Special method that removes head element.
@return
423685
public T removeFirst() {
        try {
            modifyLock.lock();
            Iterator<T> it = iterator();
            if (it.hasNext()) {
                T item = it.next();
                it.remove();
                return item;
            }
        } finally {
            modifyLock.unlock();
        }
        return null;
    }
778091
public E removeLast () {
		if (size > 0) {
			E e = data[--size];
			data[size] = null;
			return e;
		}

		return null;
	}
257113
private static void cleanHeaders(Element e) {
        for (int headerIndex = 1; headerIndex < 7; headerIndex++) {
            Elements headers = getElementsByTag(e, "h" + headerIndex);
            for (Element header : headers) {
                if (getClassWeight(header) < 0
                        || getLinkDensity(header) > 0.33f) {
                    header.remove();
                }
            }
        }
    }
298224
def remove(self):
        
        DoubleLinkedListItem.remove(self)     # remove from double linked list
        if self.succ is self:                 # list was a singleton
            self.theclass.items = None        # class is empty
        elif self.theclass.items is self:     # oups we removed the head
            self.theclass.items = self.succ
779845
def remove_first(self):
        

        if self.head is None:
            return False

        self.head = self.head.next_node
        return True
79100
public String removeHead(String srcStr, int charCount) {
        return getRightOf(srcStr, srcStr.length() - charCount);
    }
1311800
public T remove() {
        final Node<T> previous = iterator.currentNode.previous;
        final T element = remove(iterator.currentNode);
        iterator.currentNode = previous;
        return element;
    }
914205
public HString head() {
      return tokens()
                .stream()
                .filter(t -> t
                                .parent()
                                .isEmpty())
                .map(Cast::<HString>as)
                .findFirst()
                .orElseGet(() -> tokens()
                                    .stream()
                                    .filter(t -> !this.overlaps(t.parent()))
                                    .map(Cast::<HString>as)
                                    .findFirst()
                                    .orElse(this));
   }
562479
public Node removeFirst()
    {
        Node node = header.getNextNode();
        firstByte += node.ba.last();
        return removeNode( node );
    }
1114599
private void removeNodeFromList(RepairQueueNode el) {
    // the head case
    //
    if (null == el.prev) {
      if (null != el.next) {
        this.head = el.next;
        this.head.prev = null;
        el=null;
      }
      else {
        // can't happen? yep. if there is only one element exists...
        this.head = null;
      }
    }
    // the tail case
    //
    else if (null == el.next) {
      if (null != el.prev) {
        el.prev.next = null;
      }
      else {
        // can't happen?
        throw new RuntimeException("Unrecognized situation here...");
      }
    }
    // all others
    //
    else {
      el.prev.next = el.next;
      el.next.prev = el.prev;
    }

  }
245560
public boolean removeElement(P element) {
		boolean changed = false;
		if (element != null) {
			GridCellElement<P> gridElement;
			for (final GridCell<P> cell : getGridCellsOn(element.getGeoLocation().toBounds2D())) {
				gridElement = cell.removeElement(element);
				if (gridElement != null) {
					if (cell.isEmpty()) {
						this.cells[cell.row()][cell.column()] = null;
						--this.cellCount;
					}
					for (final GridCell<P> otherCell : gridElement.consumeCells()) {
						assert otherCell != cell;
						otherCell.removeElement(element);
						if (otherCell.isEmpty()) {
							this.cells[otherCell.row()][otherCell.column()] = null;
							--this.cellCount;
						}
					}
					changed = true;
				}
			}
		}
		if (changed) {
			--this.elementCount;
		}
		return changed;
	}
1081541
public GridCellElement<P> removeElement(P element) {
		final GridCellElement<P> elt = remove(element);
		if (elt != null) {
			if (elt.removeCellLink(this)) {
				--this.referenceElementCount;
			}
		}
		return elt;
	}
771122
public void removeHead( int total ) {
		for( int j = total; j < size; j++ ) {
			data[j-total] = data[j];
		}
		size -= total;
	}
785937
public T removeFirst() {
		if (isEmpty()) {
			return null;
		}
		T firstElement = elements[firstIndex];
		elements[firstIndex] = null;
		firstIndex = incrementIndex(firstIndex, 0);
		return firstElement;
	}
73404
public Head getHead() {
    if (EntityMention_Type.featOkTst && ((EntityMention_Type)jcasType).casFeat_head == null)
      jcasType.jcas.throwFeatMissing("head", "de.julielab.jules.types.ace.EntityMention");
    return (Head)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((EntityMention_Type)jcasType).casFeatCode_head)));}
1228582
public T removeLast()
   {
      T element = elementData[--size];
      elementData[size] = null;
      return element;
   }
42152
public ObjectSinkNode removeFirst() {
        if ( this.firstNode == null ) {
            return null;
        }
        final ObjectSinkNode node = this.firstNode;
        this.firstNode = node.getNextObjectSinkNode();
        node.setNextObjectSinkNode( null );
        if ( this.firstNode != null ) {
            this.firstNode.setPreviousObjectSinkNode( null );
        } else {
            this.lastNode = null;
        }
        this.size--;
        return node;
    }