if (dojo.lang.isUndefined(index)) { index = this.children.length; } 
if (dojo.lang.isUndefined(index)) { index = this.children.length; } 
  doAddChild: function(child, index){    if (dojo.lang.isUndefined(index)) {      index = this.children.length;    }    if (!child.isTreeNode){      dojo.raise("You can only add TreeNode widgets to a "+this.widgetType+" widget!");      return;    }    // usually it is impossible to change "isFolder" state, but if anyone wants to add a child to leaf,    // it is possible program-way.    if (this.isTreeNode){      if (!this.isFolder) { // just became a folder.        //dojo.debug("becoming folder "+this);        this.setFolder();      }    }    // adjust tree    var _this = this;    dojo.lang.forEach(child.getDescendants(), function(elem) { elem.tree = _this.tree; });    // fix parent    child.parent = this;    // no dynamic loading for those who become parents    if (this.isTreeNode) {      this.state = this.loadStates.LOADED;    }    // add new child into DOM after it was added into children    if (index < this.children.length) { // children[] already has child      //dojo.debug("Inserting before "+this.children[index].title);      dojo.html.insertBefore(child.domNode, this.children[index].domNode);    } else {      this.containerNode.appendChild(child.domNode);      if (this.isExpanded && this.isTreeNode) {        /* When I add children to hidden containerNode => show container w/ them */        this.showChildren();      }    }    this.children.splice(index, 0, child);    //dojo.debugShallow(this.children);    // if node exists - adjust its depth, otherwise build it    if (child.domNodeInitialized) {      var d = this.isTreeNode ? this.depth : -1;      child.adjustDepth( d - child.depth + 1 );      // update icons to link generated dom with Tree => updateParentGrid      // if I moved child from LastNode inside the tree => need to link it up'n'down =>      // updateExpandGridColumn      // if I change depth => need to update all grid..      child.updateIconTree();    } else {      //dojo.debug("Create domnode ");      child.depth = this.isTreeNode ? this.depth+1 : 0;      child.createDOMNode(child.tree, child.depth);    }    // Use-case:    // When previous sibling was created => it was last, no children after it    // so it did not create link down => let's add it for all descendants    // Use-case:    // a child was moved down under the last node so last node should be updated    var prevSibling = child.getPreviousSibling();    if (child.isLastChild() && prevSibling) {      prevSibling.updateExpandGridColumn();    }    //dojo.debug("Added child "+child);  },
6315	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6315/65ae7e8768a77997b7894e274bc242069a1cb027/struts_dojo.js.uncompressed.js/clean/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js