Program: 74819
Project: 74819
Buggy source:
/** 
 * Make all connections for this nested actor.
 * @param actor The actor for to connect to others.
 * @exception PtalonRuntimeException If thrown trying to access the parameter,or if unable to set the token for the corresponding paramter.
 */
public void makeThisConnections() throws PtalonRuntimeException {
  try {
    for (    String portName : _relations.keySet()) {
      String relationName=_actor.getMappedName(_relations.get(portName));
      TypedIORelation relation=(TypedIORelation)_actor.getRelation(relationName);
      TypedIOPort port=(TypedIOPort)_actor.getPort(portName);
      if (port == null) {
        throw new PtalonRuntimeException("String_Node_Str" + portName);
      }
      port.link(relation);
    }
    for (    String portName : _transparencies.keySet()) {
      TypedIOPort port=(TypedIOPort)_actor.getPort(portName);
      String shortName=_transparencies.get(portName);
      if (_transparentRelations.containsKey(shortName)) {
        TypedIOPort connectionPoint=_transparentRelations.get(shortName);
        String relationName=_actor.uniqueName("String_Node_Str");
        TypedIORelation rel=new TypedIORelation(_actor,relationName);
        if (port == null) {
          throw new PtalonRuntimeException("String_Node_Str" + portName);
        }
        port.link(rel);
        connectionPoint.link(rel);
      }
 else {
        if (port == null) {
          throw new PtalonRuntimeException("String_Node_Str" + portName);
        }
        _transparentRelations.put(shortName,port);
      }
    }
    for (    String portName : _ports.keySet()) {
      TypedIOPort port=(TypedIOPort)_actor.getPort(portName);
      String containerPortName=_actor.getMappedName(_ports.get(portName));
      TypedIOPort containerPort=(TypedIOPort)_actor.getPort(containerPortName);
      if (port == null) {
        throw new PtalonRuntimeException("String_Node_Str" + portName);
      }
      String relationName=_actor.uniqueName("String_Node_Str");
      TypedIORelation relation=new TypedIORelation(_actor,relationName);
      port.link(relation);
      containerPort.link(relation);
    }
    for (    String portName : _unknownPrefixes.keySet()) {
      String suffix=evaluateString(_unknownExpressions.get(portName));
      if (suffix == null) {
        throw new PtalonRuntimeException("String_Node_Str" + _unknownExpressions.get(portName));
      }
      String name=_unknownPrefixes.get(portName) + suffix;
      if (getType(name).endsWith("String_Node_Str")) {
        TypedIOPort port=(TypedIOPort)_actor.getPort(portName);
        String containerPortName=_actor.getMappedName(name);
        TypedIOPort containerPort=(TypedIOPort)_actor.getPort(containerPortName);
        if (port == null) {
          throw new PtalonRuntimeException("String_Node_Str" + portName);
        }
        String relationName=_actor.uniqueName("String_Node_Str");
        TypedIORelation relation=new TypedIORelation(_actor,relationName);
        port.link(relation);
        containerPort.link(relation);
      }
 else       if (getType(name).equals("String_Node_Str")) {
        String relationName=_actor.getMappedName(name);
        TypedIORelation relation=(TypedIORelation)_actor.getRelation(relationName);
        TypedIOPort port=(TypedIOPort)_actor.getPort(portName);
        if (port == null) {
          throw new PtalonRuntimeException("String_Node_Str" + portName);
        }
        port.link(relation);
      }
 else       if (getType(name).equals("String_Node_Str")) {
        TypedIOPort port=(TypedIOPort)_actor.getPort(portName);
        if (_transparentRelations.containsKey(name)) {
          TypedIOPort connectionPoint=_transparentRelations.get(name);
          String relationName=_actor.uniqueName("String_Node_Str");
          TypedIORelation rel=new TypedIORelation(_actor,relationName);
          if (port == null) {
            throw new PtalonRuntimeException("String_Node_Str" + portName);
          }
          port.link(rel);
          connectionPoint.link(rel);
        }
 else {
          if (port == null) {
            throw new PtalonRuntimeException("String_Node_Str" + portName);
          }
          _transparentRelations.put(name,port);
        }
      }
 else {
        throw new PtalonRuntimeException(name + "String_Node_Str");
      }
    }
  }
 catch (  Exception e) {
    throw new PtalonRuntimeException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Make all connections for this nested actor.
 * @param actor The actor for to connect to others.
 * @exception PtalonRuntimeException If thrown trying to access the parameter,or if unable to set the token for the corresponding paramter.
 */
public void makeThisConnections() throws PtalonRuntimeException {
  try {
    for (    String portName : _relations.keySet()) {
      String relationName=_actor.getMappedName(_relations.get(portName));
      TypedIORelation relation=(TypedIORelation)_actor.getRelation(relationName);
      TypedIOPort port=(TypedIOPort)_actor.getPort(portName);
      if (port == null) {
        throw new PtalonRuntimeException("String_Node_Str" + portName);
      }
      port.link(relation);
    }
    for (    String portName : _transparencies.keySet()) {
      TypedIOPort port=(TypedIOPort)_actor.getPort(portName);
      String shortName=_transparencies.get(portName);
      if (_transparentRelations.containsKey(shortName)) {
        TypedIOPort connectionPoint=_transparentRelations.get(shortName);
        String relationName=_actor.uniqueName("String_Node_Str");
        TypedIORelation rel=new TypedIORelation(_actor,relationName);
        if (port == null) {
          throw new PtalonRuntimeException("String_Node_Str" + portName);
        }
        port.link(rel);
        connectionPoint.link(rel);
      }
 else {
        if (port == null) {
          throw new PtalonRuntimeException("String_Node_Str" + portName);
        }
        _transparentRelations.put(shortName,port);
      }
    }
    for (    String portName : _ports.keySet()) {
      TypedIOPort port=(TypedIOPort)_actor.getPort(portName);
      String containerPortName=_actor.getMappedName(_ports.get(portName));
      TypedIOPort containerPort=(TypedIOPort)_actor.getPort(containerPortName);
      if (port == null) {
        throw new PtalonRuntimeException("String_Node_Str" + portName);
      }
      String relationName=_actor.uniqueName("String_Node_Str");
      TypedIORelation relation=new TypedIORelation(_actor,relationName);
      port.link(relation);
      containerPort.link(relation);
    }
    for (    String portName : _unknownPrefixes.keySet()) {
      String suffix=evaluateString(_unknownExpressions.get(portName));
      if (suffix == null) {
        throw new PtalonRuntimeException("String_Node_Str" + _unknownExpressions.get(portName));
      }
      String name=_unknownPrefixes.get(portName) + suffix;
      if (_getType(name).endsWith("String_Node_Str")) {
        TypedIOPort port=(TypedIOPort)_actor.getPort(portName);
        String containerPortName=_actor.getMappedName(name);
        TypedIOPort containerPort=(TypedIOPort)_actor.getPort(containerPortName);
        if (port == null) {
          throw new PtalonRuntimeException("String_Node_Str" + portName);
        }
        String relationName=_actor.uniqueName("String_Node_Str");
        TypedIORelation relation=new TypedIORelation(_actor,relationName);
        port.link(relation);
        containerPort.link(relation);
      }
 else       if (_getType(name).equals("String_Node_Str")) {
        String relationName=_actor.getMappedName(name);
        TypedIORelation relation=(TypedIORelation)_actor.getRelation(relationName);
        TypedIOPort port=(TypedIOPort)_actor.getPort(portName);
        if (port == null) {
          throw new PtalonRuntimeException("String_Node_Str" + portName);
        }
        port.link(relation);
      }
 else       if (_getType(name).equals("String_Node_Str")) {
        TypedIOPort port=(TypedIOPort)_actor.getPort(portName);
        if (_transparentRelations.containsKey(name)) {
          TypedIOPort connectionPoint=_transparentRelations.get(name);
          String relationName=_actor.uniqueName("String_Node_Str");
          TypedIORelation rel=new TypedIORelation(_actor,relationName);
          if (port == null) {
            throw new PtalonRuntimeException("String_Node_Str" + portName);
          }
          port.link(rel);
          connectionPoint.link(rel);
        }
 else {
          if (port == null) {
            throw new PtalonRuntimeException("String_Node_Str" + portName);
          }
          _transparentRelations.put(name,port);
        }
      }
 else {
        throw new PtalonRuntimeException(name + "String_Node_Str");
      }
    }
  }
 catch (  Exception e) {
    throw new PtalonRuntimeException("String_Node_Str",e);
  }
}