Program: 45158
Project: 45158
Buggy source:
/** 
 * Main method used to startup muCommander.
 */
public static void main(String args[]){
  int i;
  fatalWarnings=false;
  verbose=true;
  useSplash=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"))     useSplash=false;
 else     if (args[i].equals("String_Node_Str"))     useSplash=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 {
        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.ActionKeymap.setActionKeyMapFile(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 {
        ToolBar.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 {
        CommandBar.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;
  }
  if (PlatformManager.getOsFamily() == PlatformManager.MAC_OS_X) {
    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");
  }
  if (useSplash)   splashScreen=new SplashScreen(RuntimeConstants.VERSION,"String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  if (PlatformManager.getOsFamily() != PlatformManager.MAC_OS_X) {
    try {
      MuConfiguration.read();
    }
 catch (    Exception e) {
      printFileError("String_Node_Str",e,fatalWarnings);
    }
  }
  showSetup=MuConfiguration.getVariable(MuConfiguration.THEME_TYPE) == null;
  Runtime.getRuntime().addShutdownHook(new ShutdownHook());
  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) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  try {
    com.mucommander.command.CommandManager.loadAssociations();
  }
 catch (  Exception e) {
    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");
  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.ActionKeymap.loadActionKeyMap();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  try {
    ToolBar.loadDescriptionFile();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  try {
    CommandBar.loadDescriptionFile();
  }
 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;
  useSplash=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"))     useSplash=false;
 else     if (args[i].equals("String_Node_Str"))     useSplash=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 {
        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.ActionKeymap.setActionKeyMapFile(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 {
        ToolBar.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 {
        CommandBar.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;
  }
  if (PlatformManager.getOsFamily() == PlatformManager.MAC_OS_X) {
    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");
  }
  if (useSplash)   splashScreen=new SplashScreen(RuntimeConstants.VERSION,"String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  if (PlatformManager.getOsFamily() != PlatformManager.MAC_OS_X) {
    try {
      MuConfiguration.read();
    }
 catch (    Exception e) {
      printFileError("String_Node_Str",e,fatalWarnings);
    }
  }
  showSetup=MuConfiguration.getVariable(MuConfiguration.THEME_TYPE) == null;
  Runtime.getRuntime().addShutdownHook(new ShutdownHook());
  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) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  try {
    com.mucommander.command.CommandManager.loadAssociations();
  }
 catch (  Exception e) {
    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");
  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.ActionKeymap.loadActionKeyMap();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  try {
    ToolBar.loadDescriptionFile();
  }
 catch (  Exception e) {
    printFileError("String_Node_Str",e,fatalWarnings);
  }
  printStartupMessage("String_Node_Str");
  try {
    CommandBar.loadDescriptionFile();
  }
 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();
}