Creates and returns the directory nodes for bulk load.

@param nodes the nodes to be inserted
@return the directory nodes containing the nodes
342630
private List<E> createBulkDirectoryNodes(List<E> nodes) {
    int minEntries = dirMinimum;
    int maxEntries = dirCapacity - 1;

    ArrayList<E> result = new ArrayList<>();
    List<List<E>> partitions = settings.bulkSplitter.partition(nodes, minEntries, maxEntries);

    for(List<E> partition : partitions) {
      // create node
      N dirNode = createNewDirectoryNode();
      // insert nodes
      for(E o : partition) {
        dirNode.addDirectoryEntry(o);
      }
      // write to file
      writeNode(dirNode);

      result.add(createNewDirectoryEntry(dirNode));
      if(getLogger().isDebuggingFiner()) {
        getLogger().debugFiner("Directory page no: "+dirNode.getPageID());
      }
    }

    return result;
  }
1111558
public Set<Weighted<DirectedEdge>> directedEdges(Map<NodeId, Node> nodes) {
        return Collections.emptySet();
    }
158521
private List<DefNode> flatten(DefNode node) {
        final List<DefNode> result = new ArrayList<>();
        result.add(node);
        return flatten(result, node.getChildren());
    }
369078
public static <T> List<T> toList(final NodeList nodes) {
        final List<T> res = new ArrayList<>(nodes.getLength());
        for (int i = 0; i < nodes.getLength(); i++) {
            res.add((T) nodes.item(i));
        }
        return res;
    }
860150
def get_directory_nodes(self, path):
        

        return [directory_node for directory_node in self.list_directory_nodes() if directory_node.path == path]
781340
private LocatedBlocks createLocatedBlocks(INode node) throws IOException {
     LocatedBlocks loc = null;
     if (node instanceof INodeFile) {
       loc = getFSNamesystem().getBlockLocationsInternal(
           (INodeFile)node, 0L, Long.MAX_VALUE, Integer.MAX_VALUE);
     }
     if (loc==null) {
       loc = EMPTY_BLOCK_LOCS;
     }
     return loc;
   }
1300352
public static Collection<DisqueNode> parse(String nodes) {
        List<DisqueNode> result = new ArrayList<>();

        Iterator<String> iterator = TOKEN_PATTERN.splitAsStream(nodes).iterator();

        try {
            while (iterator.hasNext()) {
                String node = iterator.next();
                DisqueNode partition = parseNode(node);
                result.add(partition);
            }

        } catch (Exception e) {
            throw new RedisException("Cannot parse " + nodes, e);
        }

        return result;
    }
744712
function getBlockNodes(nodes) {
  // TODO(perf): just check if all items in `nodes` are siblings and if they are return the original
  //             collection, otherwise update the original collection.
  var node = nodes[0];
  var endNode = nodes[nodes.length - 1];
  var blockNodes = [node];

  do {
    node = node.nextSibling;
    if (!node) break;
    blockNodes.push(node);
  } while (node !== endNode);

  return jqLite(blockNodes);
}
759937
private PathQueryNode createPathQueryNode(SimpleNode node) {
        root.setLocationNode(factory.createPathQueryNode(root));
        node.childrenAccept(this, root.getLocationNode());
        return root.getLocationNode();
    }
279077
public Vertigo deployCluster(String cluster, int nodes) {
    return deployCluster(cluster, null, nodes, null);
  }
1248858
public List<SiteNode> getTopNodesInContextFromSiteTree() {
		List<SiteNode> nodes = new LinkedList<>();
		SiteNode rootNode = session.getSiteTree().getRoot();
		@SuppressWarnings("unchecked")
		Enumeration<TreeNode> en = rootNode.children();
		while (en.hasMoreElements()) {
			SiteNode sn = (SiteNode) en.nextElement();
			if (isContainsNodesInContext(sn)) {
				nodes.add(sn);
			}
		}
		return nodes;
	}
1004527
public List<RiakNode> getNodes()
    {
        stateCheck(State.CREATED, State.RUNNING, State.SHUTTING_DOWN, State.QUEUING);
        try
        {
            nodeListLock.readLock().lock();
            return new ArrayList<>(nodeList);
        }
        finally
        {
            nodeListLock.readLock().unlock();
        }
    }
368286
public static void getTopicLinkIds(final Node node, final Set<String> linkIds) {
        // If the node is null then there isn't anything to find, so just return.
        if (node == null) {
            return;
        }

        if (node.getNodeName().equals("xref") || node.getNodeName().equals("link")) {
            final NamedNodeMap attributes = node.getAttributes();
            if (attributes != null) {
                final Node idAttribute = attributes.getNamedItem("linkend");
                if (idAttribute != null) {
                    final String idAttributeValue = idAttribute.getNodeValue();
                    linkIds.add(idAttributeValue);
                }
            }
        }

        final NodeList elements = node.getChildNodes();
        for (int i = 0; i < elements.getLength(); ++i) {
            getTopicLinkIds(elements.item(i), linkIds);
        }
    }
53831
@Override
    public Collection<N> getNodes() {
        List<N> nodes = new ArrayList<>();
        Iterables.addAll(nodes, GraphTraversal.breadthFirstOrder(this, Collections.singleton(root)));
        return nodes;
    }
338159
public static ArrayNode createArray(boolean fallbackToEmptyArray, JsonNode... nodes) {
		ArrayNode array = null;
		for (JsonNode element: nodes) {
			if (element != null) {
				if (array == null) {
					array = new ArrayNode(JsonNodeFactory.instance);
				}
				array.add(element);
			}
		}
		if ((array == null) && fallbackToEmptyArray) {
			array = new ArrayNode(JsonNodeFactory.instance);
		}
		return array;
	}
796464
public static List<Online> newOnline(Collection<Node> nodes) {
        return nodes.stream().map(Online::new).collect(Collectors.toList());
    }
1340303
public Set<RedisURI> getClusterNodes() {

        Set<RedisURI> result = new HashSet<>();

        Map<String, RedisURI> knownUris = new HashMap<>();
        for (NodeTopologyView view : views) {
            knownUris.put(view.getNodeId(), view.getRedisURI());
        }

        for (NodeTopologyView view : views) {
            for (RedisClusterNode redisClusterNode : view.getPartitions()) {
                if (knownUris.containsKey(redisClusterNode.getNodeId())) {
                    result.add(knownUris.get(redisClusterNode.getNodeId()));
                } else {
                    result.add(redisClusterNode.getUri());
                }
            }
        }

        return result;
    }