0

Hello World!

This commit is contained in:
Ethan Lee
2012-02-01 00:49:44 -05:00
commit fa19d70be4
1681 changed files with 142058 additions and 0 deletions

View File

@@ -0,0 +1,376 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
FindBugs - Find bugs in Java programs
Copyright (C) 2004,2005 University of Maryland
Copyright (C) 2005, Chris Nappin
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-->
<!--
A simple XSLT stylesheet to transform FindBugs XML results
annotated with messages into HTML.
If you want to experiment with modifying this stylesheet,
or write your own, you need to generate XML output from FindBugs
using a special option which lets it know to include
human-readable messages in the XML. Invoke the findbugs script
as follows:
findbugs -textui -xml:withMessages -project myProject.fb > results.xml
Then you can use your favorite XSLT implementation to transform
the XML output into HTML. (But don't use xsltproc. It generates well-nigh
unreadable output, and generates incorrect output for the
<script> element.)
Authors:
David Hovemeyer
Chris Nappin (summary table)
-->
<xsl:stylesheet
version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
method="xml"
indent="yes"
omit-xml-declaration="yes"
standalone="yes"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
encoding="UTF-8"/>
<xsl:variable name="literalNbsp">&amp;nbsp;</xsl:variable>
<!--xsl:key name="bug-category-key" match="/BugCollection/BugInstance" use="@category"/-->
<xsl:variable name="bugTableHeader">
<tr class="tableheader">
<th align="left">Code</th>
<th align="left">Warning</th>
</tr>
</xsl:variable>
<xsl:template match="/">
<html>
<head>
<title>FindBugs Report</title>
<style type="text/css">
.tablerow0 {
background: #EEEEEE;
}
.tablerow1 {
background: white;
}
.detailrow0 {
background: #EEEEEE;
}
.detailrow1 {
background: white;
}
.tableheader {
background: #b9b9fe;
font-size: larger;
}
.tablerow0:hover, .tablerow1:hover {
background: #aaffaa;
}
.priority-1 {
color: red;
font-weight: bold;
}
.priority-2 {
color: orange;
font-weight: bold;
}
.priority-3 {
color: green;
font-weight: bold;
}
.priority-4 {
color: blue;
font-weight: bold;
}
</style>
<script type="text/javascript">
function toggleRow(elid) {
if (document.getElementById) {
element = document.getElementById(elid);
if (element) {
if (element.style.display == 'none') {
element.style.display = 'block';
//window.status = 'Toggle on!';
} else {
element.style.display = 'none';
//window.status = 'Toggle off!';
}
}
}
}
</script>
</head>
<xsl:variable name="unique-catkey" select="/BugCollection/BugCategory/@category"/>
<!--xsl:variable name="unique-catkey" select="/BugCollection/BugInstance[generate-id() = generate-id(key('bug-category-key',@category))]/@category"/-->
<body>
<h1><a href="http://findbugs.sourceforge.net">FindBugs</a> Report</h1>
<h2>Project Information</h2>
<xsl:apply-templates select="/BugCollection/Project"/>
<h2>Metrics</h2>
<xsl:apply-templates select="/BugCollection/FindBugsSummary"/>
<h2>Contents</h2>
<ul>
<xsl:for-each select="$unique-catkey">
<xsl:sort select="." order="ascending"/>
<xsl:variable name="catkey" select="."/>
<xsl:variable name="catdesc" select="/BugCollection/BugCategory[@category=$catkey]/Description"/>
<li><a href="#Warnings_{$catkey}"><xsl:value-of select="$catdesc"/> Warnings</a></li>
</xsl:for-each>
<li><a href="#Details">Details</a></li>
</ul>
<h1>Summary</h1>
<table width="500" cellpadding="5" cellspacing="2">
<tr class="tableheader">
<th align="left">Warning Type</th>
<th align="right">Number</th>
</tr>
<xsl:for-each select="$unique-catkey">
<xsl:sort select="." order="ascending"/>
<xsl:variable name="catkey" select="."/>
<xsl:variable name="catdesc" select="/BugCollection/BugCategory[@category=$catkey]/Description"/>
<xsl:variable name="styleclass">
<xsl:choose><xsl:when test="position() mod 2 = 1">tablerow0</xsl:when>
<xsl:otherwise>tablerow1</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr class="{$styleclass}">
<td><a href="#Warnings_{$catkey}"><xsl:value-of select="$catdesc"/> Warnings</a></td>
<td align="right"><xsl:value-of select="count(/BugCollection/BugInstance[(@category=$catkey) and not(@last)])"/></td>
</tr>
</xsl:for-each>
<xsl:variable name="styleclass">
<xsl:choose><xsl:when test="count($unique-catkey) mod 2 = 0">tablerow0</xsl:when>
<xsl:otherwise>tablerow1</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr class="{$styleclass}">
<td><b>Total</b></td>
<td align="right"><b><xsl:value-of select="count(/BugCollection/BugInstance[not(@last)])"/></b></td>
</tr>
</table>
<h1>Warnings</h1>
<p>Click on a warning row to see full context information.</p>
<xsl:for-each select="$unique-catkey">
<xsl:sort select="." order="ascending"/>
<xsl:variable name="catkey" select="."/>
<xsl:variable name="catdesc" select="/BugCollection/BugCategory[@category=$catkey]/Description"/>
<xsl:call-template name="generateWarningTable">
<xsl:with-param name="warningSet" select="/BugCollection/BugInstance[(@category=$catkey) and not(@last)]"/>
<xsl:with-param name="sectionTitle"><xsl:value-of select="$catdesc"/> Warnings</xsl:with-param>
<xsl:with-param name="sectionId">Warnings_<xsl:value-of select="$catkey"/></xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<h1><a name="Details">Details</a></h1>
<xsl:apply-templates select="/BugCollection/BugPattern">
<xsl:sort select="@abbrev"/>
<xsl:sort select="ShortDescription"/>
</xsl:apply-templates>
</body>
</html>
</xsl:template>
<xsl:template match="Project">
<p>Project:
<xsl:choose>
<xsl:when test='string-length(/BugCollection/Project/@projectName)>0'><xsl:value-of select="/BugCollection/Project/@projectName" /></xsl:when>
<xsl:otherwise><xsl:value-of select="/BugCollection/Project/@filename" /></xsl:otherwise>
</xsl:choose>
</p>
<p>FindBugs version: <xsl:value-of select="/BugCollection/@version"/></p>
<p>Code analyzed:</p>
<ul>
<xsl:for-each select="./Jar">
<li><xsl:value-of select="text()"/></li>
</xsl:for-each>
</ul>
<p><br/><br/></p>
</xsl:template>
<xsl:template match="BugInstance[not(@last)]">
<xsl:variable name="warningId"><xsl:value-of select="generate-id()"/></xsl:variable>
<tr class="tablerow{position() mod 2}" onclick="toggleRow('{$warningId}');">
<td>
<span><xsl:attribute name="class">priority-<xsl:value-of select="@priority"/></xsl:attribute>
<xsl:value-of select="@abbrev"/>
</span>
</td>
<td>
<xsl:value-of select="LongMessage"/>
</td>
</tr>
<!-- Add bug annotation elements: Class, Method, Field, SourceLine, Field -->
<tr class="detailrow{position() mod 2}">
<td/>
<td>
<p id="{$warningId}" style="display: none;">
<a href="#{@type}">Bug type <xsl:value-of select="@type"/> (click for details)</a>
<xsl:for-each select="./*/Message">
<br/><xsl:value-of select="text()" disable-output-escaping="no"/>
</xsl:for-each>
</p>
</td>
</tr>
</xsl:template>
<xsl:template match="BugPattern">
<h2><a name="{@type}"><xsl:value-of select="@type"/>: <xsl:value-of select="ShortDescription"/></a></h2>
<xsl:value-of select="Details" disable-output-escaping="yes"/>
</xsl:template>
<xsl:template name="generateWarningTable">
<xsl:param name="warningSet"/>
<xsl:param name="sectionTitle"/>
<xsl:param name="sectionId"/>
<h2><a name="{$sectionId}"><xsl:value-of select="$sectionTitle"/></a></h2>
<table class="warningtable" width="100%" cellspacing="0">
<xsl:copy-of select="$bugTableHeader"/>
<xsl:apply-templates select="$warningSet">
<xsl:sort select="@abbrev"/>
<xsl:sort select="Class/@classname"/>
</xsl:apply-templates>
</table>
</xsl:template>
<xsl:template match="FindBugsSummary">
<xsl:variable name="kloc" select="@total_size div 1000.0"/>
<xsl:variable name="format" select="'#######0.00'"/>
<p><xsl:value-of select="@total_size"/> lines of code analyzed,
in <xsl:value-of select="@total_classes"/> classes,
in <xsl:value-of select="@num_packages"/> packages.</p>
<table width="500" cellpadding="5" cellspacing="2">
<tr class="tableheader">
<th align="left">Metric</th>
<th align="right">Total</th>
<th align="right">Density*</th>
</tr>
<tr class="tablerow0">
<td>High Priority Warnings</td>
<td align="right"><xsl:value-of select="@priority_1"/></td>
<td align="right">
<xsl:choose>
<xsl:when test= "number($kloc) &gt; 0.0 and number(@priority_1) &gt; 0.0">
<xsl:value-of select="format-number(@priority_1 div $kloc, $format)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="format-number(0.0, $format)"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<tr class="tablerow1">
<td>Medium Priority Warnings</td>
<td align="right"><xsl:value-of select="@priority_2"/></td>
<td align="right">
<xsl:choose>
<xsl:when test= "number($kloc) &gt; 0.0 and number(@priority_2) &gt; 0.0">
<xsl:value-of select="format-number(@priority_2 div $kloc, $format)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="format-number(0.0, $format)"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<xsl:choose>
<xsl:when test="@priority_3">
<tr class="tablerow1">
<td>Low Priority Warnings</td>
<td align="right"><xsl:value-of select="@priority_3"/></td>
<td align="right">
<xsl:choose>
<xsl:when test= "number($kloc) &gt; 0.0 and number(@priority_3) &gt; 0.0">
<xsl:value-of select="format-number(@priority_3 div $kloc, $format)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="format-number(0.0, $format)"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<xsl:variable name="totalClass" select="tablerow0"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="totalClass" select="tablerow1"/>
</xsl:otherwise>
</xsl:choose>
<tr class="$totalClass">
<td><b>Total Warnings</b></td>
<td align="right"><b><xsl:value-of select="@total_bugs"/></b></td>
<xsl:choose>
<xsl:when test="number($kloc) &gt; 0.0">
<td align="right"><b><xsl:value-of select="format-number(@total_bugs div $kloc, $format)"/></b></td>
</xsl:when>
<xsl:otherwise>
<td align="right"><b><xsl:value-of select="format-number(0.0, $format)"/></b></td>
</xsl:otherwise>
</xsl:choose>
</tr>
</table>
<p><i>(* Defects per Thousand lines of non-commenting source statements)</i></p>
<p><br/><br/></p>
</xsl:template>
</xsl:stylesheet>
<!-- vim:set ts=4: -->

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,848 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (C) 2005, 2006 Etienne Giraudy, InStranet Inc
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-->
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
<xsl:output
method="xml" indent="yes"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
encoding="UTF-8"/>
<!--
Parameter for specifying HTMLized sources location; if current dir, use "./"
If not passed, no links to sources are generated.
because of back-compatibility reasons.
The source filename should be package.class.java.html
The source can have line no anchors like #11 -->
<xsl:param name="htmlsrcpath"></xsl:param>
<!--xsl:key name="lbc-category-key" match="/BugCollection/BugInstance" use="@category" /-->
<xsl:key name="lbc-code-key" match="/BugCollection/BugInstance" use="concat(@category,@abbrev)" />
<xsl:key name="lbc-bug-key" match="/BugCollection/BugInstance" use="concat(@category,@abbrev,@type)" />
<xsl:key name="lbp-class-b-t" match="/BugCollection/BugInstance" use="concat(Class/@classname,@type)" />
<xsl:template match="/" >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>
FindBugs (<xsl:value-of select="/BugCollection/@version" />)
Analysis for
<xsl:choose>
<xsl:when test='string-length(/BugCollection/Project/@projectName)>0'><xsl:value-of select="/BugCollection/Project/@projectName" /></xsl:when>
<xsl:otherwise><xsl:value-of select="/BugCollection/Project/@filename" /></xsl:otherwise>
</xsl:choose>
</title>
<script type="text/javascript">
function show(foo) {
document.getElementById(foo).style.display="block";
}
function hide(foo) {
document.getElementById(foo).style.display="none";
}
function toggle(foo) {
if( document.getElementById(foo).style.display == "none") {
show(foo);
} else {
if( document.getElementById(foo).style.display == "block") {
hide(foo);
} else {
show(foo);
}
}
}
function showmenu(foo) {
if( document.getElementById(foo).style.display == "none") {
hide("bug-summary");
document.getElementById("bug-summary-tab").className="menu-tab";
hide("analysis-data");
document.getElementById("analysis-data-tab").className="menu-tab";
//hide("list-by-b-t");
//document.getElementById("list-by-b-t-tab").className="menu-tab";
hide("list-by-package");
document.getElementById("list-by-package-tab").className="menu-tab";
hide("list-by-category");
document.getElementById("list-by-category-tab").className="menu-tab";
document.getElementById(foo+"-tab").className="menu-tab-selected";
show(foo);
}
// else menu already selected!
}
function showbug(buguid, list) {
var bugplaceholder = document.getElementById(buguid+'-ph-'+list);
var bug = document.getElementById(buguid);
if ( bugplaceholder==null) {
alert(buguid+'-ph-'+list+' - '+buguid+' - bugplaceholder==null');
return;
}
if ( bug==null) {
alert(buguid+'-ph-'+list+' - '+buguid+' - bug==null');
return;
}
var oldBug = bugplaceholder.innerHTML;
var newBug = bug.innerHTML;
//alert(oldBug);
//alert(newBug);
toggle(buguid+'-ph-'+list);
bugplaceholder.innerHTML = newBug;
}
</script>
<script type='text/javascript'><xsl:text disable-output-escaping='yes'>
/* <![CDATA[ */
// Extended Tooltip Javascript
// copyright 9th August 2002, 3rd July 2005
// by Stephen Chapman, Felgall Pty Ltd
// permission is granted to use this javascript provided that the below code is not altered
var DH = 0;var an = 0;var al = 0;var ai = 0;if (document.getElementById) {ai = 1; DH = 1;}else {if (document.all) {al = 1; DH = 1;} else { browserVersion = parseInt(navigator.appVersion); if (navigator.appName.indexOf('Netscape') != -1) if (browserVersion == 4) {an = 1; DH = 1;}}}
function fd(oi, wS) {if (ai) return wS ? document.getElementById(oi).style:document.getElementById(oi); if (al) return wS ? document.all[oi].style: document.all[oi]; if (an) return document.layers[oi];}
function pw() {return window.innerWidth != null? window.innerWidth: document.body.clientWidth != null? document.body.clientWidth:null;}
function mouseX(evt) {if (evt.pageX) return evt.pageX; else if (evt.clientX)return evt.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); else return null;}
function mouseY(evt) {if (evt.pageY) return evt.pageY; else if (evt.clientY)return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); else return null;}
function popUp(evt,oi) {if (DH) {var wp = pw(); ds = fd(oi,1); dm = fd(oi,0); st = ds.visibility; if (dm.offsetWidth) ew = dm.offsetWidth; else if (dm.clip.width) ew = dm.clip.width; if (st == "visible" || st == "show") { ds.visibility = "hidden"; } else {tv = mouseY(evt) + 20; lv = mouseX(evt) - (ew/4); if (lv < 2) lv = 2; else if (lv + ew > wp) lv -= ew/2; if (!an) {lv += 'px';tv += 'px';} ds.left = lv; ds.top = tv; ds.visibility = "visible";}}}
/* ]]> */
</xsl:text></script>
<style type='text/css'>
html, body {
background-color: #ffffff;
}
a, a:link , a:active, a:visited, a:hover {
text-decoration: none; color: black;
}
.b-r a {
text-decoration: underline; color: blue;
}
div, span {
vertical-align: top;
}
p {
margin: 0px;
}
h1 {
/*font-size: 14pt;*/
color: red;
}
#menu {
margin-bottom: 10px;
}
#menu ul {
margin-left: 0;
padding-left: 0;
display: inline;
}
#menu ul li {
margin-left: 0;
margin-bottom: 0;
padding: 2px 15px 5px;
border: 1px solid #000;
list-style: none;
display: inline;
}
#menu ul li.here {
border-bottom: 1px solid #ffc;
list-style: none;
display: inline;
}
.menu-tab {
background: white;
}
.menu-tab:hover {
background: grey;
}
.menu-tab-selected {
background: #aaaaaa;
}
#analysis-data ul {
margin-left: 15px;
}
#analyzed-files, #used-libraries, #analysis-error {
margin: 2px;
border: 1px black solid;
padding: 2px;
float: left;
overflow:auto;
}
#analyzed-files {
width: 25%;
}
#used-libraries {
width: 25%;
}
#analysis-error {
width: 40%;
}
div.summary {
width:100%;
text-align:left;
}
.summary table {
border:1px solid black;
}
.summary th {
background: #aaaaaa;
color: white;
}
.summary th, .summary td {
padding: 2px 4px 2px 4px;
}
.summary-name {
background: #eeeeee;
text-align:left;
}
.summary-size {
background: #eeeeee;
text-align:center;
}
.summary-ratio {
background: #eeeeee;
text-align:center;
}
.summary-priority-all {
background: #dddddd;
text-align:center;
}
.summary-priority-1 {
background: red;
text-align:center;
}
.summary-priority-2 {
background: orange;
text-align:center;
}
.summary-priority-3 {
background: green;
text-align:center;
}
.summary-priority-4 {
background: blue;
text-align:center;
}
.ob {
border: 1px solid black;
margin: 10px;
}
.ob-t {
border-bottom: 1px solid #000000; font-size: 12pt; font-weight: bold;
background: #cccccc; margin: 0; padding: 0 5px 0 5px;
}
.t-h {
font-weight: normal;
}
.ib-1, .ib-2 {
margin: 0 0 0 10px;
}
.ib-1-t, .ib-2-t {
border-bottom: 1px solid #000000; border-left: 1px solid #000000;
margin: 0; padding: 0 5px 0 5px;
font-size: 12pt; font-weight: bold; background: #cccccc;
}
.bb {
border-bottom: 1px solid #000000; border-left: 1px solid #000000;
}
.b-1 {
background: red; height: 0.5em; width: 1em;
margin-right: 0.5em;
}
.b-2 {
background: orange; height: 0.5em; width: 1em;
margin-right: 0.5em;
}
.b-3 {
background: green; height: 0.5em; width: 1em;
margin-right: 0.5em;
}
.b-4 {
background: blue; height: 0.5em; width: 1em;
margin-right: 0.5em;
}
.b-t {
}
.b-r {
font-size: 10pt; font-weight: bold; padding: 0 0 0 60px;
}
.b-d {
font-weight: normal; background: #eeeee0;
padding: 0 5px 0 5px; margin: 0px;
}
.bug-placeholder {
top:140px;
border:1px solid black;
display:none;
}
.tip {
border:solid 1px #666666;
width:600px;
padding:3px;
position:absolute;
z-index:100;
visibility:hidden;
color:#333333;
top:20px;
left:90px;
background-color:#ffffcc;
layer-background-color:#ffffcc;
}
</style>
</head>
<body>
<div id='content'>
<h1>
FindBugs (<xsl:value-of select="/BugCollection/@version" />)
Analysis for
<xsl:choose>
<xsl:when test='string-length(/BugCollection/Project/@projectName)>0'><xsl:value-of select="/BugCollection/Project/@projectName" /></xsl:when>
<xsl:otherwise><xsl:value-of select="/BugCollection/Project/@filename" /></xsl:otherwise>
</xsl:choose>
</h1>
<div id="menu">
<ul>
<li id='bug-summary-tab' class='menu-tab-selected'>
<xsl:attribute name="onclick">showmenu('bug-summary');return false;</xsl:attribute>
<a href='' onclick='return false;'>Bug Summary</a>
</li>
<li id='analysis-data-tab' class='menu-tab'>
<xsl:attribute name="onclick">showmenu('analysis-data');return false;</xsl:attribute>
<a href='' onclick='return false;'>Analysis Information</a>
</li>
<li id='list-by-category-tab' class='menu-tab'>
<xsl:attribute name="onclick">showmenu('list-by-category');return false;</xsl:attribute>
<a href='' onclick='return false;'>List bugs by bug category</a>
</li>
<li id='list-by-package-tab' class='menu-tab'>
<xsl:attribute name="onclick">showmenu('list-by-package');return false;</xsl:attribute>
<a href='' onclick='return false;'>List bugs by package</a>
</li>
</ul>
</div>
<xsl:call-template name="generateSummary" />
<xsl:call-template name="analysis-data" />
<xsl:call-template name="list-by-category" />
<xsl:call-template name="list-by-package" />
<!-- advanced tooltips -->
<xsl:for-each select="/BugCollection/BugPattern">
<xsl:variable name="b-t"><xsl:value-of select="@type" /></xsl:variable>
<div>
<xsl:attribute name="id">tip-<xsl:value-of select="$b-t" /></xsl:attribute>
<xsl:attribute name="class">tip</xsl:attribute>
<b><xsl:value-of select="@abbrev" /> / <xsl:value-of select="@type" /></b><br/>
<xsl:value-of select="/BugCollection/BugPattern[@type=$b-t]/Details" disable-output-escaping="yes" />
</div>
</xsl:for-each>
<!-- bug descriptions - hidden -->
<xsl:for-each select="/BugCollection/BugInstance[not(@last)]">
<div style="display:none;">
<xsl:attribute name="id">b-uid-<xsl:value-of select="@instanceHash" />-<xsl:value-of select="@instanceOccurrenceNum" /></xsl:attribute>
<xsl:for-each select="*/Message">
<xsl:choose>
<xsl:when test="parent::SourceLine and $htmlsrcpath != '' ">
<div class="b-r"><a>
<xsl:attribute name="href"><xsl:value-of select="$htmlsrcpath"/><xsl:value-of select="../@sourcepath" />.html#<xsl:value-of select="../@start" /></xsl:attribute>
<xsl:apply-templates />
</a></div>
</xsl:when>
<xsl:otherwise>
<div class="b-r"><xsl:apply-templates /></div>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<div class="b-d">
<xsl:value-of select="LongMessage" disable-output-escaping="no" />
</div>
</div>
</xsl:for-each>
</div>
<div id='fixedbox'>
<div id='bug-placeholder'></div>
</div>
</body>
</html>
</xsl:template>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- generate summary report from stats -->
<xsl:template name="generateSummary" >
<div class='summary' id='bug-summary'>
<h2>FindBugs Analysis generated at: <xsl:value-of select="/BugCollection/FindBugsSummary/@timestamp" /></h2>
<table>
<tr>
<th>Package</th>
<th>Code Size</th>
<th>Bugs</th>
<th>High Prio Bugs</th>
<th>Medium Prio Bugs</th>
<th>Low Prio Bugs</th>
<th>Exp. Bugs</th>
<th>Ratio</th>
</tr>
<tr>
<td class='summary-name'>
Overall
(<xsl:value-of select="/BugCollection/FindBugsSummary/@num_packages" /> packages),
(<xsl:value-of select="/BugCollection/FindBugsSummary/@total_classes" /> classes)
</td>
<td class='summary-size'><xsl:value-of select="/BugCollection/FindBugsSummary/@total_size" /></td>
<td class='summary-priority-all'><xsl:value-of select="/BugCollection/FindBugsSummary/@total_bugs" /></td>
<td class='summary-priority-1'><xsl:value-of select="/BugCollection/FindBugsSummary/@priority_1" /></td>
<td class='summary-priority-2'><xsl:value-of select="/BugCollection/FindBugsSummary/@priority_2" /></td>
<td class='summary-priority-3'><xsl:value-of select="/BugCollection/FindBugsSummary/@priority_3" /></td>
<td class='summary-priority-4'><xsl:value-of select="/BugCollection/FindBugsSummary/@priority_4" /></td>
<td class='summary-ratio'></td>
</tr>
<xsl:for-each select="/BugCollection/FindBugsSummary/PackageStats">
<xsl:sort select="@package" />
<xsl:if test="@total_bugs!='0'" >
<tr>
<td class='summary-name'><xsl:value-of select="@package" /></td>
<td class='summary-size'><xsl:value-of select="@total_size" /></td>
<td class='summary-priority-all'><xsl:value-of select="@total_bugs" /></td>
<td class='summary-priority-1'><xsl:value-of select="@priority_1" /></td>
<td class='summary-priority-2'><xsl:value-of select="@priority_2" /></td>
<td class='summary-priority-3'><xsl:value-of select="@priority_3" /></td>
<td class='summary-priority-4'><xsl:value-of select="@priority_4" /></td>
<td class='summary-ratio'></td>
<!--
<xsl:for-each select="ClassStats">
<xsl:if test="@bugs!='0'" >
<li>
<xsl:value-of select="@class" /> - total: <xsl:value-of select="@bugs" />
</li>
</xsl:if>
</xsl:for-each>
-->
</tr>
</xsl:if>
</xsl:for-each>
</table>
</div>
</xsl:template>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- display analysis info -->
<xsl:template name="analysis-data">
<div id='analysis-data' style='display:none;'>
<div id='analyzed-files'>
<h3>Analyzed Files:</h3>
<ul>
<xsl:for-each select="/BugCollection/Project/Jar">
<li><xsl:apply-templates /></li>
</xsl:for-each>
</ul>
</div>
<div id='used-libraries'>
<h3>Used Libraries:</h3>
<ul>
<xsl:for-each select="/BugCollection/Project/AuxClasspathEntry">
<li><xsl:apply-templates /></li>
</xsl:for-each>
<xsl:if test="count(/BugCollection/Project/AuxClasspathEntry)=0" >
<li>None</li>
</xsl:if>
</ul>
</div>
<div id='analysis-error'>
<h3>Analysis Errors:</h3>
<ul>
<xsl:variable name="error-count"
select="count(/BugCollection/Errors/MissingClass)" />
<xsl:if test="$error-count=0" >
<li>None</li>
</xsl:if>
<xsl:if test="$error-count>0" >
<li>Missing ref classes for analysis:
<ul>
<xsl:for-each select="/BugCollection/Errors/MissingClass">
<li><xsl:apply-templates /></li>
</xsl:for-each>
</ul>
</li>
</xsl:if>
</ul>
</div>
</div>
</xsl:template>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- show priorities helper -->
<xsl:template name="helpPriorities">
<span>
<xsl:attribute name="class">b-1</xsl:attribute>
<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;</xsl:text>
</span> High Prio
<span>
<xsl:attribute name="class">b-2</xsl:attribute>
<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;</xsl:text>
</span> Medium Prio
<span>
<xsl:attribute name="class">b-3</xsl:attribute>
<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;</xsl:text>
</span> Low Prio
<span>
<xsl:attribute name="class">b-4</xsl:attribute>
<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;</xsl:text>
</span> Exp.
</xsl:template>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- display the details of a bug -->
<xsl:template name="display-bug" >
<xsl:param name="b-t" select="''" />
<xsl:param name="bug-id" select="''" />
<xsl:param name="which-list" select="''" />
<div class="bb">
<a>
<xsl:attribute name="href"></xsl:attribute>
<xsl:attribute name="onclick">showbug('b-uid-<xsl:value-of select="@instanceHash" />-<xsl:value-of select="@instanceOccurrenceNum" />','<xsl:value-of select="$which-list" />');return false;</xsl:attribute>
<span>
<xsl:attribute name="class">b-<xsl:value-of select="@priority"/></xsl:attribute>
<xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;</xsl:text>
</span>
<span class="b-t"><xsl:value-of select="@abbrev" />: </span> <xsl:value-of select="Class/Message" />
</a>
<div style="display:none;">
<xsl:attribute name="id">b-uid-<xsl:value-of select="@instanceHash" />-<xsl:value-of select="@instanceOccurrenceNum" />-ph-<xsl:value-of select="$which-list" /></xsl:attribute>
loading...
</div>
</div>
</xsl:template>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- main template for the list by category -->
<xsl:template name="list-by-category" >
<div id='list-by-category' class='data-box' style='display:none;'>
<xsl:call-template name="helpPriorities" />
<xsl:variable name="unique-category" select="/BugCollection/BugCategory/@category"/>
<xsl:for-each select="$unique-category">
<xsl:sort select="." order="ascending" />
<xsl:call-template name="categories">
<xsl:with-param name="category" select="." />
</xsl:call-template>
</xsl:for-each>
</div>
</xsl:template>
<xsl:template name="categories" >
<xsl:param name="category" select="''" />
<xsl:variable name="category-count"
select="count(/BugCollection/BugInstance[@category=$category and not(@last)])" />
<xsl:variable name="category-count-p1"
select="count(/BugCollection/BugInstance[@category=$category and @priority='1' and not(@last)])" />
<xsl:variable name="category-count-p2"
select="count(/BugCollection/BugInstance[@category=$category and @priority='2' and not(@last)])" />
<xsl:variable name="category-count-p3"
select="count(/BugCollection/BugInstance[@category=$category and @priority='3' and not(@last)])" />
<xsl:variable name="category-count-p4"
select="count(/BugCollection/BugInstance[@category=$category and @priority='4' and not(@last)])" />
<div class='ob'>
<div class='ob-t'>
<a>
<xsl:attribute name="href"></xsl:attribute>
<xsl:attribute name="onclick">toggle('category-<xsl:value-of select="$category" />');return false;</xsl:attribute>
<xsl:value-of select="/BugCollection/BugCategory[@category=$category]/Description" />
(<xsl:value-of select="$category-count" />:
<span class='t-h'><xsl:value-of select="$category-count-p1" />/<xsl:value-of select="$category-count-p2" />/<xsl:value-of select="$category-count-p3" />/<xsl:value-of select="$category-count-p4" /></span>)
</a>
</div>
<div style="display:none;">
<xsl:attribute name="id">category-<xsl:value-of select="$category" /></xsl:attribute>
<xsl:call-template name="list-by-category-and-code">
<xsl:with-param name="category" select="$category" />
</xsl:call-template>
</div>
</div>
</xsl:template>
<xsl:template name="list-by-category-and-code" >
<xsl:param name="category" select="''" />
<xsl:variable name="unique-code" select="/BugCollection/BugInstance[@category=$category and not(@last) and generate-id()= generate-id(key('lbc-code-key',concat(@category,@abbrev)))]/@abbrev" />
<xsl:for-each select="$unique-code">
<xsl:sort select="." order="ascending" />
<xsl:call-template name="codes">
<xsl:with-param name="category" select="$category" />
<xsl:with-param name="code" select="." />
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<xsl:template name="codes" >
<xsl:param name="category" select="''" />
<xsl:param name="code" select="''" />
<xsl:variable name="code-count"
select="count(/BugCollection/BugInstance[@category=$category and @abbrev=$code and not(@last)])" />
<xsl:variable name="code-count-p1"
select="count(/BugCollection/BugInstance[@category=$category and @abbrev=$code and @priority='1' and not(@last)])" />
<xsl:variable name="code-count-p2"
select="count(/BugCollection/BugInstance[@category=$category and @abbrev=$code and @priority='2' and not(@last)])" />
<xsl:variable name="code-count-p3"
select="count(/BugCollection/BugInstance[@category=$category and @abbrev=$code and @priority='3' and not(@last)])" />
<xsl:variable name="code-count-p4"
select="count(/BugCollection/BugInstance[@category=$category and @abbrev=$code and @priority='4' and not(@last)])" />
<div class='ib-1'>
<div class="ib-1-t">
<a>
<xsl:attribute name="href"></xsl:attribute>
<xsl:attribute name="onclick">toggle('category-<xsl:value-of select="$category" />-and-code-<xsl:value-of select="$code" />');return false;</xsl:attribute>
<xsl:value-of select="$code" />: <xsl:value-of select="/BugCollection/BugCode[@abbrev=$code]/Description" />
(<xsl:value-of select="$code-count" />:
<span class='t-h'><xsl:value-of select="$code-count-p1" />/<xsl:value-of select="$code-count-p2" />/<xsl:value-of select="$code-count-p3" />/<xsl:value-of select="$code-count-p4" /></span>)
</a>
</div>
<div style="display:none;">
<xsl:attribute name="id">category-<xsl:value-of select="$category" />-and-code-<xsl:value-of select="$code" /></xsl:attribute>
<xsl:call-template name="list-by-category-and-code-and-bug">
<xsl:with-param name="category" select="$category" />
<xsl:with-param name="code" select="$code" />
</xsl:call-template>
</div>
</div>
</xsl:template>
<xsl:template name="list-by-category-and-code-and-bug" >
<xsl:param name="category" select="''" />
<xsl:param name="code" select="''" />
<xsl:variable name="unique-bug" select="/BugCollection/BugInstance[@category=$category and not(@last) and @abbrev=$code and generate-id()= generate-id(key('lbc-bug-key',concat(@category,@abbrev,@type)))]/@type" />
<xsl:for-each select="$unique-bug">
<xsl:sort select="." order="ascending" />
<xsl:call-template name="bugs">
<xsl:with-param name="category" select="$category" />
<xsl:with-param name="code" select="$code" />
<xsl:with-param name="bug" select="." />
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<xsl:template name="bugs" >
<xsl:param name="category" select="''" />
<xsl:param name="code" select="''" />
<xsl:param name="bug" select="''" />
<xsl:variable name="bug-count"
select="count(/BugCollection/BugInstance[@category=$category and @abbrev=$code and @type=$bug and not(@last)])" />
<xsl:variable name="bug-count-p1"
select="count(/BugCollection/BugInstance[@category=$category and @abbrev=$code and @type=$bug and @priority='1' and not(@last)])" />
<xsl:variable name="bug-count-p2"
select="count(/BugCollection/BugInstance[@category=$category and @abbrev=$code and @type=$bug and @priority='2' and not(@last)])" />
<xsl:variable name="bug-count-p3"
select="count(/BugCollection/BugInstance[@category=$category and @abbrev=$code and @type=$bug and @priority='3' and not(@last)])" />
<xsl:variable name="bug-count-p4"
select="count(/BugCollection/BugInstance[@category=$category and @abbrev=$code and @type=$bug and @priority='4' and not(@last)])" />
<div class='ib-2'>
<div class='ib-2-t'>
<a>
<xsl:attribute name="href"></xsl:attribute>
<xsl:attribute name="onclick">toggle('category-<xsl:value-of select="$category" />-and-code-<xsl:value-of select="$code" />-and-bug-<xsl:value-of select="$bug" />');return false;</xsl:attribute>
<xsl:attribute name="onmouseout">popUp(event,'tip-<xsl:value-of select="$bug" />');</xsl:attribute>
<xsl:attribute name="onmouseover">popUp(event,'tip-<xsl:value-of select="$bug" />');</xsl:attribute>
<xsl:value-of select="/BugCollection/BugPattern[@category=$category and @abbrev=$code and @type=$bug]/ShortDescription" /><xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;</xsl:text>
(<xsl:value-of select="$bug-count" />:
<span class='t-h'><xsl:value-of select="$bug-count-p1" />/<xsl:value-of select="$bug-count-p2" />/<xsl:value-of select="$bug-count-p3" />/<xsl:value-of select="$bug-count-p4" /></span>)
</a>
</div>
<div style="display:none;">
<xsl:attribute name="id">category-<xsl:value-of select="$category" />-and-code-<xsl:value-of select="$code" />-and-bug-<xsl:value-of select="$bug" /></xsl:attribute>
<xsl:variable name="cat-code-type">category-<xsl:value-of select="$category" />-and-code-<xsl:value-of select="$code" />-and-bug-<xsl:value-of select="$bug" /></xsl:variable>
<xsl:variable name="bug-id">b-uid-<xsl:value-of select="@instanceHash" />-<xsl:value-of select="@instanceOccurrenceNum" /></xsl:variable>
<xsl:for-each select="/BugCollection/BugInstance[@category=$category and @abbrev=$code and @type=$bug and not(@last)]">
<xsl:call-template name="display-bug">
<xsl:with-param name="b-t" select="@type" />
<xsl:with-param name="bug-id" select="$bug-id" />
<xsl:with-param name="which-list" select="'c'" />
</xsl:call-template>
</xsl:for-each>
</div>
</div>
</xsl:template>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- main template for the list by package -->
<xsl:template name="list-by-package" >
<div id='list-by-package' class='data-box' style='display:none;'>
<xsl:call-template name="helpPriorities" />
<xsl:for-each select="/BugCollection/FindBugsSummary/PackageStats[@total_bugs != '0']/@package">
<xsl:sort select="." order="ascending" />
<xsl:call-template name="packages">
<xsl:with-param name="package" select="." />
</xsl:call-template>
</xsl:for-each>
</div>
</xsl:template>
<xsl:template name="packages" >
<xsl:param name="package" select="''" />
<xsl:variable name="package-count-p1">
<xsl:if test="not(/BugCollection/FindBugsSummary/PackageStats[@package=$package]/@priority_1 != '')">0</xsl:if>
<xsl:if test="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/@priority_1 != ''">
<xsl:value-of select="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/@priority_1" />
</xsl:if>
</xsl:variable>
<xsl:variable name="package-count-p2">
<xsl:if test="not(/BugCollection/FindBugsSummary/PackageStats[@package=$package]/@priority_2 != '')">0</xsl:if>
<xsl:if test="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/@priority_2 != ''">
<xsl:value-of select="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/@priority_2" />
</xsl:if>
</xsl:variable>
<xsl:variable name="package-count-p3">
<xsl:if test="not(/BugCollection/FindBugsSummary/PackageStats[@package=$package]/@priority_3 != '')">0</xsl:if>
<xsl:if test="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/@priority_3 != ''">
<xsl:value-of select="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/@priority_3" />
</xsl:if>
</xsl:variable>
<xsl:variable name="package-count-p4">
<xsl:if test="not(/BugCollection/FindBugsSummary/PackageStats[@package=$package]/@priority_4 != '')">0</xsl:if>
<xsl:if test="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/@priority_4 != ''">
<xsl:value-of select="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/@priority_4" />
</xsl:if>
</xsl:variable>
<div class='ob'>
<div class='ob-t'>
<a>
<xsl:attribute name="href"></xsl:attribute>
<xsl:attribute name="onclick">toggle('package-<xsl:value-of select="$package" />');return false;</xsl:attribute>
<xsl:value-of select="$package" />
(<xsl:value-of select="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/@total_bugs" />:
<span class='t-h'><xsl:value-of select="$package-count-p1" />/<xsl:value-of select="$package-count-p2" />/<xsl:value-of select="$package-count-p3" />/<xsl:value-of select="$package-count-p4" /></span>)
</a>
</div>
<div style="display:none;">
<xsl:attribute name="id">package-<xsl:value-of select="$package" /></xsl:attribute>
<xsl:call-template name="list-by-package-and-class">
<xsl:with-param name="package" select="$package" />
</xsl:call-template>
</div>
</div>
</xsl:template>
<xsl:template name="list-by-package-and-class" >
<xsl:param name="package" select="''" />
<xsl:for-each select="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/ClassStats[@bugs != '0']/@class">
<xsl:sort select="." order="ascending" />
<xsl:call-template name="classes">
<xsl:with-param name="package" select="$package" />
<xsl:with-param name="class" select="." />
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<xsl:template name="classes" >
<xsl:param name="package" select="''" />
<xsl:param name="class" select="''" />
<xsl:variable name="class-count"
select="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/ClassStats[@class=$class and @bugs != '0']/@bugs" />
<xsl:variable name="class-count-p1">
<xsl:if test="not(/BugCollection/FindBugsSummary/PackageStats[@package=$package]/ClassStats[@class=$class and @bugs != '0']/@priority_1 != '')">0</xsl:if>
<xsl:if test="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/ClassStats[@class=$class and @bugs != '0']/@priority_1 != ''">
<xsl:value-of select="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/ClassStats[@class=$class and @bugs != '0']/@priority_1" />
</xsl:if>
</xsl:variable>
<xsl:variable name="class-count-p2">
<xsl:if test="not(/BugCollection/FindBugsSummary/PackageStats[@package=$package]/ClassStats[@class=$class and @bugs != '0']/@priority_2 != '')">0</xsl:if>
<xsl:if test="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/ClassStats[@class=$class and @bugs != '0']/@priority_2 != ''">
<xsl:value-of select="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/ClassStats[@class=$class and @bugs != '0']/@priority_2" />
</xsl:if>
</xsl:variable>
<xsl:variable name="class-count-p3">
<xsl:if test="not(/BugCollection/FindBugsSummary/PackageStats[@package=$package]/ClassStats[@class=$class and @bugs != '0']/@priority_3 != '')">0</xsl:if>
<xsl:if test="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/ClassStats[@class=$class and @bugs != '0']/@priority_3 != ''">
<xsl:value-of select="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/ClassStats[@class=$class and @bugs != '0']/@priority_3" />
</xsl:if>
</xsl:variable>
<xsl:variable name="class-count-p4">
<xsl:if test="not(/BugCollection/FindBugsSummary/PackageStats[@package=$package]/ClassStats[@class=$class and @bugs != '0']/@priority_4 != '')">0</xsl:if>
<xsl:if test="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/ClassStats[@class=$class and @bugs != '0']/@priority_4 != ''">
<xsl:value-of select="/BugCollection/FindBugsSummary/PackageStats[@package=$package]/ClassStats[@class=$class and @bugs != '0']/@priority_4" />
</xsl:if>
</xsl:variable>
<div class='ib-1'>
<div class="ib-1-t">
<a>
<xsl:attribute name="href"></xsl:attribute>
<xsl:attribute name="onclick">toggle('package-<xsl:value-of select="$package" />-and-class-<xsl:value-of select="$class" />');return false;</xsl:attribute>
<xsl:value-of select="$class" /> (<xsl:value-of select="$class-count" />:
<span class='t-h'><xsl:value-of select="$class-count-p1" />/<xsl:value-of select="$class-count-p2" />/<xsl:value-of select="$class-count-p3" />/<xsl:value-of select="$class-count-p4" /></span>)
</a>
</div>
<div style="display:none;">
<xsl:attribute name="id">package-<xsl:value-of select="$package" />-and-class-<xsl:value-of select="$class" /></xsl:attribute>
<xsl:call-template name="list-by-package-and-class-and-bug">
<xsl:with-param name="package" select="$package" />
<xsl:with-param name="class" select="$class" />
</xsl:call-template>
</div>
</div>
</xsl:template>
<xsl:template name="list-by-package-and-class-and-bug" >
<xsl:param name="package" select="''" />
<xsl:param name="class" select="''" />
<xsl:variable name="unique-class-bugs" select="/BugCollection/BugInstance[not(@last) and Class[position()=1 and @classname=$class] and generate-id() = generate-id(key('lbp-class-b-t',concat(Class/@classname,@type)))]/@type" />
<xsl:for-each select="$unique-class-bugs">
<xsl:sort select="." order="ascending" />
<xsl:call-template name="class-bugs">
<xsl:with-param name="package" select="$package" />
<xsl:with-param name="class" select="$class" />
<xsl:with-param name="type" select="." />
</xsl:call-template>
</xsl:for-each>
</xsl:template>
<xsl:template name="class-bugs" >
<xsl:param name="package" select="''" />
<xsl:param name="class" select="''" />
<xsl:param name="type" select="''" />
<xsl:variable name="bug-count"
select="count(/BugCollection/BugInstance[@type=$type and not(@last) and Class[position()=1 and @classname=$class]])" />
<div class='ib-2'>
<div class='ib-2-t'>
<a>
<xsl:attribute name="href"></xsl:attribute>
<xsl:attribute name="onclick">toggle('package-<xsl:value-of select="$package" />-and-class-<xsl:value-of select="$class" />-and-type-<xsl:value-of select="$type" />');return false;</xsl:attribute>
<xsl:attribute name="onmouseout">popUp(event,'tip-<xsl:value-of select="$type" />')</xsl:attribute>
<xsl:attribute name="onmouseover">popUp(event,'tip-<xsl:value-of select="$type" />')</xsl:attribute>
<xsl:value-of select="/BugCollection/BugPattern[@type=$type]/ShortDescription" /><xsl:text disable-output-escaping="yes">&amp;nbsp;&amp;nbsp;</xsl:text>
(<xsl:value-of select="$bug-count" />)
</a>
</div>
<div style="display:none;">
<xsl:attribute name="id">package-<xsl:value-of select="$package" />-and-class-<xsl:value-of select="$class" />-and-type-<xsl:value-of select="$type" /></xsl:attribute>
<xsl:variable name="package-class-type">package-<xsl:value-of select="$package" />-and-class-<xsl:value-of select="$class" />-and-type-<xsl:value-of select="$type" /></xsl:variable>
<xsl:variable name="bug-id">b-uid-<xsl:value-of select="@instanceHash" />-<xsl:value-of select="@instanceOccurrenceNum" /></xsl:variable>
<xsl:for-each select="/BugCollection/BugInstance[@type=$type and not(@last) and Class[position()=1 and @classname=$class]]">
<xsl:call-template name="display-bug">
<xsl:with-param name="b-t" select="@type" />
<xsl:with-param name="bug-id" select="$bug-id" />
<xsl:with-param name="which-list" select="'p'" />
</xsl:call-template>
</xsl:for-each>
</div>
</div>
</xsl:template>
</xsl:transform>

View File

@@ -0,0 +1,306 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
FindBugs - Find bugs in Java programs
Copyright (C) 2004,2005 University of Maryland
Copyright (C) 2005, Chris Nappin
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-->
<xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
method="xml"
omit-xml-declaration="yes"
standalone="yes"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
indent="yes"
encoding="UTF-8"/>
<xsl:variable name="bugTableHeader">
<tr class="tableheader">
<th align="left">Warning</th>
<th align="left">Priority</th>
<th align="left">Details</th>
</tr>
</xsl:variable>
<xsl:template match="/">
<html>
<head>
<title>FindBugs Report</title>
<style type="text/css">
.tablerow0 {
background: #EEEEEE;
}
.tablerow1 {
background: white;
}
.detailrow0 {
background: #EEEEEE;
}
.detailrow1 {
background: white;
}
.tableheader {
background: #b9b9fe;
font-size: larger;
}
</style>
</head>
<xsl:variable name="unique-catkey" select="/BugCollection/BugCategory/@category"/>
<body>
<h1>FindBugs Report</h1>
<p>Produced using <a href="http://findbugs.sourceforge.net">FindBugs</a> <xsl:value-of select="/BugCollection/@version"/>.</p>
<p>Project:
<xsl:choose>
<xsl:when test='string-length(/BugCollection/Project/@projectName)>0'><xsl:value-of select="/BugCollection/Project/@projectName" /></xsl:when>
<xsl:otherwise><xsl:value-of select="/BugCollection/Project/@filename" /></xsl:otherwise>
</xsl:choose>
</p>
<h2>Metrics</h2>
<xsl:apply-templates select="/BugCollection/FindBugsSummary"/>
<h2>Summary</h2>
<table width="500" cellpadding="5" cellspacing="2">
<tr class="tableheader">
<th align="left">Warning Type</th>
<th align="right">Number</th>
</tr>
<xsl:for-each select="$unique-catkey">
<xsl:sort select="." order="ascending"/>
<xsl:variable name="catkey" select="."/>
<xsl:variable name="catdesc" select="/BugCollection/BugCategory[@category=$catkey]/Description"/>
<xsl:variable name="styleclass">
<xsl:choose><xsl:when test="position() mod 2 = 1">tablerow0</xsl:when>
<xsl:otherwise>tablerow1</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr class="{$styleclass}">
<td><a href="#Warnings_{$catkey}"><xsl:value-of select="$catdesc"/> Warnings</a></td>
<td align="right"><xsl:value-of select="count(/BugCollection/BugInstance[(@category=$catkey) and (not(@last))])"/></td>
</tr>
</xsl:for-each>
<xsl:variable name="styleclass">
<xsl:choose><xsl:when test="count($unique-catkey) mod 2 = 0">tablerow0</xsl:when>
<xsl:otherwise>tablerow1</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr class="{$styleclass}">
<td><b>Total</b></td>
<td align="right"><b><xsl:value-of select="count(/BugCollection/BugInstance[not(@last)])"/></b></td>
</tr>
</table>
<p><br/><br/></p>
<h1>Warnings</h1>
<p>Click on each warning link to see a full description of the issue, and
details of how to resolve it.</p>
<xsl:for-each select="$unique-catkey">
<xsl:sort select="." order="ascending"/>
<xsl:variable name="catkey" select="."/>
<xsl:variable name="catdesc" select="/BugCollection/BugCategory[@category=$catkey]/Description"/>
<xsl:call-template name="generateWarningTable">
<xsl:with-param name="warningSet" select="/BugCollection/BugInstance[(@category=$catkey) and (not(@last))]"/>
<xsl:with-param name="sectionTitle"><xsl:value-of select="$catdesc"/> Warnings</xsl:with-param>
<xsl:with-param name="sectionId">Warnings_<xsl:value-of select="$catkey"/></xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<p><br/><br/></p>
<h1><a name="Details">Warning Types</a></h1>
<xsl:apply-templates select="/BugCollection/BugPattern">
<xsl:sort select="@abbrev"/>
<xsl:sort select="ShortDescription"/>
</xsl:apply-templates>
</body>
</html>
</xsl:template>
<xsl:template match="BugInstance[not(@last)]">
<xsl:variable name="warningId"><xsl:value-of select="generate-id()"/></xsl:variable>
<tr class="tablerow{position() mod 2}">
<td width="20%" valign="top">
<a href="#{@type}"><xsl:value-of select="ShortMessage"/></a>
</td>
<td width="10%" valign="top">
<xsl:choose>
<xsl:when test="@priority = 1">High</xsl:when>
<xsl:when test="@priority = 2">Medium</xsl:when>
<xsl:when test="@priority = 3">Low</xsl:when>
<xsl:otherwise>Unknown</xsl:otherwise>
</xsl:choose>
</td>
<td width="70%">
<p><xsl:value-of select="LongMessage"/><br/><br/>
<!-- add source filename and line number(s), if any -->
<xsl:if test="SourceLine">
<br/>In file <xsl:value-of select="SourceLine/@sourcefile"/>,
<xsl:choose>
<xsl:when test="SourceLine/@start = SourceLine/@end">
line <xsl:value-of select="SourceLine/@start"/>
</xsl:when>
<xsl:otherwise>
lines <xsl:value-of select="SourceLine/@start"/>
to <xsl:value-of select="SourceLine/@end"/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:for-each select="./*/Message">
<br/><xsl:value-of select="text()"/>
</xsl:for-each>
</p>
</td>
</tr>
</xsl:template>
<xsl:template match="BugPattern">
<h2><a name="{@type}"><xsl:value-of select="ShortDescription"/></a></h2>
<xsl:value-of select="Details" disable-output-escaping="yes"/>
<p><br/><br/></p>
</xsl:template>
<xsl:template name="generateWarningTable">
<xsl:param name="warningSet"/>
<xsl:param name="sectionTitle"/>
<xsl:param name="sectionId"/>
<h2><a name="{$sectionId}"><xsl:value-of select="$sectionTitle"/></a></h2>
<table class="warningtable" width="100%" cellspacing="2" cellpadding="5">
<xsl:copy-of select="$bugTableHeader"/>
<xsl:choose>
<xsl:when test="count($warningSet) &gt; 0">
<xsl:apply-templates select="$warningSet">
<xsl:sort select="@priority"/>
<xsl:sort select="@abbrev"/>
<xsl:sort select="Class/@classname"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<tr><td colspan="2"><p><i>None</i></p></td></tr>
</xsl:otherwise>
</xsl:choose>
</table>
<p><br/><br/></p>
</xsl:template>
<xsl:template match="FindBugsSummary">
<xsl:variable name="kloc" select="@total_size div 1000.0"/>
<xsl:variable name="format" select="'#######0.00'"/>
<p><xsl:value-of select="@total_size"/> lines of code analyzed,
in <xsl:value-of select="@total_classes"/> classes,
in <xsl:value-of select="@num_packages"/> packages.</p>
<table width="500" cellpadding="5" cellspacing="2">
<tr class="tableheader">
<th align="left">Metric</th>
<th align="right">Total</th>
<th align="right">Density*</th>
</tr>
<tr class="tablerow0">
<td>High Priority Warnings</td>
<td align="right"><xsl:value-of select="@priority_1"/></td>
<td align="right">
<xsl:choose>
<xsl:when test= "number($kloc) &gt; 0.0">
<xsl:value-of select="format-number(@priority_1 div $kloc, $format)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="format-number(0.0, $format)"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<tr class="tablerow1">
<td>Medium Priority Warnings</td>
<td align="right"><xsl:value-of select="@priority_2"/></td>
<td align="right">
<xsl:choose>
<xsl:when test= "number($kloc) &gt; 0.0">
<xsl:value-of select="format-number(@priority_2 div $kloc, $format)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="format-number(0.0, $format)"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<xsl:choose>
<xsl:when test="@priority_3">
<tr class="tablerow1">
<td>Low Priority Warnings</td>
<td align="right"><xsl:value-of select="@priority_3"/></td>
<td align="right">
<xsl:choose>
<xsl:when test= "number($kloc) &gt; 0.0">
<xsl:value-of select="format-number(@priority_3 div $kloc, $format)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="format-number(0.0, $format)"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<xsl:variable name="totalClass" select="tablerow0"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="totalClass" select="tablerow1"/>
</xsl:otherwise>
</xsl:choose>
<tr class="$totalClass">
<td><b>Total Warnings</b></td>
<td align="right"><b><xsl:value-of select="@total_bugs"/></b></td>
<td align="right">
<b>
<xsl:choose>
<xsl:when test= "number($kloc) &gt; 0.0">
<xsl:value-of select="format-number(@total_bugs div $kloc, $format)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="format-number(0.0, $format)"/>
</xsl:otherwise>
</xsl:choose>
</b>
</td>
</tr>
</table>
<p><i>(* Defects per Thousand lines of non-commenting source statements)</i></p>
<p><br/><br/></p>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,252 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" >
<xsl:output
method="xml" indent="yes"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
encoding="UTF-8"/>
<xsl:param name="PAGE.TITLE" select="'Findbugs Summary Statistics'" />
<xsl:param name="PAGE.FONT" select="'Arial'" />
<xsl:param name="SUMMARY.HEADER" select="'Findbugs Summary Report'" />
<xsl:param name="SUMMARY.LABEL" select="'Summary Analysis Generated at: '" />
<xsl:param name="PACKAGE.HEADER" select="'Bugs By Package'" />
<xsl:param name="PACKAGE.SORT.LABEL" select="'Sorted by Total Bugs'" />
<xsl:param name="PACKAGE.LABEL" select="'Analysis of Package: '" />
<xsl:param name="DEFAULT.PACKAGE.NAME" select="'default package'" />
<xsl:param name="PACKAGE.BUGCLASS.LABEL" select="'Most Buggy Class in Package with #1 $1:'" />
<xsl:param name="TOTAL.PACKAGES.LABEL" select="'#1 $1 Analyzed'" />
<xsl:param name="BUGS.SINGLE.LABEL" select="'Bug'" />
<xsl:param name="BUGS.PULURAL.LABEL" select="'Bugs'" />
<xsl:param name="PACKAGE.SINGLE.LABEL" select="'Package'" />
<xsl:param name="PACKAGE.PULURAL.LABEL" select="'Packages'" />
<xsl:param name="TABLE.HEADING.TYPE" select="'Type Checked'" />
<xsl:param name="TABLE.HEADING.COUNT" select="'Count'" />
<xsl:param name="TABLE.HEADING.BUGS" select="'Bugs'" />
<xsl:param name="TABLE.HEADING.PERCENT" select="'Percentage'" />
<xsl:param name="TABLE.ROW.OUTER" select="'Outer Classes'" />
<xsl:param name="TABLE.ROW.INNER" select="'Inner Classes'" />
<xsl:param name="TABLE.ROW.INTERFACE" select="'Interfaces'" />
<xsl:param name="TABLE.ROW.TOTAL" select="'Total'" />
<xsl:param name="TABLE.WIDTH" select="'90%'" />
<xsl:param name="PERCENTAGE.FORMAT" select="'#0.00%'" />
<!-- This template drives the rest of the output -->
<xsl:template match="/" >
<html>
<!-- JEditorPane gets really angry if it sees this
WWP: Sorry, this needs to be explained better. Not a valid HTML document without a head.
-->
<head><title><xsl:value-of select="$PAGE.TITLE" /></title></head>
<body>
<h1 align="center"><a href="http://findbugs.sourceforge.net"><xsl:value-of select="$SUMMARY.HEADER" /></a></h1>
<h2 align="center"> Analysis for
<xsl:choose>
<xsl:when test='string-length(/BugCollection/Project/@projectName)>0'>
<xsl:value-of select="/BugCollection/Project/@projectName" /></xsl:when>
<xsl:otherwise><xsl:value-of select="/BugCollection/Project/@filename" /></xsl:otherwise>
</xsl:choose>
</h2>
<h2 align="center"><xsl:value-of select="$SUMMARY.LABEL" />
<i><xsl:value-of select="//FindBugsSummary/@timestamp" /></i></h2>
<xsl:apply-templates select="//FindBugsSummary" />
<br/>
<p align="center">
<font face="{$PAGE.FONT}" size="6"><xsl:value-of select="$PACKAGE.HEADER" /></font>
<br/><font face="{$PAGE.FONT}" size="4"><i>(<xsl:value-of select="$PACKAGE.SORT.LABEL"/>)</i></font>
</p>
<xsl:for-each select="//FindBugsSummary/PackageStats">
<xsl:sort select="@total_bugs" data-type="number" order="descending" />
<xsl:apply-templates select="." />
</xsl:for-each>
</body>
</html>
</xsl:template>
<xsl:template name="status_table_row" >
<xsl:param name="LABEL" select="''" />
<xsl:param name="COUNT" select="1" />
<xsl:param name="BUGS" select="0" />
<xsl:param name="FONT_SIZE" select="4" />
<tr>
<td align="left"><font face="{$PAGE.FONT}" size="{$FONT_SIZE}"><xsl:value-of select="$LABEL" /></font></td>
<td align="center"><font face="{$PAGE.FONT}" color="green" size="{$FONT_SIZE}"><xsl:value-of select="$COUNT" /></font></td>
<td align="center"><font face="{$PAGE.FONT}" color="red" size="{$FONT_SIZE}"><xsl:value-of select="$BUGS" /></font></td>
<td align="center"><font face="{$PAGE.FONT}" color="blue" size="{$FONT_SIZE}">
<xsl:choose>
<xsl:when test="$COUNT &gt; 0">
<xsl:value-of select="format-number(number($BUGS div $COUNT), $PERCENTAGE.FORMAT)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="format-number(0, $PERCENTAGE.FORMAT)"/>
</xsl:otherwise>
</xsl:choose>
</font>
</td>
</tr>
</xsl:template>
<xsl:template name="table_header" >
<tr>
<th><font face="{$PAGE.FONT}" size="4"><xsl:value-of select="$TABLE.HEADING.TYPE"/></font></th>
<th><font face="{$PAGE.FONT}" size="4"><xsl:value-of select="$TABLE.HEADING.COUNT"/></font></th>
<th><font face="{$PAGE.FONT}" size="4"><xsl:value-of select="$TABLE.HEADING.BUGS"/></font></th>
<th><font face="{$PAGE.FONT}" size="4"><xsl:value-of select="$TABLE.HEADING.PERCENT"/></font></th>
</tr>
</xsl:template>
<xsl:template match="FindBugsSummary" >
<table width="{$TABLE.WIDTH}" border="1" align="center">
<xsl:call-template name="table_header" />
<xsl:call-template name="status_table_row">
<xsl:with-param name="LABEL" select="$TABLE.ROW.OUTER" />
<xsl:with-param name="COUNT" select="count(PackageStats/ClassStats[@interface='false' and substring-after(@class,'$')=''])" />
<xsl:with-param name="BUGS" select="sum(PackageStats/ClassStats[@interface='false' and substring-after(@class,'$')='']/@bugs)" />
</xsl:call-template>
<xsl:call-template name="status_table_row">
<xsl:with-param name="LABEL" select="$TABLE.ROW.INNER" />
<xsl:with-param name="COUNT" select="count(PackageStats/ClassStats[@interface='false' and substring-after(@class,'$')!=''])" />
<xsl:with-param name="BUGS" select="sum(PackageStats/ClassStats[@interface='false' and substring-after(@class,'$')!='']/@bugs)" />
</xsl:call-template>
<xsl:call-template name="status_table_row">
<xsl:with-param name="LABEL" select="$TABLE.ROW.INTERFACE" />
<xsl:with-param name="COUNT" select="count(PackageStats/ClassStats[@interface='true'])" />
<xsl:with-param name="BUGS" select="sum(PackageStats/ClassStats[@interface='true']/@bugs)" />
</xsl:call-template>
<xsl:call-template name="status_table_row">
<xsl:with-param name="LABEL" select="$TABLE.ROW.TOTAL" />
<xsl:with-param name="COUNT" select="@total_classes" />
<xsl:with-param name="BUGS" select="@total_bugs"/>
<xsl:with-param name="FONT_SIZE" select="5"/>
</xsl:call-template>
<xsl:variable name="num_packages" select="count(PackageStats)" />
<tr><td align="center" colspan="4"><font face="{$PAGE.FONT}" size="4">
<xsl:call-template name='string_format'>
<xsl:with-param name="COUNT" select="$num_packages"/>
<xsl:with-param name="STRING" select="$TOTAL.PACKAGES.LABEL"/>
<xsl:with-param name="SINGLE" select="$PACKAGE.SINGLE.LABEL"/>
<xsl:with-param name="PULURAL" select="$PACKAGE.PULURAL.LABEL"/>
</xsl:call-template>
</font></td>
</tr>
</table>
</xsl:template>
<xsl:template name='string_format'>
<xsl:param name="COUNT" select="1"/>
<xsl:param name="STRING" select="''"/>
<xsl:param name="SINGLE" select="''"/>
<xsl:param name="PULURAL" select="''"/>
<xsl:variable name="count_str" select="concat(substring-before($STRING,'#1'), $COUNT, substring-after($STRING,'#1'))" />
<xsl:choose>
<xsl:when test="$COUNT &gt; 1">
<xsl:value-of select="concat(substring-before($count_str,'$1'), $PULURAL, substring-after($count_str,'$1'))" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(substring-before($count_str,'$1'), $SINGLE, substring-after($count_str,'$1'))" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="PackageStats" >
<xsl:variable name="package-name">
<xsl:choose>
<xsl:when test="@package = ''">
<xsl:value-of select="$DEFAULT.PACKAGE.NAME"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@package"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="package-prefix">
<xsl:choose>
<xsl:when test="@package = ''">
<xsl:text></xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(@package,'.')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<h2 align="center"><xsl:value-of select="$PACKAGE.LABEL"/><i><font color='green'><xsl:value-of select="$package-name" /></font></i></h2>
<table width="{$TABLE.WIDTH}" border="1" align="center">
<xsl:call-template name="table_header" />
<xsl:call-template name="status_table_row">
<xsl:with-param name="LABEL" select="$TABLE.ROW.OUTER" />
<xsl:with-param name="COUNT" select="count(ClassStats[@interface='false' and substring-after(@class,'$')=''])" />
<xsl:with-param name="BUGS" select="sum(ClassStats[@interface='false' and substring-after(@class,'$')='']/@bugs)" />
</xsl:call-template>
<xsl:call-template name="status_table_row">
<xsl:with-param name="LABEL" select="$TABLE.ROW.INNER" />
<xsl:with-param name="COUNT" select="count(ClassStats[@interface='false' and substring-after(@class,'$')!=''])" />
<xsl:with-param name="BUGS" select="sum(ClassStats[@interface='false' and substring-after(@class,'$')!='']/@bugs)" />
</xsl:call-template>
<xsl:call-template name="status_table_row">
<xsl:with-param name="LABEL" select="$TABLE.ROW.INTERFACE" />
<xsl:with-param name="COUNT" select="count(ClassStats[@interface='true'])" />
<xsl:with-param name="BUGS" select="sum(ClassStats[@interface='true']/@bugs)" />
</xsl:call-template>
<xsl:call-template name="status_table_row">
<xsl:with-param name="LABEL" select="$TABLE.ROW.TOTAL" />
<xsl:with-param name="COUNT" select="@total_types" />
<xsl:with-param name="BUGS" select="@total_bugs" />
<xsl:with-param name="FONT_SIZE" select="5"/>
</xsl:call-template>
</table>
<xsl:if test="@total_bugs &gt; 0">
<table width="{$TABLE.WIDTH}" border="0" align="center">
<xsl:variable name="max_bugs">
<xsl:for-each select="ClassStats">
<xsl:sort select="@bugs" data-type="number" order="descending"/>
<xsl:if test="position()=1">
<xsl:value-of select="@bugs"/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<tr>
<td align="left" colspan="2">
<font face="{$PAGE.FONT}" size="4">
<xsl:call-template name='string_format'>
<xsl:with-param name="COUNT" select="$max_bugs"/>
<xsl:with-param name="STRING" select="$PACKAGE.BUGCLASS.LABEL"/>
<xsl:with-param name="SINGLE" select="$BUGS.SINGLE.LABEL"/>
<xsl:with-param name="PULURAL" select="$BUGS.PULURAL.LABEL"/>
</xsl:call-template>
</font>
</td>
</tr>
<xsl:for-each select="ClassStats">
<xsl:if test="@bugs = $max_bugs">
<tr>
<td>&#160;&#160;&#160;&#160;&#160;&#160;&#160;</td>
<td align="left"><font face="{$PAGE.FONT}" color="red" size="4"><i><xsl:value-of select="$package-prefix"/><xsl:value-of select="@class" /></i></font></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</xsl:if>
<br/>
</xsl:template>
</xsl:stylesheet>