Program: 69673
Project: 69673
Buggy source:
/** 
 * Draws the background image at the contentByteUnder of the PPT with the given offset
 * @param imageURI the URI referring the image
 * @param x the start X coordinate at the PPT where the image is positioned
 * @param y the start Y coordinate at the PPT 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
 */
public void drawBackgroundImage(String imageURI,float x,float y,float width,float height,float iWidth,float iHeight,float positionX,float positionY,int repeat){
  if (imageURI == null || imageURI.length() == 0) {
    return;
  }
  float imageWidth=iWidth;
  float imageHeight=iHeight;
  String extension=getImageExtension(imageURI);
  Image image=EmitterUtil.parseImage(null,IImageContent.IMAGE_URL,imageURI,null,extension);
  byte[] imageData=image.getData();
  if (imageWidth == 0 || imageHeight == 0) {
    imageWidth=image.getWidth();
    imageHeight=image.getHeight();
  }
  ImageInfo imageInfo=getImageInfo(imageURI,imageData,extension);
  Position areaPosition=new Position(x,y);
  Position areaSize=new Position(width,height);
  Position imagePosition=new Position(x + positionX,y + positionY);
  Position imageSize=new Position(imageWidth,imageHeight);
  BackgroundImageLayout layout=new BackgroundImageLayout(areaPosition,areaSize,imagePosition,imageSize);
  Collection positions=layout.getImagePositions(repeat);
  Iterator iterator=positions.iterator();
  while (iterator.hasNext()) {
    Position position=(Position)iterator.next();
    exportImageDefn(imageInfo.imageName,imageInfo.imageId,imageWidth,imageHeight,position.getX(),position.getY(),null);
  }
}

Fixed version (ground truth):
/** 
 * Draws the background image at the contentByteUnder of the PPT with the given offset
 * @param imageURI the URI referring the image
 * @param x the start X coordinate at the PPT where the image is positioned
 * @param y the start Y coordinate at the PPT 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
 */
public void drawBackgroundImage(String imageURI,float x,float y,float width,float height,float iWidth,float iHeight,float positionX,float positionY,int repeat){
  if (imageURI == null || imageURI.length() == 0) {
    return;
  }
  float imageWidth=iWidth;
  float imageHeight=iHeight;
  String extension=getImageExtension(imageURI);
  try {
    Image image=EmitterUtil.parseImage(null,IImageContent.IMAGE_URL,imageURI,null,extension);
    byte[] imageData=image.getData();
    if (imageWidth == 0 || imageHeight == 0) {
      imageWidth=image.getWidth();
      imageHeight=image.getHeight();
    }
    ImageInfo imageInfo=getImageInfo(imageURI,imageData,extension);
    Position areaPosition=new Position(x,y);
    Position areaSize=new Position(width,height);
    Position imagePosition=new Position(x + positionX,y + positionY);
    Position imageSize=new Position(imageWidth,imageHeight);
    BackgroundImageLayout layout=new BackgroundImageLayout(areaPosition,areaSize,imagePosition,imageSize);
    Collection positions=layout.getImagePositions(repeat);
    Iterator iterator=positions.iterator();
    while (iterator.hasNext()) {
      Position position=(Position)iterator.next();
      exportImageDefn(imageInfo.imageName,imageInfo.imageId,imageWidth,imageHeight,position.getX(),position.getY(),null);
    }
  }
 catch (  IOException e) {
    logger.log(Level.WARNING,e.getLocalizedMessage());
  }
}