Program: 177145
Project: 177145
Buggy source:
public ResourceMethod(MethodDeclaration delegate,Resource parent){
  super(delegate);
  Set<String> httpMethods=new TreeSet<String>();
  Collection<AnnotationMirror> mirrors=delegate.getAnnotationMirrors();
  for (  AnnotationMirror mirror : mirrors) {
    AnnotationTypeDeclaration annotationDeclaration=mirror.getAnnotationType().getDeclaration();
    HttpMethod httpMethodInfo=annotationDeclaration.getAnnotation(HttpMethod.class);
    if (httpMethodInfo != null) {
      httpMethods.add(httpMethodInfo.value());
      break;
    }
  }
  if (httpMethods.isEmpty()) {
    throw new IllegalStateException("String_Node_Str");
  }
  this.httpMethods=httpMethods;
  Set<String> consumes;
  Consumes consumesInfo=delegate.getAnnotation(Consumes.class);
  if (consumesInfo != null) {
    consumes=new TreeSet<String>(Arrays.asList(consumesInfo.value()));
  }
 else {
    consumes=new TreeSet<String>(parent.getConsumesMime());
  }
  this.consumesMime=consumes;
  Set<String> produces;
  Produces producesInfo=delegate.getAnnotation(Produces.class);
  if (producesInfo != null) {
    produces=new TreeSet<String>(Arrays.asList(producesInfo.value()));
  }
 else {
    produces=new TreeSet<String>(parent.getProducesMime());
  }
  this.producesMime=produces;
  String subpath=null;
  Path pathInfo=delegate.getAnnotation(Path.class);
  if (pathInfo != null) {
    subpath=pathInfo.value();
  }
  ResourceEntityParameter entityParameter;
  List<RESTResourceParameter> resourceParameters;
  ResourcePayloadTypeAdapter outputPayload;
  ResourceMethodSignature signatureOverride=delegate.getAnnotation(ResourceMethodSignature.class);
  if (signatureOverride == null) {
    entityParameter=null;
    resourceParameters=new ArrayList<RESTResourceParameter>();
    for (    ParameterDeclaration parameterDeclaration : getParameters()) {
      if (ResourceParameter.isResourceParameter(parameterDeclaration)) {
        resourceParameters.add(new ResourceParameter(parameterDeclaration));
      }
 else       if (parameterDeclaration.getAnnotation(Context.class) == null) {
        entityParameter=new ResourceEntityParameter(parameterDeclaration);
      }
    }
    DecoratedTypeMirror returnType=(DecoratedTypeMirror)getReturnType();
    outputPayload=returnType.isVoid() ? null : new ResourcePayloadTypeAdapter(returnType);
  }
 else {
    entityParameter=loadEntityParameter(signatureOverride);
    resourceParameters=loadResourceParameters(signatureOverride);
    outputPayload=loadOutputPayload(signatureOverride);
  }
  this.entityParameter=entityParameter;
  this.resourceParameters=resourceParameters;
  this.subpath=subpath;
  this.parent=parent;
  this.errors=new ArrayList<RESTResourceError>();
  this.outputPayload=outputPayload;
}

Fixed version (ground truth):
public ResourceMethod(MethodDeclaration delegate,Resource parent){
  super(delegate);
  Set<String> httpMethods=new TreeSet<String>();
  Collection<AnnotationMirror> mirrors=delegate.getAnnotationMirrors();
  for (  AnnotationMirror mirror : mirrors) {
    AnnotationTypeDeclaration annotationDeclaration=mirror.getAnnotationType().getDeclaration();
    HttpMethod httpMethodInfo=annotationDeclaration.getAnnotation(HttpMethod.class);
    if (httpMethodInfo != null) {
      httpMethods.add(httpMethodInfo.value());
      break;
    }
  }
  if (httpMethods.isEmpty()) {
    throw new IllegalStateException("String_Node_Str");
  }
  this.httpMethods=httpMethods;
  Set<String> consumes;
  Consumes consumesInfo=delegate.getAnnotation(Consumes.class);
  if (consumesInfo != null) {
    consumes=new TreeSet<String>(Arrays.asList(consumesInfo.value()));
  }
 else {
    consumes=new TreeSet<String>(parent.getConsumesMime());
  }
  this.consumesMime=consumes;
  Set<String> produces;
  Produces producesInfo=delegate.getAnnotation(Produces.class);
  if (producesInfo != null) {
    produces=new TreeSet<String>(Arrays.asList(producesInfo.value()));
  }
 else {
    produces=new TreeSet<String>(parent.getProducesMime());
  }
  this.producesMime=produces;
  String subpath=null;
  Path pathInfo=delegate.getAnnotation(Path.class);
  if (pathInfo != null) {
    subpath=pathInfo.value();
  }
  ResourceEntityParameter entityParameter;
  List<ResourceEntityParameter> declaredEntityParameters=new ArrayList<ResourceEntityParameter>();
  List<RESTResourceParameter> resourceParameters;
  ResourcePayloadTypeAdapter outputPayload;
  ResourceMethodSignature signatureOverride=delegate.getAnnotation(ResourceMethodSignature.class);
  if (signatureOverride == null) {
    entityParameter=null;
    resourceParameters=new ArrayList<RESTResourceParameter>();
    for (    ParameterDeclaration parameterDeclaration : getParameters()) {
      if (ResourceParameter.isResourceParameter(parameterDeclaration)) {
        resourceParameters.add(new ResourceParameter(parameterDeclaration));
      }
 else       if (parameterDeclaration.getAnnotation(Context.class) == null) {
        entityParameter=new ResourceEntityParameter(parameterDeclaration);
        declaredEntityParameters.add(entityParameter);
      }
    }
    DecoratedTypeMirror returnType=(DecoratedTypeMirror)getReturnType();
    outputPayload=returnType.isVoid() ? null : new ResourcePayloadTypeAdapter(returnType);
  }
 else {
    entityParameter=loadEntityParameter(signatureOverride);
    declaredEntityParameters.add(entityParameter);
    resourceParameters=loadResourceParameters(signatureOverride);
    outputPayload=loadOutputPayload(signatureOverride);
  }
  this.entityParameter=entityParameter;
  this.resourceParameters=resourceParameters;
  this.subpath=subpath;
  this.parent=parent;
  this.errors=new ArrayList<RESTResourceError>();
  this.outputPayload=outputPayload;
  this.declaredEntityParameters=declaredEntityParameters;
}