Program: 112268
Project: 112268
Buggy source:
@SuppressWarnings("String_Node_Str") @RequestMapping(value={"String_Node_Str"}) public String actionSearch(HttpServletRequest theReq,HomeRequest theRequest,BindingResult theBindingResult,ModelMap theModel) throws IOException {
  addCommonParams(theReq,theRequest,theModel);
  StringWriter clientCodeJsonStringWriter=new StringWriter();
  JsonWriter clientCodeJsonWriter=new JsonWriter(clientCodeJsonStringWriter);
  clientCodeJsonWriter.beginObject();
  clientCodeJsonWriter.name("String_Node_Str");
  clientCodeJsonWriter.value("String_Node_Str");
  clientCodeJsonWriter.name("String_Node_Str");
  clientCodeJsonWriter.value((String)theModel.get("String_Node_Str"));
  CaptureInterceptor interceptor=new CaptureInterceptor();
  GenericClient client=theRequest.newClient(theReq,getContext(theRequest),myConfig,interceptor);
  IUntypedQuery search=client.search();
  IQuery query;
  if (isNotBlank(theReq.getParameter("String_Node_Str"))) {
    try {
      query=search.forResource((Class<? extends IBaseResource>)getResourceType(theRequest,theReq).getImplementingClass());
    }
 catch (    ServletException e) {
      theModel.put("String_Node_Str",e.toString());
      return "String_Node_Str";
    }
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.value(theReq.getParameter("String_Node_Str"));
  }
 else {
    query=search.forAllResources();
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.nullValue();
  }
  if (client.getPrettyPrint() != null) {
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.value(client.getPrettyPrint().toString());
  }
 else {
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.nullValue();
  }
  if (client.getEncoding() != null) {
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.value(client.getEncoding().getRequestContentType());
  }
 else {
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.nullValue();
  }
  String outcomeDescription="String_Node_Str";
  clientCodeJsonWriter.name("String_Node_Str");
  clientCodeJsonWriter.beginArray();
  int paramIdx=-1;
  while (true) {
    paramIdx++;
    String paramIdxString=Integer.toString(paramIdx);
    boolean shouldContinue=handleSearchParam(paramIdxString,theReq,query,clientCodeJsonWriter);
    if (!shouldContinue) {
      break;
    }
  }
  clientCodeJsonWriter.endArray();
  clientCodeJsonWriter.name("String_Node_Str");
  clientCodeJsonWriter.beginArray();
  String[] incValues=theReq.getParameterValues(Constants.PARAM_INCLUDE);
  if (incValues != null) {
    for (    String next : incValues) {
      if (isNotBlank(next)) {
        query.include(new Include(next));
        clientCodeJsonWriter.value(next);
      }
    }
  }
  clientCodeJsonWriter.endArray();
  clientCodeJsonWriter.name("String_Node_Str");
  clientCodeJsonWriter.beginArray();
  String[] revIncValues=theReq.getParameterValues(Constants.PARAM_REVINCLUDE);
  if (revIncValues != null) {
    for (    String next : revIncValues) {
      if (isNotBlank(next)) {
        query.revInclude(new Include(next));
        clientCodeJsonWriter.value(next);
      }
    }
  }
  clientCodeJsonWriter.endArray();
  String limit=theReq.getParameter("String_Node_Str");
  if (isNotBlank(limit)) {
    if (!limit.matches("String_Node_Str")) {
      theModel.put("String_Node_Str","String_Node_Str");
      return "String_Node_Str";
    }
    int limitInt=Integer.parseInt(limit);
    query.limitTo(limitInt);
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.value(limit);
  }
 else {
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.nullValue();
  }
  String[] sort=theReq.getParameterValues("String_Node_Str");
  if (sort != null) {
    for (    String next : sort) {
      if (isBlank(next)) {
        continue;
      }
      String direction=theReq.getParameter("String_Node_Str");
      if ("String_Node_Str".equals(direction)) {
        query.sort().ascending(new StringClientParam(next));
      }
 else       if ("String_Node_Str".equals(direction)) {
        query.sort().descending(new StringClientParam(next));
      }
 else {
        query.sort().defaultOrder(new StringClientParam(next));
      }
    }
  }
  if (client.getFhirContext().getVersion().getVersion() != FhirVersionEnum.DSTU1) {
    query.returnBundle(client.getFhirContext().getResourceDefinition("String_Node_Str").getImplementingClass());
  }
  long start=System.currentTimeMillis();
  ResultType returnsResource;
  try {
    ourLog.info(logPrefix(theModel) + "String_Node_Str");
    query.execute();
    returnsResource=ResultType.BUNDLE;
  }
 catch (  Exception e) {
    returnsResource=handleClientException(client,e,theModel);
  }
  long delay=System.currentTimeMillis() - start;
  processAndAddLastClientInvocation(client,returnsResource,theModel,delay,outcomeDescription,interceptor,theRequest);
  clientCodeJsonWriter.endObject();
  clientCodeJsonWriter.close();
  String clientCodeJson=clientCodeJsonStringWriter.toString();
  theModel.put("String_Node_Str",clientCodeJson);
  return "String_Node_Str";
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @RequestMapping(value={"String_Node_Str"}) public String actionSearch(HttpServletRequest theReq,HomeRequest theRequest,BindingResult theBindingResult,ModelMap theModel) throws IOException {
  addCommonParams(theReq,theRequest,theModel);
  StringWriter clientCodeJsonStringWriter=new StringWriter();
  JsonWriter clientCodeJsonWriter=new JsonWriter(clientCodeJsonStringWriter);
  clientCodeJsonWriter.beginObject();
  clientCodeJsonWriter.name("String_Node_Str");
  clientCodeJsonWriter.value("String_Node_Str");
  clientCodeJsonWriter.name("String_Node_Str");
  clientCodeJsonWriter.value((String)theModel.get("String_Node_Str"));
  CaptureInterceptor interceptor=new CaptureInterceptor();
  GenericClient client=theRequest.newClient(theReq,getContext(theRequest),myConfig,interceptor);
  IUntypedQuery search=client.search();
  IQuery query;
  if (isNotBlank(theReq.getParameter("String_Node_Str"))) {
    try {
      query=search.forResource((Class<? extends IBaseResource>)getResourceType(theRequest,theReq).getImplementingClass());
    }
 catch (    ServletException e) {
      theModel.put("String_Node_Str",e.toString());
      return "String_Node_Str";
    }
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.value(theReq.getParameter("String_Node_Str"));
  }
 else {
    query=search.forAllResources();
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.nullValue();
  }
  if (client.isPrettyPrint()) {
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.value("String_Node_Str");
  }
 else {
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.nullValue();
  }
  if (client.getEncoding() != null) {
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.value(client.getEncoding().getRequestContentType());
  }
 else {
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.nullValue();
  }
  String outcomeDescription="String_Node_Str";
  clientCodeJsonWriter.name("String_Node_Str");
  clientCodeJsonWriter.beginArray();
  int paramIdx=-1;
  while (true) {
    paramIdx++;
    String paramIdxString=Integer.toString(paramIdx);
    boolean shouldContinue=handleSearchParam(paramIdxString,theReq,query,clientCodeJsonWriter);
    if (!shouldContinue) {
      break;
    }
  }
  clientCodeJsonWriter.endArray();
  clientCodeJsonWriter.name("String_Node_Str");
  clientCodeJsonWriter.beginArray();
  String[] incValues=theReq.getParameterValues(Constants.PARAM_INCLUDE);
  if (incValues != null) {
    for (    String next : incValues) {
      if (isNotBlank(next)) {
        query.include(new Include(next));
        clientCodeJsonWriter.value(next);
      }
    }
  }
  clientCodeJsonWriter.endArray();
  clientCodeJsonWriter.name("String_Node_Str");
  clientCodeJsonWriter.beginArray();
  String[] revIncValues=theReq.getParameterValues(Constants.PARAM_REVINCLUDE);
  if (revIncValues != null) {
    for (    String next : revIncValues) {
      if (isNotBlank(next)) {
        query.revInclude(new Include(next));
        clientCodeJsonWriter.value(next);
      }
    }
  }
  clientCodeJsonWriter.endArray();
  String limit=theReq.getParameter("String_Node_Str");
  if (isNotBlank(limit)) {
    if (!limit.matches("String_Node_Str")) {
      theModel.put("String_Node_Str","String_Node_Str");
      return "String_Node_Str";
    }
    int limitInt=Integer.parseInt(limit);
    query.limitTo(limitInt);
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.value(limit);
  }
 else {
    clientCodeJsonWriter.name("String_Node_Str");
    clientCodeJsonWriter.nullValue();
  }
  String[] sort=theReq.getParameterValues("String_Node_Str");
  if (sort != null) {
    for (    String next : sort) {
      if (isBlank(next)) {
        continue;
      }
      String direction=theReq.getParameter("String_Node_Str");
      if ("String_Node_Str".equals(direction)) {
        query.sort().ascending(new StringClientParam(next));
      }
 else       if ("String_Node_Str".equals(direction)) {
        query.sort().descending(new StringClientParam(next));
      }
 else {
        query.sort().defaultOrder(new StringClientParam(next));
      }
    }
  }
  if (client.getFhirContext().getVersion().getVersion() != FhirVersionEnum.DSTU1) {
    query.returnBundle(client.getFhirContext().getResourceDefinition("String_Node_Str").getImplementingClass());
  }
  long start=System.currentTimeMillis();
  ResultType returnsResource;
  try {
    ourLog.info(logPrefix(theModel) + "String_Node_Str");
    query.execute();
    returnsResource=ResultType.BUNDLE;
  }
 catch (  Exception e) {
    returnsResource=handleClientException(client,e,theModel);
  }
  long delay=System.currentTimeMillis() - start;
  processAndAddLastClientInvocation(client,returnsResource,theModel,delay,outcomeDescription,interceptor,theRequest);
  clientCodeJsonWriter.endObject();
  clientCodeJsonWriter.close();
  String clientCodeJson=clientCodeJsonStringWriter.toString();
  theModel.put("String_Node_Str",clientCodeJson);
  return "String_Node_Str";
}