Program: 106655
Project: 106655
Buggy source:
@Override public Answer executeRequest(Command cmd){
  if (s_logger.isTraceEnabled())   s_logger.trace("String_Node_Str" + cmd.getClass().getSimpleName());
  Answer answer=null;
  NDC.push(_hostName != null ? _hostName : _guid + "String_Node_Str" + ComponentLocator.class.getPackage().getImplementationVersion()+ "String_Node_Str");
  try {
    long cmdSequence=_cmdSequence++;
    Date startTime=DateUtil.currentGMTTime();
    PropertyMapDynamicBean mbean=new PropertyMapDynamicBean();
    mbean.addProp("String_Node_Str",DateUtil.getDateDisplayString(TimeZone.getDefault(),startTime));
    mbean.addProp("String_Node_Str",_gson.toJson(cmd));
    mbean.addProp("String_Node_Str",String.valueOf(cmdSequence));
    mbean.addProp("String_Node_Str",cmd.getClass().getSimpleName());
    if (cmd instanceof CreateCommand) {
      answer=execute((CreateCommand)cmd);
    }
 else     if (cmd instanceof SetPortForwardingRulesCommand) {
      answer=execute((SetPortForwardingRulesCommand)cmd);
    }
 else     if (cmd instanceof SetStaticNatRulesCommand) {
      answer=execute((SetStaticNatRulesCommand)cmd);
    }
 else     if (cmd instanceof LoadBalancerConfigCommand) {
      answer=execute((LoadBalancerConfigCommand)cmd);
    }
 else     if (cmd instanceof IpAssocCommand) {
      answer=execute((IpAssocCommand)cmd);
    }
 else     if (cmd instanceof SavePasswordCommand) {
      answer=execute((SavePasswordCommand)cmd);
    }
 else     if (cmd instanceof DhcpEntryCommand) {
      answer=execute((DhcpEntryCommand)cmd);
    }
 else     if (cmd instanceof VmDataCommand) {
      answer=execute((VmDataCommand)cmd);
    }
 else     if (cmd instanceof ReadyCommand) {
      answer=execute((ReadyCommand)cmd);
    }
 else     if (cmd instanceof GetHostStatsCommand) {
      answer=execute((GetHostStatsCommand)cmd);
    }
 else     if (cmd instanceof GetVmStatsCommand) {
      answer=execute((GetVmStatsCommand)cmd);
    }
 else     if (cmd instanceof CheckHealthCommand) {
      answer=execute((CheckHealthCommand)cmd);
    }
 else     if (cmd instanceof StopCommand) {
      answer=execute((StopCommand)cmd);
    }
 else     if (cmd instanceof RebootRouterCommand) {
      answer=execute((RebootRouterCommand)cmd);
    }
 else     if (cmd instanceof RebootCommand) {
      answer=execute((RebootCommand)cmd);
    }
 else     if (cmd instanceof CheckVirtualMachineCommand) {
      answer=execute((CheckVirtualMachineCommand)cmd);
    }
 else     if (cmd instanceof PrepareForMigrationCommand) {
      answer=execute((PrepareForMigrationCommand)cmd);
    }
 else     if (cmd instanceof MigrateCommand) {
      answer=execute((MigrateCommand)cmd);
    }
 else     if (cmd instanceof DestroyCommand) {
      answer=execute((DestroyCommand)cmd);
    }
 else     if (cmd instanceof CreateStoragePoolCommand) {
      return execute((CreateStoragePoolCommand)cmd);
    }
 else     if (cmd instanceof ModifyStoragePoolCommand) {
      answer=execute((ModifyStoragePoolCommand)cmd);
    }
 else     if (cmd instanceof DeleteStoragePoolCommand) {
      answer=execute((DeleteStoragePoolCommand)cmd);
    }
 else     if (cmd instanceof CopyVolumeCommand) {
      answer=execute((CopyVolumeCommand)cmd);
    }
 else     if (cmd instanceof AttachVolumeCommand) {
      answer=execute((AttachVolumeCommand)cmd);
    }
 else     if (cmd instanceof AttachIsoCommand) {
      answer=execute((AttachIsoCommand)cmd);
    }
 else     if (cmd instanceof ValidateSnapshotCommand) {
      answer=execute((ValidateSnapshotCommand)cmd);
    }
 else     if (cmd instanceof ManageSnapshotCommand) {
      answer=execute((ManageSnapshotCommand)cmd);
    }
 else     if (cmd instanceof BackupSnapshotCommand) {
      answer=execute((BackupSnapshotCommand)cmd);
    }
 else     if (cmd instanceof CreateVolumeFromSnapshotCommand) {
      answer=execute((CreateVolumeFromSnapshotCommand)cmd);
    }
 else     if (cmd instanceof CreatePrivateTemplateFromVolumeCommand) {
      answer=execute((CreatePrivateTemplateFromVolumeCommand)cmd);
    }
 else     if (cmd instanceof CreatePrivateTemplateFromSnapshotCommand) {
      answer=execute((CreatePrivateTemplateFromSnapshotCommand)cmd);
    }
 else     if (cmd instanceof UpgradeSnapshotCommand) {
      answer=execute((UpgradeSnapshotCommand)cmd);
    }
 else     if (cmd instanceof GetStorageStatsCommand) {
      answer=execute((GetStorageStatsCommand)cmd);
    }
 else     if (cmd instanceof PrimaryStorageDownloadCommand) {
      answer=execute((PrimaryStorageDownloadCommand)cmd);
    }
 else     if (cmd instanceof GetVncPortCommand) {
      answer=execute((GetVncPortCommand)cmd);
    }
 else     if (cmd instanceof SetupCommand) {
      answer=execute((SetupCommand)cmd);
    }
 else     if (cmd instanceof MaintainCommand) {
      answer=execute((MaintainCommand)cmd);
    }
 else     if (cmd instanceof PingTestCommand) {
      answer=execute((PingTestCommand)cmd);
    }
 else     if (cmd instanceof CheckOnHostCommand) {
      answer=execute((CheckOnHostCommand)cmd);
    }
 else     if (cmd instanceof ModifySshKeysCommand) {
      answer=execute((ModifySshKeysCommand)cmd);
    }
 else     if (cmd instanceof PoolEjectCommand) {
      answer=execute((PoolEjectCommand)cmd);
    }
 else     if (cmd instanceof NetworkUsageCommand) {
      answer=execute((NetworkUsageCommand)cmd);
    }
 else     if (cmd instanceof StartCommand) {
      answer=execute((StartCommand)cmd);
    }
 else     if (cmd instanceof RemoteAccessVpnCfgCommand) {
      answer=execute((RemoteAccessVpnCfgCommand)cmd);
    }
 else     if (cmd instanceof VpnUsersCfgCommand) {
      answer=execute((VpnUsersCfgCommand)cmd);
    }
 else     if (cmd instanceof CheckSshCommand) {
      answer=execute((CheckSshCommand)cmd);
    }
 else     if (cmd instanceof CheckRouterCommand) {
      answer=execute((CheckRouterCommand)cmd);
    }
 else     if (cmd instanceof SetFirewallRulesCommand) {
      answer=execute((SetFirewallRulesCommand)cmd);
    }
 else     if (cmd instanceof BumpUpPriorityCommand) {
      answer=execute((BumpUpPriorityCommand)cmd);
    }
 else     if (cmd instanceof GetDomRVersionCmd) {
      answer=execute((GetDomRVersionCmd)cmd);
    }
 else {
      answer=Answer.createUnsupportedCommandAnswer(cmd);
    }
    if (cmd.getContextParam("String_Node_Str") != null) {
      answer.setContextParam("String_Node_Str",cmd.getContextParam("String_Node_Str"));
    }
    Date doneTime=DateUtil.currentGMTTime();
    mbean.addProp("String_Node_Str",DateUtil.getDateDisplayString(TimeZone.getDefault(),doneTime));
    mbean.addProp("String_Node_Str",_gson.toJson(answer));
synchronized (this) {
      try {
        JmxUtil.registerMBean("String_Node_Str" + _morHyperHost.get_value(),"String_Node_Str" + cmdSequence + "String_Node_Str"+ cmd.getClass().getSimpleName(),mbean);
        _cmdMBeans.add(mbean);
        if (_cmdMBeans.size() >= MAX_CMD_MBEAN) {
          PropertyMapDynamicBean mbeanToRemove=_cmdMBeans.get(0);
          _cmdMBeans.remove(0);
          JmxUtil.unregisterMBean("String_Node_Str" + _morHyperHost.get_value(),"String_Node_Str" + mbeanToRemove.getProp("String_Node_Str") + "String_Node_Str"+ mbeanToRemove.getProp("String_Node_Str"));
        }
      }
 catch (      Exception e) {
        if (s_logger.isTraceEnabled())         s_logger.trace("String_Node_Str" + ExceptionUtil.toString(e));
      }
    }
  }
  finally {
    NDC.pop();
  }
  if (s_logger.isTraceEnabled())   s_logger.trace("String_Node_Str" + cmd.getClass().getSimpleName());
  return answer;
}

Fixed version (ground truth):
@Override public Answer executeRequest(Command cmd){
  if (s_logger.isTraceEnabled())   s_logger.trace("String_Node_Str" + cmd.getClass().getSimpleName());
  Answer answer=null;
  NDC.push(_hostName != null ? _hostName : _guid + "String_Node_Str" + ComponentLocator.class.getPackage().getImplementationVersion()+ "String_Node_Str");
  try {
    long cmdSequence=_cmdSequence++;
    Date startTime=DateUtil.currentGMTTime();
    PropertyMapDynamicBean mbean=new PropertyMapDynamicBean();
    mbean.addProp("String_Node_Str",DateUtil.getDateDisplayString(TimeZone.getDefault(),startTime));
    mbean.addProp("String_Node_Str",_gson.toJson(cmd));
    mbean.addProp("String_Node_Str",String.valueOf(cmdSequence));
    mbean.addProp("String_Node_Str",cmd.getClass().getSimpleName());
    if (cmd instanceof CreateCommand) {
      answer=execute((CreateCommand)cmd);
    }
 else     if (cmd instanceof SetPortForwardingRulesCommand) {
      answer=execute((SetPortForwardingRulesCommand)cmd);
    }
 else     if (cmd instanceof SetStaticNatRulesCommand) {
      answer=execute((SetStaticNatRulesCommand)cmd);
    }
 else     if (cmd instanceof LoadBalancerConfigCommand) {
      answer=execute((LoadBalancerConfigCommand)cmd);
    }
 else     if (cmd instanceof IpAssocCommand) {
      answer=execute((IpAssocCommand)cmd);
    }
 else     if (cmd instanceof SavePasswordCommand) {
      answer=execute((SavePasswordCommand)cmd);
    }
 else     if (cmd instanceof DhcpEntryCommand) {
      answer=execute((DhcpEntryCommand)cmd);
    }
 else     if (cmd instanceof VmDataCommand) {
      answer=execute((VmDataCommand)cmd);
    }
 else     if (cmd instanceof ReadyCommand) {
      answer=execute((ReadyCommand)cmd);
    }
 else     if (cmd instanceof GetHostStatsCommand) {
      answer=execute((GetHostStatsCommand)cmd);
    }
 else     if (cmd instanceof GetVmStatsCommand) {
      answer=execute((GetVmStatsCommand)cmd);
    }
 else     if (cmd instanceof CheckHealthCommand) {
      answer=execute((CheckHealthCommand)cmd);
    }
 else     if (cmd instanceof StopCommand) {
      answer=execute((StopCommand)cmd);
    }
 else     if (cmd instanceof RebootRouterCommand) {
      answer=execute((RebootRouterCommand)cmd);
    }
 else     if (cmd instanceof RebootCommand) {
      answer=execute((RebootCommand)cmd);
    }
 else     if (cmd instanceof CheckVirtualMachineCommand) {
      answer=execute((CheckVirtualMachineCommand)cmd);
    }
 else     if (cmd instanceof PrepareForMigrationCommand) {
      answer=execute((PrepareForMigrationCommand)cmd);
    }
 else     if (cmd instanceof MigrateCommand) {
      answer=execute((MigrateCommand)cmd);
    }
 else     if (cmd instanceof DestroyCommand) {
      answer=execute((DestroyCommand)cmd);
    }
 else     if (cmd instanceof CreateStoragePoolCommand) {
      return execute((CreateStoragePoolCommand)cmd);
    }
 else     if (cmd instanceof ModifyStoragePoolCommand) {
      answer=execute((ModifyStoragePoolCommand)cmd);
    }
 else     if (cmd instanceof DeleteStoragePoolCommand) {
      answer=execute((DeleteStoragePoolCommand)cmd);
    }
 else     if (cmd instanceof CopyVolumeCommand) {
      answer=execute((CopyVolumeCommand)cmd);
    }
 else     if (cmd instanceof AttachVolumeCommand) {
      answer=execute((AttachVolumeCommand)cmd);
    }
 else     if (cmd instanceof AttachIsoCommand) {
      answer=execute((AttachIsoCommand)cmd);
    }
 else     if (cmd instanceof ValidateSnapshotCommand) {
      answer=execute((ValidateSnapshotCommand)cmd);
    }
 else     if (cmd instanceof ManageSnapshotCommand) {
      answer=execute((ManageSnapshotCommand)cmd);
    }
 else     if (cmd instanceof BackupSnapshotCommand) {
      answer=execute((BackupSnapshotCommand)cmd);
    }
 else     if (cmd instanceof CreateVolumeFromSnapshotCommand) {
      answer=execute((CreateVolumeFromSnapshotCommand)cmd);
    }
 else     if (cmd instanceof CreatePrivateTemplateFromVolumeCommand) {
      answer=execute((CreatePrivateTemplateFromVolumeCommand)cmd);
    }
 else     if (cmd instanceof CreatePrivateTemplateFromSnapshotCommand) {
      answer=execute((CreatePrivateTemplateFromSnapshotCommand)cmd);
    }
 else     if (cmd instanceof UpgradeSnapshotCommand) {
      answer=execute((UpgradeSnapshotCommand)cmd);
    }
 else     if (cmd instanceof GetStorageStatsCommand) {
      answer=execute((GetStorageStatsCommand)cmd);
    }
 else     if (cmd instanceof PrimaryStorageDownloadCommand) {
      answer=execute((PrimaryStorageDownloadCommand)cmd);
    }
 else     if (cmd instanceof GetVncPortCommand) {
      answer=execute((GetVncPortCommand)cmd);
    }
 else     if (cmd instanceof SetupCommand) {
      answer=execute((SetupCommand)cmd);
    }
 else     if (cmd instanceof MaintainCommand) {
      answer=execute((MaintainCommand)cmd);
    }
 else     if (cmd instanceof PingTestCommand) {
      answer=execute((PingTestCommand)cmd);
    }
 else     if (cmd instanceof CheckOnHostCommand) {
      answer=execute((CheckOnHostCommand)cmd);
    }
 else     if (cmd instanceof ModifySshKeysCommand) {
      answer=execute((ModifySshKeysCommand)cmd);
    }
 else     if (cmd instanceof PoolEjectCommand) {
      answer=execute((PoolEjectCommand)cmd);
    }
 else     if (cmd instanceof NetworkUsageCommand) {
      answer=execute((NetworkUsageCommand)cmd);
    }
 else     if (cmd instanceof StartCommand) {
      answer=execute((StartCommand)cmd);
    }
 else     if (cmd instanceof RemoteAccessVpnCfgCommand) {
      answer=execute((RemoteAccessVpnCfgCommand)cmd);
    }
 else     if (cmd instanceof VpnUsersCfgCommand) {
      answer=execute((VpnUsersCfgCommand)cmd);
    }
 else     if (cmd instanceof CheckSshCommand) {
      answer=execute((CheckSshCommand)cmd);
    }
 else     if (cmd instanceof CheckRouterCommand) {
      answer=execute((CheckRouterCommand)cmd);
    }
 else     if (cmd instanceof SetFirewallRulesCommand) {
      answer=execute((SetFirewallRulesCommand)cmd);
    }
 else     if (cmd instanceof BumpUpPriorityCommand) {
      answer=execute((BumpUpPriorityCommand)cmd);
    }
 else     if (cmd instanceof GetDomRVersionCmd) {
      answer=execute((GetDomRVersionCmd)cmd);
    }
 else     if (cmd instanceof CheckNetworkCommand) {
    }
 else {
      answer=Answer.createUnsupportedCommandAnswer(cmd);
    }
    if (cmd.getContextParam("String_Node_Str") != null) {
      answer.setContextParam("String_Node_Str",cmd.getContextParam("String_Node_Str"));
    }
    Date doneTime=DateUtil.currentGMTTime();
    mbean.addProp("String_Node_Str",DateUtil.getDateDisplayString(TimeZone.getDefault(),doneTime));
    mbean.addProp("String_Node_Str",_gson.toJson(answer));
synchronized (this) {
      try {
        JmxUtil.registerMBean("String_Node_Str" + _morHyperHost.get_value(),"String_Node_Str" + cmdSequence + "String_Node_Str"+ cmd.getClass().getSimpleName(),mbean);
        _cmdMBeans.add(mbean);
        if (_cmdMBeans.size() >= MAX_CMD_MBEAN) {
          PropertyMapDynamicBean mbeanToRemove=_cmdMBeans.get(0);
          _cmdMBeans.remove(0);
          JmxUtil.unregisterMBean("String_Node_Str" + _morHyperHost.get_value(),"String_Node_Str" + mbeanToRemove.getProp("String_Node_Str") + "String_Node_Str"+ mbeanToRemove.getProp("String_Node_Str"));
        }
      }
 catch (      Exception e) {
        if (s_logger.isTraceEnabled())         s_logger.trace("String_Node_Str" + ExceptionUtil.toString(e));
      }
    }
  }
  finally {
    NDC.pop();
  }
  if (s_logger.isTraceEnabled())   s_logger.trace("String_Node_Str" + cmd.getClass().getSimpleName());
  return answer;
}