Program: 105638
Project: 105638
Buggy source:
protected void processResourceEvent(Integer event,Object... params){
  List<ResourceListener> lst=_lifeCycleListeners.get(event);
  if (lst == null || lst.size() == 0) {
    return;
  }
  String eventName;
  for (  ResourceListener l : lst) {
    if (event == ResourceListener.EVENT_DISCOVER_BEFORE) {
      l.processDiscoverEventBefore((Long)params[0],(Long)params[1],(Long)params[2],(URI)params[3],(String)params[4],(String)params[5],(List<String>)params[6]);
      eventName="String_Node_Str";
    }
 else     if (event == ResourceListener.EVENT_DISCOVER_AFTER) {
      l.processDiscoverEventAfter((Map<? extends ServerResource,Map<String,String>>)params[0]);
      eventName="String_Node_Str";
    }
 else     if (event == ResourceListener.EVENT_DELETE_HOST_BEFORE) {
      l.processDeleteHostEventBefore((HostVO)params[0]);
      eventName="String_Node_Str";
    }
 else     if (event == ResourceListener.EVENT_DELETE_HOST_AFTER) {
      l.processDeletHostEventAfter((HostVO)params[0]);
      eventName="String_Node_Str";
    }
 else     if (event == ResourceListener.EVENT_CANCEL_MAINTENANCE_BEFORE) {
      l.processCancelMaintenaceEventBefore((Long)params[0]);
      eventName="String_Node_Str";
    }
 else     if (event == ResourceListener.EVENT_CANCEL_MAINTENANCE_AFTER) {
      l.processCancelMaintenaceEventAfter((Long)params[0]);
      eventName="String_Node_Str";
    }
 else     if (event == ResourceListener.EVENT_PREPARE_MAINTENANCE_BEFORE) {
      l.processPrepareMaintenaceEventBefore((Long)params[0]);
      eventName="String_Node_Str";
    }
 else     if (event == ResourceListener.EVENT_PREPARE_MAINTENANCE_AFTER) {
      l.processPrepareMaintenaceEventAfter((Long)params[0]);
      eventName="String_Node_Str";
    }
 else {
      throw new CloudRuntimeException("String_Node_Str" + event);
    }
    s_logger.debug("String_Node_Str" + eventName + "String_Node_Str"+ l.getClass().getSimpleName());
  }
}

Fixed version (ground truth):
protected void processResourceEvent(Integer event,Object... params){
  List<ResourceListener> lst=_lifeCycleListeners.get(event);
  if (lst == null || lst.size() == 0) {
    return;
  }
  String eventName;
  for (  ResourceListener l : lst) {
    if (event.equals(ResourceListener.EVENT_DISCOVER_BEFORE)) {
      l.processDiscoverEventBefore((Long)params[0],(Long)params[1],(Long)params[2],(URI)params[3],(String)params[4],(String)params[5],(List<String>)params[6]);
      eventName="String_Node_Str";
    }
 else     if (event.equals(ResourceListener.EVENT_DISCOVER_AFTER)) {
      l.processDiscoverEventAfter((Map<? extends ServerResource,Map<String,String>>)params[0]);
      eventName="String_Node_Str";
    }
 else     if (event.equals(ResourceListener.EVENT_DELETE_HOST_BEFORE)) {
      l.processDeleteHostEventBefore((HostVO)params[0]);
      eventName="String_Node_Str";
    }
 else     if (event.equals(ResourceListener.EVENT_DELETE_HOST_AFTER)) {
      l.processDeletHostEventAfter((HostVO)params[0]);
      eventName="String_Node_Str";
    }
 else     if (event.equals(ResourceListener.EVENT_CANCEL_MAINTENANCE_BEFORE)) {
      l.processCancelMaintenaceEventBefore((Long)params[0]);
      eventName="String_Node_Str";
    }
 else     if (event.equals(ResourceListener.EVENT_CANCEL_MAINTENANCE_AFTER)) {
      l.processCancelMaintenaceEventAfter((Long)params[0]);
      eventName="String_Node_Str";
    }
 else     if (event.equals(ResourceListener.EVENT_PREPARE_MAINTENANCE_BEFORE)) {
      l.processPrepareMaintenaceEventBefore((Long)params[0]);
      eventName="String_Node_Str";
    }
 else     if (event.equals(ResourceListener.EVENT_PREPARE_MAINTENANCE_AFTER)) {
      l.processPrepareMaintenaceEventAfter((Long)params[0]);
      eventName="String_Node_Str";
    }
 else {
      throw new CloudRuntimeException("String_Node_Str" + event);
    }
    s_logger.debug("String_Node_Str" + eventName + "String_Node_Str"+ l.getClass().getSimpleName());
  }
}