Program: 48547
Project: 48547
Buggy source:
@CliCommand(value="String_Node_Str",help="String_Node_Str") public void addAppManager(@CliOption(key={"String_Node_Str"},mandatory=true,help="String_Node_Str") final String name,@CliOption(key={"String_Node_Str"},mandatory=false,help="String_Node_Str") final String description,@CliOption(key={"String_Node_Str"},mandatory=true,help="String_Node_Str") final String type,@CliOption(key={"String_Node_Str"},mandatory=true,help="String_Node_Str") final String url){
  AppManagerAdd appManagerAdd=new AppManagerAdd();
  appManagerAdd.setName(name);
  appManagerAdd.setDescription(description);
  appManagerAdd.setType(type);
  appManagerAdd.setUrl(url);
  Map<String,String> loginInfo=getAccount();
  if (null == loginInfo) {
    return;
  }
  appManagerAdd.setUsername(loginInfo.get(Constants.LOGIN_USERNAME));
  appManagerAdd.setPassword(loginInfo.get(Constants.LOGIN_PASSWORD));
  if (url.toLowerCase().startsWith("String_Node_Str")) {
    String sslCertificate=getSslCertificate();
    if (null != sslCertificate) {
      appManagerAdd.setSslCertificate(sslCertificate);
    }
 else {
      CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_APPMANAGER,name,Constants.OUTPUT_OP_ADD,Constants.OUTPUT_OP_RESULT_FAIL,"String_Node_Str");
      return;
    }
  }
  try {
    restClient.add(appManagerAdd);
    CommandsUtils.printCmdSuccess(Constants.OUTPUT_OBJECT_APPMANAGER,name,Constants.OUTPUT_OP_RESULT_ADD);
  }
 catch (  Exception e) {
    CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_APPMANAGER,name,Constants.OUTPUT_OP_ADD,Constants.OUTPUT_OP_RESULT_FAIL,e.getMessage());
  }
}

Fixed version (ground truth):
@CliCommand(value="String_Node_Str",help="String_Node_Str") public void addAppManager(@CliOption(key={"String_Node_Str"},mandatory=true,help="String_Node_Str") final String name,@CliOption(key={"String_Node_Str"},mandatory=false,help="String_Node_Str") final String description,@CliOption(key={"String_Node_Str"},mandatory=true,help="String_Node_Str") final String type,@CliOption(key={"String_Node_Str"},mandatory=true,help="String_Node_Str") final String url){
  AppManagerAdd appManagerAdd=new AppManagerAdd();
  appManagerAdd.setName(name);
  appManagerAdd.setDescription(description);
  String[] types=restClient.getTypes();
  boolean found=false;
  for (  String t : types) {
    if (type.equals(t)) {
      found=true;
      break;
    }
  }
  if (found) {
    appManagerAdd.setType(type);
  }
 else {
    CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_APPMANAGER,name,Constants.OUTPUT_OP_ADD,Constants.OUTPUT_OP_RESULT_FAIL,"String_Node_Str" + type + "String_Node_Str"+ Arrays.asList(types)+ "String_Node_Str");
    return;
  }
  appManagerAdd.setUrl(url);
  Map<String,String> loginInfo=getAccount();
  if (null == loginInfo) {
    return;
  }
  appManagerAdd.setUsername(loginInfo.get(Constants.LOGIN_USERNAME));
  appManagerAdd.setPassword(loginInfo.get(Constants.LOGIN_PASSWORD));
  if (url.toLowerCase().startsWith("String_Node_Str")) {
    String sslCertificate=getSslCertificate();
    if (null != sslCertificate) {
      appManagerAdd.setSslCertificate(sslCertificate);
    }
 else {
      CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_APPMANAGER,name,Constants.OUTPUT_OP_ADD,Constants.OUTPUT_OP_RESULT_FAIL,"String_Node_Str");
      return;
    }
  }
  try {
    restClient.add(appManagerAdd);
    CommandsUtils.printCmdSuccess(Constants.OUTPUT_OBJECT_APPMANAGER,name,Constants.OUTPUT_OP_RESULT_ADD);
  }
 catch (  Exception e) {
    CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_APPMANAGER,name,Constants.OUTPUT_OP_ADD,Constants.OUTPUT_OP_RESULT_FAIL,e.getMessage());
  }
}