Program: 44619
Project: 44619
Buggy source:
/** 
 * Generate a class for the given translation file.
 * @param primaryClassName       the qualified super class name
 * @param generatedClassName     the qualified class name
 * @param messageAnnotationClass the annotation who trigger generation
 * @param translationFile        the translation file
 */
private void generateClassFor(final String primaryClassName,final String generatedClassName,final Class<?> messageAnnotationClass,final File translationFile){
  try {
    String superClassName=TranslationUtil.getEnclosingTranslationClassName(generatedClassName);
    if (!superClassName.equals(primaryClassName)) {
      String name=translationFile.getName();
      int lastUnder=name.lastIndexOf("String_Node_Str");
      String enclosingTranslationFileName=name.substring(0,lastUnder) + "String_Node_Str";
      File parent=new File(translationFile.getParent(),enclosingTranslationFileName);
      if (!parent.exists()) {
        this.generateClassFor(primaryClassName,superClassName,messageAnnotationClass,parent);
      }
    }
    Properties translations=new Properties();
    System.out.println(translationFile.getName() + "String_Node_Str" + translationFile.exists());
    if (translationFile != null && translationFile.exists()) {
      translations.load(new FileInputStream(translationFile));
      System.out.println(translations.keySet());
    }
    ClassModel classModel;
    if (messageAnnotationClass.isAssignableFrom(MessageBundle.class)) {
      classModel=new MessageBundleClassModel(generatedClassName,superClassName);
      classModel=new GeneratedAnnotation(classModel,MessageBundle.class.getName());
    }
 else {
      classModel=new MessageLoggerClassModel(generatedClassName,superClassName);
      classModel=new GeneratedAnnotation(classModel,MessageLogger.class.getName());
    }
    classModel=new TranslationMethods(classModel,(Map)translations);
    classModel.generateModel();
    classModel.writeClass(filer.createSourceFile(classModel.getClassName()));
  }
 catch (  Exception e) {
    this.messager.printMessage(Diagnostic.Kind.ERROR,String.format("String_Node_Str",generatedClassName));
  }
}

Fixed version (ground truth):
/** 
 * Generate a class for the given translation file.
 * @param primaryClassName       the qualified super class name
 * @param generatedClassName     the qualified class name
 * @param messageAnnotationClass the annotation who trigger generation
 * @param translationFile        the translation file
 */
private void generateClassFor(final String primaryClassName,final String generatedClassName,final Class<?> messageAnnotationClass,final File translationFile){
  try {
    String superClassName=TranslationUtil.getEnclosingTranslationClassName(generatedClassName);
    if (!superClassName.equals(primaryClassName)) {
      String name=translationFile.getName();
      int lastUnder=name.lastIndexOf("String_Node_Str");
      String enclosingTranslationFileName=name.substring(0,lastUnder) + "String_Node_Str";
      File parent=new File(translationFile.getParent(),enclosingTranslationFileName);
      if (!parent.exists()) {
        this.generateClassFor(primaryClassName,superClassName,messageAnnotationClass,parent);
      }
    }
    Properties translations=new Properties();
    if (translationFile != null && translationFile.exists()) {
      translations.load(new FileInputStream(translationFile));
    }
    ClassModel classModel;
    if (messageAnnotationClass.isAssignableFrom(MessageBundle.class)) {
      classModel=new MessageBundleClassModel(generatedClassName,superClassName);
      classModel=new GeneratedAnnotation(classModel,MessageBundle.class.getName());
    }
 else {
      classModel=new MessageLoggerClassModel(generatedClassName,superClassName);
      classModel=new GeneratedAnnotation(classModel,MessageLogger.class.getName());
    }
    classModel=new TranslationMethods(classModel,(Map)translations);
    classModel.generateModel();
    classModel.writeClass(filer.createSourceFile(classModel.getClassName()));
  }
 catch (  Exception e) {
    this.messager.printMessage(Diagnostic.Kind.ERROR,String.format("String_Node_Str",generatedClassName));
  }
}