Method called by the stream reader to remove the topmost (start)
element from the stack;
called when an end element is encountered during parsing.

@return True if stack has more elements; false if not (that is,
root element closed)
429730
public final boolean pop() throws XMLStreamException
    {
        if (mCurrElement == null) {
            throw new IllegalStateException("Popping from empty stack");
        }
        --mDepth;

        Element child = mCurrElement;
        Element parent = child.mParent;
        mCurrElement = parent;

        // Let's do simple recycling of Element instances...
        child.relink(mFreeElement);
        mFreeElement = child;
            
        // Need to purge namespaces?
        int nsCount = mNamespaces.size() - child.mNsOffset;
        if (nsCount > 0) { // 2 entries for each NS mapping:
            mLastNsContext = null; // let's invalidate ns ctxt too, if we had one
            mNamespaces.removeLast(nsCount);
        }
        return (parent != null);
    }
1311800
public T remove() {
        final Node<T> previous = iterator.currentNode.previous;
        final T element = remove(iterator.currentNode);
        iterator.currentNode = previous;
        return element;
    }
1001294
public boolean removeAfter(Node node) {

        if (node == null || node.next == null) {
            return false;
        }

        if (node.next == last) {
            last = node;
        }

        node.next = node.next.next;

        return true;
    }
1354112
private int endCheckBreak()
    {
        Node n = ((Jump) this).getJumpStatement();
        n.putIntProp(CONTROL_BLOCK_PROP, END_DROPS_OFF);
        return END_UNREACHED;
    }
911171
public boolean isGroupEnd()
    {
        if (getValue() == null || isCommand() || getValue().length() != 1)
            return false;
        return getValue().charAt(0) == ')' || getValue().charAt(0) == ']';
    }
1035208
@Override
    public void endElement( String uri, String localName, String qName )
        throws SAXException
    {
        flushCharacters();
        if ( stack.isEmpty() )
        {
            throw new IllegalStateException( "Stack must not be empty when closing the element " + qName
                + " around line " + locator.getLineNumber() + " and column " + locator.getColumnNumber() );
        }
        IndentCheckSaxHandler.ElementEntry startEntry = stack.pop();
        int indentDiff = lastIndent.size - startEntry.expectedIndent.size;
        int expectedIndent = startEntry.expectedIndent.size;
        if ( lastIndent.lineNumber != startEntry.foundIndent.lineNumber && indentDiff != 0 )
        {
            /*
             * diff should be zero unless we are on the same line as start element
             */
            int opValue = expectedIndent - lastIndent.size;
            String op = opValue > 0 ? "Insert" : "Delete";
            String units = opValue == 1 ? "space" : "spaces";
            String message = op + " " + Math.abs( opValue ) + " " + units + ". Expected " + expectedIndent + " found "
                + lastIndent.size + " spaces before end element </" + qName + ">";
            XmlFormatViolation violation =
                new XmlFormatViolation( file, locator.getLineNumber(), locator.getColumnNumber(), message );
            violationHandler.handle( violation );
        }
    }
80066
private QName findEndElement() throws SAXException{
        finishStartElement();
        if(elemStack.empty() || elemStack.peek()==null)
            throw new SAXException("can't find matching start element");
        return elemStack.pop();
    }
198101
public E pop() {
        StackNode<E> oldTop, newTop;

        while (true) {
            oldTop = top.get();
            if (oldTop == null)
                return null;
            newTop = oldTop.next;
            if (top.compareAndSet(oldTop, newTop))
                break;
        }

        return oldTop.data;
    }
162631
def remove(self, position):
        
        if position <= 0:  # at beginning
            return self.remove_first()

        if position >= self.length() - 1:  # at end
            return self.remove_last()

        counter = 0
        last_node = self.head
        current_node = self.head

        while current_node is not None and counter <= position:
            if counter == position:
                last_node.next_node = current_node.next_node  # remove current
                return True

            last_node = current_node
            current_node = current_node.next_node
            counter += 1

        return False
1070256
@Override
	public boolean hasMoreElements()
	{
		if (endOfQueueReached)
			return false;
		try
		{
			checkNotClosed();
			Message msg = fetchNext();
			return msg != null;
		}
		catch (JMSException e)
		{
			throw new IllegalStateException(e.toString());
		}
	}
145976
private int endCheckIf()
    {
        Node th, el;
        int rv = END_UNREACHED;

        th = next;
        el = ((Jump)this).target;

        rv = th.endCheck();

        if (el != null)
            rv |= el.endCheck();
        else
            rv |= END_DROPS_OFF;

        return rv;
    }
1075855
public boolean lastChild() {
        if (mNode == null || mNode.getChildCount() < 1) {
            return false;
        }
        for (int i = mNode.getChildCount() - 1; i >= 0; --i) {
            AccessibilityNodeInfoCompat newNode = mNode.getChild(i);
            if (newNode == null) {
                return false;
            }
            if (AccessibilityNodeInfoUtils.isVisibleOrLegacy(newNode)) {
                reset(newNode);
                return true;
            }
            newNode.recycle();
        }
        return false;
    }
712919
public synchronized boolean removeAny(Object element) {
		if (end == start) return false;
		if (end == -1) {
			for (int i = array.length - 1; i >= 0; --i)
				if (array[i].equals(element)) {
					removeAt(i);
					return true;
				}
			return false;
		}
		if (end < start) {
			for (int i = array.length - 1; i >= start; --i)
				if (array[i].equals(element)) {
					removeAt(i);
					return true;
				}
			for (int i = 0; i < end; ++i)
				if (array[i].equals(element)) {
					removeAt(i);
					return true;
				}
			return false;
		}
		for (int i = start; i < end; ++i)
			if (array[i].equals(element)) {
				removeAt(i);
				return true;
			}
		return false;
	}
1229371
protected boolean stealBackStrongCloseChar(){        
        StrongEmphSuperNode child = (StrongEmphSuperNode) peek();
        child.setClosed(false);
        addAsChild();
        //signal parser to close StrongEmphSuperNode in next check for close char
        push(new ValidEmphOrStrongCloseNode());
        return true;
    }
1166163
@Override
    public N pop() {
        try {
            return stack[(--stackTop)&mask];
        } finally {
            // remove the reference to the element in the
            // stack to prevent hanging references from living forever
            stack[(stackTop&mask)] = null;
        }
    }
125509
public boolean nextStartElement() throws XMLException, IOException {
		try {
			do {
				next();
			} while (!Type.START_ELEMENT.equals(event.type));
			return true;
		} catch (EOFException e) {
			return false;
		}
	}
257007
public T removeHead() {
		if( first == null )
			throw new IllegalArgumentException("Empty list");

		T ret = first.getObject();
		Element<T> e = first;
		available.push(first);

		if( first.next != null ) {
			first.next.previous = null;
			first = first.next;
		} else {
			// there's only one element in the list
			first = last = null;
		}
		e.clear();
		size--;
		return ret;
	}