Program: 151042
Project: 151042
Buggy source:
/** 
 * <p> Performs pixel-wise subtraction, but ensures the result is between two bounds.<br> d(x,y) = imgA(x,y) - imgB(x,y) </p>
 * @param inputA Input image. Not modified.
 * @param inputB Input image. Not modified.
 * @param output Output image. Modified.
 */
public static <T extends ImageSingleBand,O extends ImageSingleBand>void subtract(T inputA,T inputB,O output){
  if (ImageUInt8.class == inputA.getClass()) {
    PixelMath.subtract((ImageUInt8)inputA,(ImageUInt8)inputB,(ImageUInt16)output);
  }
 else   if (ImageSInt8.class == inputA.getClass()) {
    PixelMath.subtract((ImageSInt8)inputA,(ImageSInt8)inputB,(ImageSInt16)output);
  }
 else   if (ImageUInt16.class == inputA.getClass()) {
    PixelMath.subtract((ImageUInt16)inputA,(ImageUInt16)inputB,(ImageSInt32)output);
  }
 else   if (ImageSInt16.class == inputA.getClass()) {
    PixelMath.subtract((ImageSInt16)inputA,(ImageSInt16)inputB,(ImageSInt32)output);
  }
 else   if (ImageSInt32.class == inputA.getClass()) {
    PixelMath.subtract((ImageSInt32)inputA,(ImageSInt32)inputB,(ImageSInt32)output);
  }
 else   if (ImageSInt64.class == inputA.getClass()) {
    PixelMath.subtract((ImageSInt64)inputA,(ImageSInt64)inputB,(ImageSInt64)output);
  }
 else   if (ImageFloat32.class == inputA.getClass()) {
    PixelMath.subtract((ImageFloat32)inputA,(ImageFloat32)inputB,(ImageFloat32)output);
  }
 else   if (ImageFloat64.class == inputA.getClass()) {
    PixelMath.subtract((ImageFloat64)inputA,(ImageFloat64)inputB,(ImageFloat64)output);
  }
 else {
    throw new IllegalArgumentException("String_Node_Str" + inputA.getClass().getSimpleName());
  }
}

Fixed version (ground truth):
/** 
 * <p> Performs pixel-wise subtraction, but ensures the result is between two bounds.<br> d(x,y) = imgA(x,y) - imgB(x,y) </p>
 * @param inputA Input image. Not modified.
 * @param inputB Input image. Not modified.
 * @param output Output image. Modified.
 */
public static <T extends ImageSingleBand,O extends ImageSingleBand>void subtract(T inputA,T inputB,O output){
  if (ImageUInt8.class == inputA.getClass()) {
    PixelMath.subtract((ImageUInt8)inputA,(ImageUInt8)inputB,(ImageInt16)output);
  }
 else   if (ImageSInt8.class == inputA.getClass()) {
    PixelMath.subtract((ImageSInt8)inputA,(ImageSInt8)inputB,(ImageSInt16)output);
  }
 else   if (ImageUInt16.class == inputA.getClass()) {
    PixelMath.subtract((ImageUInt16)inputA,(ImageUInt16)inputB,(ImageSInt32)output);
  }
 else   if (ImageSInt16.class == inputA.getClass()) {
    PixelMath.subtract((ImageSInt16)inputA,(ImageSInt16)inputB,(ImageSInt32)output);
  }
 else   if (ImageSInt32.class == inputA.getClass()) {
    PixelMath.subtract((ImageSInt32)inputA,(ImageSInt32)inputB,(ImageSInt32)output);
  }
 else   if (ImageSInt64.class == inputA.getClass()) {
    PixelMath.subtract((ImageSInt64)inputA,(ImageSInt64)inputB,(ImageSInt64)output);
  }
 else   if (ImageFloat32.class == inputA.getClass()) {
    PixelMath.subtract((ImageFloat32)inputA,(ImageFloat32)inputB,(ImageFloat32)output);
  }
 else   if (ImageFloat64.class == inputA.getClass()) {
    PixelMath.subtract((ImageFloat64)inputA,(ImageFloat64)inputB,(ImageFloat64)output);
  }
 else {
    throw new IllegalArgumentException("String_Node_Str" + inputA.getClass().getSimpleName());
  }
}