Program: 73351
Project: 73351
Buggy source:
/** 
 * For all deeply contained actors, if annotateModelDelay is true, and if the actor has a dependency that is not equal to the OTimesIdentity or OPlusIdentity, then this actor is annotated with a certain color. This process is repeated recursively. If annotateModelDelay is false, then instead of highlighting actors, the highlighting is cleared.
 * @param compositeActor actor to highlight model delays.
 * @param highlightModelDelay Whether to highlight model delay.
 * @exception IllegalActionException If causality interface cannotbe evaluated, dependency cannot be evaluated, or finite dependent ports cannot be evaluated.
 */
private void _highlightModelDelays(CompositeActor compositeActor,boolean highlightModelDelay) throws IllegalActionException {
  for (  Actor actor : (List<Actor>)(compositeActor.deepEntityList())) {
    if (!highlightModelDelay) {
      _clearHighlight(actor,true);
    }
    boolean annotateThisActor=false;
    CausalityInterface causalityInterface=actor.getCausalityInterface();
    for (    IOPort input : (List<IOPort>)actor.inputPortList()) {
      for (      IOPort output : (Collection<IOPort>)_finiteDependentPorts(input)) {
        Dependency dependency=causalityInterface.getDependency(input,output);
        if (!dependency.equals(dependency.oTimesIdentity()) && !dependency.equals(dependency.oPlusIdentity())) {
          annotateThisActor=true;
          break;
        }
      }
      if (annotateThisActor) {
        break;
      }
    }
    if (annotateThisActor && highlightModelDelay) {
      _highlightActor(actor,"String_Node_Str",true);
    }
    if (actor instanceof CompositeActor) {
      _highlightModelDelays((CompositeActor)actor,highlightModelDelay);
    }
  }
}

Fixed version (ground truth):
/** 
 * For all deeply contained actors, if annotateModelDelay is true, and if the actor has a dependency that is not equal to the OTimesIdentity or OPlusIdentity, then this actor is annotated with a certain color. This process is repeated recursively. If annotateModelDelay is false, then instead of highlighting actors, the highlighting is cleared.
 * @param compositeActor actor to highlight model delays.
 * @param highlightModelDelay Whether to highlight model delay.
 * @exception IllegalActionException If causality interface cannotbe evaluated, dependency cannot be evaluated, or finite dependent ports cannot be evaluated.
 */
private void _highlightModelDelays(CompositeActor compositeActor,boolean highlightModelDelay) throws IllegalActionException {
  for (  Actor actor : (List<Actor>)(compositeActor.deepEntityList())) {
    boolean annotateThisActor=false;
    CausalityInterface causalityInterface=actor.getCausalityInterface();
    for (    IOPort input : (List<IOPort>)actor.inputPortList()) {
      for (      IOPort output : (Collection<IOPort>)_finiteDependentPorts(input)) {
        Dependency dependency=causalityInterface.getDependency(input,output);
        if (!dependency.equals(dependency.oTimesIdentity()) && !dependency.equals(dependency.oPlusIdentity())) {
          annotateThisActor=true;
          break;
        }
      }
      if (annotateThisActor) {
        break;
      }
 else {
        _clearHighlight(actor,true);
      }
    }
    if (annotateThisActor && highlightModelDelay) {
      _highlightActor(actor,"String_Node_Str",true);
    }
    if (actor instanceof CompositeActor) {
      _highlightModelDelays((CompositeActor)actor,highlightModelDelay);
    }
  }
}