} else if (ratio < 0.99) {
} else if (ratio < yellowThreshold) {
    private void viewAgentSmall() throws IOException {      response.setContentType("text/html");      out = response.getWriter();      format = FORMAT_HTML;     // Force html format      String agent = getEncodedAgentName();      CompletionData result = getCompletionData();      double ratio = result.getRatio();      int nTasks = result.getNumberOfTasks();      int nUnplannedTasks = result.getNumberOfUnplannedTasks();      int nPlannedTasks = (nTasks - nUnplannedTasks);      double percentPlannedTasks =        ((nTasks > 0) ?          (1.0 * nPlannedTasks) / nTasks :         0.0);      int nUnestimatedTasks = result.getNumberOfUnestimatedTasks();      int nEstimatedTasks = (nPlannedTasks - nUnestimatedTasks);      double percentEstimatedTasks =        ((nPlannedTasks > 0) ?          (1.0 * nEstimatedTasks) / nPlannedTasks :         0.0);      int nFailedTasks = result.getNumberOfFailedTasks();      int nSuccessfulTasks = (nEstimatedTasks - nFailedTasks);      double percentSuccessfulTasks =        ((nEstimatedTasks > 0) ?          (1.0 * nSuccessfulTasks) / nEstimatedTasks :         0.0);      int nUnconfidentTasks = result.getNumberOfUnconfidentTasks();      int nFullConfidenceTasks = (nSuccessfulTasks - nUnconfidentTasks);      double percentFullConfidenceTasks =        ((nSuccessfulTasks > 0) ?          (1.0 * nFullConfidenceTasks) / nSuccessfulTasks :         0.0);      String bgcolor, fgcolor, lncolor;      if (ratio < 0.89) {        bgcolor = "#aa0000";        fgcolor = "#ffffff";        lncolor = "#ffff00";      } else if (ratio < 0.99) {        bgcolor = "#ffff00";        fgcolor = "#000000";        lncolor = "#0000ff";      } else {        bgcolor = "#d0ffd0";        fgcolor = "#000000";        lncolor = "#0000ff";      }      out.println(          "<html>\n"+          "<head>\n"+          "</head>\n"+          "<body"+          " bgcolor=\"" + bgcolor +           "\" text=\"" + fgcolor +           "\" vlink=\"" + lncolor +           "\" link=\"" + lncolor + "\">\n"+          "<pre><a href=\""+          "/$" + agent + getPath() +          "\" target=\"_top\">"+          agent+          "</a>");      out.println(formatLabel("Ratio:") + "  <b>" + formatPercent(ratio) + "</b> ("+ratio+")");      out.println(formatLabel("Tasks:") + formatInteger(nTasks));      out.println(formatLabel("Planned:")        + formatInteger(nPlannedTasks)        + "(" + formatPercent(percentPlannedTasks)        + ")");      out.println(formatLabel("Successful:")     + formatInteger(nSuccessfulTasks)     + "(" + formatPercent(percentSuccessfulTasks)     + ")");      out.println(formatLabel("Completed:")      + formatInteger(nFullConfidenceTasks) + "(" + formatPercent(percentFullConfidenceTasks) + ")</pre>");      out.println("</body>\n</html>");    }