Program: 73240
Project: 73240
Buggy source:
/** 
 * Calculate the superdense dependency (minimum model time delay) between a source input port and the input port group of a destination input  port. The Floyd-Warshall algorithm is used to calculate the minimum  model time delay paths.
 * @exception IllegalActionException If the container is not aTypedCompositeActor. 
 */
protected void _calculateSuperdenseDependenices() throws IllegalActionException {
  if (!(getContainer() instanceof TypedCompositeActor)) {
    throw new IllegalActionException(getContainer(),getContainer().getFullName() + "String_Node_Str");
  }
  _superdenseDependencyPair=new HashMap<TypedIOPort,Map<TypedIOPort,SuperdenseDependency>>();
  List<TypedIOPort> inputPorts=new ArrayList<TypedIOPort>();
  for (  Actor actor : (List<Actor>)((TypedCompositeActor)getContainer()).deepEntityList()) {
    CausalityInterface actorCausality=actor.getCausalityInterface();
    for (    TypedIOPort inputPort : (List<TypedIOPort>)(actor.inputPortList())) {
      _superdenseDependencyPair.put(inputPort,new HashMap<TypedIOPort,SuperdenseDependency>());
      inputPorts.add(inputPort);
      _putSuperdenseDependencyPair(inputPort,inputPort,SuperdenseDependency.OTIMES_IDENTITY);
      for (      TypedIOPort outputPort : (List<TypedIOPort>)(actor.outputPortList())) {
        SuperdenseDependency minDelay=(SuperdenseDependency)actorCausality.getDependency(inputPort,outputPort);
        if (!minDelay.equals(SuperdenseDependency.OPLUS_IDENTITY)) {
          for (          TypedIOPort connectedPort : (List<TypedIOPort>)outputPort.connectedPortList()) {
            if (connectedPort.isInput()) {
              _putSuperdenseDependencyPair(inputPort,connectedPort,minDelay);
            }
          }
        }
 else {
        }
      }
    }
  }
  for (  TypedIOPort k : inputPorts) {
    for (    TypedIOPort i : inputPorts) {
      for (      TypedIOPort j : inputPorts) {
        SuperdenseDependency ij, ik, kj;
        ij=_getSuperdenseDependencyPair(i,j);
        ik=_getSuperdenseDependencyPair(i,k);
        kj=_getSuperdenseDependencyPair(k,j);
        if (ij.compareTo(ik.oTimes(kj)) == SuperdenseDependency.GREATER_THAN) {
          _putSuperdenseDependencyPair(i,j,(SuperdenseDependency)ik.oTimes(kj));
        }
      }
    }
  }
  for (  Actor actor : (List<Actor>)((TypedCompositeActor)getContainer()).deepEntityList()) {
    CausalityInterface actorCausality=actor.getCausalityInterface();
    for (    TypedIOPort outputPort : (List<TypedIOPort>)(actor.outputPortList())) {
      Set<TypedIOPort> inputPortGroup=new HashSet<TypedIOPort>();
      for (      TypedIOPort inputPort : (List<TypedIOPort>)(actor.inputPortList())) {
        SuperdenseDependency minDelay=(SuperdenseDependency)actorCausality.getDependency(inputPort,outputPort);
        if (!minDelay.equals(SuperdenseDependency.OPLUS_IDENTITY)) {
          inputPortGroup.add(inputPort);
        }
      }
      for (      TypedIOPort srcPort : inputPorts) {
        SuperdenseDependency min=SuperdenseDependency.OPLUS_IDENTITY;
        for (        TypedIOPort destPort : inputPortGroup) {
          min=(SuperdenseDependency)min.oPlus(_getSuperdenseDependencyPair(srcPort,destPort));
        }
        if (!min.equals(SuperdenseDependency.OPLUS_IDENTITY)) {
          for (          TypedIOPort destPort : inputPortGroup) {
            _putSuperdenseDependencyPair(srcPort,destPort,min);
          }
        }
      }
    }
  }
  if (_debugging) {
    StringBuffer buf=new StringBuffer();
    buf.append("String_Node_Str");
    for (    TypedIOPort srcPort : inputPorts) {
      buf.append(srcPort.getName(getContainer()) + "String_Node_Str");
    }
    _debug(buf.toString());
    for (    TypedIOPort srcPort : inputPorts) {
      buf=new StringBuffer();
      buf.append(srcPort.getName(getContainer()) + "String_Node_Str");
      for (      TypedIOPort destPort : inputPorts) {
        buf.append(_getSuperdenseDependencyPair(srcPort,destPort).timeValue() + "String_Node_Str" + _getSuperdenseDependencyPair(srcPort,destPort).indexValue()+ "String_Node_Str");
      }
      _debug(buf.toString());
    }
  }
}

Fixed version (ground truth):
/** 
 * Calculate the superdense dependency (minimum model time delay) between a source input port and the input port group of a destination input  port. The Floyd-Warshall algorithm is used to calculate the minimum  model time delay paths.
 * @exception IllegalActionException If the container is not aTypedCompositeActor. 
 */
protected void _calculateSuperdenseDependenices() throws IllegalActionException {
  if (!(getContainer() instanceof TypedCompositeActor)) {
    throw new IllegalActionException(getContainer(),getContainer().getFullName() + "String_Node_Str");
  }
  _superdenseDependencyPair=new HashMap<TypedIOPort,Map<TypedIOPort,SuperdenseDependency>>();
  List<TypedIOPort> inputPorts=new ArrayList<TypedIOPort>();
  for (  Actor actor : (List<Actor>)((TypedCompositeActor)getContainer()).deepEntityList()) {
    CausalityInterface actorCausality=actor.getCausalityInterface();
    for (    TypedIOPort inputPort : (List<TypedIOPort>)(actor.inputPortList())) {
      if (!inputPort.isOutsideConnected()) {
        continue;
      }
      _superdenseDependencyPair.put(inputPort,new HashMap<TypedIOPort,SuperdenseDependency>());
      inputPorts.add(inputPort);
      _putSuperdenseDependencyPair(inputPort,inputPort,SuperdenseDependency.OTIMES_IDENTITY);
      for (      TypedIOPort outputPort : (List<TypedIOPort>)(actor.outputPortList())) {
        SuperdenseDependency minDelay=(SuperdenseDependency)actorCausality.getDependency(inputPort,outputPort);
        if (!minDelay.equals(SuperdenseDependency.OPLUS_IDENTITY)) {
          for (          TypedIOPort connectedPort : (List<TypedIOPort>)outputPort.deepConnectedPortList()) {
            if (connectedPort.isInput()) {
              _putSuperdenseDependencyPair(inputPort,connectedPort,minDelay);
            }
          }
        }
 else {
        }
      }
    }
  }
  for (  TypedIOPort k : inputPorts) {
    for (    TypedIOPort i : inputPorts) {
      for (      TypedIOPort j : inputPorts) {
        SuperdenseDependency ij, ik, kj;
        ij=_getSuperdenseDependencyPair(i,j);
        ik=_getSuperdenseDependencyPair(i,k);
        kj=_getSuperdenseDependencyPair(k,j);
        if (ij.compareTo(ik.oTimes(kj)) == SuperdenseDependency.GREATER_THAN) {
          _putSuperdenseDependencyPair(i,j,(SuperdenseDependency)ik.oTimes(kj));
        }
      }
    }
  }
  for (  Actor actor : (List<Actor>)((TypedCompositeActor)getContainer()).deepEntityList()) {
    CausalityInterface actorCausality=actor.getCausalityInterface();
    for (    TypedIOPort outputPort : (List<TypedIOPort>)(actor.outputPortList())) {
      Set<TypedIOPort> inputPortGroup=new HashSet<TypedIOPort>();
      for (      TypedIOPort inputPort : (List<TypedIOPort>)(actor.inputPortList())) {
        SuperdenseDependency minDelay=(SuperdenseDependency)actorCausality.getDependency(inputPort,outputPort);
        if (!minDelay.equals(SuperdenseDependency.OPLUS_IDENTITY)) {
          inputPortGroup.add(inputPort);
        }
      }
      for (      TypedIOPort srcPort : inputPorts) {
        SuperdenseDependency min=SuperdenseDependency.OPLUS_IDENTITY;
        for (        TypedIOPort destPort : inputPortGroup) {
          min=(SuperdenseDependency)min.oPlus(_getSuperdenseDependencyPair(srcPort,destPort));
        }
        if (!min.equals(SuperdenseDependency.OPLUS_IDENTITY)) {
          for (          TypedIOPort destPort : inputPortGroup) {
            _putSuperdenseDependencyPair(srcPort,destPort,min);
          }
        }
      }
    }
  }
  if (_debugging) {
    StringBuffer buf=new StringBuffer();
    buf.append("String_Node_Str");
    for (    TypedIOPort srcPort : inputPorts) {
      buf.append(srcPort.getName(getContainer()) + "String_Node_Str");
    }
    _debug(buf.toString());
    for (    TypedIOPort srcPort : inputPorts) {
      buf=new StringBuffer();
      buf.append(srcPort.getName(getContainer()) + "String_Node_Str");
      for (      TypedIOPort destPort : inputPorts) {
        buf.append(_getSuperdenseDependencyPair(srcPort,destPort).timeValue() + "String_Node_Str" + _getSuperdenseDependencyPair(srcPort,destPort).indexValue()+ "String_Node_Str");
      }
      _debug(buf.toString());
    }
  }
}