Program: 111609
Project: 111609
Buggy source:
public void run(){
  gridbag=new GridBagLayout();
  vncContainer.setLayout(gridbag);
  GridBagConstraints gbc=new GridBagConstraints();
  gbc.gridwidth=GridBagConstraints.REMAINDER;
  gbc.anchor=GridBagConstraints.NORTHWEST;
  if (showControls) {
    buttonPanel=new ButtonPanel(this);
    buttonPanel.setLayout(new FlowLayout(FlowLayout.LEFT,0,0));
    gridbag.setConstraints(buttonPanel,gbc);
    vncContainer.add(buttonPanel);
  }
  if (inSeparateFrame) {
    vncFrame.pack();
    vncFrame.show();
  }
 else {
    validate();
  }
  try {
    if (inAnApplet) {
      url=new URL(getCodeBase(),sessionURL);
    }
 else {
      url=new URL(sessionURL);
    }
    rfb=new RfbProto(url);
    vc=new VncCanvas(this);
    gbc.weightx=1.0;
    gbc.weighty=1.0;
    if (inSeparateFrame) {
      Panel canvasPanel=new Panel();
      canvasPanel.setLayout(new FlowLayout(FlowLayout.LEFT,0,0));
      canvasPanel.add(vc);
      desktopScrollPane=new ScrollPane(ScrollPane.SCROLLBARS_AS_NEEDED);
      gbc.fill=GridBagConstraints.BOTH;
      gridbag.setConstraints(desktopScrollPane,gbc);
      desktopScrollPane.add(canvasPanel);
      vncFrame.add(desktopScrollPane);
      vncFrame.setTitle(rfb.desktopName);
      vncFrame.pack();
      vc.resizeDesktopFrame();
    }
 else {
      gridbag.setConstraints(vc,gbc);
      add(vc);
      validate();
    }
    while (true) {
      try {
        setPaused(!autoPlay);
        rfb.fbs.setSpeed(playbackSpeed);
        if (initialTimeOffset > rfb.fbs.getTimeOffset())         setPos(initialTimeOffset);
        vc.processNormalProtocol();
      }
 catch (      EOFException e) {
        if (e.getMessage() != null && e.getMessage().equals("String_Node_Str")) {
          initialTimeOffset=rfb.fbs.getSeekOffset();
          autoPlay=!rfb.fbs.isPaused();
          rfb.newSession(url);
        }
 else {
          initialTimeOffset=0;
          autoPlay=false;
          rfb.newSession(url);
          vc.updateFramebufferSize();
        }
      }
    }
  }
 catch (  FileNotFoundException e) {
    fatalError(e.toString());
  }
catch (  Exception e) {
    e.printStackTrace();
    fatalError(e.toString());
  }
}

Fixed version (ground truth):
public void run(){
  gridbag=new GridBagLayout();
  vncContainer.setLayout(gridbag);
  GridBagConstraints gbc=new GridBagConstraints();
  gbc.gridwidth=GridBagConstraints.REMAINDER;
  gbc.anchor=GridBagConstraints.NORTHWEST;
  if (showControls) {
    buttonPanel=new ButtonPanel(this);
    buttonPanel.setLayout(new FlowLayout(FlowLayout.LEFT,0,0));
    gridbag.setConstraints(buttonPanel,gbc);
    vncContainer.add(buttonPanel);
  }
  if (inSeparateFrame) {
    vncFrame.pack();
    vncFrame.show();
  }
 else {
    validate();
  }
  try {
    if (inAnApplet) {
      url=new URL(getCodeBase(),sessionURL);
    }
 else {
      url=new URL(sessionURL);
    }
    rfb=new RfbProto(url);
    vc=new VncCanvas(this);
    gbc.weightx=1.0;
    gbc.weighty=1.0;
    if (inSeparateFrame) {
      Panel canvasPanel=new Panel();
      canvasPanel.setLayout(new FlowLayout(FlowLayout.LEFT,0,0));
      canvasPanel.add(vc);
      desktopScrollPane=new ScrollPane(ScrollPane.SCROLLBARS_AS_NEEDED);
      gbc.fill=GridBagConstraints.BOTH;
      gridbag.setConstraints(desktopScrollPane,gbc);
      desktopScrollPane.add(canvasPanel);
      vncFrame.add(desktopScrollPane);
      vncFrame.setTitle(rfb.desktopName);
      vncFrame.pack();
      vc.resizeDesktopFrame();
    }
 else {
      gridbag.setConstraints(vc,gbc);
      add(vc);
      validate();
    }
    while (true) {
      try {
        setPaused(!autoPlay);
        rfb.fbs.setSpeed(playbackSpeed);
        if (initialTimeOffset > rfb.fbs.getTimeOffset())         setPos(initialTimeOffset);
        vc.processNormalProtocol();
      }
 catch (      EOFException e) {
        if (e.getMessage() != null && e.getMessage().equals("String_Node_Str")) {
          initialTimeOffset=rfb.fbs.getSeekOffset();
          autoPlay=!rfb.fbs.isPaused();
        }
 else {
          initialTimeOffset=0;
          autoPlay=false;
        }
        rfb.newSession(url);
        vc.updateFramebufferSize();
      }
    }
  }
 catch (  FileNotFoundException e) {
    fatalError(e.toString());
  }
catch (  Exception e) {
    e.printStackTrace();
    fatalError(e.toString());
  }
}