Lets add a child element at the right place
548276
private boolean addPropertyElement(Element element, String elementName, String textContent) {
        Document doc = element.getOwnerDocument();
        Element newElement = doc.createElement(elementName);
        newElement.setTextContent(textContent);
        Text textNode = doc.createTextNode("\n    ");

        NodeList childNodes = element.getChildNodes();
        for (int i = 0, size = childNodes.getLength(); i < size; i++) {
            Node item = childNodes.item(i);
            if (item instanceof Element) {
                Element childElement = (Element) item;
                int value = childElement.getTagName().compareTo(elementName);
                if (value == 0) {
                    return false;
                }
                if (value > 0) {
                    element.insertBefore(textNode, childElement);
                    element.insertBefore(newElement, textNode);
                    return true;
                }
            }
        }
        // lets insert at the end
        element.appendChild(textNode);
        element.appendChild(newElement);
        return true;
    }
18595
public void addChild(int offset, TreeElement child)
            throws IllegalArgumentException
    {
        child.setSelected(false);
        child.setParent(this);
        if (_children == null)
            _children = new ArrayList();
        _children.add(offset, child);

        //Need to rename all affected!
        int size = _children.size();
        for (int i = offset; i < size; i++) {
            TreeElement thisChild = (TreeElement) _children.get(i);
            thisChild.updateName(this, i);
        }

    }
8116
void addElement(KElement element) {
		if (!this.elements.contains(element)) {
			element.setIndex(this.elements.size());
			this.elements.add(element);
		}
	}
1046780
function addChild(parent, child) {
        parent._children.push(child)
        incChildrenVersion(parent)
        return parent
    }
1081544
def maybe_add_child(self, fcoord):
        
        if fcoord not in self.children:
            new_position = self.position.play_move(
                coords.from_flat(fcoord))
            self.children[fcoord] = MCTSNode(
                new_position, fmove=fcoord, parent=self)
        return self.children[fcoord]
1039969
function(child) {
        child = child.get ? child.get('element') : child;
        return this.get('element').appendChild(child);
    }
688673
def add_child(self, child):
        
        self.children.append(child)
        child.parent = self
        self.udepth = max([child.udepth for child in self.children]) + 1
221078
function() {
        var win = $(window),
            options = this.options,
            element = this.element,
            parent = options.context ? element.parents(options.context) : element.parent();

        this.viewport = {
            width: win.width(),
            height: win.height()
        };

        this.elementHeight = element.outerHeight(true); // Include margin
        this.parentHeight = parent.height(); // Exclude padding
        this.parentTop = parent.offset().top;

        // Disable pin if element is larger than the viewport
        if (options.lock && this.elementHeight >= this.viewport.height) {
            this.active = false;

        // Enable pin if the parent is larger than the child
        } else {
            this.active = (element.is(':visible') && this.parentHeight > this.elementHeight);
        }
    }
692869
def appendChild(self, param):
        ''' 
        '''
        Symbol.appendChild(self, param)
        if param.offset is None:
            param.offset = self.size
            self.size += param.size
1164705
def add_child(self, child):
        '''
        '''
        if not isinstance(child, Node):
            raise TypeError("child must be a Node")
        self.children.append(child); child.parent = self
519699
function(index) {
    if(lang.isNumber(index)&& this._elColgroup) {
        var nextSibling = this._elColgroup.childNodes[index] || null;
        this._elColgroup.insertBefore(document.createElement("col"), nextSibling);
    }
}
260247
function (context) {
            var parent = context.stack.top();
            parent && parent.addChild(this);
            context.stack.push(this);
        }
865162
function (element) {
                var position = ariaUtilsDom.getOffset(element);
                this._elementInitialPosition = position;

                var style = element.style;
                style.position = "absolute";
                style.left = position.left + "px";
                style.top = position.top + "px";

            }
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);
            }
        }
    }
364137
def add_to(self, parent, name=None, index=None):
        """"""
        parent.add_child(self, name=name, index=index)
        return self
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);
    }
455215
function(element, child){
    if(_.isString(child))
      element.innerHTML += child;
    else if (_.isElement(child))
      element.appendChild(child);
  }