Program: 61706
Project: 61706
Buggy source:
private static BufferedImage dropShadow(BufferedImage src,int blurX,int blurY,float angle,double distance,Color color,boolean inner,int iterations,float strength,boolean knockout){
  int width=src.getWidth();
  int height=src.getHeight();
  int[] srcPixels=getRGB(src,0,0,width,height);
  int shadow[]=new int[srcPixels.length];
  for (int i=0; i < srcPixels.length; i++) {
    int alpha=(srcPixels[i] >> 24) & 0xff;
    if (inner) {
      alpha=255 - alpha;
    }
    shadow[i]=new Color(color.getRed(),color.getGreen(),color.getBlue(),cut(color.getAlpha() * alpha * strength)).getRGB();
  }
  Color colorFirst=Color.BLACK;
  Color colorAlpha=new Color(0,0,0,0);
  double angleRad=angle / 180 * Math.PI;
  double moveX=(distance * Math.cos(angleRad));
  double moveY=(distance * Math.sin(angleRad));
  shadow=moveRGB(width,height,shadow,moveX,moveY,inner ? colorFirst : colorAlpha);
  BufferedImage retCanvas=new BufferedImage(width,height,src.getType());
  setRGB(retCanvas,0,0,width,height,shadow);
  if (blurX > 0 || blurY > 0) {
    retCanvas=blur(retCanvas,blurX,blurY,iterations,null);
  }
  shadow=getRGB(retCanvas,0,0,width,height);
  for (int i=0; i < shadow.length; i++) {
    int mask=(srcPixels[i] >> 24) & 0xff;
    if (!inner) {
      mask=255 - mask;
    }
    shadow[i]=shadow[i] & 0xffffff + ((mask * ((shadow[i] >> 24) & 0xff) / 255) << 24);
  }
  setRGB(retCanvas,0,0,width,height,shadow);
  if (!knockout) {
    Graphics2D g=retCanvas.createGraphics();
    g.setComposite(AlphaComposite.DstOver);
    g.drawImage(src,0,0,null);
  }
  return retCanvas;
}

Fixed version (ground truth):
private static BufferedImage dropShadow(BufferedImage src,int blurX,int blurY,float angle,double distance,Color color,boolean inner,int iterations,float strength,boolean knockout){
  int width=src.getWidth();
  int height=src.getHeight();
  int[] srcPixels=getRGB(src,0,0,width,height);
  int shadow[]=new int[srcPixels.length];
  for (int i=0; i < srcPixels.length; i++) {
    int alpha=(srcPixels[i] >> 24) & 0xff;
    if (inner) {
      alpha=255 - alpha;
    }
    shadow[i]=new Color(color.getRed(),color.getGreen(),color.getBlue(),cut(color.getAlpha() * alpha / 255 * strength)).getRGB();
  }
  Color colorFirst=Color.BLACK;
  Color colorAlpha=new Color(0,0,0,0);
  double angleRad=angle / 180 * Math.PI;
  double moveX=(distance * Math.cos(angleRad));
  double moveY=(distance * Math.sin(angleRad));
  shadow=moveRGB(width,height,shadow,moveX,moveY,inner ? colorFirst : colorAlpha);
  BufferedImage retCanvas=new BufferedImage(width,height,src.getType());
  setRGB(retCanvas,0,0,width,height,shadow);
  if (blurX > 0 || blurY > 0) {
    retCanvas=blur(retCanvas,blurX,blurY,iterations,null);
  }
  shadow=getRGB(retCanvas,0,0,width,height);
  for (int i=0; i < shadow.length; i++) {
    int mask=(srcPixels[i] >> 24) & 0xff;
    if (!inner) {
      mask=255 - mask;
    }
    shadow[i]=shadow[i] & 0xffffff + ((mask * ((shadow[i] >> 24) & 0xff) / 255) << 24);
  }
  setRGB(retCanvas,0,0,width,height,shadow);
  if (!knockout) {
    Graphics2D g=retCanvas.createGraphics();
    g.setComposite(AlphaComposite.DstOver);
    g.drawImage(src,0,0,null);
  }
  return retCanvas;
}