Program: 48893
Project: 48893
Buggy source:
private void processEvent(VcEventType type,Event e,String moId,boolean external) throws Exception {
  try {
switch (type) {
case VmRemoved:
{
        logger.debug("String_Node_Str" + moId);
        if (clusterEntityMgr.getNodeByMobId(moId) != null) {
          clusterEntityMgr.refreshNodeByMobId(moId,null,true);
        }
        break;
      }
case VmPoweredOn:
{
      refreshNodeWithAction(e,moId,true,Constants.NODE_ACTION_WAITING_IP,"String_Node_Str");
      if (external) {
        NodePowerOnRequest request=new NodePowerOnRequest(clusterEntityMgr,moId);
        CmsWorker.addRequest(WorkQueue.VC_TASK_NO_DELAY,request);
      }
      break;
    }
case VmCloned:
{
    refreshNodeWithAction(e,moId,true,Constants.NODE_ACTION_RECONFIGURE,"String_Node_Str");
    break;
  }
case VmSuspended:
{
  refreshNodeWithAction(e,moId,true,null,"String_Node_Str");
  break;
}
case VmPoweredOff:
{
refreshNodeWithAction(e,moId,true,null,"String_Node_Str");
break;
}
case VhmError:
case VhmWarning:
case VhmInfo:
case VhmUser:
{
EventEx event=(EventEx)e;
refreshNodeWithAction(e,moId,true,null,"String_Node_Str");
VcVirtualMachine vm=VcCache.getIgnoreMissing(event.getVm().getVm());
if (vm == null) {
break;
}
vm.updateRuntime();
if (clusterEntityMgr.getNodeByVmName(vm.getName()) != null) {
logger.info("String_Node_Str" + e.getDynamicType() + "String_Node_Str"+ vm.getName()+ "String_Node_Str"+ event.getMessage());
clusterEntityMgr.refreshNodeByVmName(moId,vm.getName(),event.getMessage(),true);
}
break;
}
default :
{
refreshNodeWithAction(e,moId,false,null,type.name());
break;
}
}
}
 catch (ManagedObjectNotFound exp) {
VcUtil.processNotFoundException(exp,moId,logger);
}
}

Fixed version (ground truth):
private void processEvent(VcEventType type,Event e,String moId,boolean external) throws Exception {
  try {
switch (type) {
case VmRemoved:
{
        logger.debug("String_Node_Str" + moId);
        if (clusterEntityMgr.getNodeByMobId(moId) != null) {
          clusterEntityMgr.refreshNodeByMobId(moId,null,true);
        }
        break;
      }
case VmDisconnected:
{
      refreshNodeWithAction(e,null,true,null,"String_Node_Str");
      break;
    }
case VmPoweredOn:
{
    refreshNodeWithAction(e,moId,true,Constants.NODE_ACTION_WAITING_IP,"String_Node_Str");
    if (external) {
      NodePowerOnRequest request=new NodePowerOnRequest(clusterEntityMgr,moId);
      CmsWorker.addRequest(WorkQueue.VC_TASK_NO_DELAY,request);
    }
    break;
  }
case VmCloned:
{
  refreshNodeWithAction(e,moId,true,Constants.NODE_ACTION_RECONFIGURE,"String_Node_Str");
  break;
}
case VmSuspended:
{
refreshNodeWithAction(e,moId,true,null,"String_Node_Str");
break;
}
case VmPoweredOff:
{
refreshNodeWithAction(e,moId,true,null,"String_Node_Str");
break;
}
case VhmError:
case VhmWarning:
case VhmInfo:
case VhmUser:
{
EventEx event=(EventEx)e;
refreshNodeWithAction(e,moId,true,null,"String_Node_Str");
VcVirtualMachine vm=VcCache.getIgnoreMissing(event.getVm().getVm());
if (vm == null) {
break;
}
vm.updateRuntime();
if (clusterEntityMgr.getNodeByVmName(vm.getName()) != null) {
logger.info("String_Node_Str" + e.getDynamicType() + "String_Node_Str"+ vm.getName()+ "String_Node_Str"+ event.getMessage());
clusterEntityMgr.refreshNodeByVmName(moId,vm.getName(),event.getMessage(),true);
}
break;
}
default :
{
refreshNodeWithAction(e,moId,false,null,type.name());
break;
}
}
}
 catch (ManagedObjectNotFound exp) {
VcUtil.processNotFoundException(exp,moId,logger);
}
}