Program: 64298
Project: 64298
Buggy source:
protected Response create(@SuppressWarnings("String_Node_Str") String version,String persistenceUnit,String type,HttpHeaders hh,UriInfo uriInfo,URI baseURI,InputStream in) throws JAXBException {
  PersistenceContext app=getPersistenceFactory().get(persistenceUnit,baseURI,null);
  if (app == null) {
    JPARSLogger.fine("String_Node_Str",new Object[]{persistenceUnit});
    return Response.status(Status.NOT_FOUND).build();
  }
  ClassDescriptor descriptor=app.getDescriptor(type);
  if (descriptor == null) {
    JPARSLogger.fine("String_Node_Str",new Object[]{type,persistenceUnit});
    return Response.status(Status.NOT_FOUND).build();
  }
  Object entity=null;
  try {
    entity=app.unmarshalEntity(type,mediaType(hh.getAcceptableMediaTypes()),in);
  }
 catch (  JAXBException e) {
    JPARSLogger.fine("String_Node_Str",new Object[]{type,persistenceUnit,e.toString()});
    return Response.status(Status.BAD_REQUEST).build();
  }
  AbstractDirectMapping sequenceMapping=descriptor.getObjectBuilder().getSequenceMapping();
  if (sequenceMapping != null) {
    Object value=sequenceMapping.getAttributeAccessor().getAttributeValueFromObject(entity);
    if (descriptor.getObjectBuilder().isPrimaryKeyComponentInvalid(value,descriptor.getPrimaryKeyFields().indexOf(descriptor.getSequenceNumberField())) || descriptor.getSequence().shouldAlwaysOverrideExistingValue()) {
      JPARSLogger.fine("String_Node_Str",new Object[]{type,persistenceUnit});
      return Response.status(Status.BAD_REQUEST).build();
    }
  }
  app.create(getMatrixParameters(uriInfo,persistenceUnit),entity);
  ResponseBuilder rb=Response.status(Status.CREATED);
  rb.entity(new StreamingOutputMarshaller(app,entity,hh.getAcceptableMediaTypes()));
  return rb.build();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected Response create(@SuppressWarnings("String_Node_Str") String version,String persistenceUnit,String type,HttpHeaders hh,UriInfo uriInfo,URI baseURI,InputStream in) throws JAXBException {
  PersistenceContext app=getPersistenceFactory().get(persistenceUnit,baseURI,null);
  if (app == null) {
    JPARSLogger.fine("String_Node_Str",new Object[]{persistenceUnit});
    return Response.status(Status.NOT_FOUND).build();
  }
  ClassDescriptor descriptor=app.getDescriptor(type);
  if (descriptor == null) {
    JPARSLogger.fine("String_Node_Str",new Object[]{type,persistenceUnit});
    return Response.status(Status.NOT_FOUND).build();
  }
  Object entity=null;
  try {
    entity=app.unmarshalEntity(type,mediaType(hh.getAcceptableMediaTypes()),in);
  }
 catch (  JAXBException e) {
    JPARSLogger.fine("String_Node_Str",new Object[]{type,persistenceUnit,e.toString()});
    return Response.status(Status.BAD_REQUEST).build();
  }
  AbstractDirectMapping sequenceMapping=descriptor.getObjectBuilder().getSequenceMapping();
  if (sequenceMapping != null) {
    Object value=sequenceMapping.getAttributeAccessor().getAttributeValueFromObject(entity);
    if (descriptor.getObjectBuilder().isPrimaryKeyComponentInvalid(value,descriptor.getPrimaryKeyFields().indexOf(descriptor.getSequenceNumberField())) || descriptor.getSequence().shouldAlwaysOverrideExistingValue()) {
      JPARSLogger.fine("String_Node_Str",new Object[]{type,persistenceUnit});
      return Response.status(Status.BAD_REQUEST).build();
    }
  }
  List<DatabaseMapping> mappings=descriptor.getMappings();
  if ((mappings != null) && (!mappings.isEmpty())) {
    for (    DatabaseMapping mapping : mappings) {
      if (mapping instanceof ForeignReferenceMapping) {
        ForeignReferenceMapping fkMapping=(ForeignReferenceMapping)mapping;
        if ((fkMapping.isCascadePersist()) || (fkMapping.isCascadeMerge())) {
          ClassDescriptor referenceDescriptor=fkMapping.getReferenceDescriptor();
          if (referenceDescriptor != null) {
            if (referenceDescriptor instanceof RelationalDescriptor) {
              RelationalDescriptor relDesc=(RelationalDescriptor)referenceDescriptor;
              AbstractDirectMapping relSequenceMapping=relDesc.getObjectBuilder().getSequenceMapping();
              if (relSequenceMapping != null) {
                Object value=mapping.getAttributeAccessor().getAttributeValueFromObject(entity);
                if (value != null) {
                  if (value instanceof ValueHolder) {
                    ValueHolder holder=(ValueHolder)value;
                    if (holder != null) {
                      Object obj=holder.getValue();
                      if (obj != null) {
                        JPARSLogger.fine("String_Node_Str",new Object[]{type,persistenceUnit});
                        return Response.status(Status.BAD_REQUEST).build();
                      }
                    }
                  }
 else                   if (value instanceof Collection) {
                    if (!(((Collection)value).isEmpty())) {
                      JPARSLogger.fine("String_Node_Str",new Object[]{type,persistenceUnit});
                      return Response.status(Status.BAD_REQUEST).build();
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  app.create(getMatrixParameters(uriInfo,persistenceUnit),entity);
  ResponseBuilder rb=Response.status(Status.CREATED);
  rb.entity(new StreamingOutputMarshaller(app,entity,hh.getAcceptableMediaTypes()));
  return rb.build();
}