Program: 158593
Project: 158593
Buggy source:
/** 
 * Creates new form MageFrame
 */
public MageFrame(){
  setWindowTitle();
  clientId=UUID.randomUUID();
  EDTExceptionHandler.registerExceptionHandler();
  addWindowListener(new WindowAdapter(){
    @Override public void windowClosing(    WindowEvent e){
      exitApp();
    }
  }
);
  TConfig config=TConfig.current();
  config.setArchiveDetector(new TArchiveDetector("String_Node_Str"));
  config.setAccessPreference(FsAccessOption.STORE,true);
  try {
    UIManager.put("String_Node_Str",new Color(0,0,0,0));
    UIManager.setLookAndFeel("String_Node_Str");
  }
 catch (  Exception ex) {
    logger.fatal(null,ex);
  }
  ManaSymbols.loadImages();
  Plugins.getInstance().loadPlugins();
  initComponents();
  desktopPane.setDesktopManager(new MageDesktopManager());
  setSize(1024,768);
  SettingsManager.getInstance().setScreenWidthAndHeight(1024,768);
  DialogManager.updateParams(768,1024,false);
  this.setExtendedState(JFrame.MAXIMIZED_BOTH);
  session=new SessionImpl(this);
  callbackClient=new CallbackClientImpl(this);
  connectDialog=new ConnectDialog();
  desktopPane.add(connectDialog,JLayeredPane.POPUP_LAYER);
  errorDialog=new ErrorDialog();
  errorDialog.setLocation(100,100);
  desktopPane.add(errorDialog,JLayeredPane.POPUP_LAYER);
  ui.addComponent(MageComponents.DESKTOP_PANE,desktopPane);
  pingTaskExecutor.scheduleAtFixedRate(new Runnable(){
    @Override public void run(){
      session.ping();
    }
  }
,60,60,TimeUnit.SECONDS);
  updateMemUsageTask=new UpdateMemUsageTask(jMemUsageLabel);
  try {
    tablesPane=new TablesPane();
    desktopPane.add(tablesPane,javax.swing.JLayeredPane.DEFAULT_LAYER);
    tablesPane.setMaximum(true);
  }
 catch (  PropertyVetoException ex) {
    logger.fatal(null,ex);
  }
  addTooltipContainer();
  setBackground();
  addMageLabel();
  setAppIcon();
  MageTray.getInstance().install();
  desktopPane.add(ArrowBuilder.getBuilder().getArrowsManagerPanel(),JLayeredPane.DRAG_LAYER);
  desktopPane.addComponentListener(new ComponentAdapter(){
    @Override public void componentResized(    ComponentEvent e){
      int width=((JComponent)e.getSource()).getWidth();
      int height=((JComponent)e.getSource()).getHeight();
      SettingsManager.getInstance().setScreenWidthAndHeight(width,height);
      if (!liteMode && !grayMode) {
        backgroundPane.setSize(width,height);
      }
      ArrowBuilder.getBuilder().setSize(width,height);
      if (title != null) {
        title.setBounds((int)(width - titleRectangle.getWidth()) / 2,(int)(height - titleRectangle.getHeight()) / 2,titleRectangle.width,titleRectangle.height);
      }
    }
  }
);
  mageToolbar.add(new javax.swing.JToolBar.Separator());
  mageToolbar.add(createWindowsButton());
  if (Plugins.getInstance().isCardPluginLoaded()) {
    Separator separator=new javax.swing.JToolBar.Separator();
    mageToolbar.add(separator);
    JButton btnDownloadSymbols=new JButton("String_Node_Str");
    btnDownloadSymbols.setFocusable(false);
    btnDownloadSymbols.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnDownloadSymbols.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnDownloadSymbols.addActionListener(new java.awt.event.ActionListener(){
      @Override public void actionPerformed(      java.awt.event.ActionEvent evt){
        btnSymbolsActionPerformed(evt);
      }
    }
);
    mageToolbar.add(btnDownloadSymbols);
    separator=new javax.swing.JToolBar.Separator();
    mageToolbar.add(separator);
    JButton btnDownload=new JButton("String_Node_Str");
    btnDownload.setFocusable(false);
    btnDownload.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnDownload.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnDownload.addActionListener(new java.awt.event.ActionListener(){
      @Override public void actionPerformed(      java.awt.event.ActionEvent evt){
        btnImagesActionPerformed(evt);
      }
    }
);
    mageToolbar.add(btnDownload);
  }
  if (Plugins.getInstance().isCounterPluginLoaded()) {
    int i=Plugins.getInstance().getGamesPlayed();
    JLabel label=new JLabel("String_Node_Str" + String.valueOf(i));
    desktopPane.add(label,JLayeredPane.DEFAULT_LAYER + 1);
    label.setVisible(true);
    label.setForeground(Color.white);
    label.setBounds(0,0,180,30);
  }
  ui.addButton(MageComponents.TABLES_MENU_BUTTON,btnGames);
  SwingUtilities.invokeLater(new Runnable(){
    @Override public void run(){
      disableButtons();
      if (PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_CHECK,"String_Node_Str").equals("String_Node_Str")) {
        checkForNewImages();
      }
      updateMemUsageTask.execute();
      logger.info("String_Node_Str" + ((System.currentTimeMillis() - startTime) / 1000 + "String_Node_Str"));
      if (autoConnect()) {
        enableButtons();
      }
 else {
        connectDialog.showDialog();
      }
      setWindowTitle();
    }
  }
);
  if (SystemUtil.isMacOSX()) {
    SystemUtil.enableMacOSFullScreenMode(this);
    if (fullscreenMode) {
      SystemUtil.toggleMacOSFullScreenMode(this);
    }
  }
}

Fixed version (ground truth):
/** 
 * Creates new form MageFrame
 */
public MageFrame(){
  setWindowTitle();
  clientId=UUID.randomUUID();
  EDTExceptionHandler.registerExceptionHandler();
  addWindowListener(new WindowAdapter(){
    @Override public void windowClosing(    WindowEvent e){
      exitApp();
    }
  }
);
  TConfig config=TConfig.current();
  config.setArchiveDetector(new TArchiveDetector("String_Node_Str"));
  config.setAccessPreference(FsAccessOption.STORE,true);
  try {
    UIManager.put("String_Node_Str",new Color(0,0,0,0));
    UIManager.setLookAndFeel("String_Node_Str");
  }
 catch (  Exception ex) {
    LOGGER.fatal(null,ex);
  }
  ManaSymbols.loadImages();
  Plugins.getInstance().loadPlugins();
  initComponents();
  desktopPane.setDesktopManager(new MageDesktopManager());
  setSize(1024,768);
  SettingsManager.getInstance().setScreenWidthAndHeight(1024,768);
  DialogManager.updateParams(768,1024,false);
  this.setExtendedState(JFrame.MAXIMIZED_BOTH);
  session=new SessionImpl(this);
  callbackClient=new CallbackClientImpl(this);
  connectDialog=new ConnectDialog();
  desktopPane.add(connectDialog,JLayeredPane.POPUP_LAYER);
  errorDialog=new ErrorDialog();
  errorDialog.setLocation(100,100);
  desktopPane.add(errorDialog,JLayeredPane.POPUP_LAYER);
  UI.addComponent(MageComponents.DESKTOP_PANE,desktopPane);
  PING_TASK_EXECUTOR.scheduleAtFixedRate(new Runnable(){
    @Override public void run(){
      session.ping();
    }
  }
,60,60,TimeUnit.SECONDS);
  updateMemUsageTask=new UpdateMemUsageTask(jMemUsageLabel);
  try {
    tablesPane=new TablesPane();
    desktopPane.add(tablesPane,javax.swing.JLayeredPane.DEFAULT_LAYER);
    tablesPane.setMaximum(true);
  }
 catch (  PropertyVetoException ex) {
    LOGGER.fatal(null,ex);
  }
  addTooltipContainer();
  setBackground();
  addMageLabel();
  setAppIcon();
  MageTray.getInstance().install();
  desktopPane.add(ArrowBuilder.getBuilder().getArrowsManagerPanel(),JLayeredPane.DRAG_LAYER);
  desktopPane.addComponentListener(new ComponentAdapter(){
    @Override public void componentResized(    ComponentEvent e){
      int width=((JComponent)e.getSource()).getWidth();
      int height=((JComponent)e.getSource()).getHeight();
      SettingsManager.getInstance().setScreenWidthAndHeight(width,height);
      if (!liteMode && !grayMode) {
        backgroundPane.setSize(width,height);
      }
      ArrowBuilder.getBuilder().setSize(width,height);
      if (title != null) {
        title.setBounds((int)(width - titleRectangle.getWidth()) / 2,(int)(height - titleRectangle.getHeight()) / 2,titleRectangle.width,titleRectangle.height);
      }
    }
  }
);
  mageToolbar.add(new javax.swing.JToolBar.Separator());
  mageToolbar.add(createWindowsButton());
  if (Plugins.getInstance().isCardPluginLoaded()) {
    Separator separator=new javax.swing.JToolBar.Separator();
    mageToolbar.add(separator);
    JButton btnDownloadSymbols=new JButton("String_Node_Str");
    btnDownloadSymbols.setFocusable(false);
    btnDownloadSymbols.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnDownloadSymbols.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnDownloadSymbols.addActionListener(new java.awt.event.ActionListener(){
      @Override public void actionPerformed(      java.awt.event.ActionEvent evt){
        btnSymbolsActionPerformed(evt);
      }
    }
);
    mageToolbar.add(btnDownloadSymbols);
    separator=new javax.swing.JToolBar.Separator();
    mageToolbar.add(separator);
    JButton btnDownload=new JButton("String_Node_Str");
    btnDownload.setFocusable(false);
    btnDownload.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnDownload.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    btnDownload.addActionListener(new java.awt.event.ActionListener(){
      @Override public void actionPerformed(      java.awt.event.ActionEvent evt){
        btnImagesActionPerformed(evt);
      }
    }
);
    mageToolbar.add(btnDownload);
  }
  if (Plugins.getInstance().isCounterPluginLoaded()) {
    int i=Plugins.getInstance().getGamesPlayed();
    JLabel label=new JLabel("String_Node_Str" + String.valueOf(i));
    desktopPane.add(label,JLayeredPane.DEFAULT_LAYER + 1);
    label.setVisible(true);
    label.setForeground(Color.white);
    label.setBounds(0,0,180,30);
  }
  UI.addButton(MageComponents.TABLES_MENU_BUTTON,btnGames);
  SwingUtilities.invokeLater(new Runnable(){
    @Override public void run(){
      disableButtons();
      if (PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_CHECK,"String_Node_Str").equals("String_Node_Str")) {
        checkForNewImages();
      }
      updateMemUsageTask.execute();
      LOGGER.info("String_Node_Str" + ((System.currentTimeMillis() - startTime) / 1000 + "String_Node_Str"));
      if (autoConnect()) {
        enableButtons();
      }
 else {
        connectDialog.showDialog();
      }
      setWindowTitle();
    }
  }
);
  if (SystemUtil.isMacOSX()) {
    SystemUtil.enableMacOSFullScreenMode(this);
    if (fullscreenMode) {
      SystemUtil.toggleMacOSFullScreenMode(this);
    }
  }
}