Program: 73331
Project: 73331
Buggy source:
/** 
 * Draws the background image at the contentByteUnder of the pdf with the given offset
 * @param imageURI the URI referring the image
 * @param x the start X coordinate at the PDF where the image is positioned
 * @param y the start Y coordinate at the PDF where the image is positioned
 * @param width the width of the background dimension
 * @param height the height of the background dimension
 * @param positionX the offset X percentage relating to start X
 * @param positionY the offset Y percentage relating to start Y
 * @param repeat the background-repeat property
 * @param xMode whether the horizontal position is a percentage value or not
 * @param yMode whether the vertical position is a percentage value or not
 */
private void drawBackgroundImage(String imageURI,int x,int y,int width,int height,float positionX,float positionY,String repeat,boolean xMode,boolean yMode){
  if (null == imageURI) {
    return;
  }
  String imageUrl=getImageUrl(imageURI);
  if (imageUrl == null || "String_Node_Str".equals(imageUrl)) {
    return;
  }
  if (null == repeat) {
    repeat="String_Node_Str";
  }
  Image img=null;
  try {
    img=Image.getInstance(imageUrl);
    int absPosX, absPosY;
    if (xMode) {
      absPosX=(int)((width - img.scaledWidth() * PDFConstants.LAYOUT_TO_PDF_RATIO) * positionX);
    }
 else {
      absPosX=(int)positionX;
    }
    if (yMode) {
      absPosY=(int)((height - img.scaledHeight() * PDFConstants.LAYOUT_TO_PDF_RATIO) * positionY);
    }
 else {
      absPosY=(int)positionY;
    }
    pageGraphic.drawBackgroundImage(x,y,width,height,repeat,imageUrl,absPosX,absPosY);
  }
 catch (  Exception e) {
    log(e,Level.WARNING);
  }
}

Fixed version (ground truth):
/** 
 * Draws the background image at the contentByteUnder of the pdf with the given offset
 * @param imageURI the URI referring the image
 * @param x the start X coordinate at the PDF where the image is positioned
 * @param y the start Y coordinate at the PDF where the image is positioned
 * @param width the width of the background dimension
 * @param height the height of the background dimension
 * @param positionX the offset X percentage relating to start X
 * @param positionY the offset Y percentage relating to start Y
 * @param repeat the background-repeat property
 * @param xMode whether the horizontal position is a percentage value or not
 * @param yMode whether the vertical position is a percentage value or not
 */
private void drawBackgroundImage(String imageURI,int x,int y,int width,int height,float positionX,float positionY,String repeat,boolean xMode,boolean yMode){
  if (null == imageURI) {
    return;
  }
  if (imageURI == null || "String_Node_Str".equals(imageURI)) {
    return;
  }
  if (null == repeat) {
    repeat="String_Node_Str";
  }
  Image img=null;
  try {
    img=Image.getInstance(new URL(imageURI));
    int absPosX, absPosY;
    if (xMode) {
      absPosX=(int)((width - img.scaledWidth() * PDFConstants.LAYOUT_TO_PDF_RATIO) * positionX);
    }
 else {
      absPosX=(int)positionX;
    }
    if (yMode) {
      absPosY=(int)((height - img.scaledHeight() * PDFConstants.LAYOUT_TO_PDF_RATIO) * positionY);
    }
 else {
      absPosY=(int)positionY;
    }
    pageGraphic.drawBackgroundImage(x,y,width,height,repeat,imageURI,absPosX,absPosY);
  }
 catch (  Exception e) {
    log(e,Level.WARNING);
  }
}