Just create a local copy of the fractions and colors array
@param FRACTIONS
@param colors
337605
private void copyArrays(final float[] FRACTIONS, final Color[] colors) {
        fractions = new float[FRACTIONS.length];
        System.arraycopy(FRACTIONS, 0, fractions, 0, FRACTIONS.length);
        this.colors = colors.clone();
    }
244877
public void setIconColor(@ColorInt int color) {
    jsonObject.addProperty(SymbolOptions.PROPERTY_ICON_COLOR, ColorUtils.colorToRgbaString(color));
  }
849067
public void setColor(float r, float g, float b, float a) {
		if (color == Color.white) {
			color = new Color(r,g,b,a);
		} else {
			color.r = r;
			color.g = g;
			color.b = b;
			color.a = a;
		}
	}
500229
@SuppressWarnings({ "checkstyle:magicnumber", "static-method" })
	@Pure
	public Color rgba(int color) {
		final int alpha = (color & 0xFF000000) >> 24;
		final int red = (color & 0x00FF0000) >> 16;
		final int green = (color & 0x0000FF00) >> 8;
		final int blue = color & 0x000000FF;
		final double opacity;
		switch (alpha) {
		case 0:
			opacity = 0.;
			break;
		case 255:
			opacity = 1.;
			break;
		default:
			opacity = ((double) alpha) / 255;
		}
		return Color.rgb(red, green, blue, opacity);
	}
301606
public void setGraph(MeasureCollection[] measures, MeasureCollection[] measureStds,
            double[] variedParamValues, Color[] colors) {
        this.measures = measures;
        this.variedParamValues = variedParamValues;
        ((GraphScatter) this.plotPanel).setGraph(measures, measureStds,
                variedParamValues, colors);
        updateCanvas(false);
    }
1336772
public void setCircleColor(@ColorInt int color) {
    jsonObject.addProperty(CircleOptions.PROPERTY_CIRCLE_COLOR, ColorUtils.colorToRgbaString(color));
  }
1036392
public static MattePainter getMattePainter(final int width, final int height,
		final float[] fractions, final Color... colors)
	{
		final LinearGradientPaint gradientPaint = new LinearGradientPaint(0.0f, 0.0f, width, height,
			fractions, colors);
		final MattePainter mattePainter = new MattePainter(gradientPaint);
		return mattePainter;

	}
699128
private static Color[] rainbow(int n, float start, float end, float alpha) {
        return rainbow(n, start, end, 1.0f, 1.0f, alpha);
    }
446503
private static int setColorAlpha(int color, byte alpha) {
    return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color));
  }
441512
public void setColor(Color c) {
		boolean renderAgain = (c != m_color) && isRendered();
		m_color = c;
		if (renderAgain)
			render(g2d);
	}
876580
private final void setColor(ColorSet colorSet) {
        int[] rgb = ColorSet.getRGB(colorSet);
        this.red   = rgb[0] / 255.0;
        this.green = rgb[1] / 255.0;
        this.blue  = rgb[2] / 255.0;
    }
1363433
private float colorToAngle(int color) {
		float[] colors = new float[3];
		Color.colorToHSV(color, colors);
		
		return (float) Math.toRadians(-colors[0]);
	}
930350
public void setBackgroundColor(int color) {
        setBackgroundColorR(Colors.byteToGl(Color.red(color)));
        setBackgroundColorG(Colors.byteToGl(Color.green(color)));
        setBackgroundColorB(Colors.byteToGl(Color.blue(color)));
        setBackgroundColorA(Colors.byteToGl(Color.alpha(color)));
    }
85507
public void setEdgeColor(ColorSet colorSet) {
        if (edgeColor == null) edgeColor = new RGBColor(0.0, 0.0, 0.0);
        setGradation(true);
        this.edgeColor = RGBColor.color(colorSet);
    }
842356
public void setNonStrokingColor (final Color color) throws IOException
  {
    final float [] components = new float [] { color.getRed () / 255f,
                                               color.getGreen () / 255f,
                                               color.getBlue () / 255f };
    final PDColor pdColor = new PDColor (components, PDDeviceRGB.INSTANCE);
    setNonStrokingColor (pdColor);
  }
597303
public void drawLine(int x0, int y0, int x1, int y1, Color c) {
        int colorRGB = c.getRGB();
        int dy = y1 - y0;
        int dx = x1 - x0;
        int stepx, stepy;
        int fraction;


        if (dy < 0) {
            dy = -dy;
            stepy = -1;
        } else {
            stepy = 1;
        }
        if (dx < 0) {
            dx = -dx;
            stepx = -1;
        } else {
            stepx = 1;
        }
        dy <<= 1;                            // dy is now 2*dy
        dx <<= 1;                            // dx is now 2*dx

        setIntColor(x0, y0, colorRGB);

        if (dx > dy) {
            fraction = dy - (dx >> 1);    // same as 2*dy - dx
            while (x0 != x1) {
                if (fraction >= 0) {
                    y0 += stepy;
                    fraction -= dx;        // same as fraction -= 2*dx
                }
                x0 += stepx;
                fraction += dy;                // same as fraction -= 2*dy
                setIntColor(x0, y0, colorRGB);
            }
        } else {
            fraction = dx - (dy >> 1);
            while (y0 != y1) {
                if (fraction >= 0) {
                    x0 += stepx;
                    fraction -= dy;
                }
                y0 += stepy;
                fraction += dx;
                setIntColor(x0, y0, colorRGB);
            }
        }
    }
1293225
public final void setHintTextColor(final ColorStateList colors) {
        this.hintColor = colors;

        if (getAdapter() != null) {
            ProxySpinnerAdapter proxyAdapter = (ProxySpinnerAdapter) getAdapter();
            setAdapter(proxyAdapter.getAdapter());
        }
    }