Program: 73425
Project: 73425
Buggy source:
/** 
 * Generate code for replacing the get() macro. This delegates to the receiver adapter for the specified channel and asks it to generate the get code.
 * @param channel The channel for which to generate the get code.
 * @param offset The offset in the array representation of the port.
 * @return The code that gets data from the specified channel.
 * @exception IllegalActionException If the receiver adapter is not found or it encounters an error while generating the get code.
 */
public String generateGetCode(String channel,String offset) throws IllegalActionException {
  Receiver[][] receivers=getReceiverAdapters();
  int channelIndex=Integer.parseInt(channel);
  if (receivers.length != 0) {
    if (channelIndex >= receivers.length) {
      throw new IllegalActionException(getComponent(),"String_Node_Str" + channelIndex + "String_Node_Str"+ "String_Node_Str"+ receivers.length+ "String_Node_Str"+ channel+ "String_Node_Str"+ offset+ "String_Node_Str");
    }
    if (receivers[channelIndex].length > 1) {
      throw new IllegalActionException("String_Node_Str" + "String_Node_Str");
    }
    if (receivers[channelIndex].length > 0) {
      return receivers[channelIndex][0].generateGetCode(offset);
    }
  }
  Type type=((TypedIOPort)getComponent()).getType();
  if (((TypedIOPort)getComponent()) instanceof ParameterPort) {
    Parameter parameter=((ParameterPort)getComponent()).getParameter();
    if (parameter.isStringMode()) {
      return "String_Node_Str" + parameter.getExpression().replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str") + "String_Node_Str";
    }
 else {
      return parameter.getValueAsString();
    }
  }
  String typeString=getCodeGenerator().codeGenType(type);
  return "String_Node_Str" + getCodeGenerator().codeGenType(BaseType.INT) + "String_Node_Str"+ typeString+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Generate code for replacing the get() macro. This delegates to the receiver adapter for the specified channel and asks it to generate the get code.
 * @param channel The channel for which to generate the get code.
 * @param offset The offset in the array representation of the port.
 * @return The code that gets data from the specified channel.
 * @exception IllegalActionException If the receiver adapter is not found or it encounters an error while generating the get code.
 */
public String generateGetCode(String channel,String offset) throws IllegalActionException {
  Receiver[][] receivers=getReceiverAdapters();
  int channelIndex=Integer.parseInt(channel);
  if (receivers.length != 0) {
    if (channelIndex >= receivers.length) {
      throw new IllegalActionException(getComponent(),"String_Node_Str" + channelIndex + "String_Node_Str"+ "String_Node_Str"+ receivers.length+ "String_Node_Str"+ channel+ "String_Node_Str"+ offset+ "String_Node_Str");
    }
    if (receivers[channelIndex].length > 1) {
      throw new IllegalActionException("String_Node_Str" + "String_Node_Str");
    }
    if (receivers[channelIndex].length > 0) {
      return receivers[channelIndex][0].generateGetCode(offset);
    }
  }
  TypedIOPort port=(TypedIOPort)getComponent();
  Type type=port.getType();
  if (port instanceof ParameterPort) {
    Parameter parameter=((ParameterPort)getComponent()).getParameter();
    if (port.numLinks() <= 0) {
      if (parameter.isStringMode()) {
        return "String_Node_Str" + parameter.getExpression().replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str") + "String_Node_Str";
      }
 else {
        return parameter.getValueAsString();
      }
    }
 else {
      throw new InternalErrorException(port,null,"String_Node_Str" + "String_Node_Str");
    }
  }
  String typeString=getCodeGenerator().codeGenType(type);
  System.err.println("String_Node_Str");
  return "String_Node_Str" + getCodeGenerator().codeGenType(BaseType.INT) + "String_Node_Str"+ typeString+ "String_Node_Str";
}