Program: 154079
Project: 154079
Buggy source:
/** 
 * Creates a new instance of <code>MlibHistogramOpImage</code> in the rendered layer. Any image layout information in <code>RenderingHints</code> is ignored. This method satisfies the implementation of RIF.
 */
public RenderedImage create(ParameterBlock args,RenderingHints hints){
  if (!MediaLibAccessor.isMediaLibCompatible(args)) {
    return null;
  }
  RenderedImage src=args.getRenderedSource(0);
  int dataType=src.getSampleModel().getDataType();
  if (dataType == DataBuffer.TYPE_FLOAT || dataType == DataBuffer.TYPE_DOUBLE) {
    return null;
  }
  ROI roi=(ROI)args.getObjectParameter(0);
  if (roi != null && !roi.equals(new Rectangle(src.getMinX(),src.getMinY(),src.getWidth(),src.getHeight()))) {
    return null;
  }
  int xPeriod=args.getIntParameter(1);
  int yPeriod=args.getIntParameter(2);
  int[] numBins=(int[])args.getObjectParameter(3);
  double[] lowValueFP=(double[])args.getObjectParameter(4);
  double[] highValueFP=(double[])args.getObjectParameter(5);
  MlibHistogramOpImage op=null;
  try {
    op=new MlibHistogramOpImage(src,xPeriod,yPeriod,numBins,lowValueFP,highValueFP);
  }
 catch (  Exception e) {
    ImagingListener listener=ImageUtil.getImagingListener(hints);
    String message=JaiI18N.getString("String_Node_Str");
    listener.errorOccurred(message,e,this,false);
  }
  return op;
}

Fixed version (ground truth):
/** 
 * Creates a new instance of <code>MlibHistogramOpImage</code> in the rendered layer. Any image layout information in <code>RenderingHints</code> is ignored. This method satisfies the implementation of RIF.
 */
public RenderedImage create(ParameterBlock args,RenderingHints hints){
  if (!MediaLibAccessor.isMediaLibCompatible(args)) {
    return null;
  }
  RenderedImage src=args.getRenderedSource(0);
  int dataType=src.getSampleModel().getDataType();
  if (dataType == DataBuffer.TYPE_FLOAT || dataType == DataBuffer.TYPE_DOUBLE) {
    return null;
  }
  ROI roi=(ROI)args.getObjectParameter(0);
  if (roi != null && !roi.equals(new Rectangle(src.getMinX(),src.getMinY(),src.getWidth(),src.getHeight()))) {
    return null;
  }
  int xPeriod=args.getIntParameter(1);
  int yPeriod=args.getIntParameter(2);
  int[] numBins=(int[])args.getObjectParameter(3);
  double[] lowValueFP=(double[])args.getObjectParameter(4);
  double[] highValueFP=(double[])args.getObjectParameter(5);
  int minPixelValue;
  int maxPixelValue;
switch (dataType) {
case DataBuffer.TYPE_SHORT:
    minPixelValue=Short.MIN_VALUE;
  maxPixelValue=Short.MAX_VALUE;
break;
case DataBuffer.TYPE_USHORT:
minPixelValue=0;
maxPixelValue=-((int)Short.MIN_VALUE) + Short.MAX_VALUE;
break;
case DataBuffer.TYPE_INT:
minPixelValue=Integer.MIN_VALUE;
maxPixelValue=Integer.MAX_VALUE;
break;
case DataBuffer.TYPE_BYTE:
default :
minPixelValue=0;
maxPixelValue=-((int)Byte.MIN_VALUE) + Byte.MAX_VALUE;
break;
}
for (int i=0; i < lowValueFP.length; i++) {
if (lowValueFP[i] < minPixelValue || lowValueFP[i] > maxPixelValue) {
return null;
}
}
for (int i=0; i < highValueFP.length; i++) {
if (highValueFP[i] <= minPixelValue || highValueFP[i] > (maxPixelValue + 1)) {
return null;
}
}
MlibHistogramOpImage op=null;
try {
op=new MlibHistogramOpImage(src,xPeriod,yPeriod,numBins,lowValueFP,highValueFP);
}
 catch (Exception e) {
ImagingListener listener=ImageUtil.getImagingListener(hints);
String message=JaiI18N.getString("String_Node_Str");
listener.errorOccurred(message,e,this,false);
}
return op;
}