/* add new node to the collection
510357
function(key, value){
                            var json = null;
                            try { json = JSON.parse(value); } catch (e){} //try get json
                            if (json === null) json = $scope.utils.tryGetFunction(value) || json; //try get function

                            /* add element to the object */
                            if ($scope.node.type() === 'object') {
                                if (json !== null){
                                    $scope.json[key] = json
                                } else {
                                    $scope.json[key] = value
                                }

                            }
                            /* add element(s) to the array */
                            else if ($scope.node.type() === 'array') {
                                if (json !== null) {
                                    if (json.constructor === Array){
                                        /* push new array elements to the array */
                                        $scope.json.push.apply($scope.json, json);
                                    } else {
                                        /* push single element to the array */
                                        $scope.json.push(json);
                                    }
                                } else {
                                    $scope.json.push(value);
                                }
                            }
                            $scope.refresh();
                        }
233493
private void addNthLastChild() {
        for (Node node : nodes) {
            int count = 1;
            Node n = DOMHelper.getNextSiblingElement(node);
            while (n != null) {
                count++;
                n = DOMHelper.getNextSiblingElement(n);
            }
            
            if (specifier.isMatch(count)) {
                result.add(node);
            }
        }
    }
1360054
def addinnode(self, otherplus, node, objectname):
        
        # do a test for unique object here
        newelement = otherplus.dt[node.upper()]
150322
function addNodeToGraph(node){

    gNodesDisplayed.push(node);
    g.addNode(node._id, node);


    if (contains(childrenNodes, node._id)){
        var parentNode = getNodeFromId(nodesToBeLinked[node._id].from);
        if (contains(gNodesDisplayed, parentNode)){
            addLinkToParent(node._id, parentNode._id);
        }
    }
}
364494
protected function wizardAddCollection()
    {
        $this->validatePrompt('title', $this->text('Title'), 'collection');
        $this->validateMenu('type', $this->text('Type'), 'collection', $this->collection->getTypes());
        $this->validatePrompt('store_id', $this->text('Store'), 'collection');
        $this->validatePrompt('description', $this->text('Description'), 'collection', '');
        $this->validatePrompt('status', $this->text('Status'), 'collection', 0);

        $this->validateComponent('collection');
        $this->addCollection();
    }
1346802
function(collection){
	Array.apply(this);
	if(arguments.length >= 1){
		for(var i=0,len = collection.length;i<len;i++){
			var item = collection[i];
			if(this.indexOf(item) < 0){
				this.push(item);
			}
		}
	}
 }
68683
def add(self, node):
        """"""
        if not isinstance(node, Node):
            raise TypeError()
        for i, j in enumerate(self.__nodes):
            if j.node_id == node.node_id:
                self.__nodes[i] = node
                return
        self.__nodes.append(node)
108229
function addNode( $nodeID, $isSubtree = true )
    {
        $this->RootNodeIDArray[] = $nodeID;
        $this->NodeIDArray[] = $nodeID;

        if ( $isSubtree )
        {
            $nodeArray = eZContentObjectTreeNode::subTreeByNodeID( array( 'AsObject' => false ), $nodeID );
            foreach( $nodeArray as $node )
            {
                $this->NodeIDArray[] = $node['node_id'];
            }
        }
    }
46218
public boolean addAll(Collection<T> coll) {
	boolean newData = false;
	for(T elem : coll) {
	    if(set.add(elem)) {
		newData = true;
	    }
	}
	return newData;
    }
48780
public void addNode(Node n)
  {

    if (!m_mutable)
      throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeSet is not mutable!");

    this.addElement(n);
  }
472857
function ($ul, collection, updater, refresh) {
            var ul = ($ul.length ? $ul[0] : $ul);
            var i = 0;
            // var li = $ul.find('li');
            var li = ul.childNodes;

            // Update existing
            while (i < collection.length && i < li.length) {
                updater.setLi(li[i], collection[i]);
                ++i;
            }
            // Add new
            while (i < collection.length) {
                $(ul).append(updater.newLi(collection[i]));
                ++i;
            }
            // Remove extra
            var j = li.length - 1;
            while (j >= i) {
                ul.removeChild(li[j]);
                --j;
            }
            if (refresh !== false) {
                $(ul).listview('refresh');
            }
        }
290523
protected function addCollectionNode(DOMElement $element, $value): void
    {
        if ($element->childNodes->length === 0) {
            $this->convert($element, $value);
            return;
        }

        /**
         * @var $child DOMElement
         */
        $child = $this->element($element->nodeName);
        $element->parentNode->appendChild($child);
        $this->convert($child, $value);
    }
378347
function addNodeToSlot (slot, node, insertBefore) {
  const isInDefaultMode = slot.assignedNodes().length === 0;
  registerNode(slot, node, insertBefore, eachNode => {
    if (isInDefaultMode) {
      slot.__insertBefore(eachNode, insertBefore !== undefined ? insertBefore : null);
    }
  });
}
107854
def add_nodes(self, new_nodes):
        """"""
        for unique_id, node in new_nodes.items():
            if unique_id in self.nodes:
                raise_duplicate_resource_name(node, self.nodes[unique_id])
            self.nodes[unique_id] = node
614142
function addChildNode(node, tagName) {
    return node.appendChild((node.ownerDocument || node).createElement(tagName));
}
912871
public void add(final ObjectSinkNode node) {
        if ( this.firstNode == null ) {
            this.firstNode = node;
            this.lastNode = node;
        } else {
            this.lastNode.setNextObjectSinkNode( node );
            node.setPreviousObjectSinkNode( this.lastNode );
            this.lastNode = node;
        }
        this.size++;
    }
743439
static <E> Node<E> newNode(E item) {
        Node<E> node = new Node<E>();
        ITEM.set(node, item);
        return node;
    }