// The reason to add the code is that a port may not be contained in
// _containerPortMap if it is encountered the first time here --- Gang
} else if (_doneProcessingActorWithPortNameChanges
&& attributeName.equals("port")) {
int lastIndex = attributeValue.lastIndexOf(".");
NamedObj portContainer = null;
String portContainerName = null;
String portName = null;
if (lastIndex > 0) {
portContainerName = attributeValue.substring(0, lastIndex);
portContainer = ((CompositeEntity) container)
.getEntity(portContainerName);
portName = attributeValue.substring(lastIndex + 1);
} else {
portContainer = container;
portName = attributeValue;
}
if (portContainer != null) {
String className = portContainer.getClassName();
if (_actorsWithPortNameChanges.containsKey(className)) {
HashMap portMap = (HashMap) _actorsWithPortNameChanges
.get(className);
if (portMap.containsKey(portName)) {
String newPort = (String) portMap.get(portName);