Program: 20535
Project: 20535
Buggy source:
private MethodSpec.Builder createMethodBuilder(GMethod gMethod,String methodName,Set<String> mediaTypesForMethod,Map<String,TypeSpec.Builder> responseSpec){
  MethodSpec.Builder methodSpec=MethodSpec.methodBuilder(methodName).addModifiers(Modifier.ABSTRACT,Modifier.PUBLIC);
  methodSpec=build.getResourceMethodExtension(Annotations.ON_METHOD_CREATION,gMethod).onMethod(new ResourceContextImpl(build),gMethod,methodSpec);
  for (  GParameter typeDeclaration : gMethod.resource().uriParameters()) {
    if (TypeUtils.isComposite(typeDeclaration)) {
      throw new GenerationException("String_Node_Str" + typeDeclaration);
    }
    methodSpec.addParameter(ParameterSpec.builder(typeDeclaration.type().defaultJavaTypeName(build.getModelPackage()),Names.methodName(typeDeclaration.name())).addAnnotation(AnnotationSpec.builder(PathParam.class).addMember("String_Node_Str","String_Node_Str",typeDeclaration.name()).build()).build());
  }
  for (  GParameter typeDeclaration : gMethod.queryParameters()) {
    if (TypeUtils.isComposite(typeDeclaration)) {
      throw new GenerationException("String_Node_Str" + typeDeclaration);
    }
    methodSpec.addParameter(ParameterSpec.builder(typeDeclaration.type().defaultJavaTypeName(build.getModelPackage()),Names.methodName(typeDeclaration.name())).addAnnotation(AnnotationSpec.builder(QueryParam.class).addMember("String_Node_Str","String_Node_Str",typeDeclaration.name()).build()).build());
  }
  buildNewWebMethod(gMethod,methodSpec);
  if (gMethod.resource().parentResource() != null) {
    methodSpec.addAnnotation(AnnotationSpec.builder(Path.class).addMember("String_Node_Str","String_Node_Str",gMethod.resource().resourcePath()).build());
  }
  if (gMethod.responses().size() != 0) {
    TypeSpec.Builder responseSpecForMethod=responseSpec.get(Names.responseClassName(gMethod.resource(),gMethod));
    if (responseSpecForMethod == null) {
      methodSpec.returns(ClassName.get(Response.class));
    }
 else {
      methodSpec.returns(ClassName.get("String_Node_Str",responseSpecForMethod.build().name));
    }
  }
 else {
    methodSpec.returns(ClassName.VOID);
  }
  if (mediaTypesForMethod.size() > 0) {
    AnnotationSpec.Builder ann=buildAnnotation(mediaTypesForMethod,Produces.class);
    methodSpec.addAnnotation(ann.build());
  }
  return methodSpec;
}

Fixed version (ground truth):
private MethodSpec.Builder createMethodBuilder(GMethod gMethod,String methodName,Set<String> mediaTypesForMethod,Map<String,TypeSpec.Builder> responseSpec){
  MethodSpec.Builder methodSpec=MethodSpec.methodBuilder(methodName).addModifiers(Modifier.ABSTRACT,Modifier.PUBLIC);
  methodSpec=build.getResourceMethodExtension(Annotations.ON_METHOD_CREATION,gMethod).onMethod(new ResourceContextImpl(build),gMethod,methodSpec);
  for (  GParameter typeDeclaration : gMethod.resource().uriParameters()) {
    if (TypeUtils.isComposite(typeDeclaration)) {
      throw new GenerationException("String_Node_Str" + typeDeclaration);
    }
    methodSpec.addParameter(ParameterSpec.builder(typeDeclaration.type().defaultJavaTypeName(build.getModelPackage()),Names.methodName(typeDeclaration.name())).addAnnotation(AnnotationSpec.builder(PathParam.class).addMember("String_Node_Str","String_Node_Str",typeDeclaration.name()).build()).build());
  }
  for (  GParameter typeDeclaration : gMethod.queryParameters()) {
    if (TypeUtils.isComposite(typeDeclaration)) {
      throw new GenerationException("String_Node_Str" + typeDeclaration);
    }
    methodSpec.addParameter(ParameterSpec.builder(typeDeclaration.type().defaultJavaTypeName(build.getModelPackage()),Names.methodName(typeDeclaration.name())).addAnnotation(AnnotationSpec.builder(QueryParam.class).addMember("String_Node_Str","String_Node_Str",typeDeclaration.name()).build()).build());
  }
  buildNewWebMethod(gMethod,methodSpec);
  if (gMethod.resource().parentResource() != null) {
    methodSpec.addAnnotation(AnnotationSpec.builder(Path.class).addMember("String_Node_Str","String_Node_Str",gMethod.resource().relativePath()).build());
  }
  if (gMethod.responses().size() != 0) {
    TypeSpec.Builder responseSpecForMethod=responseSpec.get(Names.responseClassName(gMethod.resource(),gMethod));
    if (responseSpecForMethod == null) {
      methodSpec.returns(ClassName.get(Response.class));
    }
 else {
      methodSpec.returns(ClassName.get("String_Node_Str",responseSpecForMethod.build().name));
    }
  }
 else {
    methodSpec.returns(ClassName.VOID);
  }
  if (mediaTypesForMethod.size() > 0) {
    AnnotationSpec.Builder ann=buildAnnotation(mediaTypesForMethod,Produces.class);
    methodSpec.addAnnotation(ann.build());
  }
  return methodSpec;
}