rem: element.appendChild(change.value.replacement[0]); 
add: element.appendChild(replacement[0]); 
context: function _applyChanges(changes) {  for (var i in changes) {    var change = changes[i];    if (change.label == 'InsertBeforeXml') {      _domInsertBeforeXml(change.value.insertXml, change.value.before);    }    else if (change.label == 'ReplaceNodeXml') {      _domReplaceNodeXml(change.value.refNode, change.value.replacement);    }    else if (change.label == 'GetRefByID') {      return _domGetRefByID(change.value.id);    }    else if (change.label == 'AppendChildXml') {      _domAppendChildXml(change.value.newChild, change.value.parentNode);    }    else if (change.label == 'RemoveNodeRef') {      _domRemoveNodeRef(change.value.nodeRef);    }    else if (change.label == 'InsertBeforeRef') {      _domInsertBeforeRef(change.value.moveRef, change.value.beforeRef);    }    else if (change.label == 'AppendChildRef') {      _domAppendChildRef(change.value.moveRef, change.value.parentRef);    }    else if (change.label == 'GetDocRef') {      return _domGetDocRef();    }    else if (change.label == 'GetRepresentation') {      return _domGetRepresentation(change.value.nodeRef);    }    // old-fashioned ops    else if (change.label == 'AppendChild') {        var element = document.getElementById(change.value.id);        if (!element) _alert("element " + change.value.id + " does not exist");        // FIXME: "replacement" is not a good name; nothing is being replaced.        element.appendChild(change.value.replacement[0]);    }      else if (change.label == 'SwapNodes') {          var one = change.value.first;          var two = change.value.second;          _swapNode(one, two);    }      else if (change.label == 'Document') {          _start(change.value);    } else {       throw("Unknown dom operation " + change)    }  }}
meta: 3248	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3248/77d9cf916f0c84f8b138a737e2ee44cbfaf21849/jslib.js/buggy/lib/js/jslib.js