Program: 6522
Project: 6522
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;
  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)));
    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.add(sourceFileData.typeObject);
    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");
    for (    String requiredInclude : sourceFileData.requiredIncludes) {
      cppsf.addLibInclude(requiredInclude);
    }
    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;
  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)));
    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");
    for (    String requiredInclude : sourceFileData.requiredIncludes) {
      cppsf.addLibInclude(requiredInclude);
    }
    LOGGER.debug(String.format("String_Node_Str",name));
  }
}