Program: 75538
Project: 75538
Buggy source:
/** 
 * Draws image into the PPT.
 * @param image the ImageArea specified from the layout
 */
protected void drawImage(IImageArea image){
  if (image == null)   return;
  ContainerPosition curPos;
  String imageName;
  shapeCount++;
  if (!containerStack.isEmpty()) {
    curPos=(ContainerPosition)containerStack.peek();
  }
 else {
    curPos=new ContainerPosition(0,0);
  }
  int imageX=curPos.x + image.getX();
  int imageY=curPos.y + image.getY();
  IImageContent imageContent=((IImageContent)image.getContent());
  String imageTitle="String_Node_Str" + currentPageNum + "String_Node_Str"+ shapeCount;
  if (imageNames.containsKey(imageContent.getURI())) {
    imageName=(String)imageNames.get(imageContent.getURI());
  }
 else {
    String extension=getImageExtension(imageContent.getURI());
    imageName=imageTitle + "String_Node_Str" + extension;
    imageNames.put(imageContent.getURI(),imageName);
    imageExtensions.put(imageContent.getURI(),extension);
    recordFileLists(imageName);
    currentImageContents.add(imageContent);
  }
  double width=pptMeasure(image.getWidth());
  double height=pptMeasure(image.getHeight());
  double x=layoutAreaX2PPT(imageX);
  double y=layoutAreaY2PPT(imageY);
  try {
    pptOutput.write(("String_Node_Str" + (shapeCount) + "String_Node_Str").getBytes());
    pptOutput.write(("String_Node_Str" + x + "String_Node_Str"+ y+ "String_Node_Str"+ width+ "String_Node_Str"+ height+ "String_Node_Str").getBytes());
    pptOutput.write(("String_Node_Str").getBytes());
    pptOutput.write(("String_Node_Str" + imageName + "String_Node_Str"+ imageTitle+ "String_Node_Str").getBytes());
    pptOutput.write(("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str").getBytes());
    pptOutput.write(("String_Node_Str").getBytes());
  }
 catch (  IOException ioe) {
    logger.log(Level.WARNING,ioe.getMessage(),ioe);
  }
}

Fixed version (ground truth):
/** 
 * Draws image into the PPT.
 * @param image the ImageArea specified from the layout
 */
protected void drawImage(IImageArea image){
  if (image == null)   return;
  ContainerPosition curPos;
  String imageName;
  shapeCount++;
  if (!containerStack.isEmpty()) {
    curPos=(ContainerPosition)containerStack.peek();
  }
 else {
    curPos=new ContainerPosition(0,0);
  }
  int imageX=curPos.x + image.getX();
  int imageY=curPos.y + image.getY();
  IImageContent imageContent=((IImageContent)image.getContent());
  String imageTitle="String_Node_Str" + currentPageNum + "String_Node_Str"+ shapeCount;
  if (imageContent.getURI() != null) {
    if (imageNames.containsKey(imageContent.getURI())) {
      imageName=(String)imageNames.get(imageContent.getURI());
    }
 else {
      String extension=getImageExtension(imageContent.getURI());
      imageName=imageTitle + "String_Node_Str" + extension;
      imageNames.put(imageContent.getURI(),imageName);
      imageExtensions.put(imageContent.getURI(),extension);
      recordFileLists(imageName);
      currentImageContents.add(imageContent);
    }
  }
 else {
    if (imageNames.containsKey(imageContent.getName())) {
      imageName=(String)imageNames.get(imageContent.getName());
    }
 else {
      String extension=imageContent.getExtension();
      imageName=imageTitle + "String_Node_Str" + extension;
      imageNames.put(imageContent.getName(),imageName);
      imageExtensions.put(imageContent.getName(),extension);
      recordFileLists(imageName);
      currentImageContents.add(imageContent);
    }
  }
  double width=pptMeasure(image.getWidth());
  double height=pptMeasure(image.getHeight());
  double x=layoutAreaX2PPT(imageX);
  double y=layoutAreaY2PPT(imageY);
  try {
    pptOutput.write(("String_Node_Str" + (shapeCount) + "String_Node_Str").getBytes());
    pptOutput.write(("String_Node_Str" + x + "String_Node_Str"+ y+ "String_Node_Str"+ width+ "String_Node_Str"+ height+ "String_Node_Str").getBytes());
    pptOutput.write(("String_Node_Str").getBytes());
    pptOutput.write(("String_Node_Str" + imageName + "String_Node_Str"+ imageTitle+ "String_Node_Str").getBytes());
    pptOutput.write(("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str").getBytes());
    pptOutput.write(("String_Node_Str").getBytes());
  }
 catch (  IOException ioe) {
    logger.log(Level.WARNING,ioe.getMessage(),ioe);
  }
}