Program: 161075
Project: 161075
Buggy source:
/** 
 * The search interface resembles a standard Whois client query with the extra features of multi-registry client, multiple response styles that can be selected via content negotiation and with an extensible URL parameters schema.
 */
@GET @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Path("String_Node_Str") public Response search(@Context final HttpServletRequest request,@QueryParam("String_Node_Str") final Set<String> sources,@QueryParam("String_Node_Str") final String searchKey,@QueryParam("String_Node_Str") final Set<String> inverseAttributes,@QueryParam("String_Node_Str") final Set<String> includeTags,@QueryParam("String_Node_Str") final Set<String> excludeTags,@QueryParam("String_Node_Str") final Set<String> types,@QueryParam("String_Node_Str") final Set<String> flags){
  validateSources(request,sources);
  validateSearchKey(request,searchKey);
  final Set<QueryFlag> separateFlags=splitInputFlags(request,flags);
  checkForInvalidFlags(request,separateFlags);
  final QueryBuilder queryBuilder=new QueryBuilder();
  queryBuilder.addFlag(QueryFlag.SHOW_TAG_INFO);
  queryBuilder.addCommaList(QueryFlag.SOURCES,sources);
  queryBuilder.addCommaList(QueryFlag.SELECT_TYPES,types);
  queryBuilder.addCommaList(QueryFlag.INVERSE,inverseAttributes);
  queryBuilder.addCommaList(QueryFlag.FILTER_TAG_INCLUDE,includeTags);
  queryBuilder.addCommaList(QueryFlag.FILTER_TAG_EXCLUDE,excludeTags);
  for (  QueryFlag separateFlag : separateFlags) {
    queryBuilder.addFlag(separateFlag);
  }
  final Query query=Query.parse(queryBuilder.build(searchKey),Query.Origin.REST);
  final Parameters parameters=new Parameters(new InverseAttributes(inverseAttributes),new TypeFilters(types),new Flags(separateFlags),new QueryStrings(new QueryString(searchKey)),new Sources(sources),null);
  final Service service=new Service(SERVICE_SEARCH);
  return handleQueryAndStreamResponse(query,request,InetAddresses.forString(request.getRemoteAddr()),parameters,service,getServerAttributeMapper(request));
}

Fixed version (ground truth):
/** 
 * The search interface resembles a standard Whois client query with the extra features of multi-registry client, multiple response styles that can be selected via content negotiation and with an extensible URL parameters schema.
 */
@GET @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @Path("String_Node_Str") public Response search(@Context final HttpServletRequest request,@QueryParam("String_Node_Str") final Set<String> sources,@QueryParam("String_Node_Str") final String searchKey,@QueryParam("String_Node_Str") final Set<String> inverseAttributes,@QueryParam("String_Node_Str") final Set<String> includeTags,@QueryParam("String_Node_Str") final Set<String> excludeTags,@QueryParam("String_Node_Str") final Set<String> types,@QueryParam("String_Node_Str") final Set<String> flags){
  validateSources(request,sources);
  validateSearchKey(request,searchKey);
  final Set<QueryFlag> separateFlags=splitInputFlags(request,flags);
  checkForInvalidFlags(request,separateFlags);
  final QueryBuilder queryBuilder=new QueryBuilder();
  queryBuilder.addFlag(QueryFlag.SHOW_TAG_INFO);
  queryBuilder.addCommaList(QueryFlag.SOURCES,sources);
  queryBuilder.addCommaList(QueryFlag.SELECT_TYPES,types);
  queryBuilder.addCommaList(QueryFlag.INVERSE,inverseAttributes);
  queryBuilder.addCommaList(QueryFlag.FILTER_TAG_INCLUDE,includeTags);
  queryBuilder.addCommaList(QueryFlag.FILTER_TAG_EXCLUDE,excludeTags);
  for (  QueryFlag separateFlag : separateFlags) {
    queryBuilder.addFlag(separateFlag);
  }
  final Query query=Query.parse(queryBuilder.build(searchKey),Query.Origin.REST);
  final Parameters parameters=new Parameters(new InverseAttributes(inverseAttributes),new TypeFilters(types),new Flags(separateFlags),new QueryStrings(new QueryString(searchKey)),new Sources(sources),null);
  final Service service=new Service(SERVICE_SEARCH);
  return handleQueryAndStreamResponse(query,request,InetAddresses.forString(request.getRemoteAddr()),parameters,service);
}