Program: 72749
Project: 72749
Buggy source:
/** 
 * Generate the code for the transfer of output values inside the modal model.
 * @return The generated code.
 * @exception IllegalActionException If the adapter associated withan actor throws it while generating code for the actor.
 */
public String generateTransferOutputCode() throws IllegalActionException {
  StringBuffer code=new StringBuffer();
  CompositeActor container=((CompositeActor)_director.getContainer());
  String containerName=generateName(container);
  Iterator<?> ports=container.outputPortList().iterator();
  while (ports.hasNext()) {
    TypedIOPort port=(TypedIOPort)ports.next();
    if (!port.getFullName().contains("String_Node_Str")) {
      code.append(_eol + port.getName() + "String_Node_Str"+ containerName+ "String_Node_Str"+ port.getName()+ "String_Node_Str");
      int width=port.getWidth();
      for (int i=0; i < width; i++) {
        code.append(_eol + "String_Node_Str" + port.getName()+ "String_Node_Str"+ _eol);
        code.append(_eol + "String_Node_Str" + port.getName()+ "String_Node_Str");
        code.append(_eol + containerName + "String_Node_Str"+ port.getName());
        code.append("String_Node_Str");
        code.append("String_Node_Str" + getCodeGenerator().codeGenType(port.getType()) + "String_Node_Str"+ _eol);
        code.append(_eol + "String_Node_Str");
      }
    }
  }
  ports=container.outputPortList().iterator();
  while (ports.hasNext()) {
    TypedIOPort port=(TypedIOPort)ports.next();
    if (!port.getFullName().contains("String_Node_Str")) {
      code.append(_eol + port.getName() + "String_Node_Str"+ containerName+ "String_Node_Str"+ port.getName()+ "String_Node_Str");
    }
  }
  return processCode(code.toString());
}

Fixed version (ground truth):
/** 
 * Generate the code for the transfer of output values inside the modal model.
 * @return The generated code.
 * @exception IllegalActionException If the adapter associated withan actor throws it while generating code for the actor.
 */
public String generateTransferOutputCode() throws IllegalActionException {
  StringBuffer code=new StringBuffer();
  CompositeActor container=((CompositeActor)_director.getContainer());
  String containerName=generateName(container);
  Iterator<?> ports=container.outputPortList().iterator();
  while (ports.hasNext()) {
    TypedIOPort port=(TypedIOPort)ports.next();
    if (!port.getFullName().contains("String_Node_Str")) {
      code.append(_eol + port.getName() + "String_Node_Str"+ containerName+ "String_Node_Str"+ port.getName()+ "String_Node_Str");
      int width=port.getWidth();
      String widthDeclaration;
      for (int i=0; i < width; i++) {
        if (width > 1) {
          widthDeclaration="String_Node_Str" + i + "String_Node_Str";
        }
 else {
          widthDeclaration="String_Node_Str";
        }
        code.append(_eol + "String_Node_Str" + port.getName()+ "String_Node_Str"+ _eol);
        code.append(_eol + "String_Node_Str" + port.getName()+ "String_Node_Str");
        code.append(_eol + containerName + "String_Node_Str"+ port.getName()+ widthDeclaration);
        code.append("String_Node_Str");
        code.append("String_Node_Str" + getCodeGenerator().codeGenType(port.getType()) + "String_Node_Str"+ _eol);
        code.append(_eol + "String_Node_Str");
      }
    }
  }
  ports=container.outputPortList().iterator();
  while (ports.hasNext()) {
    TypedIOPort port=(TypedIOPort)ports.next();
    if (!port.getFullName().contains("String_Node_Str")) {
      code.append(_eol + port.getName() + "String_Node_Str"+ containerName+ "String_Node_Str"+ port.getName()+ "String_Node_Str");
    }
  }
  return processCode(code.toString());
}