rem: { if (arguments.length == 0) { return ind; } if (typeof ind != "number") { ind = 0; } if (ind < 0) { ind = Math.max(0,this.length + ind); } if (ind > this.length) { if (arguments.length > 2) { ind = this.length; } else { return []; } } if (arguments.length < 2) { cnt = this.length-ind; } 
add: { if (arguments.length == 0) { return ind; } if (typeof ind != "number") { ind = 0; } if (ind < 0) { ind = Math.max(0,this.length + ind); } if (ind > this.length) { if (arguments.length > 2) { ind = this.length; } else { return []; } } if (arguments.length < 2) { cnt = this.length-ind; } 
context:     Array.prototype.splice = function(ind, cnt)    {        if (arguments.length == 0) {            return ind;        }        if (typeof ind != "number") {            ind = 0;        }        if (ind < 0) {            ind = Math.max(0,this.length + ind);        }        if (ind > this.length) {            if (arguments.length > 2) {                ind = this.length;            }            else {                return [];            }        }        if (arguments.length < 2) {            cnt = this.length-ind;        }        cnt = (typeof cnt == "number") ? Math.max(0, cnt) : 0;        removeArray = this.slice(ind, ind + cnt);        endArray = this.slice(ind + cnt);        this.length = ind;        for (var i = 2; i < arguments.length; i++) {            this[this.length] = arguments[i];        }        for (i = 0; i < endArray.length; i++) {            this[this.length] = endArray[i];        }        return removeArray;    }
meta: 266	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/266/769a5807f342d8541951d74937d724ab38fcafe0/engine.js/buggy/java/uk/ltd/getahead/dwr/engine.js