Program: 75180
Project: 75180
Buggy source:
private void _computeActorDepth() throws IllegalActionException {
  CompositeActor container=(CompositeActor)getContainer();
  LinkedList actors=(LinkedList)container.deepEntityList();
  _actorToDepth=new Hashtable(actors.size());
  Iterator actorsIterator=actors.iterator();
  while (actorsIterator.hasNext()) {
    Actor actor=(Actor)actorsIterator.next();
    int depth=-1;
    Iterator inputs=actor.inputPortList().iterator();
    while (inputs.hasNext()) {
      IOPort inputPort=(IOPort)inputs.next();
      int inputDepth=_getDepthOfIOPort(inputPort);
      if (inputDepth < depth || depth == -1) {
        depth=inputDepth;
      }
    }
    Iterator outputs=actor.outputPortList().iterator();
    while (outputs.hasNext()) {
      IOPort outputPort=(IOPort)outputs.next();
      int outputDepth=_getDepthOfIOPort(outputPort);
      if (outputDepth < depth) {
        depth=outputDepth;
      }
    }
    _actorToDepth.put(actor,new Integer(depth));
  }
  if (!_eventQueue.isEmpty()) {
    LinkedList updatedEventList=new LinkedList();
    while (!_eventQueue.isEmpty()) {
      DEEvent event=_eventQueue.take();
      IOPort ioPort=event.ioPort();
      Actor actor=event.actor();
      if (ioPort != null) {
        event._updateDepth(_getDepthOfIOPort(ioPort));
      }
 else       if (actor != null) {
        event._updateDepth(_getDepthOfActor(actor));
      }
 else {
      }
      updatedEventList.add(event);
    }
    Iterator updatedEvents=updatedEventList.iterator();
    while (updatedEvents.hasNext()) {
      DEEvent updatedEvent=(DEEvent)updatedEvents.next();
      _eventQueue.put(updatedEvent);
    }
  }
}

Fixed version (ground truth):
private void _computeActorDepth() throws IllegalActionException {
  CompositeActor container=(CompositeActor)getContainer();
  LinkedList actors=(LinkedList)container.deepEntityList();
  _actorToDepth=new Hashtable(actors.size());
  Iterator actorsIterator=actors.iterator();
  while (actorsIterator.hasNext()) {
    Actor actor=(Actor)actorsIterator.next();
    int depth=-1;
    Iterator inputs=actor.inputPortList().iterator();
    while (inputs.hasNext()) {
      IOPort inputPort=(IOPort)inputs.next();
      int inputDepth=_getDepthOfIOPort(inputPort);
      if (inputDepth < depth || depth == -1) {
        depth=inputDepth;
      }
    }
    Iterator outputs=actor.outputPortList().iterator();
    while (outputs.hasNext()) {
      IOPort outputPort=(IOPort)outputs.next();
      int outputDepth=_getDepthOfIOPort(outputPort);
      if (outputDepth < depth || depth == -1) {
        depth=outputDepth;
      }
    }
    _actorToDepth.put(actor,new Integer(depth));
  }
  if (!_eventQueue.isEmpty()) {
    LinkedList updatedEventList=new LinkedList();
    while (!_eventQueue.isEmpty()) {
      DEEvent event=_eventQueue.take();
      IOPort ioPort=event.ioPort();
      Actor actor=event.actor();
      if (ioPort != null) {
        event._updateDepth(_getDepthOfIOPort(ioPort));
      }
 else       if (actor != null) {
        event._updateDepth(_getDepthOfActor(actor));
      }
 else {
      }
      updatedEventList.add(event);
    }
    Iterator updatedEvents=updatedEventList.iterator();
    while (updatedEvents.hasNext()) {
      DEEvent updatedEvent=(DEEvent)updatedEvents.next();
      _eventQueue.put(updatedEvent);
    }
  }
}