Delete from right side with successor node present.
334896
private void rightDeleteWithSuccessor(
                                         GBSNode           p,
                                         GBSNode           l,
                                         Object            deleteKey,
                                         DeleteNode        point)
    {
        java.util.Comparator comp = p.deleteComparator();
        int xcc = comp.compare(deleteKey, l.leftMostKey());

        if (xcc == 0)                /* Target key IS low key of successor    */
        {
            /* Migrate up high key of current (delete key)
                into low key of successor (target key)                  */
            point.setDelete(p, p.rightMostIndex());
            point.setTarget(l, 0, DeleteNode.OVERLAY_LEFT);
        }
        else if (xcc < 0)            /* Less than left most key of successor  */
        {
            /* Target is in right of current         */
            int ix = p.findDeleteInRight(deleteKey);
            if (ix >= 0)
                point.setDelete(p, ix);
        }
        else                        /* Greater than left most of successor   */
        {
            /* Target is in left of successor        */
            int ix = l.findDeleteInLeft(deleteKey);
            if (ix >= 0)
            {
                /* Migrate up high key of current (delete key) into
                    low key of successor (hole left after keys moved)           */
                point.setDelete(p, p.rightMostIndex());
                point.setTarget(l, ix, DeleteNode.ADD_LEFT);
            }
        }
    }
929821
def remove(self, node, dirty=True):
        
        if node.id in self._children:
            self._children[node.id].parent = None
            del self._children[node.id]
        if dirty:
            self.touch()
518253
private void unlinkLast(Node<E> last, Node<E> prev) {
        // assert last != null;
        // assert prev != null;
        // assert last.item == null;
        for (Node<E> o = null, p = prev, q;;) {
            if (p.item != null || (q = p.prev) == null) {
                if (o != null && p.next != p && last.casPrev(prev, p)) {
                    skipDeletedSuccessors(p);
                    if (last.next == null &&
                        (p.prev == null || p.item != null) &&
                        p.next == last) {

                        updateHead(); // Ensure o is not reachable from head
                        updateTail(); // Ensure o is not reachable from tail

                        // Finally, actually gc-unlink
                        o.lazySetPrev(o);
                        o.lazySetNext(nextTerminator());
                    }
                }
                return;
            }
            else if (p == q)
                return;
            else {
                o = p;
                p = q;
            }
        }
    }
399060
def remove(self, key, value, element):
        """"""
        self.neoindex.delete(key, value, element.neoelement)
750247
def prune(self):
        
        if not self[0] or not self[1]:    # if I have an empty branch
            direction = not self[0]       # graft the other branch here
            #if trace:
            #    print('Grafting {} branch'.format(
            #       'right' if direction else 'left'))

            result = self[direction]
            #if result: result.verify()
            return result
        else:
            # Replace the root node with the greatest predecessor.
            heir, self[0] = self[0].pop_greatest_child()
            #if trace:
            #    print('Replacing {} with {}.'.format(
            #        self.x_center, heir.x_center
            #        ))
            #    print('Removed greatest predecessor:')
            #    self.print_structure()

            #if self[0]: self[0].verify()
            #if self[1]: self[1].verify()

            # Set up the heir as the new root node
            (heir[0], heir[1]) = (self[0], self[1])
            #if trace: print('Setting up the heir:')
            #if trace: heir.print_structure()

            # popping the predecessor may have unbalanced this node;
            # fix it
            heir.refresh_balance()
            heir = heir.rotate()
            #heir.verify()
            #if trace: print('Rotated the heir:')
            #if trace: heir.print_structure()
            return heir
756236
def delete(self):
        """"""
        stacks = [
            self.utilities_name,
            self.spot_nodes_name,
            self.node_group_name,
            self.cluster_name,
            self.vpc_name,
            self.role_name
        ]
        # Execute creation.
        for stack in tqdm.tqdm(stacks, ncols=70):
            self.delete_stack(stack)
1307479
async def delete(self):
        """"""
        interface = self._data['interface']
        data = await interface._handler.unlink_subnet(
            system_id=interface.node.system_id, id=interface.id, _id=self.id)
        interface._data['links'] = list(data['links'])
        interface._orig_data['links'] = copy.deepcopy(interface._data['links'])
1339252
public function successor()
    {
        if ($this->information & 1) {
            $node = $this->right;

            while ($node->information & 2) {
                $node = $node->left;
            }

            return $node;
        } else {
            return $this->right;
        }
    }
318124
def delete_node(self, name):
        

        name = self._validate_name(name)
        if name in self.nodes:
            del self.nodes[name]
612762
private void deleteNode() throws TTException {
        /*
         * If found in one of the rightsiblings in the current shreddered
         * structure remove all nodes until the transaction points to the found
         * node (keyMatches).
         */
        if (mInserted && !mMovedToRightSibling) {
            mInserted = false;
            if (((ITreeStructData)mWtx.getNode()).hasRightSibling()) {
                // Cursor is on the inserted node, so move to right sibling.
                mWtx.moveTo(((ITreeStructData)mWtx.getNode()).getRightSiblingKey());
            }
        }

        // // Check if transaction is on the last node in the shreddered file.
        // checkIfLastNode(true);

        // Determines if transaction has moved to the parent node after a delete
        // operation.
        boolean movedToParent = false;

        // Determines if ldeleteNodeast node in a subtree is going to be
        // deleted.
        boolean isLast = false;

        do {
            if (mWtx.getNode().getDataKey() != mKeyMatches) {
                final ITreeStructData node = (ITreeStructData)mWtx.getNode();
                if (!node.hasRightSibling() && !node.hasLeftSibling()) {
                    // if (mDelete == EDelete.ATSTARTMIDDLE) {
                    // // If the delete occurs right before an end tag the
                    // // level hasn't been incremented.
                    // mLevelInShreddered--;
                    // }
                    /*
                     * Node has no right and no left sibling, so the transaction
                     * moves to the parent after the delete.
                     */
                    movedToParent = true;
                } else if (!node.hasRightSibling()) {
                    // Last node has been reached, which means that the
                    // transaction moves to the left sibling.
                    isLast = true;
                }

                mWtx.remove();
            }
        } while (mWtx.getNode().getDataKey() != mKeyMatches && !movedToParent && !isLast);

        if (movedToParent) {
            if (mDelete == EDelete.ATBOTTOM) {
                /*
                 * Deleted right before an end tag has been parsed, thus don't
                 * move transaction to next node in processEndTag().
                 */
                mRemovedNode = true;
            }
            /*
             * Treetank transaction has been moved to parent, because all child
             * nodes have been deleted, thus to right sibling.
             */
            mWtx.moveTo(((ITreeStructData)mWtx.getNode()).getRightSiblingKey());
        } else {
            if (((ITreeStructData)mWtx.getNode()).hasFirstChild()) {
                if (mDelete == EDelete.ATBOTTOM && isLast) {
                    /*
                     * Deleted right before an end tag has been parsed, thus
                     * don't move transaction to next node in processEndTag().
                     */
                    mRemovedNode = true;
                }

                if (isLast) {
                    // If last node of a subtree has been removed, move to
                    // parent and right sibling.
                    mWtx.moveTo(mWtx.getNode().getParentKey());
                    mWtx.moveTo(((ITreeStructData)mWtx.getNode()).getRightSiblingKey());

                    // // If the delete occurs right before an end tag the level
                    // // hasn't been incremented.
                    // if (mDelete == EDelete.ATSTARTMIDDLE) {
                    // mLevelInShreddered--;
                    // }
                }
            }
        }

        // Check if transaction is on the last node in the shreddered file.
        // checkIfLastNode(true);
        mInsert = EInsert.NOINSERT;
    }
954927
def remove(self, node):
        
        if node is None or node._prev == -1:
            return
        if node._next is None:
            self._last = node._prev  # last node
        else:
            node._next._prev = node._prev
        if node._prev is None:
            self._first = node._next  # first node
        else:
            node._prev._next = node._next
        node._prev = node._next = -1
        self._size -= 1
16108
function removeNotNeededNodes(parentElements, newChildren, oldChildren) {
  let remaining = parentElements.childNodes.length;
  if (oldChildren.length !== remaining) {
    console.warn(
      "ZLIQ: Something other then ZLIQ has manipulated the children of the element",
      parentElements,
      ". This can lead to sideffects. Consider using the 'isolated' attribute for this element to prevent updates."
    );
  }

  for (; remaining > newChildren.length; remaining--) {
    let childToRemove = parentElements.childNodes[remaining - 1];
    parentElements.removeChild(childToRemove);

    if (oldChildren.length < remaining) {
      continue;
    } else {
      let { cycle } = oldChildren[remaining - 1];

      triggerLifecycle(childToRemove, { cycle }, "removed");
    }
  }
}
1122402
private final V remove_semi_leaf(BinTreeNode<K,V> node, BinTreeNode<K,V> prev,
				     int son, BinTreeNode<K,V> m) {
	if(prev == null) {
	    root = m;
	}
	else {
	    if(son == 0)
		prev.left = m;
	    else
		prev.right = m;
	}

	return node.value;
    }
1328234
protected Node<K, V> unlinkRightChild(Node<K, V> n) {
        Node<K, V> left = n.o_c;
        if (left == null || left.y_s == n) {
            return null;
        }
        Node<K, V> right = left.y_s;
        left.y_s = n;
        right.y_s = null;
        return right;
    }
663796
def delete_node(self, loadbalancer, node):
        """"""
        lb = node.parent
        if not lb:
            raise exc.UnattachedNode("No parent Load Balancer for this node "
                    "could be determined.")
        resp, body = self.api.method_delete("/loadbalancers/%s/nodes/%s" %
                (lb.id, node.id))
        return resp, body
1244266
def delete_node(self, key_chain):
        
        node = self._data
        for key in key_chain[:-1]:
            node = node[key]

        del node[key_chain[-1]]
896601
private Node<T> removeMin(Node<T> h, boolean updateMin) { 
        if (h.left == null)
            return null;

        if (!h.left.red && (h.left.left == null || !h.left.left.red))
            h = moveRedLeft(h);

        h.left = removeMin(h.left, updateMin);
    	if (h.left == null && updateMin)
    		first = h;
        return balance(h);
    }