public AnalysisOutput getResult(Class<? extends AnalysisTool> analysisTool) { for (AnalysisTool tool : results.keySet()) { if (tool.getClass().equals(analysisTool)) { AnalysisOutput result = results.get(tool); assert result != null; return result; } } return null; }
public String buildOverviewFragmentHtml(File folder) throws UnsupportedEncodingException { StringBuilder sb = new StringBuilder(); sb.append( "<div class=\"test\" tool=\"" + job.getFullApplicationName() + "\" testcase=\"" + job.getMIWGTestCase() + "\" "); for (AnalysisTool analysisTool : results.keySet()) { AnalysisOutput result = results.get(analysisTool); assert result != null; sb.append("data-" + analysisTool.getName() + "-ok=\"" + result.numOKs() + "\" "); sb.append("data-" + analysisTool.getName() + "-finding=\"" + result.numFindings() + "\" "); } sb.append(">\n"); sb.append("<ul>\n"); for (AnalysisTool tool : results.keySet()) { AnalysisOutput result = results.get(tool); assert result != null; sb.append("<li>"); sb.append("<a href=\"" + result.getHTMLResultsLink(job) + "\">"); sb.append(result.getHTMLResultsLink(job)); sb.append("</a>"); sb.append("</li>\n"); } sb.append("</ul>\n"); sb.append("</div>\n"); String html = sb.toString(); return html; }