Program: 9212
Project: 9212
Buggy source:
/** 
 * resolve one of these funky things. Need to: <br> (a) Check the formal is bound <br> (b) Check the annotation type is valid
 */
public AnnotationTypePattern resolveBindings(IScope scope,Bindings bindings,boolean allowBinding){
  if (resolved)   return this;
  resolved=true;
  FormalBinding formalBinding=scope.lookupFormal(formalName);
  if (formalBinding == null) {
    scope.message(IMessage.ERROR,this,"String_Node_Str");
  }
  annotationType=scope.getWorld().resolve(annotationType,true);
  if (ResolvedType.isMissing(annotationType)) {
    String cleanname=annotationType.getName();
    UnresolvedType type=null;
    while (ResolvedType.isMissing(type=scope.lookupType(cleanname,this))) {
      int lastDot=cleanname.lastIndexOf('.');
      if (lastDot == -1)       break;
      cleanname=cleanname.substring(0,lastDot) + "String_Node_Str" + cleanname.substring(lastDot + 1);
    }
    annotationType=scope.getWorld().resolve(type,true);
  }
  verifyIsAnnotationType((ResolvedType)annotationType,scope);
  if (!formalBinding.getType().resolve(scope.getWorld()).isEnum()) {
    scope.message(IMessage.ERROR,this,"String_Node_Str" + formalBinding.getType() + "String_Node_Str");
  }
  bindingPattern=true;
  ReferenceType theAnnotationType=(ReferenceType)annotationType;
  ResolvedMember[] annotationFields=theAnnotationType.getDeclaredMethods();
  field=null;
  for (int i=0; i < annotationFields.length; i++) {
    ResolvedMember resolvedMember=annotationFields[i];
    if (resolvedMember.getReturnType().equals(formalBinding.getType())) {
      if (field != null) {
        scope.message(IMessage.ERROR,this,"String_Node_Str" + formalBinding.getType() + "String_Node_Str"+ theAnnotationType.getName()+ "String_Node_Str");
      }
      field=resolvedMember;
    }
  }
  if (field == null) {
    scope.message(IMessage.ERROR,this,"String_Node_Str" + formalBinding.getType() + "String_Node_Str"+ theAnnotationType.getName()+ "String_Node_Str");
  }
  BindingAnnotationFieldTypePattern binding=new BindingAnnotationFieldTypePattern(formalBinding.getType(),formalBinding.getIndex(),theAnnotationType);
  binding.copyLocationFrom(this);
  bindings.register(binding,scope);
  binding.resolveBinding(scope.getWorld());
  return binding;
}

Fixed version (ground truth):
/** 
 * resolve one of these funky things. Need to: <br> (a) Check the formal is bound <br> (b) Check the annotation type is valid
 */
public AnnotationTypePattern resolveBindings(IScope scope,Bindings bindings,boolean allowBinding){
  if (resolved)   return this;
  resolved=true;
  FormalBinding formalBinding=scope.lookupFormal(formalName);
  if (formalBinding == null) {
    scope.message(IMessage.ERROR,this,"String_Node_Str");
    return this;
  }
  annotationType=scope.getWorld().resolve(annotationType,true);
  if (ResolvedType.isMissing(annotationType)) {
    String cleanname=annotationType.getName();
    UnresolvedType type=null;
    while (ResolvedType.isMissing(type=scope.lookupType(cleanname,this))) {
      int lastDot=cleanname.lastIndexOf('.');
      if (lastDot == -1)       break;
      cleanname=cleanname.substring(0,lastDot) + "String_Node_Str" + cleanname.substring(lastDot + 1);
    }
    annotationType=scope.getWorld().resolve(type,true);
  }
  verifyIsAnnotationType((ResolvedType)annotationType,scope);
  if (!formalBinding.getType().resolve(scope.getWorld()).isEnum()) {
    scope.message(IMessage.ERROR,this,"String_Node_Str" + formalBinding.getType() + "String_Node_Str");
  }
  bindingPattern=true;
  ReferenceType theAnnotationType=(ReferenceType)annotationType;
  ResolvedMember[] annotationFields=theAnnotationType.getDeclaredMethods();
  field=null;
  for (int i=0; i < annotationFields.length; i++) {
    ResolvedMember resolvedMember=annotationFields[i];
    if (resolvedMember.getReturnType().equals(formalBinding.getType())) {
      if (field != null) {
        scope.message(IMessage.ERROR,this,"String_Node_Str" + formalBinding.getType() + "String_Node_Str"+ theAnnotationType.getName()+ "String_Node_Str");
      }
      field=resolvedMember;
    }
  }
  if (field == null) {
    scope.message(IMessage.ERROR,this,"String_Node_Str" + formalBinding.getType() + "String_Node_Str"+ theAnnotationType.getName()+ "String_Node_Str");
  }
  BindingAnnotationFieldTypePattern binding=new BindingAnnotationFieldTypePattern(formalBinding.getType(),formalBinding.getIndex(),theAnnotationType);
  binding.copyLocationFrom(this);
  bindings.register(binding,scope);
  binding.resolveBinding(scope.getWorld());
  return binding;
}