Program: 44893
Project: 44893
Buggy source:
/** 
 * Main method used to startup muCommander.
 * @param args command line arguments.
 */
public static void main(String args[]){
  int i;
  fatalWarnings=false;
  verbose=true;
  for (i=0; i < args.length; i++) {
    if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))     printVersion();
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))     printUsage();
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        com.mucommander.command.CommandManager.setAssociationFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        com.mucommander.command.CommandManager.setCommandFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        com.mucommander.bookmark.BookmarkManager.setBookmarksFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        MuConfiguration.setConfigurationFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        ShellHistoryManager.setHistoryFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        com.mucommander.ui.action.ActionKeymapIO.setActionsFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        ToolBarIO.setDescriptionFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        CommandBarIO.setDescriptionFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        com.mucommander.auth.CredentialsManager.setCredentialsFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (Debug.ON && (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")))     Debug.setEnabled(false);
 else     if (Debug.ON && (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")))     Debug.setEnabled(true);
 else     if ((args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        PlatformManager.setPreferencesFolder(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if ((args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        ExtensionManager.setExtensionsFolder(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))     fatalWarnings=false;
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))     fatalWarnings=true;
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))     verbose=false;
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))     verbose=true;
 else     break;
  }
  boolean isFirstBoot;
  try {
    isFirstBoot=!MuConfiguration.getConfigurationFile().exists();
  }
 catch (  IOException e) {
    isFirstBoot=true;
  }
  if (OsFamilies.MAC_OS_X.isCurrent()) {
    try {
      MuConfiguration.read();
    }
 catch (    Exception e) {
      printFileError("String_Node_Str",e,fatalWarnings);
    }
    try {
      Class osxIntegrationClass=Class.forName("String_Node_Str");
      Constructor constructor=osxIntegrationClass.getConstructor(new Class[]{});
      constructor.newInstance(new Object[]{});
    }
 catch (    Exception e) {
      if (Debug.ON)       Debug.trace("String_Node_Str");
    }
  }
  try {
    ExtensionManager.addExtensionsToClasspath();
  }
 catch (  Exception e) {
    if (Debug.ON)     Debug.trace("String_Node_Str");
  }
  System.setProperty("String_Node_Str","String_Node_Str");
  if (!OsFamilies.MAC_OS_X.isCurrent()) {
    try {
      MuConfiguration.read();
    }
 catch (    Exception e) {
      printFileError("String_Node_Str",e,fatalWarnings);
    }
  }
  useSplash=MuConfiguration.getVariable(MuConfiguration.SHOW_SPLASH_SCREEN,MuConfiguration.DEFAULT_SHOW_SPLASH_SCREEN);
  if (useSplash) {
    splashScreen=new SplashScreen(RuntimeConstants.VERSION,"String_Node_Str");
  }
  boolean showSetup;
  showSetup=MuConfiguration.getVariable(MuConfiguration.THEME_TYPE) == null;
  Runtime.getRuntime().addShutdownHook(new ShutdownHook());
  configureFilesystems();
  try {
    com.mucommander.desktop.DesktopManager.init(isFirstBoot);
  }
 catch (  Exception e) {
    printError("String_Node_Str",e,true);
  }
  printStartupMessage("String_Node_Str");
  try {
    com.mucommander.text.Translator.loadDictionaryFile();
  }
 catch (  Exception e) {
    printError("String_Node_Str",e,true);
  }
  printStartupMessage("String_Node_Str");
  try {
    com.mucommander.command.CommandManager.loadCommands();
    migrateCommand("String_Node_Str","String_Node_Str",CommandManager.VIEWER_ALIAS);
    migrateCommand("String_Node_Str","String_Node_Str",CommandManager.EDITOR_ALIAS);
    try {
      CommandManager.writeCommands();
    }
 catch (    CommandException e) {
    }
  }
 catch (  Exception e) {
    if (Debug.ON)     printFileError("String_Node_Str",e,fatalWarnings);
  }
  try {
    com.mucommander.command.CommandManager.loadAssociations();
  }
 catch (  Exception e) {
    if (Debug.ON)     printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  try {
    com.mucommander.bookmark.BookmarkManager.loadBookmarks();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  try {
    com.mucommander.auth.CredentialsManager.loadCredentials();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  try {
    ShellHistoryManager.loadHistory();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  com.mucommander.text.CustomDateFormat.init();
  printStartupMessage("String_Node_Str");
  SwingFileIconProvider.forceInit();
  com.mucommander.ui.icon.FileIcons.setScaleFactor(Math.max(1.0f,MuConfiguration.getVariable(MuConfiguration.TABLE_ICON_SCALE,MuConfiguration.DEFAULT_TABLE_ICON_SCALE)));
  com.mucommander.ui.icon.FileIcons.setSystemIconsPolicy(MuConfiguration.getVariable(MuConfiguration.USE_SYSTEM_FILE_ICONS,MuConfiguration.DEFAULT_USE_SYSTEM_FILE_ICONS));
  printStartupMessage("String_Node_Str");
  try {
    com.mucommander.ui.action.ActionKeymapIO.loadActionKeymap();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  try {
    ToolBarIO.loadDescriptionFile();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  try {
    CommandBarIO.loadCommandBar();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  com.mucommander.ui.theme.ThemeManager.loadCurrentTheme();
  printStartupMessage("String_Node_Str");
  com.mucommander.bonjour.BonjourDirectory.setActive(MuConfiguration.getVariable(MuConfiguration.ENABLE_BONJOUR_DISCOVERY,MuConfiguration.DEFAULT_ENABLE_BONJOUR_DISCOVERY));
  printStartupMessage("String_Node_Str");
  for (; i < args.length; i+=2) {
    if (i < args.length - 1)     WindowManager.createNewMainFrame(args[i],args[i + 1]);
 else     WindowManager.createNewMainFrame(args[i],null);
  }
  if (WindowManager.getCurrentMainFrame() == null)   WindowManager.createNewMainFrame();
  if (MuConfiguration.getVariable(MuConfiguration.ENABLE_SYSTEM_NOTIFICATIONS,MuConfiguration.DEFAULT_ENABLE_SYSTEM_NOTIFICATIONS)) {
    printStartupMessage("String_Node_Str");
    if (com.mucommander.ui.notifier.AbstractNotifier.isAvailable())     com.mucommander.ui.notifier.AbstractNotifier.getNotifier().setEnabled(true);
  }
  if (useSplash)   splashScreen.dispose();
  if (MuConfiguration.getVariable(MuConfiguration.CHECK_FOR_UPDATE,MuConfiguration.DEFAULT_CHECK_FOR_UPDATE))   new CheckVersionDialog(WindowManager.getCurrentMainFrame(),false);
  if (showSetup)   new InitialSetupDialog(WindowManager.getCurrentMainFrame()).showDialog();
}

Fixed version (ground truth):
/** 
 * Main method used to startup muCommander.
 * @param args command line arguments.
 */
public static void main(String args[]){
  int i;
  fatalWarnings=false;
  verbose=true;
  for (i=0; i < args.length; i++) {
    if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))     printVersion();
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))     printUsage();
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        com.mucommander.command.CommandManager.setAssociationFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        com.mucommander.command.CommandManager.setCommandFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        com.mucommander.bookmark.BookmarkManager.setBookmarksFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        MuConfiguration.setConfigurationFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        ShellHistoryManager.setHistoryFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        com.mucommander.ui.action.ActionKeymapIO.setActionsFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        ToolBarIO.setDescriptionFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        CommandBarIO.setDescriptionFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        com.mucommander.auth.CredentialsManager.setCredentialsFile(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (Debug.ON && (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")))     Debug.setEnabled(false);
 else     if (Debug.ON && (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str")))     Debug.setEnabled(true);
 else     if ((args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        PlatformManager.setPreferencesFolder(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if ((args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))) {
      if (i >= args.length - 1)       printError("String_Node_Str" + args[i],null,true);
      try {
        ExtensionManager.setExtensionsFolder(args[++i]);
      }
 catch (      Exception e) {
        printError("String_Node_Str",e,fatalWarnings);
      }
    }
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))     fatalWarnings=false;
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))     fatalWarnings=true;
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))     verbose=false;
 else     if (args[i].equals("String_Node_Str") || args[i].equals("String_Node_Str"))     verbose=true;
 else     break;
  }
  boolean isFirstBoot;
  try {
    isFirstBoot=!MuConfiguration.getConfigurationFile().exists();
  }
 catch (  IOException e) {
    isFirstBoot=true;
  }
  if (OsFamilies.MAC_OS_X.isCurrent()) {
    try {
      MuConfiguration.read();
    }
 catch (    Exception e) {
      printFileError("String_Node_Str",e,fatalWarnings);
    }
    try {
      Class osxIntegrationClass=Class.forName("String_Node_Str");
      Constructor constructor=osxIntegrationClass.getConstructor(new Class[]{});
      constructor.newInstance(new Object[]{});
    }
 catch (    Exception e) {
      if (Debug.ON)       Debug.trace("String_Node_Str");
    }
  }
  try {
    ExtensionManager.addExtensionsToClasspath();
  }
 catch (  Exception e) {
    if (Debug.ON)     Debug.trace("String_Node_Str");
  }
  System.setProperty("String_Node_Str","String_Node_Str");
  if (!OsFamilies.MAC_OS_X.isCurrent()) {
    try {
      MuConfiguration.read();
    }
 catch (    Exception e) {
      printFileError("String_Node_Str",e,fatalWarnings);
    }
  }
  useSplash=MuConfiguration.getVariable(MuConfiguration.SHOW_SPLASH_SCREEN,MuConfiguration.DEFAULT_SHOW_SPLASH_SCREEN);
  if (useSplash) {
    splashScreen=new SplashScreen(RuntimeConstants.VERSION,"String_Node_Str");
  }
  boolean showSetup;
  showSetup=MuConfiguration.getVariable(MuConfiguration.THEME_TYPE) == null;
  Runtime.getRuntime().addShutdownHook(new ShutdownHook());
  configureFilesystems();
  try {
    com.mucommander.desktop.DesktopManager.init(isFirstBoot);
  }
 catch (  Exception e) {
    printError("String_Node_Str",e,true);
  }
  printStartupMessage("String_Node_Str");
  try {
    com.mucommander.text.Translator.loadDictionaryFile();
  }
 catch (  Exception e) {
    printError("String_Node_Str",e,true);
  }
  printStartupMessage("String_Node_Str");
  try {
    com.mucommander.command.CommandManager.loadCommands();
  }
 catch (  Exception e) {
    if (Debug.ON)     printFileError("String_Node_Str",e,fatalWarnings);
  }
  migrateCommand("String_Node_Str","String_Node_Str",CommandManager.VIEWER_ALIAS);
  migrateCommand("String_Node_Str","String_Node_Str",CommandManager.EDITOR_ALIAS);
  try {
    CommandManager.writeCommands();
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str");
    e.printStackTrace();
  }
  try {
    com.mucommander.command.CommandManager.loadAssociations();
  }
 catch (  Exception e) {
    if (Debug.ON)     printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  try {
    com.mucommander.bookmark.BookmarkManager.loadBookmarks();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  try {
    com.mucommander.auth.CredentialsManager.loadCredentials();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  try {
    ShellHistoryManager.loadHistory();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  com.mucommander.text.CustomDateFormat.init();
  printStartupMessage("String_Node_Str");
  SwingFileIconProvider.forceInit();
  com.mucommander.ui.icon.FileIcons.setScaleFactor(Math.max(1.0f,MuConfiguration.getVariable(MuConfiguration.TABLE_ICON_SCALE,MuConfiguration.DEFAULT_TABLE_ICON_SCALE)));
  com.mucommander.ui.icon.FileIcons.setSystemIconsPolicy(MuConfiguration.getVariable(MuConfiguration.USE_SYSTEM_FILE_ICONS,MuConfiguration.DEFAULT_USE_SYSTEM_FILE_ICONS));
  printStartupMessage("String_Node_Str");
  try {
    com.mucommander.ui.action.ActionKeymapIO.loadActionKeymap();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  try {
    ToolBarIO.loadDescriptionFile();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  try {
    CommandBarIO.loadCommandBar();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  com.mucommander.ui.theme.ThemeManager.loadCurrentTheme();
  printStartupMessage("String_Node_Str");
  com.mucommander.bonjour.BonjourDirectory.setActive(MuConfiguration.getVariable(MuConfiguration.ENABLE_BONJOUR_DISCOVERY,MuConfiguration.DEFAULT_ENABLE_BONJOUR_DISCOVERY));
  printStartupMessage("String_Node_Str");
  for (; i < args.length; i+=2) {
    if (i < args.length - 1)     WindowManager.createNewMainFrame(args[i],args[i + 1]);
 else     WindowManager.createNewMainFrame(args[i],null);
  }
  if (WindowManager.getCurrentMainFrame() == null)   WindowManager.createNewMainFrame();
  if (MuConfiguration.getVariable(MuConfiguration.ENABLE_SYSTEM_NOTIFICATIONS,MuConfiguration.DEFAULT_ENABLE_SYSTEM_NOTIFICATIONS)) {
    printStartupMessage("String_Node_Str");
    if (com.mucommander.ui.notifier.AbstractNotifier.isAvailable())     com.mucommander.ui.notifier.AbstractNotifier.getNotifier().setEnabled(true);
  }
  if (useSplash)   splashScreen.dispose();
  if (MuConfiguration.getVariable(MuConfiguration.CHECK_FOR_UPDATE,MuConfiguration.DEFAULT_CHECK_FOR_UPDATE))   new CheckVersionDialog(WindowManager.getCurrentMainFrame(),false);
  if (showSetup)   new InitialSetupDialog(WindowManager.getCurrentMainFrame()).showDialog();
}