rem: EchoRemoteClient.ComponentSyncRemoveProcessor.prototype._processComponentRemove = function(parentComponent, childElementIds) { if (childElementIds.length > 5) {     var idToIndexMap = new Object(); for (var i = 0; i < parentComponent.children.length; ++i) { idToIndexMap[parentComponent.children[i].renderId] = i; }   var indicesToRemove = new Array(); for (var i = 0; i <  childElementIds.length; ++i) { var index = idToIndexMap[childElementIds[i]]; if (index != null) { indicesToRemove.push(parseInt(index)); 
add: _processComponentRemove: function(parentComponent, childElementIds) { if (childElementIds.length > 5) {     var idToIndexMap = new Object(); for (var i = 0; i < parentComponent.children.length; ++i) { idToIndexMap[parentComponent.children[i].renderId] = i; 
context: EchoRemoteClient.ComponentSyncRemoveProcessor.prototype._processComponentRemove = function(parentComponent, childElementIds) {    if (childElementIds.length > 5) {        // Special case: many children being removed: create renderId -> index map and remove by index        // in order to prevent Component.indexOf() of from being invoked n times.                // Create map between ids and indices.        var idToIndexMap = new Object();        for (var i = 0; i < parentComponent.children.length; ++i) {            idToIndexMap[parentComponent.children[i].renderId] = i;        }                // Create array of indices to remove.        var indicesToRemove = new Array();        for (var i = 0; i <  childElementIds.length; ++i) {            var index = idToIndexMap[childElementIds[i]];            if (index != null) {                indicesToRemove.push(parseInt(index));            }        }        indicesToRemove.sort(EchoRemoteClient.ComponentSyncUpdateProcessor._numericReverseSort);        // Remove components (last to first).        for (var i = 0; i < indicesToRemove.length; ++i) {            parentComponent.remove(indicesToRemove[i]);        }    } else {        for (var i = 0; i < childElementIds.length; ++i) {            var component = this._client.application.getComponentByRenderId(childElementIds[i]);            if (component) {                parentComponent.remove(component);            }        }    }};
meta: 600	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/600/4705113f80e2c9e4d43ad240349e3193f4caf648/RemoteClient.js/buggy/src/webcontainer/java/nextapp/echo/webcontainer/resource/js/RemoteClient.js