writer.write(" <class name=\""+fileName+"\" filename=\""+fileName+"\" line-rate=\""+fc.getLineRate()+"\" branch-rate=\""+fc.getBranchRate()+"\" complexity=\"0.0\">\n");
writer.write(" <methods>\n");
writer.write(" </methods>\n");
writer.write(" <lines>\n");
for(int line : fc.getLines()) {
LineCoverage lc = fc.getLineCoverageFor(line);
Collection<BranchCoverage> bcs = fc.getBranchCoverageFor(line);
if(bcs == null) {
writer.write(" <line number=\"" + line + "\" hits=\"" + lc.getHits() + "\" branch=\"false\"/>\n");
} else {
String coverageString = calculateCoverage(bcs);
writer.write(" <line number=\"" + line + "\" hits=\"" + lc.getHits() + "\" branch=\"true\" condition-coverage=\"" + coverageString + "\">\n");
writer.write(" <conditions>\n");
int i = 0;
for(BranchCoverage bc : bcs) {
writer.write(" <condition number=\"" + (i++) + "\" type=\"jump\" coverage=\"" + calculateCoverage(bc) + "\"/>\n");
}