code: private int countCorruptNodes(Block b, 
                                      Iterator<DatanodeDescriptor> nodeIter) {
      int corrupt = 0;
      Collection<DatanodeDescriptor> nodesCorrupt = corruptReplicas.getNodes(b);
      while (nodeIter.hasNext()) {
        DatanodeDescriptor node = nodeIter.next();
        if ((nodesCorrupt != null) && (nodesCorrupt.contains(node))) {
          corrupt++;
        }
      }
      return corrupt;
    }
docs: Counts the number of nodes in the given list into active and decommissioned
  counters.