Program: 154034
Project: 154034
Buggy source:
/** 
 * Performs the "Warp" operation on a rectangular region of the same.
 */
protected void computeRect(Raster[] sources,WritableRaster dest,Rectangle destRect){
  Raster source=sources[0];
  int formatTag=MediaLibAccessor.findCompatibleTag(sources,dest);
  MediaLibAccessor srcMA=new MediaLibAccessor(source,source.getBounds(),formatTag);
  MediaLibAccessor dstMA=new MediaLibAccessor(dest,destRect,formatTag);
  mediaLibImage[] srcMLI=srcMA.getMediaLibImages();
  mediaLibImage[] dstMLI=dstMA.getMediaLibImages();
switch (dstMA.getDataType()) {
case DataBuffer.TYPE_BYTE:
case DataBuffer.TYPE_USHORT:
case DataBuffer.TYPE_SHORT:
case DataBuffer.TYPE_INT:
    if (mlibInterpTableI == null) {
      InterpolationTable jtable=(InterpolationTable)interp;
      mlibInterpTableI=new mediaLibImageInterpTable(Constants.MLIB_INT,jtable.getWidth(),jtable.getHeight(),jtable.getLeftPadding(),jtable.getTopPadding(),jtable.getSubsampleBitsH(),jtable.getSubsampleBitsV(),jtable.getPrecisionBits(),jtable.getHorizontalTableData(),jtable.getVerticalTableData());
    }
  if (setBackground)   for (int i=0; i < dstMLI.length; i++) {
    Image.PolynomialWarpTable2(dstMLI[i],srcMLI[i],xCoeffs,yCoeffs,destRect.x,destRect.y,source.getMinX(),source.getMinY(),preScaleX,preScaleY,postScaleX,postScaleY,mlibInterpTableI,Constants.MLIB_EDGE_DST_NO_WRITE,intBackgroundValues);
  }
 else   for (int i=0; i < dstMLI.length; i++) {
    Image.PolynomialWarpTable(dstMLI[i],srcMLI[i],xCoeffs,yCoeffs,destRect.x,destRect.y,source.getMinX(),source.getMinY(),preScaleX,preScaleY,postScaleX,postScaleY,mlibInterpTableI,Constants.MLIB_EDGE_DST_NO_WRITE);
  }
break;
case DataBuffer.TYPE_FLOAT:
if (mlibInterpTableF == null) {
InterpolationTable jtable=(InterpolationTable)interp;
mlibInterpTableF=new mediaLibImageInterpTable(Constants.MLIB_FLOAT,jtable.getWidth(),jtable.getHeight(),jtable.getLeftPadding(),jtable.getTopPadding(),jtable.getSubsampleBitsH(),jtable.getSubsampleBitsV(),jtable.getPrecisionBits(),jtable.getHorizontalTableDataFloat(),jtable.getVerticalTableDataFloat());
}
if (setBackground) for (int i=0; i < dstMLI.length; i++) {
Image.PolynomialWarpTable2_Fp(dstMLI[i],srcMLI[i],xCoeffs,yCoeffs,destRect.x,destRect.y,source.getMinX(),source.getMinY(),preScaleX,preScaleY,postScaleX,postScaleY,mlibInterpTableD,Constants.MLIB_EDGE_DST_NO_WRITE,backgroundValues);
}
 else for (int i=0; i < dstMLI.length; i++) {
Image.PolynomialWarpTable_Fp(dstMLI[i],srcMLI[i],xCoeffs,yCoeffs,destRect.x,destRect.y,source.getMinX(),source.getMinY(),preScaleX,preScaleY,postScaleX,postScaleY,mlibInterpTableD,Constants.MLIB_EDGE_DST_NO_WRITE);
}
break;
case DataBuffer.TYPE_DOUBLE:
if (mlibInterpTableD == null) {
InterpolationTable jtable=(InterpolationTable)interp;
mlibInterpTableD=new mediaLibImageInterpTable(Constants.MLIB_DOUBLE,jtable.getWidth(),jtable.getHeight(),jtable.getLeftPadding(),jtable.getTopPadding(),jtable.getSubsampleBitsH(),jtable.getSubsampleBitsV(),jtable.getPrecisionBits(),jtable.getHorizontalTableDataDouble(),jtable.getVerticalTableDataDouble());
}
if (setBackground) for (int i=0; i < dstMLI.length; i++) {
Image.PolynomialWarpTable2_Fp(dstMLI[i],srcMLI[i],xCoeffs,yCoeffs,destRect.x,destRect.y,source.getMinX(),source.getMinY(),preScaleX,preScaleY,postScaleX,postScaleY,mlibInterpTableD,Constants.MLIB_EDGE_DST_NO_WRITE,backgroundValues);
}
 else for (int i=0; i < dstMLI.length; i++) {
Image.PolynomialWarpTable_Fp(dstMLI[i],srcMLI[i],xCoeffs,yCoeffs,destRect.x,destRect.y,source.getMinX(),source.getMinY(),preScaleX,preScaleY,postScaleX,postScaleY,mlibInterpTableD,Constants.MLIB_EDGE_DST_NO_WRITE);
}
break;
default :
throw new RuntimeException(JaiI18N.getString("String_Node_Str"));
}
if (dstMA.isDataCopy()) {
dstMA.clampDataArrays();
dstMA.copyDataToRaster();
}
}

Fixed version (ground truth):
/** 
 * Performs the "Warp" operation on a rectangular region of the same.
 */
protected void computeRect(Raster[] sources,WritableRaster dest,Rectangle destRect){
  Raster source=sources[0];
  int formatTag=MediaLibAccessor.findCompatibleTag(sources,dest);
  MediaLibAccessor srcMA=new MediaLibAccessor(source,source.getBounds(),formatTag);
  MediaLibAccessor dstMA=new MediaLibAccessor(dest,destRect,formatTag);
  mediaLibImage[] srcMLI=srcMA.getMediaLibImages();
  mediaLibImage[] dstMLI=dstMA.getMediaLibImages();
switch (dstMA.getDataType()) {
case DataBuffer.TYPE_BYTE:
case DataBuffer.TYPE_USHORT:
case DataBuffer.TYPE_SHORT:
case DataBuffer.TYPE_INT:
    if (mlibInterpTableI == null) {
      InterpolationTable jtable=(InterpolationTable)interp;
      mlibInterpTableI=new mediaLibImageInterpTable(Constants.MLIB_INT,jtable.getWidth(),jtable.getHeight(),jtable.getLeftPadding(),jtable.getTopPadding(),jtable.getSubsampleBitsH(),jtable.getSubsampleBitsV(),jtable.getPrecisionBits(),jtable.getHorizontalTableData(),jtable.getVerticalTableData());
    }
  if (setBackground)   for (int i=0; i < dstMLI.length; i++) {
    Image.PolynomialWarpTable2(dstMLI[i],srcMLI[i],xCoeffs,yCoeffs,destRect.x,destRect.y,source.getMinX(),source.getMinY(),preScaleX,preScaleY,postScaleX,postScaleY,mlibInterpTableI,Constants.MLIB_EDGE_DST_NO_WRITE,intBackgroundValues);
  }
 else   for (int i=0; i < dstMLI.length; i++) {
    Image.PolynomialWarpTable(dstMLI[i],srcMLI[i],xCoeffs,yCoeffs,destRect.x,destRect.y,source.getMinX(),source.getMinY(),preScaleX,preScaleY,postScaleX,postScaleY,mlibInterpTableI,Constants.MLIB_EDGE_DST_NO_WRITE);
    MlibUtils.clampImage(dstMLI[i],getColorModel());
  }
break;
case DataBuffer.TYPE_FLOAT:
if (mlibInterpTableF == null) {
InterpolationTable jtable=(InterpolationTable)interp;
mlibInterpTableF=new mediaLibImageInterpTable(Constants.MLIB_FLOAT,jtable.getWidth(),jtable.getHeight(),jtable.getLeftPadding(),jtable.getTopPadding(),jtable.getSubsampleBitsH(),jtable.getSubsampleBitsV(),jtable.getPrecisionBits(),jtable.getHorizontalTableDataFloat(),jtable.getVerticalTableDataFloat());
}
if (setBackground) for (int i=0; i < dstMLI.length; i++) {
Image.PolynomialWarpTable2_Fp(dstMLI[i],srcMLI[i],xCoeffs,yCoeffs,destRect.x,destRect.y,source.getMinX(),source.getMinY(),preScaleX,preScaleY,postScaleX,postScaleY,mlibInterpTableD,Constants.MLIB_EDGE_DST_NO_WRITE,backgroundValues);
}
 else for (int i=0; i < dstMLI.length; i++) {
Image.PolynomialWarpTable_Fp(dstMLI[i],srcMLI[i],xCoeffs,yCoeffs,destRect.x,destRect.y,source.getMinX(),source.getMinY(),preScaleX,preScaleY,postScaleX,postScaleY,mlibInterpTableD,Constants.MLIB_EDGE_DST_NO_WRITE);
}
break;
case DataBuffer.TYPE_DOUBLE:
if (mlibInterpTableD == null) {
InterpolationTable jtable=(InterpolationTable)interp;
mlibInterpTableD=new mediaLibImageInterpTable(Constants.MLIB_DOUBLE,jtable.getWidth(),jtable.getHeight(),jtable.getLeftPadding(),jtable.getTopPadding(),jtable.getSubsampleBitsH(),jtable.getSubsampleBitsV(),jtable.getPrecisionBits(),jtable.getHorizontalTableDataDouble(),jtable.getVerticalTableDataDouble());
}
if (setBackground) for (int i=0; i < dstMLI.length; i++) {
Image.PolynomialWarpTable2_Fp(dstMLI[i],srcMLI[i],xCoeffs,yCoeffs,destRect.x,destRect.y,source.getMinX(),source.getMinY(),preScaleX,preScaleY,postScaleX,postScaleY,mlibInterpTableD,Constants.MLIB_EDGE_DST_NO_WRITE,backgroundValues);
}
 else for (int i=0; i < dstMLI.length; i++) {
Image.PolynomialWarpTable_Fp(dstMLI[i],srcMLI[i],xCoeffs,yCoeffs,destRect.x,destRect.y,source.getMinX(),source.getMinY(),preScaleX,preScaleY,postScaleX,postScaleY,mlibInterpTableD,Constants.MLIB_EDGE_DST_NO_WRITE);
}
break;
default :
throw new RuntimeException(JaiI18N.getString("String_Node_Str"));
}
if (dstMA.isDataCopy()) {
dstMA.clampDataArrays();
dstMA.copyDataToRaster();
}
}