rem: var returnVal = oldFunction.apply(this, arguments);  
add: var returnVal = oldFunction.apply(this, arguments); 
context: wrapGetEvents = function(getEventsFunction){    var oldFunction = getEventsFunction;    var newFunction = function(){        var realRangeStart = arguments[1];        var realRangeEnd   = arguments[2];        //add some padding        oneDay = 24 * 60 * 60 * 1000;        var paddedRangeStart = realRangeStart - oneDay;        var paddedRangeEnd   = realRangeEnd + oneDay;        arguments[1] = paddedRangeStart;        arguments[2] = paddedRangeEnd;        var returnVal = oldFunction.apply(this, arguments);        returnVal.sort(wrapGetEventsCompareFunction);        var filteredEvents = new Array();        for (var x = 0; x < returnVal.length; x++){                var start = returnVal[x].start.toUTC();                var end =  returnVal[x].end ? returnVal[x].end.toUTC() : start;                // Throw out events where both start and end are on the same                // side of the range                if (!(start < realRangeStart && end < realRangeStart) &&                    !(start > realRangeEnd && end > realRangeEnd)) {                    filteredEvents[filteredEvents.length] = returnVal[x];                }        }        return filteredEvents;    }    return newFunction;}
meta: 1859	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1859/22e60a56b01dc4984a78fe5844e4803b8d843b0e/json_service_impl.js/clean/src/main/webapp/js/cosmo/service/json_service_impl.js