Program: 105648
Project: 105648
Buggy source:
public static void main(String[] args){
  Set<Class<?>> cmdClasses=ReflectUtil.getClassesWithAnnotation(APICommand.class,new String[]{"String_Node_Str","String_Node_Str"});
  for (  Class<?> cmdClass : cmdClasses) {
    String apiName=cmdClass.getAnnotation(APICommand.class).name();
    if (s_apiNameCmdClassMap.containsKey(apiName)) {
      Class<?> curCmd=s_apiNameCmdClassMap.get(apiName);
      if (curCmd.isAssignableFrom(cmdClass)) {
        s_apiNameCmdClassMap.put(apiName,cmdClass);
      }
 else       if (cmdClass.isAssignableFrom(curCmd)) {
        continue;
      }
 else {
        System.out.println("String_Node_Str" + cmdClass.getName() + "String_Node_Str"+ apiName);
        continue;
      }
    }
 else {
      s_apiNameCmdClassMap.put(apiName,cmdClass);
    }
  }
  LinkedProperties preProcessedCommands=new LinkedProperties();
  String[] fileNames=null;
  List<String> argsList=Arrays.asList(args);
  Iterator<String> iter=argsList.iterator();
  while (iter.hasNext()) {
    String arg=iter.next();
    if (arg.equals("String_Node_Str")) {
      fileNames=iter.next().split("String_Node_Str");
    }
    if (arg.equals("String_Node_Str")) {
      s_dirName=iter.next();
    }
  }
  if ((fileNames == null) || (fileNames.length == 0)) {
    System.out.println("String_Node_Str");
    System.exit(2);
  }
  for (  String fileName : fileNames) {
    try {
      FileInputStream in=new FileInputStream(fileName);
      preProcessedCommands.load(in);
      in.close();
    }
 catch (    FileNotFoundException ex) {
      System.out.println("String_Node_Str" + fileName);
      System.exit(2);
    }
catch (    IOException ex1) {
      System.out.println("String_Node_Str" + ex1);
      System.exit(2);
    }
  }
  Iterator<?> propertiesIterator=preProcessedCommands.keys.iterator();
  while (propertiesIterator.hasNext()) {
    String key=(String)propertiesIterator.next();
    String preProcessedCommand=preProcessedCommands.getProperty(key);
    int splitIndex=preProcessedCommand.lastIndexOf("String_Node_Str");
    String commandRoleMask=preProcessedCommand.substring(splitIndex + 1);
    Class<?> cmdClass=s_apiNameCmdClassMap.get(key);
    if (cmdClass == null) {
      System.out.println("String_Node_Str" + key + "String_Node_Str"+ preProcessedCommand);
      continue;
    }
    String commandName=cmdClass.getName();
    s_allApiCommands.put(key,commandName);
    short cmdPermissions=1;
    if (commandRoleMask != null) {
      cmdPermissions=Short.parseShort(commandRoleMask);
    }
    if ((cmdPermissions & DOMAIN_ADMIN_COMMAND) != 0) {
      s_domainAdminApiCommands.put(key,commandName);
    }
    if ((cmdPermissions & USER_COMMAND) != 0) {
      s_regularUserApiCommands.put(key,commandName);
    }
  }
  s_allApiCommands.put("String_Node_Str","String_Node_Str");
  s_domainAdminApiCommands.put("String_Node_Str","String_Node_Str");
  s_regularUserApiCommands.put("String_Node_Str","String_Node_Str");
  s_allApiCommands.put("String_Node_Str","String_Node_Str");
  s_domainAdminApiCommands.put("String_Node_Str","String_Node_Str");
  s_regularUserApiCommands.put("String_Node_Str","String_Node_Str");
  s_allApiCommandsSorted.putAll(s_allApiCommands);
  s_domainAdminApiCommandsSorted.putAll(s_domainAdminApiCommands);
  s_regularUserApiCommandsSorted.putAll(s_regularUserApiCommands);
  try {
    XStream xs=new XStream();
    xs.alias("String_Node_Str",Command.class);
    xs.alias("String_Node_Str",Argument.class);
    String xmlDocDir=s_dirName + "String_Node_Str";
    String rootAdminDirName=xmlDocDir + "String_Node_Str";
    String domainAdminDirName=xmlDocDir + "String_Node_Str";
    String regularUserDirName=xmlDocDir + "String_Node_Str";
    (new File(rootAdminDirName)).mkdirs();
    (new File(domainAdminDirName)).mkdirs();
    (new File(regularUserDirName)).mkdirs();
    ObjectOutputStream out=xs.createObjectOutputStream(new FileWriter(s_dirName + "String_Node_Str"),"String_Node_Str");
    ObjectOutputStream rootAdmin=xs.createObjectOutputStream(new FileWriter(rootAdminDirName + "String_Node_Str" + "String_Node_Str"),"String_Node_Str");
    ObjectOutputStream rootAdminSorted=xs.createObjectOutputStream(new FileWriter(rootAdminDirName + "String_Node_Str" + "String_Node_Str"),"String_Node_Str");
    ObjectOutputStream domainAdmin=xs.createObjectOutputStream(new FileWriter(domainAdminDirName + "String_Node_Str" + "String_Node_Str"),"String_Node_Str");
    ObjectOutputStream outDomainAdminSorted=xs.createObjectOutputStream(new FileWriter(domainAdminDirName + "String_Node_Str" + "String_Node_Str"),"String_Node_Str");
    ObjectOutputStream regularUser=xs.createObjectOutputStream(new FileWriter(regularUserDirName + "String_Node_Str"),"String_Node_Str");
    ObjectOutputStream regularUserSorted=xs.createObjectOutputStream(new FileWriter(regularUserDirName + "String_Node_Str"),"String_Node_Str");
    Iterator<?> it=s_allApiCommands.keySet().iterator();
    while (it.hasNext()) {
      String key=(String)it.next();
      if (key.equals("String_Node_Str")) {
        writeLoginCommand(out);
        writeLoginCommand(rootAdmin);
        writeLoginCommand(domainAdmin);
        writeLoginCommand(regularUser);
        ObjectOutputStream singleRootAdminCommandOs=xs.createObjectOutputStream(new FileWriter(rootAdminDirName + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"),"String_Node_Str");
        writeLoginCommand(singleRootAdminCommandOs);
        singleRootAdminCommandOs.close();
        ObjectOutputStream singleDomainAdminCommandOs=xs.createObjectOutputStream(new FileWriter(domainAdminDirName + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"),"String_Node_Str");
        writeLoginCommand(singleDomainAdminCommandOs);
        singleDomainAdminCommandOs.close();
        ObjectOutputStream singleRegularUserCommandOs=xs.createObjectOutputStream(new FileWriter(regularUserDirName + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"),"String_Node_Str");
        writeLoginCommand(singleRegularUserCommandOs);
        singleRegularUserCommandOs.close();
      }
 else       if (key.equals("String_Node_Str")) {
        writeLogoutCommand(out);
        writeLogoutCommand(rootAdmin);
        writeLogoutCommand(domainAdmin);
        writeLogoutCommand(regularUser);
        ObjectOutputStream singleRootAdminCommandOs=xs.createObjectOutputStream(new FileWriter(rootAdminDirName + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"),"String_Node_Str");
        writeLogoutCommand(singleRootAdminCommandOs);
        singleRootAdminCommandOs.close();
        ObjectOutputStream singleDomainAdminCommandOs=xs.createObjectOutputStream(new FileWriter(domainAdminDirName + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"),"String_Node_Str");
        writeLogoutCommand(singleDomainAdminCommandOs);
        singleDomainAdminCommandOs.close();
        ObjectOutputStream singleRegularUserCommandOs=xs.createObjectOutputStream(new FileWriter(regularUserDirName + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"),"String_Node_Str");
        writeLogoutCommand(singleRegularUserCommandOs);
        singleRegularUserCommandOs.close();
      }
 else {
        writeCommand(out,key);
        writeCommand(rootAdmin,key);
        if (!key.equals("String_Node_Str")) {
          ObjectOutputStream singleRootAdminCommandOs=xs.createObjectOutputStream(new FileWriter(rootAdminDirName + "String_Node_Str" + key+ "String_Node_Str"),"String_Node_Str");
          writeCommand(singleRootAdminCommandOs,key);
          singleRootAdminCommandOs.close();
        }
        if (s_domainAdminApiCommands.containsKey(key)) {
          writeCommand(domainAdmin,key);
          ObjectOutputStream singleDomainAdminCommandOs=xs.createObjectOutputStream(new FileWriter(domainAdminDirName + "String_Node_Str" + key+ "String_Node_Str"),"String_Node_Str");
          writeCommand(singleDomainAdminCommandOs,key);
          singleDomainAdminCommandOs.close();
        }
        if (s_regularUserApiCommands.containsKey(key)) {
          writeCommand(regularUser,key);
          ObjectOutputStream singleRegularUserCommandOs=xs.createObjectOutputStream(new FileWriter(regularUserDirName + "String_Node_Str" + key+ "String_Node_Str"),"String_Node_Str");
          writeCommand(singleRegularUserCommandOs,key);
          singleRegularUserCommandOs.close();
        }
      }
    }
    it=s_allApiCommandsSorted.keySet().iterator();
    while (it.hasNext()) {
      String key=(String)it.next();
      if (key.equals("String_Node_Str")) {
        writeLoginCommand(rootAdminSorted);
        writeLoginCommand(outDomainAdminSorted);
        writeLoginCommand(regularUserSorted);
      }
 else       if (key.equals("String_Node_Str")) {
        writeLogoutCommand(rootAdminSorted);
        writeLogoutCommand(outDomainAdminSorted);
        writeLogoutCommand(regularUserSorted);
      }
 else {
        writeCommand(rootAdminSorted,key);
        if (s_domainAdminApiCommands.containsKey(key)) {
          writeCommand(outDomainAdminSorted,key);
        }
        if (s_regularUserApiCommands.containsKey(key)) {
          writeCommand(regularUserSorted,key);
        }
      }
    }
    out.close();
    rootAdmin.close();
    rootAdminSorted.close();
    domainAdmin.close();
    outDomainAdminSorted.close();
    regularUser.close();
    regularUserSorted.close();
    writeAlertTypes(xmlDocDir);
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    System.exit(2);
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  Set<Class<?>> cmdClasses=ReflectUtil.getClassesWithAnnotation(APICommand.class,new String[]{"String_Node_Str","String_Node_Str"});
  for (  Class<?> cmdClass : cmdClasses) {
    String apiName=cmdClass.getAnnotation(APICommand.class).name();
    if (s_apiNameCmdClassMap.containsKey(apiName)) {
      Class<?> curCmd=s_apiNameCmdClassMap.get(apiName);
      if (curCmd.isAssignableFrom(cmdClass)) {
        s_apiNameCmdClassMap.put(apiName,cmdClass);
      }
 else       if (cmdClass.isAssignableFrom(curCmd)) {
        continue;
      }
 else {
        System.out.println("String_Node_Str" + cmdClass.getName() + "String_Node_Str"+ apiName);
        continue;
      }
    }
 else {
      s_apiNameCmdClassMap.put(apiName,cmdClass);
    }
  }
  LinkedProperties preProcessedCommands=new LinkedProperties();
  String[] fileNames=null;
  List<String> argsList=Arrays.asList(args);
  Iterator<String> iter=argsList.iterator();
  while (iter.hasNext()) {
    String arg=iter.next();
    if (arg.equals("String_Node_Str")) {
      fileNames=iter.next().split("String_Node_Str");
    }
    if (arg.equals("String_Node_Str")) {
      s_dirName=iter.next();
    }
  }
  if ((fileNames == null) || (fileNames.length == 0)) {
    System.out.println("String_Node_Str");
    System.exit(2);
  }
  for (  String fileName : fileNames) {
    try (FileInputStream in=new FileInputStream(fileName)){
      preProcessedCommands.load(in);
    }
 catch (    FileNotFoundException ex) {
      System.out.println("String_Node_Str" + fileName);
      System.exit(2);
    }
catch (    IOException ex1) {
      System.out.println("String_Node_Str" + ex1);
      System.exit(2);
    }
  }
  Iterator<?> propertiesIterator=preProcessedCommands.keys.iterator();
  while (propertiesIterator.hasNext()) {
    String key=(String)propertiesIterator.next();
    String preProcessedCommand=preProcessedCommands.getProperty(key);
    int splitIndex=preProcessedCommand.lastIndexOf("String_Node_Str");
    String commandRoleMask=preProcessedCommand.substring(splitIndex + 1);
    Class<?> cmdClass=s_apiNameCmdClassMap.get(key);
    if (cmdClass == null) {
      System.out.println("String_Node_Str" + key + "String_Node_Str"+ preProcessedCommand);
      continue;
    }
    String commandName=cmdClass.getName();
    s_allApiCommands.put(key,commandName);
    short cmdPermissions=1;
    if (commandRoleMask != null) {
      cmdPermissions=Short.parseShort(commandRoleMask);
    }
    if ((cmdPermissions & DOMAIN_ADMIN_COMMAND) != 0) {
      s_domainAdminApiCommands.put(key,commandName);
    }
    if ((cmdPermissions & USER_COMMAND) != 0) {
      s_regularUserApiCommands.put(key,commandName);
    }
  }
  s_allApiCommands.put("String_Node_Str","String_Node_Str");
  s_domainAdminApiCommands.put("String_Node_Str","String_Node_Str");
  s_regularUserApiCommands.put("String_Node_Str","String_Node_Str");
  s_allApiCommands.put("String_Node_Str","String_Node_Str");
  s_domainAdminApiCommands.put("String_Node_Str","String_Node_Str");
  s_regularUserApiCommands.put("String_Node_Str","String_Node_Str");
  s_allApiCommandsSorted.putAll(s_allApiCommands);
  s_domainAdminApiCommandsSorted.putAll(s_domainAdminApiCommands);
  s_regularUserApiCommandsSorted.putAll(s_regularUserApiCommands);
  try {
    XStream xs=new XStream();
    xs.alias("String_Node_Str",Command.class);
    xs.alias("String_Node_Str",Argument.class);
    String xmlDocDir=s_dirName + "String_Node_Str";
    String rootAdminDirName=xmlDocDir + "String_Node_Str";
    String domainAdminDirName=xmlDocDir + "String_Node_Str";
    String regularUserDirName=xmlDocDir + "String_Node_Str";
    (new File(rootAdminDirName)).mkdirs();
    (new File(domainAdminDirName)).mkdirs();
    (new File(regularUserDirName)).mkdirs();
    ObjectOutputStream out=xs.createObjectOutputStream(new FileWriter(s_dirName + "String_Node_Str"),"String_Node_Str");
    ObjectOutputStream rootAdmin=xs.createObjectOutputStream(new FileWriter(rootAdminDirName + "String_Node_Str" + "String_Node_Str"),"String_Node_Str");
    ObjectOutputStream rootAdminSorted=xs.createObjectOutputStream(new FileWriter(rootAdminDirName + "String_Node_Str" + "String_Node_Str"),"String_Node_Str");
    ObjectOutputStream domainAdmin=xs.createObjectOutputStream(new FileWriter(domainAdminDirName + "String_Node_Str" + "String_Node_Str"),"String_Node_Str");
    ObjectOutputStream outDomainAdminSorted=xs.createObjectOutputStream(new FileWriter(domainAdminDirName + "String_Node_Str" + "String_Node_Str"),"String_Node_Str");
    ObjectOutputStream regularUser=xs.createObjectOutputStream(new FileWriter(regularUserDirName + "String_Node_Str"),"String_Node_Str");
    ObjectOutputStream regularUserSorted=xs.createObjectOutputStream(new FileWriter(regularUserDirName + "String_Node_Str"),"String_Node_Str");
    Iterator<?> it=s_allApiCommands.keySet().iterator();
    while (it.hasNext()) {
      String key=(String)it.next();
      if (key.equals("String_Node_Str")) {
        writeLoginCommand(out);
        writeLoginCommand(rootAdmin);
        writeLoginCommand(domainAdmin);
        writeLoginCommand(regularUser);
        ObjectOutputStream singleRootAdminCommandOs=xs.createObjectOutputStream(new FileWriter(rootAdminDirName + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"),"String_Node_Str");
        writeLoginCommand(singleRootAdminCommandOs);
        singleRootAdminCommandOs.close();
        ObjectOutputStream singleDomainAdminCommandOs=xs.createObjectOutputStream(new FileWriter(domainAdminDirName + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"),"String_Node_Str");
        writeLoginCommand(singleDomainAdminCommandOs);
        singleDomainAdminCommandOs.close();
        ObjectOutputStream singleRegularUserCommandOs=xs.createObjectOutputStream(new FileWriter(regularUserDirName + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"),"String_Node_Str");
        writeLoginCommand(singleRegularUserCommandOs);
        singleRegularUserCommandOs.close();
      }
 else       if (key.equals("String_Node_Str")) {
        writeLogoutCommand(out);
        writeLogoutCommand(rootAdmin);
        writeLogoutCommand(domainAdmin);
        writeLogoutCommand(regularUser);
        ObjectOutputStream singleRootAdminCommandOs=xs.createObjectOutputStream(new FileWriter(rootAdminDirName + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"),"String_Node_Str");
        writeLogoutCommand(singleRootAdminCommandOs);
        singleRootAdminCommandOs.close();
        ObjectOutputStream singleDomainAdminCommandOs=xs.createObjectOutputStream(new FileWriter(domainAdminDirName + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"),"String_Node_Str");
        writeLogoutCommand(singleDomainAdminCommandOs);
        singleDomainAdminCommandOs.close();
        ObjectOutputStream singleRegularUserCommandOs=xs.createObjectOutputStream(new FileWriter(regularUserDirName + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"),"String_Node_Str");
        writeLogoutCommand(singleRegularUserCommandOs);
        singleRegularUserCommandOs.close();
      }
 else {
        writeCommand(out,key);
        writeCommand(rootAdmin,key);
        if (!key.equals("String_Node_Str")) {
          ObjectOutputStream singleRootAdminCommandOs=xs.createObjectOutputStream(new FileWriter(rootAdminDirName + "String_Node_Str" + key+ "String_Node_Str"),"String_Node_Str");
          writeCommand(singleRootAdminCommandOs,key);
          singleRootAdminCommandOs.close();
        }
        if (s_domainAdminApiCommands.containsKey(key)) {
          writeCommand(domainAdmin,key);
          ObjectOutputStream singleDomainAdminCommandOs=xs.createObjectOutputStream(new FileWriter(domainAdminDirName + "String_Node_Str" + key+ "String_Node_Str"),"String_Node_Str");
          writeCommand(singleDomainAdminCommandOs,key);
          singleDomainAdminCommandOs.close();
        }
        if (s_regularUserApiCommands.containsKey(key)) {
          writeCommand(regularUser,key);
          ObjectOutputStream singleRegularUserCommandOs=xs.createObjectOutputStream(new FileWriter(regularUserDirName + "String_Node_Str" + key+ "String_Node_Str"),"String_Node_Str");
          writeCommand(singleRegularUserCommandOs,key);
          singleRegularUserCommandOs.close();
        }
      }
    }
    it=s_allApiCommandsSorted.keySet().iterator();
    while (it.hasNext()) {
      String key=(String)it.next();
      if (key.equals("String_Node_Str")) {
        writeLoginCommand(rootAdminSorted);
        writeLoginCommand(outDomainAdminSorted);
        writeLoginCommand(regularUserSorted);
      }
 else       if (key.equals("String_Node_Str")) {
        writeLogoutCommand(rootAdminSorted);
        writeLogoutCommand(outDomainAdminSorted);
        writeLogoutCommand(regularUserSorted);
      }
 else {
        writeCommand(rootAdminSorted,key);
        if (s_domainAdminApiCommands.containsKey(key)) {
          writeCommand(outDomainAdminSorted,key);
        }
        if (s_regularUserApiCommands.containsKey(key)) {
          writeCommand(regularUserSorted,key);
        }
      }
    }
    out.close();
    rootAdmin.close();
    rootAdminSorted.close();
    domainAdmin.close();
    outDomainAdminSorted.close();
    regularUser.close();
    regularUserSorted.close();
    writeAlertTypes(xmlDocDir);
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    System.exit(2);
  }
}