code: private int countLiveNodes(Block b, Iterator<DatanodeDescriptor> nodeIter) {
      int live = 0;
      Collection<DatanodeDescriptor> nodesCorrupt = null;
      if (corruptReplicas.size() != 0) {
        nodesCorrupt = corruptReplicas.getNodes(b);
      }
      while (nodeIter.hasNext()) {
        DatanodeDescriptor node = nodeIter.next();
        if (((nodesCorrupt != null) && (nodesCorrupt.contains(node))) ||
          node.isDecommissionInProgress() || node.isDecommissioned()) {
          // do nothing
        } else {
          live++;
        }
      }
      return live;
    }
docs: Counts the number of live nodes in the given list