Program: 28583
Project: 28583
Buggy source:
@Override protected int executeCommand() throws CommandException {
  try {
    File serverDir=new File(nodeDir,node);
    if (serverDir == null || !serverDir.isDirectory()) {
      throw new CommandException(strings.get("String_Node_Str",serverDir));
    }
    ArrayList<String> serverNames=getInstanceDirs(serverDir);
    for (    String serverName : serverNames) {
      HostAndPort adminAddress=getAdminAddress(serverName);
      if (isRunning(adminAddress.getHost(),adminAddress.getPort()))       throw new CommandException(strings.get("String_Node_Str",serverName));
    }
    oldPassword=passwords.get("String_Node_Str");
    if (oldPassword == null) {
      oldPassword=super.readPassword(strings.get("String_Node_Str"));
    }
    if (oldPassword == null)     throw new CommandException(strings.get("String_Node_Str"));
    boolean valid=true;
    for (    String instanceDir : getInstanceDirs(nodeDirChild)) {
      valid&=verifyInstancePassword(new File(nodeDirChild,instanceDir));
    }
    if (!valid) {
      throw new CommandException(strings.get("String_Node_Str"));
    }
    ParamModelData nmpo=new ParamModelData("String_Node_Str",String.class,false,null);
    nmpo.prompt=strings.get("String_Node_Str");
    nmpo.promptAgain=strings.get("String_Node_Str");
    nmpo.param._password=true;
    newPassword=super.getPassword(nmpo,null,true);
    for (    String instanceDir : getInstanceDirs(nodeDirChild)) {
      encryptKeystore(instanceDir);
    }
    if (savemp) {
      createMasterPasswordFile();
    }
    return 0;
  }
 catch (  Exception e) {
    throw new CommandException(e.getMessage(),e);
  }
}

Fixed version (ground truth):
@Override protected int executeCommand() throws CommandException {
  try {
    File serverDir=new File(nodeDir,node);
    if (serverDir == null || !serverDir.isDirectory()) {
      throw new CommandException(strings.get("String_Node_Str",serverDir));
    }
    ArrayList<String> serverNames=getInstanceDirs(serverDir);
    for (    String serverName : serverNames)     if (isRunning(serverDir,serverName))     throw new CommandException(strings.get("String_Node_Str",serverName));
    oldPassword=passwords.get("String_Node_Str");
    if (oldPassword == null) {
      oldPassword=super.readPassword(strings.get("String_Node_Str"));
    }
    if (oldPassword == null)     throw new CommandException(strings.get("String_Node_Str"));
    boolean valid=true;
    for (    String instanceDir : getInstanceDirs(nodeDirChild)) {
      valid&=verifyInstancePassword(new File(nodeDirChild,instanceDir));
    }
    if (!valid) {
      throw new CommandException(strings.get("String_Node_Str"));
    }
    ParamModelData nmpo=new ParamModelData("String_Node_Str",String.class,false,null);
    nmpo.prompt=strings.get("String_Node_Str");
    nmpo.promptAgain=strings.get("String_Node_Str");
    nmpo.param._password=true;
    newPassword=super.getPassword(nmpo,null,true);
    for (    String instanceDir : getInstanceDirs(nodeDirChild)) {
      encryptKeystore(instanceDir);
    }
    if (savemp) {
      createMasterPasswordFile();
    }
    return 0;
  }
 catch (  Exception e) {
    throw new CommandException(e.getMessage(),e);
  }
}