Program: 6512
Project: 6512
Buggy source:
/** 
 * Create source files from container classes and write them to the language-specific workspace.
 * @throws Exception Error during source file write-out
 */
@Override public void writeSourceFiles() throws Exception {
  if (!this.incompleteBuilders.empty()) {
    LOGGER.error(String.format("String_Node_Str",this.incompleteBuilders.size()));
    throw new IllegalStateException("String_Node_Str");
  }
  CWorkspace cWorkspace=this.workspace.getC();
  CppHeaderFile cpphf=null;
  CppSourceFile cppsf=null;
  CppTypeHelper.init(workspace);
  for (  String name : this.generatedElements.keySet()) {
    CppTypeGen.SourceFileData sourceFileData=this.generatedElements.get(name);
    cpphf=cWorkspace.getCppHeaderFile(name);
    cpphf.add(sourceFileData.typeObject);
    cpphf.setComment(new CCommentImpl(String.format("String_Node_Str",name)));
    for (    CppVar member : sourceFileData.typeObject.getVars(Cpp.PRIVATE)) {
      System.out.println("String_Node_Str" + member.getTypeName() + "String_Node_Str"+ name);
      if (member.getTypeName().endsWith("String_Node_Str") && !member.getTypeName().equals(name) && !cpphf.containsLibInclude(member.getTypeName() + "String_Node_Str")&& !this.incompleteLocalBuilders.containsKey(name)) {
        System.out.println("String_Node_Str" + member.getTypeName());
        cpphf.addLibInclude(member.getTypeName() + "String_Node_Str");
      }
    }
    cpphf.addBeforeDirective("String_Node_Str" + CppTypeGen.createIncludeGuardName(cpphf.getFileName()));
    cpphf.addBeforeDirective("String_Node_Str" + CppTypeGen.createIncludeGuardName(cpphf.getFileName()));
    cpphf.addAfterDirective("String_Node_Str" + CppTypeGen.createIncludeGuardName(cpphf.getFileName()));
    cppsf=cWorkspace.getCppSourceFile(name);
    cppsf.setComment(new CCommentImpl(String.format("String_Node_Str",name)));
    cppsf.addInclude(cpphf);
    cppsf.addLibInclude("String_Node_Str");
    cppsf.addUsingNamespace("String_Node_Str");
    if (!cpphf.getFileName().equals(CppTypeHelper.FILE_NAME)) {
      cpphf.addLibInclude(CppTypeHelper.FILE_NAME + "String_Node_Str");
    }
    for (    String requiredInclude : sourceFileData.requiredIncludes) {
      cpphf.addLibInclude(requiredInclude);
      cpphf.addUsingNamespace("String_Node_Str");
    }
    LOGGER.debug(String.format("String_Node_Str",name));
  }
}

Fixed version (ground truth):
/** 
 * Create source files from container classes and write them to the language-specific workspace.
 * @throws Exception Error during source file write-out
 */
@Override public void writeSourceFiles() throws Exception {
  if (!this.incompleteBuilders.empty()) {
    LOGGER.error(String.format("String_Node_Str",this.incompleteBuilders.size()));
    throw new IllegalStateException("String_Node_Str");
  }
  CWorkspace cWorkspace=this.workspace.getC();
  CppHeaderFile cpphf=null;
  CppSourceFile cppsf=null;
  CppTypeHelper.init(workspace);
  for (  String name : this.generatedElements.keySet()) {
    CppTypeGen.SourceFileData sourceFileData=this.generatedElements.get(name);
    cpphf=cWorkspace.getCppHeaderFile(name);
    cpphf.add(sourceFileData.typeObject);
    cpphf.setComment(new CCommentImpl(String.format("String_Node_Str",name)));
    if (!cpphf.getFileName().equals(CppTypeHelper.FILE_NAME)) {
      cpphf.addLibInclude(CppTypeHelper.FILE_NAME + "String_Node_Str");
    }
    for (    String requiredInclude : sourceFileData.requiredIncludes) {
      cpphf.addLibInclude(requiredInclude);
    }
    for (    CppVar member : sourceFileData.typeObject.getVars(Cpp.PRIVATE)) {
      if (!this.mapper.isBuiltInType(member.getTypeName()) && !member.getTypeName().startsWith("String_Node_Str") && !member.getTypeName().equals(name)&& !cpphf.containsLibInclude(member.getTypeName() + "String_Node_Str")&& !this.incompleteLocalBuilders.containsKey(name)) {
        cpphf.addLibInclude(member.getTypeName() + "String_Node_Str");
      }
    }
    cpphf.addUsingNamespace("String_Node_Str");
    cpphf.addBeforeDirective("String_Node_Str" + CppTypeGen.createIncludeGuardName(cpphf.getFileName()));
    cpphf.addBeforeDirective("String_Node_Str" + CppTypeGen.createIncludeGuardName(cpphf.getFileName()));
    cpphf.addAfterDirective("String_Node_Str" + CppTypeGen.createIncludeGuardName(cpphf.getFileName()));
    cppsf=cWorkspace.getCppSourceFile(name);
    cppsf.setComment(new CCommentImpl(String.format("String_Node_Str",name)));
    cppsf.addInclude(cpphf);
    cppsf.addLibInclude("String_Node_Str");
    cppsf.addUsingNamespace("String_Node_Str");
    LOGGER.debug(String.format("String_Node_Str",name));
  }
  String rootContainerName=this.properties.getProperty(FabricTypeGenModule.MAIN_CLASS_NAME_KEY);
  CppSourceFile application=workspace.getC().getCppSourceFile("String_Node_Str");
  application.addLibInclude("String_Node_Str");
  application.addLibInclude("String_Node_Str");
  application.addLibInclude(rootContainerName + "String_Node_Str");
  application.addUsingNamespace("String_Node_Str");
  CParam argc=CParam.factory.create("String_Node_Str","String_Node_Str");
  CParam argv=CParam.factory.create("String_Node_Str","String_Node_Str");
  CFunSignature mainSignature=CFunSignature.factory.create(argc,argv);
  CFun main=CFun.factory.create("String_Node_Str","String_Node_Str",mainSignature);
  String methodBody=String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str",rootContainerName,rootContainerName.toLowerCase(),rootContainerName,rootContainerName.toLowerCase());
  main.appendCode(methodBody);
  main.setComment(new CCommentImpl("String_Node_Str"));
  application.add(main);
  application.setComment(new CCommentImpl(("String_Node_Str")));
  LOGGER.debug(String.format("String_Node_Str",application.getFileName()));
}