Program: 152143
Project: 152143
Buggy source:
/** 
 * Program starter method
 * @param args the command line arguments
 */
public static void main(String[] args){
  if (!JavaType.isSupported()) {
    logger.severe(l10n.getString("String_Node_Str"));
  }
  CommandLineParser clp=new CommandLineParser();
  if (!clp.parseArgs(args)) {
    System.exit(1);
  }
  logger.fine("String_Node_Str" + Config.getLatestVersion() + "String_Node_Str");
  String macBarUI=UIManager.getString("String_Node_Str");
  configPath=clp.getConfigPath();
  if (clp.isPortable() && configPath == null) {
    logger.fine("String_Node_Str");
    try {
      SwingUtilities.invokeAndWait(new Runnable(){
        @Override public void run(){
          try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
          }
 catch (          Exception ex) {
            logger.log(Level.WARNING,"String_Node_Str",ex);
          }
          JFileChooser chooser=new JFileChooser();
          chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
          chooser.setApproveButtonText(l10n.getString("String_Node_Str"));
          chooser.setDialogTitle(l10n.getString("String_Node_Str"));
          chooser.setFileHidingEnabled(false);
          chooser.setMultiSelectionEnabled(false);
          int result=chooser.showOpenDialog(null);
          if (result == JFileChooser.APPROVE_OPTION) {
            configPath=chooser.getSelectedFile().getPath();
            logger.config("String_Node_Str" + configPath);
          }
        }
      }
);
    }
 catch (    Exception e) {
      logger.log(Level.SEVERE,"String_Node_Str",e);
    }
  }
  PersistenceManager pm=null;
  try {
    if (configPath != null) {
      PersistenceManager.setUserDir(configPath);
    }
    pm=PersistenceManager.getInstance();
    try {
      pm.loadConfig();
    }
 catch (    Exception ex) {
      logger.log(Level.WARNING,"String_Node_Str",ex);
    }
    try {
      pm.loadOperators();
    }
 catch (    IntrospectionException ex) {
      logger.log(Level.SEVERE,"String_Node_Str",ex);
      try {
        SwingUtilities.invokeAndWait(new Runnable(){
          @Override public void run(){
            JOptionPane.showMessageDialog(null,l10n.getString("String_Node_Str"),null,JOptionPane.ERROR_MESSAGE);
          }
        }
);
      }
 catch (      Exception e) {
        logger.log(Level.SEVERE,"String_Node_Str",e);
      }
      System.exit(1);
    }
catch (    Exception ex) {
      logger.log(Level.SEVERE,"String_Node_Str",ex);
    }
    try {
      pm.loadContacts();
    }
 catch (    Exception ex) {
      logger.log(Level.WARNING,"String_Node_Str",ex);
    }
    try {
      pm.loadQueue();
    }
 catch (    Exception ex) {
      logger.log(Level.WARNING,"String_Node_Str",ex);
    }
    try {
      pm.loadHistory();
    }
 catch (    Exception ex) {
      logger.log(Level.WARNING,"String_Node_Str",ex);
    }
    try {
      pm.loadKeyring();
    }
 catch (    Exception ex) {
      logger.log(Level.WARNING,"String_Node_Str",ex);
    }
  }
 catch (  Exception ex) {
    logger.log(Level.SEVERE,"String_Node_Str",ex);
    try {
      SwingUtilities.invokeAndWait(new Runnable(){
        @Override public void run(){
          JOptionPane.showMessageDialog(null,MessageFormat.format(l10n.getString("String_Node_Str"),PersistenceManager.getUserDir().getAbsolutePath()),null,JOptionPane.ERROR_MESSAGE);
        }
      }
);
    }
 catch (    Exception e) {
      logger.log(Level.SEVERE,"String_Node_Str",e);
    }
  }
  if (pm != null && !pm.isFirstInstance()) {
    logger.warning("String_Node_Str");
    try {
      SwingUtilities.invokeAndWait(new Runnable(){
        @Override public void run(){
          String runOption=l10n.getString("String_Node_Str");
          String quitOption=l10n.getString("String_Node_Str");
          String[] options=new String[]{runOption,quitOption};
          int result=JOptionPane.showOptionDialog(null,l10n.getString("String_Node_Str"),null,JOptionPane.DEFAULT_OPTION,JOptionPane.WARNING_MESSAGE,null,options,quitOption);
          if (result != 0) {
            System.exit(0);
          }
        }
      }
);
    }
 catch (    Exception e) {
      logger.log(Level.SEVERE,"String_Node_Str",e);
    }
  }
  if (StringUtils.isEmpty(Config.getInstance().getVersion())) {
    logger.fine("String_Node_Str");
    Config.getInstance().setCountryPrefix(CountryPrefix.getCountryPrefix(Locale.getDefault().getCountry()));
    Config.getInstance().setLookAndFeel(ThemeManager.suggestBestLAF());
  }
  LegacyUpdater.update();
  try {
    SwingUtilities.invokeAndWait(new Runnable(){
      @Override public void run(){
        try {
          ThemeManager.setLaF();
        }
 catch (        Throwable ex) {
          logger.log(Level.WARNING,"String_Node_Str",ex);
        }
      }
    }
);
  }
 catch (  Exception e) {
    logger.log(Level.SEVERE,"String_Node_Str",e);
  }
  Config config=Config.getInstance();
  if (config.isUseProxy()) {
    if (config.isSameProxy()) {
      ProxyManager.setProxy(config.getHttpProxy());
    }
 else {
      ProxyManager.setProxy(config.getHttpProxy(),config.getHttpsProxy(),config.getSocksProxy());
    }
  }
  if (macBarUI != null && OSType.isMac()) {
    logger.fine("String_Node_Str");
    UIManager.put("String_Node_Str",macBarUI);
  }
  EventQueue.invokeLater(new Runnable(){
    @Override public void run(){
      MainFrame.getInstance().startAndShow();
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Program starter method
 * @param args the command line arguments
 */
public static void main(String[] args){
  reallyRunning=true;
  if (!JavaType.isSupported()) {
    logger.severe(l10n.getString("String_Node_Str"));
  }
  CommandLineParser clp=new CommandLineParser();
  if (!clp.parseArgs(args)) {
    System.exit(1);
  }
  logger.fine("String_Node_Str" + Config.getLatestVersion() + "String_Node_Str");
  String macBarUI=UIManager.getString("String_Node_Str");
  configPath=clp.getConfigPath();
  if (clp.isPortable() && configPath == null) {
    logger.fine("String_Node_Str");
    try {
      SwingUtilities.invokeAndWait(new Runnable(){
        @Override public void run(){
          try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
          }
 catch (          Exception ex) {
            logger.log(Level.WARNING,"String_Node_Str",ex);
          }
          JFileChooser chooser=new JFileChooser();
          chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
          chooser.setApproveButtonText(l10n.getString("String_Node_Str"));
          chooser.setDialogTitle(l10n.getString("String_Node_Str"));
          chooser.setFileHidingEnabled(false);
          chooser.setMultiSelectionEnabled(false);
          int result=chooser.showOpenDialog(null);
          if (result == JFileChooser.APPROVE_OPTION) {
            configPath=chooser.getSelectedFile().getPath();
            logger.config("String_Node_Str" + configPath);
          }
        }
      }
);
    }
 catch (    Exception e) {
      logger.log(Level.SEVERE,"String_Node_Str",e);
    }
  }
  PersistenceManager pm=null;
  try {
    if (configPath != null) {
      PersistenceManager.setUserDir(configPath);
    }
    pm=PersistenceManager.getInstance();
    try {
      pm.loadConfig();
    }
 catch (    Exception ex) {
      logger.log(Level.WARNING,"String_Node_Str",ex);
    }
    try {
      pm.loadOperators();
    }
 catch (    IntrospectionException ex) {
      logger.log(Level.SEVERE,"String_Node_Str",ex);
      try {
        SwingUtilities.invokeAndWait(new Runnable(){
          @Override public void run(){
            JOptionPane.showMessageDialog(null,l10n.getString("String_Node_Str"),null,JOptionPane.ERROR_MESSAGE);
          }
        }
);
      }
 catch (      Exception e) {
        logger.log(Level.SEVERE,"String_Node_Str",e);
      }
      System.exit(1);
    }
catch (    Exception ex) {
      logger.log(Level.SEVERE,"String_Node_Str",ex);
    }
    try {
      pm.loadContacts();
    }
 catch (    Exception ex) {
      logger.log(Level.WARNING,"String_Node_Str",ex);
    }
    try {
      pm.loadQueue();
    }
 catch (    Exception ex) {
      logger.log(Level.WARNING,"String_Node_Str",ex);
    }
    try {
      pm.loadHistory();
    }
 catch (    Exception ex) {
      logger.log(Level.WARNING,"String_Node_Str",ex);
    }
    try {
      pm.loadKeyring();
    }
 catch (    Exception ex) {
      logger.log(Level.WARNING,"String_Node_Str",ex);
    }
  }
 catch (  Exception ex) {
    logger.log(Level.SEVERE,"String_Node_Str",ex);
    try {
      SwingUtilities.invokeAndWait(new Runnable(){
        @Override public void run(){
          JOptionPane.showMessageDialog(null,MessageFormat.format(l10n.getString("String_Node_Str"),PersistenceManager.getUserDir().getAbsolutePath()),null,JOptionPane.ERROR_MESSAGE);
        }
      }
);
    }
 catch (    Exception e) {
      logger.log(Level.SEVERE,"String_Node_Str",e);
    }
  }
  if (pm != null && !pm.isFirstInstance()) {
    logger.warning("String_Node_Str");
    try {
      SwingUtilities.invokeAndWait(new Runnable(){
        @Override public void run(){
          String runOption=l10n.getString("String_Node_Str");
          String quitOption=l10n.getString("String_Node_Str");
          String[] options=new String[]{runOption,quitOption};
          int result=JOptionPane.showOptionDialog(null,l10n.getString("String_Node_Str"),null,JOptionPane.DEFAULT_OPTION,JOptionPane.WARNING_MESSAGE,null,options,quitOption);
          if (result != 0) {
            System.exit(0);
          }
        }
      }
);
    }
 catch (    Exception e) {
      logger.log(Level.SEVERE,"String_Node_Str",e);
    }
  }
  if (StringUtils.isEmpty(Config.getInstance().getVersion())) {
    logger.fine("String_Node_Str");
    Config.getInstance().setCountryPrefix(CountryPrefix.getCountryPrefix(Locale.getDefault().getCountry()));
    Config.getInstance().setLookAndFeel(ThemeManager.suggestBestLAF());
  }
  LegacyUpdater.update();
  try {
    SwingUtilities.invokeAndWait(new Runnable(){
      @Override public void run(){
        try {
          ThemeManager.setLaF();
        }
 catch (        Throwable ex) {
          logger.log(Level.WARNING,"String_Node_Str",ex);
        }
      }
    }
);
  }
 catch (  Exception e) {
    logger.log(Level.SEVERE,"String_Node_Str",e);
  }
  Config config=Config.getInstance();
  if (config.isUseProxy()) {
    if (config.isSameProxy()) {
      ProxyManager.setProxy(config.getHttpProxy());
    }
 else {
      ProxyManager.setProxy(config.getHttpProxy(),config.getHttpsProxy(),config.getSocksProxy());
    }
  }
  if (macBarUI != null && OSType.isMac()) {
    logger.fine("String_Node_Str");
    UIManager.put("String_Node_Str",macBarUI);
  }
  EventQueue.invokeLater(new Runnable(){
    @Override public void run(){
      MainFrame.getInstance().startAndShow();
    }
  }
);
}