Program: 11019
Project: 11019
Buggy source:
public void doSetFullscreen(final boolean fullscreen){
  if (fullscreen != isFullscreen()) {
    this.fullscreen=fullscreen;
    if (!fullscreen) {
      splitPane.setRightComponent(wwdCanvas);
      frame.setBounds(Settings.get().getWindowBounds());
      if (Settings.get().isWindowMaximized()) {
        frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
      }
      loadSplitLocation();
      fullscreenFrame.dispose();
      fullscreenFrame=null;
    }
 else {
      fullscreenFrame=new JFrame(frame.getTitle());
      fullscreenFrame.setIconImage(frame.getIconImage());
      fullscreenFrame.setUndecorated(true);
      fullscreenFrame.setAlwaysOnTop(true);
      JPanel fullscreenPanel=new JPanel(new BorderLayout());
      fullscreenFrame.setContentPane(fullscreenPanel);
      fullscreenPanel.add(wwdCanvas,BorderLayout.CENTER);
      fullscreenFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
      fullscreenFrame.addWindowListener(new WindowAdapter(){
        @Override public void windowClosing(        WindowEvent e){
          setFullscreen(false);
        }
      }
);
      Action action=new AbstractAction(){
        @Override public void actionPerformed(        ActionEvent e){
          setFullscreen(false);
        }
      }
;
      fullscreenPanel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0),action);
      fullscreenPanel.getActionMap().put(action,action);
      boolean span=Settings.get().isSpanDisplays();
      String id=Settings.get().getDisplayId();
      GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
      Rectangle fullscreenBounds;
      Rectangle frameBounds=frame.getBounds();
      int splitLocation=Settings.get().getSplitLocation();
      frameBounds.width=splitLocation + 10;
      if (span) {
        Rectangle fullBounds=new Rectangle();
        GraphicsDevice[] gds=ge.getScreenDevices();
        for (        GraphicsDevice g : gds) {
          GraphicsConfiguration gc=g.getDefaultConfiguration();
          fullBounds=fullBounds.union(gc.getBounds());
        }
        fullscreenBounds=fullBounds;
      }
 else {
        GraphicsDevice fullscreenDevice=getGraphicsDeviceForId(id,ge);
        fullscreenBounds=fullscreenDevice.getDefaultConfiguration().getBounds();
        GraphicsDevice frameDevice=getGraphicsDeviceContainingBounds(frameBounds,ge);
        if (frameDevice == fullscreenDevice) {
          GraphicsDevice otherDevice=getOtherGraphicsDevice(fullscreenDevice,ge);
          if (otherDevice != null) {
            Rectangle otherDeviceBounds=otherDevice.getDefaultConfiguration().getBounds();
            frameBounds.setLocation(otherDeviceBounds.getLocation());
          }
        }
      }
      frame.setExtendedState(JFrame.NORMAL);
      frame.setBounds(frameBounds);
      fullscreenFrame.setBounds(fullscreenBounds);
      fullscreenFrame.setVisible(true);
    }
  }
}

Fixed version (ground truth):
public void doSetFullscreen(final boolean fullscreen){
  if (fullscreen != isFullscreen()) {
    this.fullscreen=fullscreen;
    wwdCanvas.getParent().remove(wwdCanvas);
    if (!fullscreen) {
      splitPane.setRightComponent(wwdCanvas);
      frame.setBounds(Settings.get().getWindowBounds());
      if (Settings.get().isWindowMaximized()) {
        frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
      }
      loadSplitLocation();
      fullscreenFrame.dispose();
      fullscreenFrame=null;
    }
 else {
      fullscreenFrame=new JFrame(frame.getTitle());
      fullscreenFrame.setIconImage(frame.getIconImage());
      fullscreenFrame.setUndecorated(true);
      fullscreenFrame.setAlwaysOnTop(true);
      JPanel fullscreenPanel=new JPanel(new BorderLayout());
      fullscreenFrame.setContentPane(fullscreenPanel);
      fullscreenPanel.add(wwdCanvas,BorderLayout.CENTER);
      fullscreenFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
      fullscreenFrame.addWindowListener(new WindowAdapter(){
        @Override public void windowClosing(        WindowEvent e){
          setFullscreen(false);
        }
      }
);
      Action action=new AbstractAction(){
        @Override public void actionPerformed(        ActionEvent e){
          setFullscreen(false);
        }
      }
;
      fullscreenPanel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0),action);
      fullscreenPanel.getActionMap().put(action,action);
      boolean span=Settings.get().isSpanDisplays();
      String id=Settings.get().getDisplayId();
      GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
      Rectangle fullscreenBounds;
      Rectangle frameBounds=frame.getBounds();
      int splitLocation=Settings.get().getSplitLocation();
      frameBounds.width=splitLocation + 10;
      if (span) {
        Rectangle fullBounds=new Rectangle();
        GraphicsDevice[] gds=ge.getScreenDevices();
        for (        GraphicsDevice g : gds) {
          GraphicsConfiguration gc=g.getDefaultConfiguration();
          fullBounds=fullBounds.union(gc.getBounds());
        }
        fullscreenBounds=fullBounds;
      }
 else {
        GraphicsDevice fullscreenDevice=getGraphicsDeviceForId(id,ge);
        fullscreenBounds=fullscreenDevice.getDefaultConfiguration().getBounds();
        GraphicsDevice frameDevice=getGraphicsDeviceContainingBounds(frameBounds,ge);
        if (frameDevice == fullscreenDevice) {
          GraphicsDevice otherDevice=getOtherGraphicsDevice(fullscreenDevice,ge);
          if (otherDevice != null) {
            Rectangle otherDeviceBounds=otherDevice.getDefaultConfiguration().getBounds();
            frameBounds.setLocation(otherDeviceBounds.getLocation());
          }
        }
      }
      frame.setExtendedState(JFrame.NORMAL);
      frame.setBounds(frameBounds);
      fullscreenFrame.setBounds(fullscreenBounds);
      fullscreenFrame.setVisible(true);
    }
  }
}