Program: 99402
Project: 99402
Buggy source:
@SuppressWarnings("String_Node_Str") private <T extends Resource,R extends Resource>R save(String href,final T resource,Class<? extends R> returnType,QueryString qs){
  Assert.hasText(href,"String_Node_Str");
  Assert.notNull(resource,"String_Node_Str");
  Assert.notNull(returnType,"String_Node_Str");
  Assert.isInstanceOf(AbstractResource.class,resource);
  Assert.isTrue(!CollectionResource.class.isAssignableFrom(resource.getClass()),"String_Node_Str");
  SanitizedQuery sanitized=QuerySanitizer.sanitize(href,qs);
  href=sanitized.getHrefWithoutQuery();
  href=ensureFullyQualified(href);
  final AbstractResource abstractResource=(AbstractResource)resource;
  LinkedHashMap<String,Object> props=toMap(abstractResource,true);
  String bodyString=mapMarshaller.marshal(props);
  StringInputStream body=new StringInputStream(bodyString);
  long length=body.available();
  QueryString filteredQs=queryStringFilterProcessor.process(returnType,qs);
  Request request=new DefaultRequest(HttpMethod.POST,href,filteredQs,null,body,length);
  Response response=execute(request);
  Map<String,Object> responseBody=getBody(response);
  int httpStatus=response.getHttpStatus();
  if (ProviderAccountResult.class.isAssignableFrom(returnType) && (httpStatus == 200 || httpStatus == 201)) {
    if (httpStatus == 200) {
      responseBody.put("String_Node_Str",false);
    }
 else {
      responseBody.put("String_Node_Str",true);
    }
  }
  Map<String,?> returnResponseBody=filterResourceData(returnType,filteredQs,responseBody);
  if (Collections.isEmpty(responseBody)) {
    return null;
  }
  boolean emailVerification=resource instanceof EmailVerificationToken && returnType.equals(Account.class);
  if (emailVerification && isCachingEnabled()) {
    String accountHref=(String)responseBody.get(HREF_PROP_NAME);
    if (Strings.hasText(accountHref)) {
      Cache<String,?> cache=getCache(Account.class);
      cache.remove(accountHref);
    }
  }
  boolean doNotCache=(resource instanceof PasswordResetToken && PasswordResetToken.class.isAssignableFrom(returnType)) || emailVerification;
  if (isCacheUpdateEnabled(returnType) && !doNotCache) {
    if (Strings.hasText((String)returnResponseBody.get(HREF_PROP_NAME))) {
      if (!returnType.isAssignableFrom(ProviderAccountResult.class)) {
        cache(returnType,responseBody,filteredQs);
      }
    }
  }
  if (resource instanceof AbstractExtendableInstanceResource && isCacheUpdateEnabled(CustomData.class)) {
    cacheNestedCustomData(href,props);
  }
  if (isMaterialized(returnResponseBody)) {
    returnResponseBody=toEnlistment(returnResponseBody);
  }
  if (returnType.equals(abstractResource.getClass())) {
    abstractResource.setProperties((Map<String,Object>)returnResponseBody);
  }
  return resourceFactory.instantiate(returnType,returnResponseBody);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private <T extends Resource,R extends Resource>R save(String href,final T resource,Class<? extends R> returnType,QueryString qs){
  Assert.hasText(href,"String_Node_Str");
  Assert.notNull(resource,"String_Node_Str");
  Assert.notNull(returnType,"String_Node_Str");
  Assert.isInstanceOf(AbstractResource.class,resource);
  Assert.isTrue(!CollectionResource.class.isAssignableFrom(resource.getClass()),"String_Node_Str");
  SanitizedQuery sanitized=QuerySanitizer.sanitize(href,qs);
  qs=sanitized.getQuery();
  href=sanitized.getHrefWithoutQuery();
  href=ensureFullyQualified(href);
  final AbstractResource abstractResource=(AbstractResource)resource;
  LinkedHashMap<String,Object> props=toMap(abstractResource,true);
  String bodyString=mapMarshaller.marshal(props);
  StringInputStream body=new StringInputStream(bodyString);
  long length=body.available();
  QueryString filteredQs=queryStringFilterProcessor.process(returnType,qs);
  Request request=new DefaultRequest(HttpMethod.POST,href,filteredQs,null,body,length);
  Response response=execute(request);
  Map<String,Object> responseBody=getBody(response);
  int httpStatus=response.getHttpStatus();
  if (ProviderAccountResult.class.isAssignableFrom(returnType) && (httpStatus == 200 || httpStatus == 201)) {
    if (httpStatus == 200) {
      responseBody.put("String_Node_Str",false);
    }
 else {
      responseBody.put("String_Node_Str",true);
    }
  }
  Map<String,?> returnResponseBody=filterResourceData(returnType,filteredQs,responseBody);
  if (Collections.isEmpty(responseBody)) {
    return null;
  }
  boolean emailVerification=resource instanceof EmailVerificationToken && returnType.equals(Account.class);
  if (emailVerification && isCachingEnabled()) {
    String accountHref=(String)responseBody.get(HREF_PROP_NAME);
    if (Strings.hasText(accountHref)) {
      Cache<String,?> cache=getCache(Account.class);
      cache.remove(accountHref);
    }
  }
  boolean doNotCache=(resource instanceof PasswordResetToken && PasswordResetToken.class.isAssignableFrom(returnType)) || emailVerification;
  if (isCacheUpdateEnabled(returnType) && !doNotCache) {
    if (Strings.hasText((String)returnResponseBody.get(HREF_PROP_NAME))) {
      if (!returnType.isAssignableFrom(ProviderAccountResult.class)) {
        cache(returnType,responseBody,filteredQs);
      }
    }
  }
  if (resource instanceof AbstractExtendableInstanceResource && isCacheUpdateEnabled(CustomData.class)) {
    cacheNestedCustomData(href,props);
  }
  if (isMaterialized(returnResponseBody)) {
    returnResponseBody=toEnlistment(returnResponseBody);
  }
  if (returnType.equals(abstractResource.getClass())) {
    abstractResource.setProperties((Map<String,Object>)returnResponseBody);
  }
  return resourceFactory.instantiate(returnType,returnResponseBody);
}