Program: 25575
Project: 25575
Buggy source:
private void processType(TypeElement type){
  Messager messager=processingEnv.getMessager();
  messager.printMessage(Diagnostic.Kind.NOTE,"String_Node_Str" + type);
  AutoValue autoValue=type.getAnnotation(AutoValue.class);
  if (autoValue == null) {
    errorReporter.abortWithError("String_Node_Str" + "String_Node_Str",type);
  }
  if (type.getKind() != ElementKind.CLASS) {
    errorReporter.abortWithError("String_Node_Str" + AutoValue.class.getName() + "String_Node_Str",type);
  }
  if (ancestorIsAutoValue(type)) {
    errorReporter.abortWithError("String_Node_Str",type);
  }
  if (implementsAnnotation(type)) {
    errorReporter.abortWithError("String_Node_Str" + "String_Node_Str",type);
  }
  List<ExecutableElement> methods=new ArrayList<ExecutableElement>();
  findLocalAndInheritedMethods(type,methods);
  ImmutableSet<ExecutableElement> methodsToImplement=methodsToImplement(methods);
  messager.printMessage(Diagnostic.Kind.NOTE,"String_Node_Str" + extensions);
  String fqExtClass=TypeSimplifier.classNameOf(type);
  int extensionsApplied=0;
  for (  AutoValueExtension extension : extensions) {
    AutoValueExtension.Context context=makeExtensionContext(type,methodsToImplement);
    messager.printMessage(Diagnostic.Kind.WARNING,"String_Node_Str" + extension);
    if (extension.applicable(context)) {
      String fqClassName=generatedSubclassName(type,extensionsApplied);
      String implClass=TypeSimplifier.classNameOf(type);
      String extClass=TypeSimplifier.simpleNameOf(fqExtClass);
      String className=TypeSimplifier.simpleNameOf(fqClassName);
      AutoValueExtension.GeneratedClass genClass=extension.generateClass(context,className,extClass,implClass);
      if (genClass != null) {
        String text=Reformatter.fixup(genClass.source());
        writeSourceFile(fqClassName,text,type);
        messager.printMessage(Diagnostic.Kind.NOTE,extension.getClass().getSimpleName() + "String_Node_Str" + genClass.consumedProperties().size());
        fqExtClass=fqClassName;
        methods.removeAll(genClass.consumedProperties());
        ++extensionsApplied;
      }
    }
  }
  String subclass=generatedSubclassName(type,++extensionsApplied);
  AutoValueTemplateVars vars=new AutoValueTemplateVars();
  vars.pkg=TypeSimplifier.packageNameOf(type);
  vars.origClass=fqExtClass;
  vars.simpleClassName=TypeSimplifier.simpleNameOf(vars.origClass);
  vars.subclass=TypeSimplifier.simpleNameOf(subclass);
  vars.types=processingEnv.getTypeUtils();
  defineVarsForType(type,vars,methods);
  GwtCompatibility gwtCompatibility=new GwtCompatibility(type);
  vars.gwtCompatibleAnnotation=gwtCompatibility.gwtCompatibleAnnotationString();
  String text=vars.toText();
  text=Reformatter.fixup(text);
  writeSourceFile(subclass,text,type);
  GwtSerialization gwtSerialization=new GwtSerialization(gwtCompatibility,processingEnv,type);
  gwtSerialization.maybeWriteGwtSerializer(vars);
}

Fixed version (ground truth):
private void processType(TypeElement type){
  AutoValue autoValue=type.getAnnotation(AutoValue.class);
  if (autoValue == null) {
    errorReporter.abortWithError("String_Node_Str" + "String_Node_Str",type);
  }
  if (type.getKind() != ElementKind.CLASS) {
    errorReporter.abortWithError("String_Node_Str" + AutoValue.class.getName() + "String_Node_Str",type);
  }
  if (ancestorIsAutoValue(type)) {
    errorReporter.abortWithError("String_Node_Str",type);
  }
  if (implementsAnnotation(type)) {
    errorReporter.abortWithError("String_Node_Str" + "String_Node_Str",type);
  }
  List<ExecutableElement> methods=new ArrayList<ExecutableElement>();
  findLocalAndInheritedMethods(type,methods);
  ImmutableSet<ExecutableElement> methodsToImplement=methodsToImplement(methods);
  String fqExtClass=TypeSimplifier.classNameOf(type);
  int extensionsApplied=0;
  for (  AutoValueExtension extension : extensions) {
    AutoValueExtension.Context context=makeExtensionContext(type,methodsToImplement);
    if (extension.applicable(context)) {
      String fqClassName=generatedSubclassName(type,extensionsApplied);
      String implClass=TypeSimplifier.classNameOf(type);
      String extClass=TypeSimplifier.simpleNameOf(fqExtClass);
      String className=TypeSimplifier.simpleNameOf(fqClassName);
      AutoValueExtension.GeneratedClass genClass=extension.generateClass(context,className,extClass,implClass);
      if (genClass != null) {
        String text=Reformatter.fixup(genClass.source());
        writeSourceFile(fqClassName,text,type);
        fqExtClass=fqClassName;
        methods.removeAll(genClass.consumedProperties());
        ++extensionsApplied;
      }
    }
  }
  String subclass=generatedSubclassName(type,extensionsApplied);
  AutoValueTemplateVars vars=new AutoValueTemplateVars();
  vars.pkg=TypeSimplifier.packageNameOf(type);
  vars.origClass=fqExtClass;
  vars.simpleClassName=TypeSimplifier.simpleNameOf(vars.origClass);
  vars.subclass=TypeSimplifier.simpleNameOf(subclass);
  vars.types=processingEnv.getTypeUtils();
  defineVarsForType(type,vars,methods);
  GwtCompatibility gwtCompatibility=new GwtCompatibility(type);
  vars.gwtCompatibleAnnotation=gwtCompatibility.gwtCompatibleAnnotationString();
  String text=vars.toText();
  text=Reformatter.fixup(text);
  writeSourceFile(subclass,text,type);
  GwtSerialization gwtSerialization=new GwtSerialization(gwtCompatibility,processingEnv,type);
  gwtSerialization.maybeWriteGwtSerializer(vars);
}