Program: 82646
Project: 82646
Buggy source:
private String generateRuntimeSelection(TreeLogger logger,GeneratorContext context,JClassType targetClass,GwtLocale compileLocale,Set<GwtLocale> locales) throws UnableToCompleteException {
  String packageName=targetClass.getPackage().getName();
  String className=targetClass.getName().replace('.','_') + "String_Node_Str" + compileLocale.getAsString()+ "String_Node_Str";
  PrintWriter pw=context.tryCreate(logger,packageName,className);
  if (pw != null) {
    ClassSourceFileComposerFactory factory=new ClassSourceFileComposerFactory(packageName,className);
    factory.setSuperclass(targetClass.getQualifiedSourceName());
    factory.addImport(CURRENCY_LIST);
    factory.addImport(CURRENCY_DATA);
    factory.addImport("String_Node_Str");
    SourceWriter writer=factory.createSourceWriter(context,pw);
    writer.println("String_Node_Str");
    writer.println();
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println();
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println();
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println();
    writer.println("String_Node_Str");
    writer.indent();
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    boolean fetchedLocale=false;
    Map<String,Set<GwtLocale>> localeMap=new HashMap<String,Set<GwtLocale>>();
    String compileLocaleClass=processChildLocale(logger,context,targetClass,localeMap,compileLocale);
    if (compileLocaleClass == null) {
      return null;
    }
    for (    GwtLocale runtimeLocale : locales) {
      processChildLocale(logger,context,targetClass,localeMap,runtimeLocale);
    }
    for (    Entry<String,Set<GwtLocale>> entry : localeMap.entrySet()) {
      if (!fetchedLocale) {
        writer.println("String_Node_Str");
        fetchedLocale=true;
      }
      boolean firstLocale=true;
      String generatedClass=entry.getKey();
      if (compileLocaleClass.equals(generatedClass)) {
        continue;
      }
      writer.print("String_Node_Str");
      for (      GwtLocale locale : entry.getValue()) {
        if (firstLocale) {
          firstLocale=false;
        }
 else {
          writer.println();
          writer.print("String_Node_Str");
        }
        writer.print("String_Node_Str" + locale.toString() + "String_Node_Str");
      }
      writer.println("String_Node_Str");
      writer.println("String_Node_Str" + generatedClass + "String_Node_Str");
      writer.println("String_Node_Str");
      writer.println("String_Node_Str");
    }
    writer.println("String_Node_Str" + compileLocaleClass + "String_Node_Str");
    writer.outdent();
    writer.println("String_Node_Str");
    writer.commit(logger);
  }
  return packageName + "String_Node_Str" + className;
}

Fixed version (ground truth):
private String generateRuntimeSelection(TreeLogger logger,GeneratorContext context,JClassType targetClass,GwtLocale compileLocale,Set<GwtLocale> locales) throws UnableToCompleteException {
  String packageName=targetClass.getPackage().getName();
  String className=targetClass.getName().replace('.','_') + "String_Node_Str" + compileLocale.getAsString()+ "String_Node_Str";
  PrintWriter pw=context.tryCreate(logger,packageName,className);
  if (pw != null) {
    ClassSourceFileComposerFactory factory=new ClassSourceFileComposerFactory(packageName,className);
    factory.setSuperclass(targetClass.getQualifiedSourceName());
    factory.addImport(CURRENCY_LIST);
    factory.addImport(CURRENCY_DATA);
    factory.addImport("String_Node_Str");
    SourceWriter writer=factory.createSourceWriter(context,pw);
    writer.println("String_Node_Str");
    writer.println();
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println();
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println();
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println();
    writer.println("String_Node_Str");
    writer.indent();
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    writer.println("String_Node_Str");
    boolean fetchedLocale=false;
    Map<String,Set<GwtLocale>> localeMap=new HashMap<String,Set<GwtLocale>>();
    String compileLocaleClass=processChildLocale(logger,context,targetClass,localeMap,compileLocale);
    if (compileLocaleClass == null) {
      return null;
    }
    for (    GwtLocale runtimeLocale : locales) {
      processChildLocale(logger,context,targetClass,localeMap,runtimeLocale);
    }
    for (    Entry<String,Set<GwtLocale>> entry : localeMap.entrySet()) {
      if (!fetchedLocale) {
        writer.println("String_Node_Str");
        fetchedLocale=true;
      }
      boolean firstLocale=true;
      String generatedClass=entry.getKey();
      if (compileLocaleClass.equals(generatedClass)) {
        continue;
      }
      writer.print("String_Node_Str");
      for (      GwtLocale locale : entry.getValue()) {
        if (firstLocale) {
          firstLocale=false;
        }
 else {
          writer.println();
          writer.print("String_Node_Str");
        }
        writer.print("String_Node_Str" + locale.toString() + "String_Node_Str");
      }
      writer.println("String_Node_Str");
      writer.println("String_Node_Str" + generatedClass + "String_Node_Str");
      writer.println("String_Node_Str");
      writer.println("String_Node_Str");
    }
    writer.println("String_Node_Str" + compileLocaleClass + "String_Node_Str");
    writer.outdent();
    writer.println("String_Node_Str");
    writer.commit(logger);
  }
  return packageName + "String_Node_Str" + className;
}