Program: 75313
Project: 75313
Buggy source:
/** 
 * Generate the Framework code. Presently this functionality is hard coded to generate the files in $PTII/domains/giotto/kernel It creates the directory c_functionality/fcode with the files f_code.c and f_code.h in it.
 */
public static void writeFrameworkCode(TypedCompositeActor model) throws IllegalActionException, NameDuplicationException {
  dataTypes=new HashSet();
  FHfuncDeclString="String_Node_Str";
  FCoutDriversImplString="String_Node_Str";
  FCinDriversImplString="String_Node_Str";
  THfuncDeclString="String_Node_Str";
  TCfuncImplString="String_Node_Str";
  _generateCodeStrings(model);
  String directoryName="String_Node_Str" + StringUtilities.sanitizeName(model.getName()) + "String_Node_Str";
  File directory;
  File outDirFile=new File(directoryName);
  if (!outDirFile.isDirectory()) {
    outDirFile.mkdirs();
  }
  File writeFCFile=new File(directoryName,"String_Node_Str");
  File writeFHFile=new File(directoryName,"String_Node_Str");
  File writeTCFile=new File(directoryName,"String_Node_Str");
  File writeTHFile=new File(directoryName,"String_Node_Str");
  try {
    FileWriter FCwriter=new FileWriter(writeFCFile);
    FCwriter.write(_generateFrameworkImplementationCode(model));
    FCwriter.close();
    FileWriter FHwriter=new FileWriter(writeFHFile);
    FHwriter.write(_generateFrameworkHeaderCode(model));
    FHwriter.close();
    FileWriter TCwriter=new FileWriter(writeTCFile);
    TCwriter.write(_generateTaskImplementationCode(model));
    TCwriter.close();
    FileWriter THwriter=new FileWriter(writeTHFile);
    THwriter.write(_generateTaskHeaderCode(model));
    THwriter.close();
  }
 catch (  IOException e) {
    throw new IllegalActionException(model,e,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Generate the Framework code. Presently this functionality is hard coded to generate the files in $PTII/domains/giotto/kernel It creates the directory c_functionality/fcode with the files f_code.c and f_code.h in it.
 */
public static void writeFrameworkCode(TypedCompositeActor model) throws IllegalActionException, NameDuplicationException {
  dataTypes=new HashSet();
  FHfuncDeclString="String_Node_Str";
  FCoutDriversImplString="String_Node_Str";
  FCinDriversImplString="String_Node_Str";
  THfuncDeclString="String_Node_Str";
  TCfuncImplString="String_Node_Str";
  _generateCodeStrings(model);
  String directoryName="String_Node_Str" + StringUtilities.sanitizeName(model.getName()) + "String_Node_Str";
  File directory;
  File outDirFile=new File(directoryName);
  if (!outDirFile.isDirectory()) {
    outDirFile.mkdirs();
  }
  File writeFCFile=new File(directoryName,"String_Node_Str");
  File writeFHFile=new File(directoryName,"String_Node_Str");
  File writeTHFile=new File(directoryName,"String_Node_Str");
  try {
    FileWriter FCwriter=new FileWriter(writeFCFile);
    FCwriter.write(_generateFrameworkImplementationCode(model));
    FCwriter.close();
    FileWriter FHwriter=new FileWriter(writeFHFile);
    FHwriter.write(_generateFrameworkHeaderCode(model));
    FHwriter.close();
    FileWriter THwriter=new FileWriter(writeTHFile);
    THwriter.write(_generateTaskHeaderCode(model));
    THwriter.close();
  }
 catch (  IOException e) {
    throw new IllegalActionException(model,e,"String_Node_Str");
  }
}