Buggy code:
) @ Path ( "//{id}" ) @ CheckPermission ( roles = { Role . SYSTEM_MONITOR , Role . TENANT_ADMIN } , acls = { ACL . ANY } ) public ProjectRestRep getProject ( @ PathParam ( "id" ) URI id ) { } @ Override protected Project queryResource ( URI id ) { } @ Override protected URI getTenantOwner ( URI id ) { } @ PUT @ Consumes ( { MediaType . APPLICATION_XML , MediaType . APPLICATION_JSON } ) @ Produces ( { MediaType . APPLICATION_XML , MediaType . APPLICATION_JSON } ) @ Path ( "//{id}" ) @ CheckPermission ( roles = { Role . TENANT_ADMIN } , acls = { ACL . OWN } ) public Response updateProject ( @ PathParam ( "id" ) URI id , ProjectUpdateParam projectUpdate ) { } @ SuppressWarnings ( "unchecked" ) @ GET @ Produces ( { MediaType . APPLICATION_XML , MediaType . APPLICATION_JSON } ) @ Path ( "//{id}//resources" ) @ CheckPermission ( roles = { Role . SYSTEM_MONITOR , Role . TENANT_ADMIN } , acls = { ACL . ANY } ) public ResourceList getResourceList ( @ PathParam ( "id" ) URI id ) { } @ POST @ Produces ( { MediaType . APPLICATION_XML , MediaType . APPLICATION_JSON } ) @ Path ( "//{id}//deactivate" ) @ CheckPermission ( roles = { Role . TENANT_ADMIN } , acls = { ACL . OWN } ) public Response deactivateProject ( @ PathParam ( "id" ) URI id ) { } public class ProjectACLFilter extends ACLInputFilter { private final TenantOrg _tenant ; private List < String > _groups ; private List < String > _users ; public ProjectACLFilter ( TenantOrg tenant ) { } @ Override public PermissionsKey getPermissionKeyForEntry ( ACLEntry entry ) throws SecurityException { } @ Override public boolean isValidACL ( String ace ) { } @ Override public void validate ( ) { } @ Override protected void addPrincipalToList ( PermissionsKey key ) { } @ Override protected void initLists ( ) { } } @ GET @ Path ( "//{id}//acl" ) @ Produces ( { MediaType . APPLICATION_XML , MediaType . APPLICATION_JSON } ) @ CheckPermission ( roles = { Role . SECURITY_ADMIN , Role . TENANT_ADMIN } , acls = { ACL . OWN } ) public ACLAssignments getRoleAssignments ( @ PathParam ( "id" ) URI id ) { } @ PUT @ Path ( "//{id}//acl" ) @ Consumes ( { MediaType . APPLICATION_XML , MediaType . APPLICATION_JSON } ) @ CheckPermission ( roles = { Role . SECURITY_ADMIN , Role . TENANT_ADMIN } , acls = { ACL . OWN } , blockProxies = true ) public ACLAssignments updateRoleAssignments ( @ PathParam ( "id" ) URI id , ACLAssignmentChanges changes ) { } private ACLAssignments getRoleAssignmentsResponse ( URI id ) { } @ POST @ Path ( "//bulk" ) @ Consumes ( { MediaType . APPLICATION_XML , MediaType . APPLICATION_JSON } ) @ Produces ( { MediaType . APPLICATION_XML , MediaType . APPLICATION_JSON } ) @ Override public ProjectBulkRep getBulkResources ( BulkIdParam param ) { } @ GET @ Produces ( { MediaType . APPLICATION_XML , MediaType . APPLICATION_JSON } ) @ CheckPermission ( roles = { Role . SYSTEM_MONITOR , Role . TENANT_ADMIN } ) @ Path ( "//{id}//quota" ) public QuotaInfo getQuota ( @ PathParam ( "id" ) URI id ) throws DatabaseException { } @ PUT @ Produces ( { MediaType . APPLICATION_XML , MediaType . APPLICATION_JSON } ) @ Consumes ( { MediaType . APPLICATION_XML , MediaType . APPLICATION_JSON } ) @ CheckPermission ( roles = { Role . TENANT_ADMIN } ) @ Path ( "//{id}//quota" ) public QuotaInfo updateQuota ( @ PathParam ( "id" ) URI id , QuotaUpdateParam param ) throws DatabaseException { } private QuotaInfo getQuota ( Project project ) { } private Project getProjectById ( URI id , boolean checkInactive ) { } public void recordProjectEvent ( Project project , OperationTypeEnum opType , Boolean opStatus ) { } public void recordOperation ( OperationTypeEnum opType , boolean opStatus , Project project ) { } @ SuppressWarnings ( "unchecked" ) @ Override public Class < Project > getResourceClass ( ) { } @ Override public ProjectBulkRep queryBulkResourceReps ( List < URI > ids ) { } @ Override protected ProjectBulkRep queryFilteredBulkResourceReps ( List < URI > ids ) { } @ Override protected boolean isZoneLevelResource ( ) { } @ Override protected ResourceTypeEnum getResourceType ( ) { } public static class ProjectResRepFilter < E extends RelatedResourceRep > extends ResRepFilter < E > { public ProjectResRepFilter ( StorageOSUser user , PermissionsHelper permissionsHelper ) { } @ Override public boolean isAccessible ( E resrep ) { } } @ Override public ResRepFilter < ? extends RelatedResourceRep > getPermissionFilter ( StorageOSUser user , PermissionsHelper permissionsHelper ) { } @ PUT @ Consumes ( { MediaType . APPLICATION_XML , MediaType . APPLICATION_JSON } ) @ Produces ( { MediaType . APPLICATION_XML , MediaType . APPLICATION_JSON } ) @ Path ( "//{id}//assign-vnas-servers" ) @ CheckPermission ( roles = { Role . SYSTEM_ADMIN } , acls = { ACL . ALL , ACL . OWN } ) public Response assignVNASServerToProject ( @ PathParam ( "id" ) URI id , AssignVNASParam vnasParam ) { } public StringSet validateVNASServers ( Project project , AssignVNASParam param ) { Set < String > vNasId = param . getVnasServers ( ) ; StringSet validNas = new StringSet ( ) ; if ( ( vNasId != null ) && ( ! ( vNasId . isEmpty ( ) ) ) ) { for ( String id : vNasId ) { URI vnasURI = URI . create ( id ) ; VirtualNAS vnas = _permissionsHelper . getObjectById ( vnasURI , VirtualNAS . class ) ; if ( ( ( vnas . getTaggedVirtualArrays ( ) ) != null ) && ( ! ( vnas . getTaggedVirtualArrays ( ) . isEmpty ( ) ) ) ) { <START_BUG> if ( ( ( vnas . getProject ( ) ) == null ) && ( vnas . getVNasState ( ) . equalsIgnoreCase ( Loaded . name ( ) ) ) ) { <END_BUG> validNas . add ( id ) ; vnas . setProject ( project . getId ( ) ) ; _dbClient . persistObject ( vnas ) ; ProjectService . _log . info ( "VNAS<seq2seq4repair_space>server<seq2seq4repair_space>{}<seq2seq4repair_space>successfully<seq2seq4repair_space>assigned<seq2seq4repair_space>to<seq2seq4repair_space>project<seq2seq4repair_space>{}<seq2seq4repair_space>" , vnas . getLabel ( ) , project . getLabel ( ) ) ;

Fix:
if ( ( ( vnas . getProject ( ) ) == null ) && ( vnas . getVNasState ( ) . equalsIgnoreCase ( LOADED . name ( ) ) ) ) {