if (estConf > 0.99) {
if (cc.isConfident(estConf)) {
    protected CompletionData getCompletionData() {      // get tasks      Collection tasks = getAllTasks();      long nowTime = System.currentTimeMillis();      double ratio = getRatio(tasks);      int nTasks = tasks.size();      Iterator taskIter = tasks.iterator();      if (showTables) {        // create and initialize our result        FullCompletionData result = new FullCompletionData();        result.setNumberOfTasks(nTasks);        result.setRatio(ratio);        result.setTimeMillis(nowTime);        // examine tasks        for (int i = 0; i < nTasks; i++) {          Task ti = (Task)taskIter.next();          PlanElement pe = ti.getPlanElement();          if (pe != null) {            AllocationResult peEstResult = pe.getEstimatedResult();            if (peEstResult != null) {              double estConf = peEstResult.getConfidenceRating();              if (peEstResult.isSuccess()) {                if (estConf > 0.99) {                  // 100% success                } else {                  result.addUnconfidentTask(                      makeUnconfidentTask(estConf, ti));                }              } else {                result.addFailedTask(makeFailedTask(estConf, ti));              }            } else {              result.addUnestimatedTask(makeUnestimatedTask(ti));            }          } else {            result.addUnplannedTask(makeUnplannedTask(ti));          }        }        return result;      } else {        // create and initialize our result        SimpleCompletionData result = new SimpleCompletionData();        result.setNumberOfTasks(nTasks);        result.setRatio(ratio);        result.setTimeMillis(nowTime);        // examine tasks        int nUnplannedTasks = 0;        int nUnestimatedTasks = 0;        int nFailedTasks = 0;        int nUnconfidentTasks = 0;        for (int i = 0; i < nTasks; i++) {          Task ti = (Task)taskIter.next();          PlanElement pe = ti.getPlanElement();          if (pe != null) {            AllocationResult peEstResult = pe.getEstimatedResult();            if (peEstResult != null) {              double estConf = peEstResult.getConfidenceRating();              if (peEstResult.isSuccess()) {                if (estConf > 0.99) {                  // 100% success                } else {                  nUnconfidentTasks++;                }              } else {                nFailedTasks++;              }            } else {              nUnestimatedTasks++;            }          } else {            nUnplannedTasks++;          }        }        result.setNumberOfUnplannedTasks(nUnplannedTasks);        result.setNumberOfUnestimatedTasks(nUnestimatedTasks);        result.setNumberOfFailedTasks(nFailedTasks);        result.setNumberOfUnconfidentTasks(nUnconfidentTasks);        return result;      }    }