Program: 28264
Project: 28264
Buggy source:
/** 
 * This is to create a health checker for a cluster configuration. By default the healh checker will be configured.  This applies only to our native load balancer.
 * @param url   the URL to ping so as to determine the health stateof a listener.
 * @param interval   specifies the interval in seconds at which healthchecks of unhealthy instances carried out to check if the instances has turned healthy. Default value is 30 seconds. A value of 0 would imply that health check is disabled.
 * @param timeout    timeout interval in seconds within which responseshould be obtained for a health check request; else the instance would be considered unhealthy.Default value is 10 seconds.
 * @param lbConfig    the load balancer configuration bean
 * @param lbConfigName    the load balancer configuration's name
 * @param target      name of the target - cluster or stand aloneserver instance
 * @throws CommandException   If the operation is failed
 */
private void createHealthCheckerInternal(String url,String interval,String timeout,LbConfig lbConfig,String lbConfigName,String target){
  if (lbConfigName == null) {
    String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str");
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(msg);
    return;
  }
  lbConfigName=lbConfig.getName();
  logger.fine("String_Node_Str" + url + "String_Node_Str"+ interval+ "String_Node_Str"+ timeout+ "String_Node_Str"+ lbConfigName+ "String_Node_Str"+ target);
  if (target == null) {
    String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str");
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(msg);
    return;
  }
  if (tgt.isCluster(target)) {
    ClusterRef cRef=lbConfig.getRefByRef(ClusterRef.class,target);
    if (cRef == null) {
      String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",lbConfigName,target);
      report.setActionExitCode(ActionReport.ExitCode.FAILURE);
      report.setMessage(msg);
      return;
    }
    if (cRef.getHealthChecker() == null) {
      try {
        addHealthChecker(cRef);
      }
 catch (      TransactionFailure ex) {
        String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str");
        report.setActionExitCode(ActionReport.ExitCode.FAILURE);
        report.setMessage(msg);
        report.setFailureCause(ex);
        return;
      }
      logger.info(localStrings.getLocalString("String_Node_Str","String_Node_Str",target));
    }
 else {
      String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",target);
      report.setActionExitCode(ActionReport.ExitCode.FAILURE);
      report.setMessage(msg);
      return;
    }
  }
 else   if (domain.isServer(target)) {
    ServerRef sRef=lbConfig.getRefByRef(ServerRef.class,target);
    if (sRef == null) {
      String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",lbConfigName,target);
      report.setActionExitCode(ActionReport.ExitCode.FAILURE);
      report.setMessage(msg);
      return;
    }
    if (sRef.getHealthChecker() == null) {
      try {
        addHealthChecker(sRef);
      }
 catch (      TransactionFailure ex) {
        String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str");
        report.setActionExitCode(ActionReport.ExitCode.FAILURE);
        report.setMessage(msg);
        report.setFailureCause(ex);
        return;
      }
      logger.info(localStrings.getLocalString("String_Node_Str","String_Node_Str",target));
    }
 else {
      String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",target);
      report.setActionExitCode(ActionReport.ExitCode.FAILURE);
      report.setMessage(msg);
      return;
    }
  }
 else {
    String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",target);
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(msg);
    return;
  }
}

Fixed version (ground truth):
/** 
 * This is to create a health checker for a cluster configuration. By default the healh checker will be configured.  This applies only to our native load balancer.
 * @param url   the URL to ping so as to determine the health stateof a listener.
 * @param interval   specifies the interval in seconds at which healthchecks of unhealthy instances carried out to check if the instances has turned healthy. Default value is 30 seconds. A value of 0 would imply that health check is disabled.
 * @param timeout    timeout interval in seconds within which responseshould be obtained for a health check request; else the instance would be considered unhealthy.Default value is 10 seconds.
 * @param lbConfig    the load balancer configuration bean
 * @param lbConfigName    the load balancer configuration's name
 * @param target      name of the target - cluster or stand aloneserver instance
 * @throws CommandException   If the operation is failed
 */
private void createHealthCheckerInternal(String url,String interval,String timeout,LbConfig lbConfig,String lbConfigName,String target){
  if (lbConfigName == null) {
    String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str");
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(msg);
    return;
  }
  lbConfigName=lbConfig.getName();
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("String_Node_Str" + url + "String_Node_Str"+ interval+ "String_Node_Str"+ timeout+ "String_Node_Str"+ lbConfigName+ "String_Node_Str"+ target);
  }
  if (target == null) {
    String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str");
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(msg);
    return;
  }
  if (tgt.isCluster(target)) {
    ClusterRef cRef=lbConfig.getRefByRef(ClusterRef.class,target);
    if (cRef == null) {
      String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",lbConfigName,target);
      report.setActionExitCode(ActionReport.ExitCode.FAILURE);
      report.setMessage(msg);
      return;
    }
    if (cRef.getHealthChecker() == null) {
      try {
        addHealthChecker(cRef);
      }
 catch (      TransactionFailure ex) {
        String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str");
        report.setActionExitCode(ActionReport.ExitCode.FAILURE);
        report.setMessage(msg);
        report.setFailureCause(ex);
        return;
      }
      logger.info(localStrings.getLocalString("String_Node_Str","String_Node_Str",target));
    }
 else {
      String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",target);
      report.setActionExitCode(ActionReport.ExitCode.FAILURE);
      report.setMessage(msg);
      return;
    }
  }
 else   if (domain.isServer(target)) {
    ServerRef sRef=lbConfig.getRefByRef(ServerRef.class,target);
    if (sRef == null) {
      String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",lbConfigName,target);
      report.setActionExitCode(ActionReport.ExitCode.FAILURE);
      report.setMessage(msg);
      return;
    }
    if (sRef.getHealthChecker() == null) {
      try {
        addHealthChecker(sRef);
      }
 catch (      TransactionFailure ex) {
        String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str");
        report.setActionExitCode(ActionReport.ExitCode.FAILURE);
        report.setMessage(msg);
        report.setFailureCause(ex);
        return;
      }
      logger.info(localStrings.getLocalString("String_Node_Str","String_Node_Str",target));
    }
 else {
      String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",target);
      report.setActionExitCode(ActionReport.ExitCode.FAILURE);
      report.setMessage(msg);
      return;
    }
  }
 else {
    String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",target);
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(msg);
    return;
  }
}