Program: 134761
Project: 134761
Buggy source:
/** 
 * This method should be called from the subclass-specific method that receives the event, for example <code>push_structured_event</code> in case of Corba NC, or preferably via   {@link #processEventAsync(Object,EventDescription)}. <p> No exception is allowed to be thrown by this method, even if the receiver implementation throws a RuntimeExecption
 */
protected void processEvent(T eventData,EventDescription eventDescrip){
  @SuppressWarnings("String_Node_Str") Class<T> incomingEventType=(Class<T>)eventData.getClass();
  String eventName=incomingEventType.getName();
  double maxProcessTimeSeconds=getMaxProcessTimeSeconds(eventName);
  StopWatch profiler=new StopWatch();
  if (receivers.containsKey(incomingEventType)) {
    Callback<? extends T> receiver=receivers.get(incomingEventType);
    profiler.reset();
    try {
      _process(receiver,eventData,eventDescrip);
    }
 catch (    Throwable thr) {
      logEventReceiveHandlerException(eventName,receiver.getClass().getName(),thr);
    }
    double usedSecondsToProcess=(profiler.getLapTimeMillis() / 1000.0);
    if (usedSecondsToProcess > maxProcessTimeSeconds && processTimeLogRepeatGuard.checkAndIncrement(eventName)) {
      logEventProcessingTimeExceeded(eventName,processTimeLogRepeatGuard.counterAtLastExecution(eventName));
    }
  }
 else   if (genericReceiver != null) {
    profiler.reset();
    genericReceiver.receive(eventData,eventDescrip);
    double usedSecondsToProcess=(profiler.getLapTimeMillis() / 1000.0);
    if (usedSecondsToProcess > maxProcessTimeSeconds && processTimeLogRepeatGuard.checkAndIncrement(eventName)) {
      logEventProcessingTimeExceeded(eventName,processTimeLogRepeatGuard.counterAtLastExecution(eventName));
    }
  }
 else {
    logNoEventReceiver(eventName);
  }
}

Fixed version (ground truth):
/** 
 * This method should be called from the subclass-specific method that receives the event, for example <code>push_structured_event</code> in case of Corba NC, or preferably via   {@link #processEventAsync(Object,EventDescription)}. <p> No exception is allowed to be thrown by this method, even if the receiver implementation throws a RuntimeExecption
 * @param eventData (defined as <code>Object</code> instead of <code>T</code> to include data for generic subscription).
 * @param eventDesc
 */
protected void processEvent(Object eventData,EventDescription eventDesc){
  Class<?> incomingEventType=eventData.getClass();
  String eventName=incomingEventType.getName();
  double maxProcessTimeSeconds=getMaxProcessTimeSeconds(eventName);
  StopWatch profiler=new StopWatch();
  if (eventType.isAssignableFrom(incomingEventType) && receivers.containsKey(incomingEventType)) {
    @SuppressWarnings("String_Node_Str") T typedEventData=(T)eventData;
    Callback<? extends T> receiver=receivers.get(incomingEventType);
    profiler.reset();
    try {
      _process(receiver,typedEventData,eventDesc);
    }
 catch (    Throwable thr) {
      logEventReceiveHandlerException(eventName,receiver.getClass().getName(),thr);
    }
    double usedSecondsToProcess=(profiler.getLapTimeMillis() / 1000.0);
    if (usedSecondsToProcess > maxProcessTimeSeconds && processTimeLogRepeatGuard.checkAndIncrement(eventName)) {
      logEventProcessingTimeExceeded(eventName,processTimeLogRepeatGuard.counterAtLastExecution(eventName));
    }
  }
 else   if (genericReceiver != null) {
    profiler.reset();
    genericReceiver.receiveGeneric(eventData,eventDesc);
    double usedSecondsToProcess=(profiler.getLapTimeMillis() / 1000.0);
    if (usedSecondsToProcess > maxProcessTimeSeconds && processTimeLogRepeatGuard.checkAndIncrement(eventName)) {
      logEventProcessingTimeExceeded(eventName,processTimeLogRepeatGuard.counterAtLastExecution(eventName));
    }
  }
 else {
    logNoEventReceiver(eventName);
  }
}