Program: 74028
Project: 74028
Buggy source:
/** 
 * For a particular input port channel pair, find the min delay.
 * @param inputPort The input port to find min delay for.
 * @param channel The channel at this input port.
 * @param inputModelTimeDelays Port channel pairs with associated dependency.
 * @return The min delay associated with this port channel pair.
 * @exception IllegalActionException
 */
private double _calculateMinDelayForPortChannel(IOPort inputPort,Integer channel,Map<IOPort,Map<Integer,SuperdenseDependency>> inputModelTimeDelays) throws IllegalActionException {
  SuperdenseDependency smallestDependency=SuperdenseDependency.OPLUS_IDENTITY;
  for (  IOPort port : (Collection<IOPort>)_finiteEquivalentPorts(inputPort)) {
    Map<Integer,SuperdenseDependency> channelDependency=(Map<Integer,SuperdenseDependency>)inputModelTimeDelays.get(port);
    if (channelDependency != null) {
      for (      Integer integer : channelDependency.keySet()) {
        if (((BooleanToken)actorsReceiveEventsInTimestampOrder.getToken()).booleanValue()) {
          if (!(port == inputPort && integer == channel)) {
            SuperdenseDependency candidate=channelDependency.get(integer);
            if (smallestDependency.compareTo(candidate) > 0) {
              smallestDependency=candidate;
            }
          }
        }
 else {
          SuperdenseDependency candidate=channelDependency.get(integer);
          if (smallestDependency.compareTo(candidate) > 0) {
            smallestDependency=candidate;
          }
        }
      }
    }
  }
  return smallestDependency.timeValue();
}

Fixed version (ground truth):
/** 
 * For a particular input port channel pair, find the min delay.
 * @param inputPort The input port to find min delay for.
 * @param channel The channel at this input port.
 * @param inputModelTimeDelays Port channel pairs with associated dependency.
 * @return The min delay associated with this port channel pair.
 * @exception IllegalActionException
 */
private double _calculateMinDelayForPortChannel(IOPort inputPort,Integer channel,Map<IOPort,Map<Integer,SuperdenseDependency>> inputModelTimeDelays) throws IllegalActionException {
  SuperdenseDependency smallestDependency=SuperdenseDependency.OPLUS_IDENTITY;
  for (  IOPort port : (Collection<IOPort>)_finiteEquivalentPorts(inputPort)) {
    Map<Integer,SuperdenseDependency> channelDependency=(Map<Integer,SuperdenseDependency>)inputModelTimeDelays.get(port);
    if (channelDependency != null) {
      for (      Integer integer : channelDependency.keySet()) {
        if (((BooleanToken)actorsReceiveEventsInTimestampOrder.getToken()).booleanValue()) {
          if (!(port == inputPort && integer.equals(channel))) {
            SuperdenseDependency candidate=channelDependency.get(integer);
            if (smallestDependency.compareTo(candidate) > 0) {
              smallestDependency=candidate;
            }
          }
        }
 else {
          SuperdenseDependency candidate=channelDependency.get(integer);
          if (smallestDependency.compareTo(candidate) > 0) {
            smallestDependency=candidate;
          }
        }
      }
    }
  }
  return smallestDependency.timeValue();
}