Program: 115858
Project: 115858
Buggy source:
public int execute(StratosCommandContext context,String[] args) throws CommandException {
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",getName());
  }
  if (args != null && args.length > 0) {
    String resourcePath=null;
    String deploymentPolicyDeployment=null;
    final CommandLineParser parser=new GnuParser();
    CommandLine commandLine;
    try {
      commandLine=parser.parse(options,args);
      if (logger.isDebugEnabled()) {
        logger.debug("String_Node_Str");
      }
      if (commandLine.hasOption(CliConstants.RESOURCE_PATH)) {
        if (logger.isTraceEnabled()) {
          logger.trace("String_Node_Str");
        }
        resourcePath=commandLine.getOptionValue(CliConstants.RESOURCE_PATH);
        deploymentPolicyDeployment=readResource(resourcePath);
      }
      if (resourcePath == null) {
        System.out.println("String_Node_Str" + getName() + "String_Node_Str");
        return CliConstants.COMMAND_FAILED;
      }
      RestCommandLineService.getInstance().addDeploymentPolicy(deploymentPolicyDeployment);
      return CliConstants.COMMAND_SUCCESSFULL;
    }
 catch (    ParseException e) {
      if (logger.isErrorEnabled()) {
        logger.error("String_Node_Str",e);
      }
      System.out.println(e.getMessage());
      return CliConstants.COMMAND_FAILED;
    }
catch (    IOException e) {
      System.out.println("String_Node_Str");
      return CliConstants.COMMAND_FAILED;
    }
  }
 else {
    context.getStratosApplication().printUsage(getName());
    return CliConstants.COMMAND_FAILED;
  }
}

Fixed version (ground truth):
public int execute(StratosCommandContext context,String[] args,Option[] already_parsed_opts) throws CommandException {
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",getName());
  }
  if (args != null && args.length > 0) {
    String resourcePath=null;
    String deploymentPolicyDeployment=null;
    final CommandLineParser parser=new GnuParser();
    CommandLine commandLine;
    try {
      commandLine=parser.parse(options,args);
      Options opts=mergeOptionArrays(already_parsed_opts,commandLine.getOptions());
      if (logger.isDebugEnabled()) {
        logger.debug("String_Node_Str");
      }
      if (opts.hasOption(CliConstants.RESOURCE_PATH)) {
        if (logger.isTraceEnabled()) {
          logger.trace("String_Node_Str");
        }
        resourcePath=opts.getOption(CliConstants.RESOURCE_PATH).getValue();
        deploymentPolicyDeployment=readResource(resourcePath);
      }
      if (resourcePath == null) {
        System.out.println("String_Node_Str" + getName() + "String_Node_Str");
        return CliConstants.COMMAND_FAILED;
      }
      RestCommandLineService.getInstance().addDeploymentPolicy(deploymentPolicyDeployment);
      return CliConstants.COMMAND_SUCCESSFULL;
    }
 catch (    ParseException e) {
      if (logger.isErrorEnabled()) {
        logger.error("String_Node_Str",e);
      }
      System.out.println(e.getMessage());
      return CliConstants.COMMAND_FAILED;
    }
catch (    IOException e) {
      System.out.println("String_Node_Str");
      return CliConstants.COMMAND_FAILED;
    }
  }
 else {
    context.getStratosApplication().printUsage(getName());
    return CliConstants.COMMAND_FAILED;
  }
}