double timeout = getNodeStatusExpiration(nodes[i]); double howRecent = now - model.getTimestamp(nodes[i]); double confidence = howRecent < timeout ? (timeout - howRecent)/timeout : 0.0; detail.append(nodes[i] + "(" + nf.format(confidence) + ") "); if (!nodes[i].equals(deadNode) && confidence < 0.5) {
if (model.getCurrentState(nodes[i]) != DefaultRobustnessController.ACTIVE) { excluded.add(nodes[i]); } else { double timeout = getTimeout(nodes[i]); double howRecent = now - model.getTimestamp(nodes[i]); double confidence = howRecent < timeout ? (timeout - howRecent) / timeout : 0.0; detail.append(nodes[i] + "(" + nf.format(confidence) + ") "); if (!nodes[i].equals(deadNode) && confidence < 0.7) {
 private Set getAdditionalExcludedNodes(String deadNode) {   Set excluded = new HashSet();   String[] nodes = model.listEntries(model.NODE);   StringBuffer detail = new StringBuffer();   double now = System.currentTimeMillis();   for (int i=0; i<nodes.length; i++) {     double timeout = getNodeStatusExpiration(nodes[i]);     double howRecent = now - model.getTimestamp(nodes[i]);     double confidence = howRecent < timeout                 ? (timeout - howRecent)/timeout                 : 0.0;     detail.append(nodes[i] + "(" + nf.format(confidence) + ") ");     if (!nodes[i].equals(deadNode) && confidence < 0.5) {         excluded.add(nodes[i]);     }   }   if (logger.isDebugEnabled()) {     logger.info("getAdditionalExcludedNodes: nodes=[" + detail +                 "] excluded=" + excluded);   }   return excluded; }