Program: 73239
Project: 73239
Buggy source:
/** 
 * Decide whether an event should begin processing at the provided execution time, and if so, what event and core. To process an  event, all events with the same tag and destination input port group are removed from the event queue, and added to the  _currentlyProcessingEvents stack for the core being processed on. This method is responsible for taking overhead execution times into account.
 * @param executionPhysicalTag Current execution physical time.
 * @exception IllegalActionException 
 */
protected void _runScheduler(Tag executionPhysicalTag) throws IllegalActionException {
  _debug("String_Node_Str" + executionPhysicalTag);
  PtidesEvent nextEvent=_getNextSafeEvent();
  _debug("String_Node_Str" + nextEvent);
  if (nextEvent == null) {
    return;
  }
  Stack<ProcessingPtidesEvents> coreToProcessOn=null;
  for (  Stack<ProcessingPtidesEvents> coreStack : _currentlyProcessingEvents) {
    if (coreStack.size() == 0) {
      coreToProcessOn=coreStack;
      break;
    }
  }
  if (coreToProcessOn == null) {
    return;
  }
  _debug("String_Node_Str" + nextEvent + "String_Node_Str"+ _currentlyProcessingEvents.indexOf(coreToProcessOn));
  List<PtidesEvent> eventList=_takeAllSameTagEventsFromQueue(nextEvent);
  double executionTime=_getExecutionTime(nextEvent.ioPort(),nextEvent.actor());
  Time finishTime=executionPhysicalTag.timestamp;
  finishTime.add(executionTime);
  ProcessingPtidesEvents events=new ProcessingPtidesEvents(eventList,executionPhysicalTag,finishTime);
  coreToProcessOn.push(events);
}

Fixed version (ground truth):
/** 
 * Decide whether an event should begin processing at the provided execution time, and if so, what event and core. To process an  event, all events with the same tag and destination input port group are removed from the event queue, and added to the  _currentlyProcessingEvents stack for the core being processed on. This method is responsible for taking overhead execution times into account.
 * @param executionPhysicalTag Current execution physical time.
 * @exception IllegalActionException 
 */
protected void _runScheduler(Tag executionPhysicalTag) throws IllegalActionException {
  _debug("String_Node_Str" + executionPhysicalTag);
  PtidesEvent nextEvent=_getNextSafeEvent();
  while (nextEvent != null) {
    _debug("String_Node_Str" + nextEvent);
    Stack<ProcessingPtidesEvents> coreToProcessOn=null;
    for (    Stack<ProcessingPtidesEvents> coreStack : _currentlyProcessingEvents) {
      if (coreStack.size() == 0) {
        _debug("String_Node_Str");
        coreToProcessOn=coreStack;
        break;
      }
    }
    if (coreToProcessOn == null) {
      _debug("String_Node_Str");
      return;
    }
    _debug("String_Node_Str" + nextEvent.actor() + "String_Node_Str"+ _currentlyProcessingEvents.indexOf(coreToProcessOn));
    List<PtidesEvent> eventList=_takeAllSameTagEventsFromQueue(nextEvent);
    Time executionTime=new Time(this,_getExecutionTime(nextEvent.ioPort(),nextEvent.actor()));
    Time finishTime=executionPhysicalTag.timestamp.add(executionTime);
    _debug(executionPhysicalTag.timestamp + "String_Node_Str" + executionTime+ "String_Node_Str"+ finishTime);
    ProcessingPtidesEvents events=new ProcessingPtidesEvents(eventList,executionPhysicalTag,finishTime);
    coreToProcessOn.push(events);
    _sendExecutionTimeEvent(nextEvent.actor(),executionPhysicalTag.timestamp.getDoubleValue(),ExecutionEventType.START,_currentlyProcessingEvents.indexOf(coreToProcessOn));
    nextEvent=_getNextSafeEvent();
  }
}