Program: 30108
Project: 30108
Buggy source:
@Override public void execute(AdminCommandContext context){
  report=context.getActionReport();
  report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
  if (load_balancer_name == null) {
    String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str");
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(msg);
    return;
  }
  LoadBalancers loadBalancers=domain.getExtensionByType(LoadBalancers.class);
  if (loadBalancers != null && loadBalancers.getLoadBalancer(load_balancer_name) != null) {
    String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",load_balancer_name);
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(msg);
    return;
  }
  if (target != null && !tgt.isValid(target)) {
    String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",target);
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(msg);
    return;
  }
  boolean isCluster=tgt.isCluster(target);
  String lbConfigName=load_balancer_name + "String_Node_Str";
  if (!isCluster) {
    if ((lbpolicy != null) || (lbpolicymodule != null)) {
      String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",target);
      report.setActionExitCode(ActionReport.ExitCode.FAILURE);
      report.setMessage(msg);
      return;
    }
  }
  try {
    createLBConfig(lbConfigName);
    if (target != null) {
      final CreateHTTPLBRefCommand command=(CreateHTTPLBRefCommand)runner.getCommand("String_Node_Str",report,context.getLogger());
      command.target=target;
      command.config=lbConfigName;
      command.lbpolicy=lbpolicy;
      command.lbpolicymodule=lbpolicymodule;
      command.healthcheckerurl=healthcheckerurl;
      command.healthcheckerinterval=healthcheckerinterval;
      command.healthcheckertimeout=healthcheckertimeout;
      command.lbenableallinstances=lbenableallinstances;
      command.lbenableallapplications=lbenableallapplications;
      command.lbweight=lbweight;
      command.execute(context);
      checkCommandStatus(context);
    }
  }
 catch (  CommandException e) {
    String msg=e.getLocalizedMessage();
    logger.warning(msg);
  }
  addLoadBalancer(lbConfigName);
  if (isCluster && lbweight != null) {
    try {
      final ConfigureLBWeightCommand command=(ConfigureLBWeightCommand)runner.getCommand("String_Node_Str",report,context.getLogger());
      command.weights=lbweight;
      command.cluster=target;
      command.execute(context);
      checkCommandStatus(context);
    }
 catch (    CommandException e) {
      String msg=e.getLocalizedMessage();
      logger.warning(msg);
    }
  }
}

Fixed version (ground truth):
@Override public void execute(AdminCommandContext context){
  report=context.getActionReport();
  report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
  if (load_balancer_name == null) {
    String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str");
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(msg);
    return;
  }
  if (!Pattern.matches(NAME_REGEX,load_balancer_name)) {
    String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str");
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(msg);
    return;
  }
  LoadBalancers loadBalancers=domain.getExtensionByType(LoadBalancers.class);
  if (loadBalancers != null && loadBalancers.getLoadBalancer(load_balancer_name) != null) {
    String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",load_balancer_name);
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(msg);
    return;
  }
  if (target != null && !tgt.isValid(target)) {
    String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",target);
    report.setActionExitCode(ActionReport.ExitCode.FAILURE);
    report.setMessage(msg);
    return;
  }
  boolean isCluster=tgt.isCluster(target);
  String lbConfigName=load_balancer_name + "String_Node_Str";
  if (!isCluster) {
    if ((lbpolicy != null) || (lbpolicymodule != null)) {
      String msg=localStrings.getLocalString("String_Node_Str","String_Node_Str",target);
      report.setActionExitCode(ActionReport.ExitCode.FAILURE);
      report.setMessage(msg);
      return;
    }
  }
  try {
    createLBConfig(lbConfigName);
    if (target != null) {
      final CreateHTTPLBRefCommand command=(CreateHTTPLBRefCommand)runner.getCommand("String_Node_Str",report,context.getLogger());
      command.target=target;
      command.config=lbConfigName;
      command.lbpolicy=lbpolicy;
      command.lbpolicymodule=lbpolicymodule;
      command.healthcheckerurl=healthcheckerurl;
      command.healthcheckerinterval=healthcheckerinterval;
      command.healthcheckertimeout=healthcheckertimeout;
      command.lbenableallinstances=lbenableallinstances;
      command.lbenableallapplications=lbenableallapplications;
      command.lbweight=lbweight;
      command.execute(context);
      checkCommandStatus(context);
    }
  }
 catch (  CommandException e) {
    String msg=e.getLocalizedMessage();
    logger.warning(msg);
  }
  addLoadBalancer(lbConfigName);
  if (isCluster && lbweight != null) {
    try {
      final ConfigureLBWeightCommand command=(ConfigureLBWeightCommand)runner.getCommand("String_Node_Str",report,context.getLogger());
      command.weights=lbweight;
      command.cluster=target;
      command.execute(context);
      checkCommandStatus(context);
    }
 catch (    CommandException e) {
      String msg=e.getLocalizedMessage();
      logger.warning(msg);
    }
  }
}