/*
This method add shift to x values
332089
function reOrderBars(plot, serie, datapoints){
            var shiftedPoints = null;

            if(serieNeedToBeReordered(serie)){
                checkIfGraphIsHorizontal(serie);
                calculPixel2XWidthConvert(plot);
                retrieveBarSeries(plot);
                calculBorderAndBarWidth(serie);

                if(nbOfBarsToOrder >= 2){
                    var position = findPosition(serie);
                    var decallage = 0;

                    var centerBarShift = calculCenterBarShift();

                    // If we haven't already calculated the decallage for this order value, do it.
                    if(typeof decallageByOrder[serie.bars.order] === 'undefined') {
                        if (isBarAtLeftOfCenter(position)){
                            decallageByOrder[serie.bars.order] = -1*(sumWidth(orderedBarSeries,position-1,Math.floor(nbOfBarsToOrder / 2)-1)) - centerBarShift;
                        }else{
                            decallageByOrder[serie.bars.order] = sumWidth(orderedBarSeries,Math.ceil(nbOfBarsToOrder / 2),position-2) + centerBarShift + borderWidthInXabsWidth*2;
                        }
                    }

                    // Lookup the decallage based on the series' order value.
                    decallage = decallageByOrder[serie.bars.order];

                    shiftedPoints = shiftPoints(datapoints,serie,decallage);
                    datapoints.points = shiftedPoints;
                }
            }
            return shiftedPoints;
        }
704665
function expandXBounds(bounds, value) {
  if (bounds[MIN_X] > value) bounds[MIN_X] = value;else if (bounds[MAX_X] < value) bounds[MAX_X] = value;
}
782460
public static int positiveRightShift(int key, int shift) {
        int single = 0x3FF >> shift;
        int shiftMask = (single << 22) | (single << 11) | single;
        return shiftMask & (key >> shift);
    }
923446
public void excl(int x) {
        Assert.check(currentState != BitsState.UNKNOWN);
        Assert.check(x >= 0);
        sizeTo((x >>> wordshift) + 1);
        bits[x >>> wordshift] = bits[x >>> wordshift] &
            ~(1 << (x & wordmask));
        currentState = BitsState.NORMAL;
    }
532580
private String getShiftDecimal(long number, int shift) {
        StringBuilder builder = new StringBuilder();
        builder.append(number);

        int index = builder.length() - shift;
        builder.insert(index, ".");

        return builder.toString();
    }
491379
public synchronized void add(double x) {
		final double oldA = a;
		a += (x - a) / ++size;
		q += (x - a) * (x - oldA);
		min = Math.min(min, x);
		max = Math.max(max, x);
	}
1162454
function circshift( x, k ) {
	var type = typeof x,
		dir = 1, // right
		len,
		i;
	if ( !Array.isArray( x ) && type !== 'string' ) {
		throw new TypeError( 'circshift()::invalid input argument. Must provide either an array or string to shift.' );
	}
	if ( !isInteger( k ) ) {
		throw new TypeError( 'circshift()::invalid input argument. Second argument must be an integer.' );
	}
	if ( type === 'string' ) {
		x = x.split( '' );
	}
	len = x.length;
	if ( k < 0 ) {
		// Get the equivalent positive number of positions...
		k = len + k; // len - |x|
	}
	// We only care about the remainder when we circularly shift. k === len means the elements stay in place.
	k = k % len;

	// Determine the direction which requires the fewest operations...
	if ( k > len/2 ) {
		dir = 0; // left
		k = len - k;
	}
	if ( dir ) {
		// Pop an element off the end and move to the front...
		for ( i = 0; i < k; i++ ) {
			x.unshift( x.pop() );
		}
	} else {
		// Shift an element off the front and move to the end...
		for ( i = 0; i < k; i++ ) {
			x.push( x.shift() );
		}
	}
	if ( type === 'string' ) {
		x = x.join( '' );
	}
	return x;
}
1261406
function shift(b, rowBytes) {
  return Buffer.concat([b.slice(-rowBytes), b.slice(0, -rowBytes)], b.length);
}
711838
public void add(double x)
    {
        if (Double.isNaN(mean))//fist case
        {
            mean = x;
            variance = 0;
        }
        else//general case
        {
            //first update stnd deviation 
            variance = (1-smoothing)*(variance + smoothing*Math.pow(x-mean, 2));
            mean = (1-smoothing)*mean + smoothing*x;
        }
                    
    }
276006
void overlayLeftShift(
    int           ix)
  {
    for (int j = ix; j < rightMostIndex(); j++)
      _nodeKey[j] = _nodeKey[j+1];
  }
113546
private void appendValueLength(int value, int index) {
    int previousValue = toIntUnsigned(getValue(index));
    int length = toIntUnsigned(getLength(index));
    int offset = value - previousValue;
    if (offset > length) {
      setLength(index, (short) offset);
    }
  }
1211077
@Override
    public C setOffset(final double x, final double y)
    {
        getAttributes().setOffset(x, y);

        return cast();
    }
522425
function shift_cell_xls(cell, tgt, opts) {
	var out = dup(cell);
	if(tgt.s) {
		if(out.cRel) out.c += tgt.s.c;
		if(out.rRel) out.r += tgt.s.r;
	} else {
		out.c += tgt.c;
		out.r += tgt.r;
	}
	if(!opts || opts.biff < 12) {
		while(out.c >= 0x100) out.c -= 0x100;
		while(out.r >= 0x10000) out.r -= 0x10000;
	}
	return out;
}
1184067
function int64rrot(dst, x, shift) {
        dst.l = (x.l >>> shift) | (x.h << (32 - shift));
        dst.h = (x.h >>> shift) | (x.l << (32 - shift));
      }
318167
public final void shiftExpression() throws RecognitionException {
		int shiftExpression_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 120) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1178:5: ( additiveExpression ( shiftOp additiveExpression )* )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1178:9: additiveExpression ( shiftOp additiveExpression )*
			{
			pushFollow(FOLLOW_additiveExpression_in_shiftExpression5337);
			additiveExpression();
			state._fsp--;
			if (state.failed) return;
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1178:28: ( shiftOp additiveExpression )*
			loop152:
			while (true) {
				int alt152=2;
				alt152 = dfa152.predict(input);
				switch (alt152) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1178:30: shiftOp additiveExpression
					{
					pushFollow(FOLLOW_shiftOp_in_shiftExpression5341);
					shiftOp();
					state._fsp--;
					if (state.failed) return;
					pushFollow(FOLLOW_additiveExpression_in_shiftExpression5343);
					additiveExpression();
					state._fsp--;
					if (state.failed) return;
					}
					break;

				default :
					break loop152;
				}
			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 120, shiftExpression_StartIndex); }

		}
	}
289513
public void scaleAdd(double f, Point2D shift) {
		x = x * f + shift.x;
		y = y * f + shift.y;
	}
783639
@Override
    public T setOffset(final double x, final double y)
    {
        getAttributes().setOffset(x, y);

        return cast();
    }