Program: 6538
Project: 6538
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;
  new CppTypeHelper(this.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)));
    String rootContainerName=this.properties.getProperty(FabricTypeGenModule.MAIN_CLASS_NAME_KEY);
    if (name.equals(rootContainerName)) {
      for (      String include : this.generatedElements.keySet()) {
        if (!include.equals(name)) {
          cpphf.addLibInclude(include + "String_Node_Str");
        }
      }
    }
    for (    CppVar member : sourceFileData.typeObject.getVars(Cpp.PRIVATE)) {
      if (member.getTypeName().endsWith("String_Node_Str")) {
        cpphf.addLibInclude(member.getTypeName());
      }
    }
    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.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)));
    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));
  }
}