rem: transitions = removeDuplicates(merge(transitions, tops)); transitions = removeDuplicates(merge(transitions, bottoms)); 
add: transitions = OSUtils.Array.removeDuplicates(OSUtils.Array.merge(transitions, tops)); transitions = OSUtils.Array.removeDuplicates(OSUtils.Array.merge(transitions, bottoms)); 
context: OSGradient.createGradient = function(e, style) {    var c0 = style['gradient-start-color'];    var c1 = style['gradient-end-color'];	var a0 = style['gradient-start-opacity'];	var a1 = style['gradient-stop-opacity'];    var r = style['border-radius'];	    var width = e.offsetWidth, height = e.offsetHeight;		var barCount = 0;	for (var shift = 24; (shift -= 8) >= 0; )		barCount = Math.max(barCount, Math.abs(c0 - c1 >> shift & 255) + 1);		var transitions = [];	for (var i = 0; i <= barCount; i++)		transitions.push(Math.floor(i * height / barCount));		var sides = [];	if (r) {		var tops = [];		var bottoms = [];		for (var y = 0; y <= r; y++) {			tops.push(y);			bottoms.unshift(height-y);		}		transitions = removeDuplicates(merge(transitions, tops));		transitions = removeDuplicates(merge(transitions, bottoms));	}	    var spans = [];    for (var i = 0; i < transitions.length-1; i++) {        var y = transitions[i];        var h = transitions[i+1] - y;		if (!h) continue;		var w = width;        var dx = 0;        var dy = Math.max(r-y, y-(height-r));        if (0 <= dy) dx = r - Math.sqrt(r*r-dy*dy);        var color = OSUtils.color.interpolate(c0, c1, y/height);        var properties = {position: 'relative',                          left: dx,						  top: 0,                          width: w-2*dx,                          height: h,						  'font-size': 1,						  'line-height': 0,                          background: OSUtils.color.long2css(color)};        var style = [];        for (var p in properties)            style.push(p + ':' + String(properties[p]));		if (false && dx) {			spans.push('<div style="'+style.join(';')+'">');			spans.push('<span style="opacity:.5;width:10;height:1px">&nbsp;</span>');			spans.push('&nbsp;');			spans.push('</div>');			continue;		}        spans.push('<div style="'+style.join(';')+'">&nbsp;</div>');    }    var g = document.createElement('div');    g.innerHTML = spans.join('');    g.style.position = 'absolute';    g.style.left='0px';    g.style.top='0px';    g.style.width="100%";    g.style.height='100%';    g.style.zIndex = -1;	return g;};
meta: 5392	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5392/ad867b0bdadb9eb3a627112421ab064b20066698/gradients.js/buggy/sources/javascript/gradients.js