Program: 60108
Project: 60108
Buggy source:
/** 
 * Instantiates a new img control.
 * @param modelNode the model node
 * @throws MalformedURLException
 * @throws TranscoderException
 * @throws IOException
 */
public ImgControl(HTMLImageElementImpl modelNode){
  super(modelNode);
  align=modelNode.getAlign();
  alt=modelNode.getAlt() != null ? modelNode.getAlt() : "String_Node_Str";
  bufferImage=null;
  modelNode.addImageListener(this);
  this.addMouseListener(new MouseAdapter(){
    @Override public void mousePressed(    MouseEvent e){
      mouseBeingPressed=true;
      repaint();
    }
    @Override public void mouseReleased(    MouseEvent e){
      mouseBeingPressed=false;
      repaint();
      HtmlController.getInstance().onPressed(modelNode,e,e.getX(),e.getY());
    }
    @Override public void mouseClicked(    MouseEvent e){
      if (e.getButton() == MouseEvent.BUTTON3) {
        HtmlController.getInstance().onContextMenu(modelNode,e,e.getX(),e.getY());
      }
    }
  }
);
  if (modelNode.getSrc() != null) {
    URL u=null;
    try {
      SSLCertificate.setCertificate();
      URL baseURL=new URL(modelNode.getOwnerDocument().getBaseURI());
      URL scriptURL=Urls.createURL(baseURL,modelNode.getSrc());
      String scriptURI=scriptURL == null ? modelNode.getSrc() : scriptURL.toExternalForm();
      u=new URL(scriptURI.replace("String_Node_Str","String_Node_Str"));
      URLConnection con=u.openConnection();
      con.setRequestProperty("String_Node_Str",UserAgentContext.DEFAULT_USER_AGENT);
      if (scriptURI.endsWith("String_Node_Str")) {
        SVGRasterizer r=new SVGRasterizer(u);
        image=r.bufferedImageToImage();
      }
 else       if (scriptURI.startsWith("String_Node_Str")) {
        image=Toolkit.getDefaultToolkit().createImage(ImageIO.read(con.getInputStream()).getSource());
      }
 else       if (scriptURI.endsWith("String_Node_Str")) {
        try {
          image=new ImageIcon(u).getImage();
        }
 catch (        Exception e) {
          image=ImageIO.read(con.getInputStream());
        }
      }
 else       if (scriptURI.endsWith("String_Node_Str")) {
        try {
          image=ImageIO.read(con.getInputStream());
        }
 catch (        IOException e) {
          logger.error("String_Node_Str" + e.getMessage());
        }
      }
 else {
        image=ImageIO.read(con.getInputStream());
      }
    }
 catch (    FileNotFoundException|IIOException ex) {
      logger.error("String_Node_Str" + modelNode.getSrc());
    }
catch (    TranscoderException|IOException e1) {
      logger.error(e1.getMessage());
    }
catch (    Exception e1) {
      logger.error("String_Node_Str" + modelNode.getSrc());
    }
  }
  if (modelNode.getHeight() > 0) {
    imageHeight=modelNode.getHeight();
  }
 else {
    if (image != null) {
      imageHeight=image.getHeight(this);
    }
  }
  if (modelNode.getWidth() > 0) {
    imageWidth=modelNode.getWidth();
  }
 else {
    if (image != null) {
      imageWidth=image.getWidth(this);
    }
  }
}

Fixed version (ground truth):
/** 
 * Instantiates a new img control.
 * @param modelNode the model node
 */
public ImgControl(HTMLImageElementImpl modelNode){
  super(modelNode);
  align=modelNode.getAlign();
  alt=modelNode.getAlt() != null ? modelNode.getAlt() : "String_Node_Str";
  bufferImage=null;
  modelNode.addImageListener(this);
  this.addMouseListener(new MouseAdapter(){
    @Override public void mousePressed(    MouseEvent e){
      mouseBeingPressed=true;
      repaint();
    }
    @Override public void mouseReleased(    MouseEvent e){
      mouseBeingPressed=false;
      repaint();
      HtmlController.getInstance().onPressed(modelNode,e,e.getX(),e.getY());
    }
    @Override public void mouseClicked(    MouseEvent e){
      if (e.getButton() == MouseEvent.BUTTON3) {
        HtmlController.getInstance().onContextMenu(modelNode,e,e.getX(),e.getY());
      }
    }
  }
);
  if (modelNode.getSrc() != null) {
    URL u=null;
    try {
      SSLCertificate.setCertificate();
      URL baseURL=new URL(modelNode.getOwnerDocument().getBaseURI());
      URL scriptURL=Urls.createURL(baseURL,modelNode.getSrc());
      String scriptURI=scriptURL == null ? modelNode.getSrc() : scriptURL.toExternalForm();
      u=new URL(scriptURI.replace("String_Node_Str","String_Node_Str"));
      URLConnection con=u.openConnection();
      con.setRequestProperty("String_Node_Str",UserAgentContext.DEFAULT_USER_AGENT);
      if (scriptURI.endsWith("String_Node_Str")) {
        SVGRasterizer r=new SVGRasterizer(u);
        image=r.bufferedImageToImage();
      }
 else       if (scriptURI.startsWith("String_Node_Str")) {
        image=Toolkit.getDefaultToolkit().createImage(ImageIO.read(con.getInputStream()).getSource());
      }
 else       if (scriptURI.endsWith("String_Node_Str")) {
        try {
          image=new ImageIcon(u).getImage();
        }
 catch (        Exception e) {
          image=ImageIO.read(con.getInputStream());
        }
      }
 else       if (scriptURI.endsWith("String_Node_Str")) {
        try {
          image=ImageIO.read(con.getInputStream());
        }
 catch (        IOException e) {
          logger.error("String_Node_Str" + e.getMessage());
        }
      }
 else {
        image=ImageIO.read(con.getInputStream());
      }
    }
 catch (    FileNotFoundException|IIOException ex) {
      logger.error("String_Node_Str" + modelNode.getSrc());
    }
catch (    TranscoderException|IOException e1) {
      logger.error(e1.getMessage());
    }
catch (    Exception e1) {
      logger.error("String_Node_Str" + modelNode.getSrc());
    }
  }
  if (modelNode.getHeight() > 0) {
    imageHeight=modelNode.getHeight();
  }
 else {
    if (image != null) {
      imageHeight=image.getHeight(this);
    }
  }
  if (modelNode.getWidth() > 0) {
    imageWidth=modelNode.getWidth();
  }
 else {
    if (image != null) {
      imageWidth=image.getWidth(this);
    }
  }
}