Program: 73980
Project: 73980
Buggy source:
/** 
 * Return a list of enabled transitions among the given list of transitions. This includes all transitions whose guards can can be evaluated and evaluate to true, plus, if all guards can be evaluated and evaluate to false, all default transitions.
 * @param transitionList A list of transitions.
 * @return A list of enabled transition.
 * @exception IllegalActionException If the guard expression of anytransition can not be evaluated.
 */
public List enabledTransitions(List transitionList) throws IllegalActionException {
  LinkedList enabledTransitions=new LinkedList();
  LinkedList defaultTransitions=new LinkedList();
  Iterator transitionRelations=transitionList.iterator();
  boolean foundUnknown=false;
  while (transitionRelations.hasNext() && !_stopRequested) {
    Transition transition=(Transition)transitionRelations.next();
    if (transition.isDefault()) {
      if (transition.isEnabled()) {
        defaultTransitions.add(transition);
      }
    }
 else {
      foundUnknown=foundUnknown || !_referencedInputPortsByGuardKnown(transition);
      try {
        if (transition.isEnabled()) {
          enabledTransitions.add(transition);
        }
      }
 catch (      RuntimeException ex) {
        if (!foundUnknown) {
          throw ex;
        }
      }
catch (      IllegalActionException ex) {
        if (!foundUnknown) {
          throw ex;
        }
      }
    }
  }
  if (enabledTransitions.size() > 0) {
    return enabledTransitions;
  }
 else {
    if (!foundUnknown) {
      if (defaultTransitions.size() == 0 && _currentState.getRefinement() == null) {
        List<IOPort> outputs=outputPortList();
        for (        IOPort port : outputs) {
          for (int channel=0; channel < port.getWidth(); channel++) {
            if (!port.isKnown(channel)) {
              port.sendClear(channel);
            }
          }
        }
      }
      return defaultTransitions;
    }
  }
  return new LinkedList();
}

Fixed version (ground truth):
/** 
 * Return a list of enabled transitions among the given list of transitions. This includes all transitions whose guards can can be evaluated and evaluate to true, plus, if all guards can be evaluated and evaluate to false, all default transitions. <p> After calling this method, you can call foundUnknown() to determine whether any guard expressions were found in the specified transition list that referred to input ports that are not currently known.
 * @param transitionList A list of transitions.
 * @return A list of enabled transition.
 * @exception IllegalActionException If the guard expression of anytransition can not be evaluated.
 */
public List enabledTransitions(List transitionList) throws IllegalActionException {
  LinkedList enabledTransitions=new LinkedList();
  LinkedList defaultTransitions=new LinkedList();
  Iterator transitionRelations=transitionList.iterator();
  _foundUnknown=false;
  while (transitionRelations.hasNext() && !_stopRequested) {
    Transition transition=(Transition)transitionRelations.next();
    if (transition.isDefault()) {
      if (transition.isEnabled()) {
        defaultTransitions.add(transition);
      }
    }
 else {
      _foundUnknown=_foundUnknown || !_referencedInputPortsByGuardKnown(transition);
      try {
        if (transition.isEnabled()) {
          enabledTransitions.add(transition);
        }
      }
 catch (      RuntimeException ex) {
        if (!_foundUnknown) {
          if (_referencedInputPortValuesByGuardPresent(transition)) {
            throw ex;
          }
        }
      }
catch (      IllegalActionException ex) {
        if (!_foundUnknown) {
          if (_referencedInputPortValuesByGuardPresent(transition)) {
            throw ex;
          }
        }
      }
    }
  }
  if (enabledTransitions.size() > 0) {
    if (_debugging) {
      _debug("String_Node_Str" + enabledTransitions);
    }
    return enabledTransitions;
  }
 else {
    if (!_foundUnknown) {
      if (_debugging) {
        if (defaultTransitions.size() > 0) {
          _debug("String_Node_Str" + defaultTransitions);
        }
 else {
          _debug("String_Node_Str");
        }
      }
      return defaultTransitions;
    }
  }
  if (_debugging) {
    _debug("String_Node_Str");
  }
  return new LinkedList();
}