Program: 72795
Project: 72795
Buggy source:
/** 
 * Load the model that already has ProxySinks/Sources and set appropriate model types from the inferred model mapping. <p>This method is indented to be used on the Android to avoid loading unneeded actors.</p>
 * @exception IllegalActionException if there is a problem parsing model types orsetting types on Typeable objects.
 */
private void _loadPreprocessedModel() throws IllegalActionException {
  for (  Object obj : getTopLevelActor().deepEntityList()) {
    ComponentEntity actor=(ComponentEntity)obj;
    if (actor instanceof ProxySink) {
      ProxySink proxySink=(ProxySink)actor;
      proxySink.setTokenPublisher(_tokenPublisher);
      _proxySinkMap.put(proxySink.getTargetEntityName(),proxySink);
      proxySink.setProxyModelInfrastructure(this);
    }
 else     if (actor instanceof ProxySource) {
      ProxySource proxySource=(ProxySource)actor;
      ProxySourceData remoteSourceData=new ProxySourceData(proxySource);
      proxySource.setProxySourceData(remoteSourceData);
      proxySource.setProxyModelInfrastructure(this);
      getProxySourceMap().put(proxySource.getTargetEntityName(),remoteSourceData);
    }
    Type type;
    for (    Object portObject : actor.portList()) {
      if (portObject instanceof TypedIOPort) {
        TypedIOPort port=(TypedIOPort)portObject;
        if (port.deepConnectedPortList().isEmpty()) {
          continue;
        }
        StringAttribute targetPortName=(StringAttribute)port.getAttribute("String_Node_Str");
        if (targetPortName != null) {
          type=TypeParser.parse(_modelTypes.get(targetPortName.getExpression()));
          if (type != null) {
            port.setTypeEquals(type);
          }
          port.typeConstraints().clear();
        }
 else         if ((type=TypeParser.parse(_modelTypes.get(port.getFullName()))) != null) {
          port.setTypeEquals(type);
          port.typeConstraints().clear();
        }
 else {
          throw new IllegalActionException(port,"String_Node_Str");
        }
      }
    }
    for (    Typeable attribute : actor.attributeList(Typeable.class)) {
      if ((type=TypeParser.parse(_modelTypes.get(((Nameable)attribute).getFullName()))) != null) {
        attribute.setTypeEquals(type);
        attribute.typeConstraints().clear();
      }
    }
  }
  ServerUtility.findRemoteAttributes(ServerUtility.deepAttributeList(_topLevelActor),_remoteAttributesMap);
}

Fixed version (ground truth):
/** 
 * Load the model that already has ProxySinks/Sources and set appropriate model types from the inferred model mapping. <p>This method is indented to be used on the Android to avoid loading unneeded actors.</p>
 * @exception IllegalActionException if there is a problem parsing model types orsetting types on Typeable objects.
 */
private void _loadPreprocessedModel() throws IllegalActionException {
  for (  Object obj : getTopLevelActor().deepEntityList()) {
    ComponentEntity actor=(ComponentEntity)obj;
    if (actor instanceof ProxySink) {
      ProxySink proxySink=(ProxySink)actor;
      proxySink.setTokenPublisher(_tokenPublisher);
      _proxySinkMap.put(proxySink.getTargetEntityName(),proxySink);
      proxySink.setProxyModelInfrastructure(this);
    }
 else     if (actor instanceof ProxySource) {
      ProxySource proxySource=(ProxySource)actor;
      ProxySourceData remoteSourceData=new ProxySourceData(proxySource);
      proxySource.setProxySourceData(remoteSourceData);
      proxySource.setProxyModelInfrastructure(this);
      getProxySourceMap().put(proxySource.getTargetEntityName(),remoteSourceData);
    }
    Type type;
    for (    Object portObject : actor.portList()) {
      if (portObject instanceof TypedIOPort) {
        TypedIOPort port=(TypedIOPort)portObject;
        if (port.deepConnectedPortList().isEmpty()) {
          continue;
        }
        StringAttribute targetPortName=(StringAttribute)port.getAttribute("String_Node_Str");
        if (targetPortName != null) {
          type=TypeParser.parse(_modelTypes.get(targetPortName.getExpression()));
          if (type != null) {
            port.setTypeEquals(type);
          }
          port.typeConstraints().clear();
        }
 else         if ((type=TypeParser.parse(_modelTypes.get(port.getFullName()))) != null) {
          port.setTypeEquals(type);
          port.typeConstraints().clear();
        }
 else {
          throw new IllegalActionException(port,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ _modelTypes);
        }
      }
    }
    for (    Typeable attribute : actor.attributeList(Typeable.class)) {
      if ((type=TypeParser.parse(_modelTypes.get(((Nameable)attribute).getFullName()))) != null) {
        attribute.setTypeEquals(type);
        attribute.typeConstraints().clear();
      }
    }
  }
  ServerUtility.findRemoteAttributes(ServerUtility.deepAttributeList(_topLevelActor),_remoteAttributesMap);
}