/*
Creates a minimal container node for further population elsewhere
164864
private Container createContainer(final FedoraSession session, final String path) {
        try {
            final Node node = findOrCreateNode(session, path, NT_FOLDER);

            if (node.canAddMixin(FEDORA_RESOURCE)) {
                node.addMixin(FEDORA_RESOURCE);
                node.addMixin(FEDORA_CONTAINER);
            }

            return new ContainerImpl(node);
        } catch (final RepositoryException e) {
            throw new RepositoryRuntimeException(e);
        }
    }
384657
function createVirtualDomNode(el, attr) {
	var ns = el.namespaceURI !== HTML_NAMESPACE ? el.namespaceURI : null;
	var key = attr && el.getAttribute(attr) ? el.getAttribute(attr) : null;

	return new VNode(
		el.tagName
		, createProperties(el)
		, createChildren(el, attr)
		, key
		, ns
	);
}
758704
function getOrCreateContainerRef(di) {
    if (!di.viewContainerRef) {
        var vcRefHost = di.node;
        ngDevMode && assertNodeOfPossibleTypes(vcRefHost, 0 /* Container */, 3 /* Element */);
        var hostParent = getParentLNode(vcRefHost);
        var lContainer = createLContainer(hostParent, vcRefHost.view, true);
        var comment = vcRefHost.view[RENDERER].createComment(ngDevMode ? 'container' : '');
        var lContainerNode = createLNodeObject(0 /* Container */, vcRefHost.view, hostParent, comment, lContainer, null);
        appendChild(hostParent, comment, vcRefHost.view);
        if (vcRefHost.queries) {
            lContainerNode.queries = vcRefHost.queries.container();
        }
        var hostTNode = vcRefHost.tNode;
        if (!hostTNode.dynamicContainerNode) {
            hostTNode.dynamicContainerNode =
                createTNode(0 /* Container */, -1, null, null, hostTNode, null);
        }
        lContainerNode.tNode = hostTNode.dynamicContainerNode;
        vcRefHost.dynamicLContainerNode = lContainerNode;
        addToViewTree(vcRefHost.view, hostTNode.index, lContainer);
        di.viewContainerRef = new ViewContainerRef$1(lContainerNode);
    }
    return di.viewContainerRef;
}
772322
function createPartialTree (currentFile, partials, visitedFiles) {
  if (visitedFiles[currentFile.name]) {
    return {
      label: '*' + currentFile.name + '*',
      name: currentFile.name
    }
  }
  visitedFiles[currentFile.name] = true

  var result = {
    label: currentFile.name,
    name: currentFile.name,
    summary: _.trunc(chainOrUndefined(currentFile, 'apidocs', 0, 'parsed', 'description'), {
      separator: ' ',
      length: 50
    })
  }
  if (currentFile.children.length > 0) {
    _.merge(result, {
      children: currentFile.children.map(function (child) {
        return createPartialTree(partials[child], partials, visitedFiles)
      })
    })
  }
  return result
}
832202
function (cb) {
			o1._client.createContainer(sName, function (err, _container) {
				if (err)
					return cb(err);

				// check that a parallel operation didn't just add the same container
				container = _.find(o1.aContainers, { name : sName });

				if (!container) {
					o1.aContainers.push(_container);
					container = _container;
				}

				cb();
			});
		}
632813
private Node createTemplateNode() {
    // The Node type choice is arbitrary.
    Node templateNode = new Node(Token.SCRIPT);
    templateNode.setStaticSourceFile(sourceFile);
    return templateNode;
  }
1178237
function (ed) {
      // Adjust selection so that a end container with a end offset of zero is not included in the selection
      // as this isn't visible to the user.
      var rng = RangeNormalizer.normalize(ed.selection.getRng());
      var start = rng.startContainer;
      var end = rng.endContainer;

      if (start !== end && rng.endOffset === 0) {
        var newEnd = findSelectionEnd(start, end);
        var endOffset = newEnd.nodeType === 3 ? newEnd.data.length : newEnd.childNodes.length;

        rng.setEnd(newEnd, endOffset);
      }

      return rng;
    }
635939
function createNode( type, details ) {

          const node = new ast.Node( type, location() );
          if ( details === null ) return node;

          util.extend( node, details );
          return util.enforceFastProperties( node );

      }
1178126
private static MinimizedCondition computeMinimizedCondition(Node n) {
    switch (n.getToken()) {
      case NOT: {
        MinimizedCondition subtree = computeMinimizedCondition(n.getFirstChild());
        MeasuredNode positive = pickBest(
            MeasuredNode.addNode(n, subtree.positive),
            subtree.negative);
        MeasuredNode negative = pickBest(
            subtree.negative.negate(),
            subtree.positive);
        return new MinimizedCondition(positive, negative);
      }
      case AND:
      case OR: {
        Node complementNode = new Node(n.getToken() == Token.AND ? Token.OR : Token.AND).srcref(n);
        MinimizedCondition leftSubtree = computeMinimizedCondition(n.getFirstChild());
        MinimizedCondition rightSubtree = computeMinimizedCondition(n.getLastChild());
        MeasuredNode positive = pickBest(
            MeasuredNode.addNode(n,
                leftSubtree.positive,
                rightSubtree.positive),
            MeasuredNode.addNode(complementNode,
                leftSubtree.negative,
                rightSubtree.negative).negate());
        MeasuredNode negative = pickBest(
            MeasuredNode.addNode(n,
                leftSubtree.positive,
                rightSubtree.positive).negate(),
            MeasuredNode.addNode(complementNode,
                leftSubtree.negative,
                rightSubtree.negative).change());
        return new MinimizedCondition(positive, negative);
      }
      case HOOK: {
        Node cond = n.getFirstChild();
        Node thenNode = cond.getNext();
        Node elseNode = thenNode.getNext();
        MinimizedCondition thenSubtree = computeMinimizedCondition(thenNode);
        MinimizedCondition elseSubtree = computeMinimizedCondition(elseNode);
        MeasuredNode positive = MeasuredNode.addNode(
            n,
            MeasuredNode.forNode(cond),
            thenSubtree.positive,
            elseSubtree.positive);
        MeasuredNode negative = MeasuredNode.addNode(
            n,
            MeasuredNode.forNode(cond),
            thenSubtree.negative,
            elseSubtree.negative);
        return new MinimizedCondition(positive, negative);
      }
      case COMMA: {
        Node lhs = n.getFirstChild();
        MinimizedCondition rhsSubtree = computeMinimizedCondition(lhs.getNext());
        MeasuredNode positive = MeasuredNode.addNode(
            n,
            MeasuredNode.forNode(lhs),
            rhsSubtree.positive);
        MeasuredNode negative = MeasuredNode.addNode(
            n,
            MeasuredNode.forNode(lhs),
            rhsSubtree.negative);
        return new MinimizedCondition(positive, negative);
      }
      default: {
        MeasuredNode pos = MeasuredNode.forNode(n);
        MeasuredNode neg = pos.negate();
        return new MinimizedCondition(pos, neg);
      }
    }
  }
1058929
private void fillNodeList(P parent) {
		P prt = parent;
		if ((prt != null) && (prt.isLeaf())) {
			return;
		}
		while (prt != null) {
			if (!prt.isLeaf()) {
				if (!this.expandedNodes.contains(prt)) {
					this.expandedNodes.add(prt);
					for (int i = prt.getChildCount() - 1; i >= 0; --i) {
						final C child = prt.getChildAt(i);
						if (child != null) {
							final P cn = toTraversableChild(prt, child);
							if (cn != null) {
								this.availableNodes.push(cn);
							}
						}
					}
				} else {
					return;
				}
			}
			prt = this.availableNodes.isEmpty() ? null : this.availableNodes.peek();
			if ((prt != null) && (prt.isLeaf())) {
				return;
			}
		}
	}
420760
function(data){
  this.head;
  this.size;
  if(typeof data !== 'undefined'){
    this.head = new Node(data);
    this.size = 1;
  }else{
    this.head = null;
    this.size = 0;
  }
}
607784
function distributeNthRoot(node) {
  let newNode = clone(node);
  const radicandNode = getRadicandNode(node);
  const rootNode = getRootNode(node);

  const children = [];
  for (let i = 0; i < radicandNode.args.length; i++) {
    const child = radicandNode.args[i];
    children.push(Node.Creator.nthRoot(child, rootNode));
  }

  newNode = Node.Creator.operator('*', children);
  return Node.Status.nodeChanged(
    ChangeTypes.DISTRIBUTE_NTH_ROOT, node, newNode);
}
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;
  }
356789
function (selection) {
      var rng = selection.getSel().getRangeAt(0);
      var startContainer = rng.startContainer;
      return startContainer.nodeType === 3 ? startContainer.parentNode : startContainer;
    }
420024
function createContainer ( tableNode ) {

        var container = document.createElement( "div" );
        container.className = "edui-chart-container";

        tableNode.parentNode.replaceChild( container, tableNode );

        return container;

    }
1125011
private static int findNodesToRelocate(final int[] array, final int maximumLength) {
        int currentNode = array.length - 2;
        for (int currentDepth = 1; currentDepth < maximumLength - 1 && currentNode > 1; currentDepth++) {
            currentNode =  first(array, currentNode - 1, 0);
        }
        return currentNode;
    }
1235096
private static <T extends Comparable<T>> Optional<Range<T>> smallestContainerForRange(
      Collection<Range<T>> ranges, Range<T> target) {
    Range<T> best = Range.all();
    for (final Range<T> r : ranges) {
      if (r.equals(target)) {
        continue;
      }
      // prefer a smaller range, always;
      if (r.encloses(target) && best.encloses(r)) {
        best = r;
      }
    }
    if (best.equals(Range.<T>all())) {
      return Optional.absent();
    }
    return Optional.of(best);
  }