/*-------------------------------------------------[ Add-Element ]---------------------------------------------------
506293
public XMLDocument addElement(String name, String text, boolean cdata) throws SAXException{
        return addElement("", name, text, cdata);
    }
742440
public void addChildElement(Node element) {
        element.setParent(this);
        emptyElementTag = false; // can't be an empty element tag if you attach child elements
        childElements.add(element);
    }
934215
function appendElementSelector (element, selector) {
  const processor = selectorParser((selectors) => {
    let combinatorNode = null

    /**
     * looping breaks if we insert dynamically
     */
    selectors.each((selector) => {
      const elementNode = selectorParser.tag({ value: element.tag })
      selector.walk((node) => {
        if (node.type === 'combinator') { combinatorNode = node }
      })

      if (combinatorNode) {
        selector.insertAfter(combinatorNode, elementNode)
      } else {
        selector.prepend(elementNode)
      }
    })
  })

  return processor.process(selector).result
}
1264218
public function addElement($element)
    {
        if ($this->processing === 'B') {
            $this->bodyElements[] = $element;
        } elseif ($this->processing === 'H') {
            $this->headerElements[] = $element;
        } elseif ($this->processing === 'F') {
            $this->footerElements[] = $element;
        }
    }
82937
@Override
    public void add(int index, E element) {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            Object[] elements = getArray();
            int len = elements.length;
            if (index > len || index < 0)
                throw new IndexOutOfBoundsException("Index: " + index +
                                                    ", Size: " + len);
            Object[] newElements;
            int numMoved = len - index;
            if (numMoved == 0)
                newElements = Arrays.copyOf(elements, len + 1);
            else {
                newElements = new Object[len + 1];
                System.arraycopy(elements, 0, newElements, 0, index);
                System.arraycopy(elements, index, newElements, index + 1,
                                 numMoved);
            }
            newElements[index] = element;
            setArray(newElements);
        } finally {
            lock.unlock();
        }
    }
620317
public boolean add(SeLionElement element) {
        // if already initialized, add the new elements to the front of the list.
        if (initialized) {
            CodeGeneratorLogger logger = CodeGeneratorLoggerFactory.getLogger();

            // info messages are only displayed after initialization happens
            if (isExactMatch(element.getElementClass())) {
                logger.info("Registering the element " + element + " which is now overwriting a pre-existing element.");
            } else {
                logger.info("Registering the element " + element + " as a valid element.");
            }

            SeLionElementSet elementSet = (SeLionElementSet) clone();
            clear();
            super.add(element);
            elementSet.stream().forEachOrdered(a -> super.add(a));
            return true;
        }
        return super.add(element);
    }
651441
public void addInt(
        @DoNotSub final int index,
        final int element)
    {
        checkIndexForAdd(index);

        @DoNotSub final int requiredSize = size + 1;
        ensureCapacityPrivate(requiredSize);

        if (index < size)
        {
            System.arraycopy(elements, index, elements, index + 1, size - index);
        }

        elements[index] = element;
        size++;
    }
16428
private void addOnlyOfTypeElements() {
        for (Node node : nodes) {
            Node n = DOMHelper.getPreviousSiblingElement(node);
            while (n != null) {
                if (DOMHelper.getNodeName(n).equals(DOMHelper.getNodeName(node))) {
                    break;
                }
                
                n = DOMHelper.getPreviousSiblingElement(n);
            }
            
            if (n == null) {
                n = DOMHelper.getNextSiblingElement(node);
                while (n != null) {
                    if (DOMHelper.getNodeName(n).equals(DOMHelper.getNodeName(node))) {
                        break;
                    }
                    
                    n = DOMHelper.getNextSiblingElement(n);
                }
                
                if (n == null) {
                    result.add(node);
                }
            }
        }
    }
650254
public static void appendElement(Element parent, Element child) {
        Node tmp = parent.getOwnerDocument().importNode(child, true);
        parent.appendChild(tmp);
    }
518977
public function addElement( $tag, $element, $overwrite = FALSE )
	{
		$this->add( array( $tag => $element ), $overwrite );
	}
198890
@Override
	public boolean add(final T element) {
		requireNonNull(element);

		boolean updated = false;
		final Iterator<T> iterator = _population.iterator();
		while (iterator.hasNext()) {
			final T existing = iterator.next();

			int cmp = _dominance.compare(element, existing);
			if (cmp > 0) {
				iterator.remove();
				updated = true;
			} else if (cmp < 0 || element.equals(existing)) {
				return updated;
			}
		}

		_population.add(element);
		return true;
	}
1125452
@Override
    public void add(int index, Object element) {
        rewrite |= index < delegate.size();

        delegate.add(index, element);
    }
437721
public function addElement(Element $element)
    {
        if (!in_array($element, $this->elements, true)) {
            array_push($this->elements, $element);
        }
        return $this;
    }
1184251
public int addElement(int element, int treap) {
		int treap_;
		if (treap == -1) {
			if (m_defaultTreap == nullNode())
				m_defaultTreap = createTreap(-1);
			treap_ = m_defaultTreap;
		} else {
			treap_ = treap;
		}

		return addElement_(element, 0, treap_);
	}
953867
public void addElement(SimpleCell element) throws BadElementException {
		if(!element.isCellgroup()) {
			throw new BadElementException("You can't add cells to a table directly, add them to a row first.");
		}
		content.add(element);
	}
960325
function append(element, content) {
  if (isElement(content)) {
    element.appendChild(content);
  } else {
    const div = document.createElement('div');
    div.innerHTML = content || '';

    while (div.firstChild) {
      element.appendChild(div.firstChild);
    }
  }
}
714014
public void add(IRenderingElement element) {
        if (element != null) {
            if (element.getClass().equals(ElementGroup.class))
                elements.addAll(((ElementGroup) element).elements);
            else
                elements.add(element);
        }
    }