Program: 154006
Project: 154006
Buggy source:
private void computeRectNonColorSpaceJAI(Raster src,ImageParameters srcParam,WritableRaster dest,ImageParameters dstParam,Rectangle destRect){
  if (!srcParam.isFloat() && !dstParam.isFloat()) {
    Raster s=src;
    if (s.getMinX() != destRect.x || s.getMinY() != destRect.y || s.getWidth() != destRect.width || s.getHeight() != destRect.height) {
      s=s.createChild(destRect.x,destRect.y,destRect.width,destRect.height,destRect.x,destRect.y,null);
    }
    WritableRaster d=dest;
    if (d.getMinX() != destRect.x || d.getMinY() != destRect.y || d.getWidth() != destRect.width || d.getHeight() != destRect.height) {
      d=d.createWritableChild(destRect.x,destRect.y,destRect.width,destRect.height,destRect.x,destRect.y,null);
    }
    colorConvertOp.filter(s,d);
  }
 else {
    ColorSpace srcColorSpace=srcParam.getColorModel().getColorSpace();
    ColorSpace dstColorSpace=dstParam.getColorModel().getColorSpace();
    boolean srcFloat=srcParam.isFloat();
    float srcMinValue=srcParam.getMinValue();
    float srcRange=srcParam.getRange();
    boolean dstFloat=dstParam.isFloat();
    float dstMinValue=dstParam.getMinValue();
    float dstRange=dstParam.getRange();
    int rectYMax=destRect.y + destRect.height;
    int rectXMax=destRect.x + destRect.width;
    int numComponents=srcColorSpace.getNumComponents();
    float[] srcPixel=new float[numComponents];
    float[] xyzPixel;
    float[] dstPixel;
    for (int y=destRect.y; y < rectYMax; y++) {
      for (int x=destRect.x; x < rectXMax; x++) {
        srcPixel=src.getPixel(x,y,srcPixel);
        if (!srcFloat) {
          for (int i=0; i < numComponents; i++) {
            srcPixel[i]=(srcPixel[i] - srcMinValue) / srcRange;
          }
        }
        xyzPixel=srcColorSpace.toCIEXYZ(srcPixel);
        dstPixel=dstColorSpace.fromCIEXYZ(xyzPixel);
        if (!dstFloat) {
          for (int i=0; i < numComponents; i++) {
            dstPixel[i]=(dstPixel[i] * dstRange + dstMinValue);
          }
        }
        dest.setPixel(x,y,dstPixel);
      }
    }
  }
}

Fixed version (ground truth):
private void computeRectNonColorSpaceJAI(Raster src,ImageParameters srcParam,WritableRaster dest,ImageParameters dstParam,Rectangle destRect){
  if (!srcParam.isFloat() && !dstParam.isFloat()) {
    Raster s=src;
    if (s.getMinX() != destRect.x || s.getMinY() != destRect.y || s.getWidth() != destRect.width || s.getHeight() != destRect.height) {
      s=s.createChild(destRect.x,destRect.y,destRect.width,destRect.height,destRect.x,destRect.y,null);
    }
    WritableRaster d=dest;
    if (d.getMinX() != destRect.x || d.getMinY() != destRect.y || d.getWidth() != destRect.width || d.getHeight() != destRect.height) {
      d=d.createWritableChild(destRect.x,destRect.y,destRect.width,destRect.height,destRect.x,destRect.y,null);
    }
synchronized (colorConvertOp.getClass()) {
      colorConvertOp.filter(s,d);
    }
  }
 else {
    ColorSpace srcColorSpace=srcParam.getColorModel().getColorSpace();
    ColorSpace dstColorSpace=dstParam.getColorModel().getColorSpace();
    boolean srcFloat=srcParam.isFloat();
    float srcMinValue=srcParam.getMinValue();
    float srcRange=srcParam.getRange();
    boolean dstFloat=dstParam.isFloat();
    float dstMinValue=dstParam.getMinValue();
    float dstRange=dstParam.getRange();
    int rectYMax=destRect.y + destRect.height;
    int rectXMax=destRect.x + destRect.width;
    int numComponents=srcColorSpace.getNumComponents();
    float[] srcPixel=new float[numComponents];
    float[] xyzPixel;
    float[] dstPixel;
    for (int y=destRect.y; y < rectYMax; y++) {
      for (int x=destRect.x; x < rectXMax; x++) {
        srcPixel=src.getPixel(x,y,srcPixel);
        if (!srcFloat) {
          for (int i=0; i < numComponents; i++) {
            srcPixel[i]=(srcPixel[i] - srcMinValue) / srcRange;
          }
        }
        xyzPixel=srcColorSpace.toCIEXYZ(srcPixel);
        dstPixel=dstColorSpace.fromCIEXYZ(xyzPixel);
        if (!dstFloat) {
          for (int i=0; i < numComponents; i++) {
            dstPixel[i]=(dstPixel[i] * dstRange + dstMinValue);
          }
        }
        dest.setPixel(x,y,dstPixel);
      }
    }
  }
}