test_class.declarator: contentType =
        new MediaType(
            MediaType.APPLICATION_JSON.getType(),
            MediaType.APPLICATION_JSON.getSubtype(),
            Charset.forName("utf8"))
test_class.modifier: private
test_class.original_string: private MediaType contentType =
        new MediaType(
            MediaType.APPLICATION_JSON.getType(),
            MediaType.APPLICATION_JSON.getSubtype(),
            Charset.forName("utf8"));
test_class.type: MediaType
test_class.var_name: contentType
test_class.declarator: mockMvc
test_class.modifier: private
test_class.original_string: private MockMvc mockMvc;
test_class.type: MockMvc
test_class.var_name: mockMvc
test_class.declarator: mappingJackson2HttpMessageConverter
test_class.modifier: private
test_class.original_string: private HttpMessageConverter<?> mappingJackson2HttpMessageConverter;
test_class.type: HttpMessageConverter<?>
test_class.var_name: mappingJackson2HttpMessageConverter
test_class.declarator: TEST_DEFAULT_SPACE = "public"
test_class.modifier: public static final
test_class.original_string: public static final String TEST_DEFAULT_SPACE = "public";
test_class.type: String
test_class.var_name: TEST_DEFAULT_SPACE
test_class.declarator: TEST_DEFAULT_TENANT = "default"
test_class.modifier: public static final
test_class.original_string: public static final String TEST_DEFAULT_TENANT = "default";
test_class.type: String
test_class.var_name: TEST_DEFAULT_TENANT
test_class.declarator: spaceRepository
test_class.modifier: @Autowired private
test_class.original_string: @Autowired private SpaceRepository spaceRepository;
test_class.type: SpaceRepository
test_class.var_name: spaceRepository
test_class.declarator: tenantRepository
test_class.modifier: @Autowired private
test_class.original_string: @Autowired private TenantRepository tenantRepository;
test_class.type: TenantRepository
test_class.var_name: tenantRepository
test_class.declarator: webApplicationContext
test_class.modifier: @Autowired private
test_class.original_string: @Autowired private WebApplicationContext webApplicationContext;
test_class.type: WebApplicationContext
test_class.var_name: webApplicationContext
test_class.file: rest-backend/src/test/java/org/eclipse/steady/backend/rest/SpaceControllerTest.java
test_class.identifier: SpaceControllerTest
test_case.body: @Test
    public void testSearchSpaces() throws Exception {
      assertEquals(0, this.spaceRepository.count());
      final Tenant d_tenant = this.createDefaultTenant();
      final Space d_space = this.createSpace(d_tenant, TEST_DEFAULT_SPACE, true);
      assertEquals(1, this.spaceRepository.count());
  
      final String space_name = "foo";
      org.eclipse.steady.shared.json.model.Space new_shared_space =
          new org.eclipse.steady.shared.json.model.Space();
      new_shared_space.setSpaceName("foo");
      new_shared_space.setExportConfiguration(ExportConfiguration.OFF);
      new_shared_space.setSpaceDescription("bar");
      new_shared_space.setOwnerEmails(
          new HashSet<String>(Arrays.asList(new String[] {"foo@bar.com"})));
      final List<org.eclipse.steady.shared.json.model.Property> props =
          new ArrayList<org.eclipse.steady.shared.json.model.Property>();
      props.add(
          new org.eclipse.steady.shared.json.model.Property(
              PropertySource.USER, "propName", "propValue"));
      new_shared_space.setProperties(props);
  
      // Post w tenant header (should create a NON default space as it's not provided)
      MockHttpServletRequestBuilder post_builder =
          post("/spaces")
              .content(JacksonUtil.asJsonString(new_shared_space))
              .contentType(MediaType.APPLICATION_JSON)
              .header(Constants.HTTP_TENANT_HEADER, d_tenant.getTenantToken())
              .accept(MediaType.APPLICATION_JSON);
      MvcResult result =
          mockMvc
              .perform(post_builder)
              .andExpect(status().isCreated())
              .andExpect(content().contentType(contentType))
              .andExpect(jsonPath("$.default", is(false)))
              .andExpect(jsonPath("$.spaceName", is(space_name)))
              .andReturn();
  
      // Create another one (private)
      new_shared_space.setPublic(false);
      post_builder =
          post("/spaces")
              .content(JacksonUtil.asJsonString(new_shared_space))
              .contentType(MediaType.APPLICATION_JSON)
              .header(Constants.HTTP_TENANT_HEADER, d_tenant.getTenantToken())
              .accept(MediaType.APPLICATION_JSON);
      result =
          mockMvc
              .perform(post_builder)
              .andExpect(status().isCreated())
              .andExpect(content().contentType(contentType))
              .andExpect(jsonPath("$.default", is(false)))
              .andExpect(jsonPath("$.spaceName", is(space_name)))
              .andReturn();
  
      assertEquals(3, this.spaceRepository.count());
  
      // Search : 0 hits
      MockHttpServletRequestBuilder search_builder =
          get("/spaces/search")
              .param("propertyName", "propName")
              .param("value", "xyz", "abc")
              .header(Constants.HTTP_TENANT_HEADER, d_tenant.getTenantToken())
              .accept(MediaType.APPLICATION_JSON);
      result = mockMvc.perform(search_builder).andExpect(status().isOk()).andReturn();
  
      org.eclipse.steady.shared.json.model.Space[] search_result =
          (org.eclipse.steady.shared.json.model.Space[])
              JacksonUtil.asObject(
                  result.getResponse().getContentAsString(),
                  org.eclipse.steady.shared.json.model.Space[].class);
      assertEquals(0, search_result.length);
  
      // Search : 1 hit
      search_builder =
          get("/spaces/search")
              .param("propertyName", "propName")
              .param("value", "xyz", "abc", "propValue")
              .header(Constants.HTTP_TENANT_HEADER, d_tenant.getTenantToken())
              .accept(MediaType.APPLICATION_JSON);
      result = mockMvc.perform(search_builder).andExpect(status().isOk()).andReturn();
  
      search_result =
          (org.eclipse.steady.shared.json.model.Space[])
              JacksonUtil.asObject(
                  result.getResponse().getContentAsString(),
                  org.eclipse.steady.shared.json.model.Space[].class);
      assertEquals(
          1,
          search_result.length); // Should be one public space, the private one shall not be returned
  
      // Bad reqeust due to lack of search term
      search_builder =
          get("/spaces/search")
              .param("propertyName", "propName")
              .header(Constants.HTTP_TENANT_HEADER, d_tenant.getTenantToken())
              .accept(MediaType.APPLICATION_JSON);
      mockMvc.perform(search_builder).andExpect(status().isBadRequest());
    }
test_case.class_method_signature: SpaceControllerTest.testSearchSpaces()
test_case.full_signature: @Test public void testSearchSpaces()
test_case.identifier: testSearchSpaces
test_case.invocations: assertEquals count createDefaultTenant createSpace assertEquals count setSpaceName setExportConfiguration setSpaceDescription setOwnerEmails asList add setProperties accept header contentType content post asJsonString getTenantToken andReturn andExpect andExpect andExpect andExpect perform isCreated status contentType content jsonPath is jsonPath is setPublic accept header contentType content post asJsonString getTenantToken andReturn andExpect andExpect andExpect andExpect perform isCreated status contentType content jsonPath is jsonPath is assertEquals count accept header param param get getTenantToken andReturn andExpect perform isOk status asObject getContentAsString getResponse assertEquals accept header param param get getTenantToken andReturn andExpect perform isOk status asObject getContentAsString getResponse assertEquals accept header param get getTenantToken andExpect perform isBadRequest status
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSearchSpaces()
focal_class.declarator: log = LoggerFactory.getLogger(SpaceController.class)
focal_class.modifier: private static
focal_class.original_string: private static Logger log = LoggerFactory.getLogger(SpaceController.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: SPACE_DO_NOT_DELETE = "vulas.backend.space.doNotDelete"
focal_class.modifier: private static
focal_class.original_string: private static String SPACE_DO_NOT_DELETE = "vulas.backend.space.doNotDelete";
focal_class.type: String
focal_class.var_name: SPACE_DO_NOT_DELETE
focal_class.declarator: SPACE_DO_NOT_CLEAN = "vulas.backend.space.doNotClean"
focal_class.modifier: private static
focal_class.original_string: private static String SPACE_DO_NOT_CLEAN = "vulas.backend.space.doNotClean";
focal_class.type: String
focal_class.var_name: SPACE_DO_NOT_CLEAN
focal_class.declarator: SPACE_DO_NOT_MODIFY = "vulas.backend.space.doNotModify"
focal_class.modifier: private static
focal_class.original_string: private static String SPACE_DO_NOT_MODIFY = "vulas.backend.space.doNotModify";
focal_class.type: String
focal_class.var_name: SPACE_DO_NOT_MODIFY
focal_class.declarator: spaceRepository
focal_class.modifier: private
focal_class.original_string: private SpaceRepository spaceRepository;
focal_class.type: SpaceRepository
focal_class.var_name: spaceRepository
focal_class.declarator: tenantRepository
focal_class.modifier: private
focal_class.original_string: private TenantRepository tenantRepository;
focal_class.type: TenantRepository
focal_class.var_name: tenantRepository
focal_class.declarator: appRepository
focal_class.modifier: private
focal_class.original_string: private ApplicationRepository appRepository;
focal_class.type: ApplicationRepository
focal_class.var_name: appRepository
focal_class.declarator: appExporter
focal_class.modifier: private final
focal_class.original_string: private final ApplicationExporter appExporter;
focal_class.type: ApplicationExporter
focal_class.var_name: appExporter
focal_class.declarator: cacheFilter
focal_class.modifier: private final
focal_class.original_string: private final Filter cacheFilter;
focal_class.type: Filter
focal_class.var_name: cacheFilter
focal_class.file: rest-backend/src/main/java/org/eclipse/steady/backend/rest/SpaceController.java
focal_class.identifier: SpaceController
focal_class.class_method_signature: SpaceController.SpaceController(
        TenantRepository tenantRepository,
        SpaceRepository spaceRepository,
        ApplicationRepository appRepository,
        ApplicationExporter appExporter,
        Filter cacheFilter)
focal_class.full_signature: @Autowired  SpaceController(
        TenantRepository tenantRepository,
        SpaceRepository spaceRepository,
        ApplicationRepository appRepository,
        ApplicationExporter appExporter,
        Filter cacheFilter)
focal_class.identifier: SpaceController
focal_class.modifiers: @Autowired
focal_class.parameters: (
        TenantRepository tenantRepository,
        SpaceRepository spaceRepository,
        ApplicationRepository appRepository,
        ApplicationExporter appExporter,
        Filter cacheFilter)
focal_class.signature:  SpaceController(
        TenantRepository tenantRepository,
        SpaceRepository spaceRepository,
        ApplicationRepository appRepository,
        ApplicationExporter appExporter,
        Filter cacheFilter)
focal_class.class_method_signature: SpaceController.getAllSpaces(
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.full_signature: @RequestMapping( value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public ResponseEntity<Collection<Space>> getAllSpaces(
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.identifier: getAllSpaces
focal_class.modifiers: @RequestMapping( value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public
focal_class.parameters: (
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.return: ResponseEntity<Collection<Space>>
focal_class.signature: ResponseEntity<Collection<Space>> getAllSpaces(
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.class_method_signature: SpaceController.getDefaultSpace(
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.full_signature: @RequestMapping( value = "default", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public ResponseEntity<Space> getDefaultSpace(
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.identifier: getDefaultSpace
focal_class.modifiers: @RequestMapping( value = "default", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public
focal_class.parameters: (
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.return: ResponseEntity<Space>
focal_class.signature: ResponseEntity<Space> getDefaultSpace(
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.class_method_signature: SpaceController.searchSpaces(
        @RequestParam(value = "propertyName", required = true) String propertyName,
        @RequestParam(value = "mode", required = false, defaultValue = "EQUALS") ComparisonMode mode,
        @RequestParam(value = "caseSensitivity", required = false, defaultValue = "CASE_SENSITIVE")
            CaseSensitivity caseSensitivity,
        @RequestParam(value = "value", required = true) String[] value,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.full_signature: @RequestMapping( value = "search", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public ResponseEntity<List<Space>> searchSpaces(
        @RequestParam(value = "propertyName", required = true) String propertyName,
        @RequestParam(value = "mode", required = false, defaultValue = "EQUALS") ComparisonMode mode,
        @RequestParam(value = "caseSensitivity", required = false, defaultValue = "CASE_SENSITIVE")
            CaseSensitivity caseSensitivity,
        @RequestParam(value = "value", required = true) String[] value,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.identifier: searchSpaces
focal_class.modifiers: @RequestMapping( value = "search", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public
focal_class.parameters: (
        @RequestParam(value = "propertyName", required = true) String propertyName,
        @RequestParam(value = "mode", required = false, defaultValue = "EQUALS") ComparisonMode mode,
        @RequestParam(value = "caseSensitivity", required = false, defaultValue = "CASE_SENSITIVE")
            CaseSensitivity caseSensitivity,
        @RequestParam(value = "value", required = true) String[] value,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.return: ResponseEntity<List<Space>>
focal_class.signature: ResponseEntity<List<Space>> searchSpaces(
        @RequestParam(value = "propertyName", required = true) String propertyName,
        @RequestParam(value = "mode", required = false, defaultValue = "EQUALS") ComparisonMode mode,
        @RequestParam(value = "caseSensitivity", required = false, defaultValue = "CASE_SENSITIVE")
            CaseSensitivity caseSensitivity,
        @RequestParam(value = "value", required = true) String[] value,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.class_method_signature: SpaceController.isSpaceExisting(
        @PathVariable String token,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.full_signature: @RequestMapping(value = "/{token:.+}", method = RequestMethod.OPTIONS) public ResponseEntity<Space> isSpaceExisting(
        @PathVariable String token,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.identifier: isSpaceExisting
focal_class.modifiers: @RequestMapping(value = "/{token:.+}", method = RequestMethod.OPTIONS) public
focal_class.parameters: (
        @PathVariable String token,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.return: ResponseEntity<Space>
focal_class.signature: ResponseEntity<Space> isSpaceExisting(
        @PathVariable String token,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.class_method_signature: SpaceController.getSpace(
        @PathVariable String token,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.full_signature: @RequestMapping(value = "/{token:.+}", method = RequestMethod.GET) public ResponseEntity<Space> getSpace(
        @PathVariable String token,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.identifier: getSpace
focal_class.modifiers: @RequestMapping(value = "/{token:.+}", method = RequestMethod.GET) public
focal_class.parameters: (
        @PathVariable String token,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.return: ResponseEntity<Space>
focal_class.signature: ResponseEntity<Space> getSpace(
        @PathVariable String token,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.class_method_signature: SpaceController.createSpace(
        @RequestBody Space space,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.full_signature: @RequestMapping( value = "", method = RequestMethod.POST, consumes = {"application/json;charset=UTF-8"}, produces = {"application/json;charset=UTF-8"}) public ResponseEntity<Space> createSpace(
        @RequestBody Space space,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.identifier: createSpace
focal_class.modifiers: @RequestMapping( value = "", method = RequestMethod.POST, consumes = {"application/json;charset=UTF-8"}, produces = {"application/json;charset=UTF-8"}) public
focal_class.parameters: (
        @RequestBody Space space,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.return: ResponseEntity<Space>
focal_class.signature: ResponseEntity<Space> createSpace(
        @RequestBody Space space,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.class_method_signature: SpaceController.modifySpace(
        @PathVariable String token,
        @RequestBody Space new_space,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.full_signature: @RequestMapping( value = "/{token:.+}", method = RequestMethod.PUT, consumes = {"application/json;charset=UTF-8"}, produces = {"application/json;charset=UTF-8"}) public ResponseEntity<Space> modifySpace(
        @PathVariable String token,
        @RequestBody Space new_space,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.identifier: modifySpace
focal_class.modifiers: @RequestMapping( value = "/{token:.+}", method = RequestMethod.PUT, consumes = {"application/json;charset=UTF-8"}, produces = {"application/json;charset=UTF-8"}) public
focal_class.parameters: (
        @PathVariable String token,
        @RequestBody Space new_space,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.return: ResponseEntity<Space>
focal_class.signature: ResponseEntity<Space> modifySpace(
        @PathVariable String token,
        @RequestBody Space new_space,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.class_method_signature: SpaceController.cleanSpace(
        @PathVariable String token,
        @RequestParam(value = "clean", required = true) Boolean clean,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.full_signature: @RequestMapping(value = "/{token:.+}", method = RequestMethod.POST) public ResponseEntity<Space> cleanSpace(
        @PathVariable String token,
        @RequestParam(value = "clean", required = true) Boolean clean,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.identifier: cleanSpace
focal_class.modifiers: @RequestMapping(value = "/{token:.+}", method = RequestMethod.POST) public
focal_class.parameters: (
        @PathVariable String token,
        @RequestParam(value = "clean", required = true) Boolean clean,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.return: ResponseEntity<Space>
focal_class.signature: ResponseEntity<Space> cleanSpace(
        @PathVariable String token,
        @RequestParam(value = "clean", required = true) Boolean clean,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.class_method_signature: SpaceController.deleteSpace(
        @PathVariable String token,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.full_signature: @RequestMapping(value = "/{token:.+}", method = RequestMethod.DELETE) public ResponseEntity<Space> deleteSpace(
        @PathVariable String token,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.identifier: deleteSpace
focal_class.modifiers: @RequestMapping(value = "/{token:.+}", method = RequestMethod.DELETE) public
focal_class.parameters: (
        @PathVariable String token,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.return: ResponseEntity<Space>
focal_class.signature: ResponseEntity<Space> deleteSpace(
        @PathVariable String token,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_class.class_method_signature: SpaceController.getApplications(
        @PathVariable String token,
        @RequestParam(value = "includeSpaceProperties", required = false, defaultValue = "")
            final String[] includeSpaceProperties,
        @RequestParam(value = "includeGoalConfiguration", required = false, defaultValue = "")
            final String[] includeGoalConfiguration,
        @RequestParam(value = "includeGoalSystemInfo", required = false, defaultValue = "")
            final String[] includeGoalSystemInfo,
        @RequestParam(value = "includeBugs", required = false, defaultValue = "false")
            final String includeBugs,
        @RequestParam(value = "includeExemptions", required = false, defaultValue = "false")
            final String includeExemptions,
        @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false) final String tenant,
        HttpServletRequest request,
        HttpServletResponse response)
focal_class.full_signature: @RequestMapping(value = "/{token:.+}/apps", method = RequestMethod.GET) public void getApplications(
        @PathVariable String token,
        @RequestParam(value = "includeSpaceProperties", required = false, defaultValue = "")
            final String[] includeSpaceProperties,
        @RequestParam(value = "includeGoalConfiguration", required = false, defaultValue = "")
            final String[] includeGoalConfiguration,
        @RequestParam(value = "includeGoalSystemInfo", required = false, defaultValue = "")
            final String[] includeGoalSystemInfo,
        @RequestParam(value = "includeBugs", required = false, defaultValue = "false")
            final String includeBugs,
        @RequestParam(value = "includeExemptions", required = false, defaultValue = "false")
            final String includeExemptions,
        @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false) final String tenant,
        HttpServletRequest request,
        HttpServletResponse response)
focal_class.identifier: getApplications
focal_class.modifiers: @RequestMapping(value = "/{token:.+}/apps", method = RequestMethod.GET) public
focal_class.parameters: (
        @PathVariable String token,
        @RequestParam(value = "includeSpaceProperties", required = false, defaultValue = "")
            final String[] includeSpaceProperties,
        @RequestParam(value = "includeGoalConfiguration", required = false, defaultValue = "")
            final String[] includeGoalConfiguration,
        @RequestParam(value = "includeGoalSystemInfo", required = false, defaultValue = "")
            final String[] includeGoalSystemInfo,
        @RequestParam(value = "includeBugs", required = false, defaultValue = "false")
            final String includeBugs,
        @RequestParam(value = "includeExemptions", required = false, defaultValue = "false")
            final String includeExemptions,
        @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false) final String tenant,
        HttpServletRequest request,
        HttpServletResponse response)
focal_class.return: void
focal_class.signature: void getApplications(
        @PathVariable String token,
        @RequestParam(value = "includeSpaceProperties", required = false, defaultValue = "")
            final String[] includeSpaceProperties,
        @RequestParam(value = "includeGoalConfiguration", required = false, defaultValue = "")
            final String[] includeGoalConfiguration,
        @RequestParam(value = "includeGoalSystemInfo", required = false, defaultValue = "")
            final String[] includeGoalSystemInfo,
        @RequestParam(value = "includeBugs", required = false, defaultValue = "false")
            final String includeBugs,
        @RequestParam(value = "includeExemptions", required = false, defaultValue = "false")
            final String includeExemptions,
        @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false) final String tenant,
        HttpServletRequest request,
        HttpServletResponse response)
focal_method.body: @RequestMapping(
        value = "search",
        method = RequestMethod.GET,
        produces = {"application/json;charset=UTF-8"})
    public ResponseEntity<List<Space>> searchSpaces(
        @RequestParam(value = "propertyName", required = true) String propertyName,
        @RequestParam(value = "mode", required = false, defaultValue = "EQUALS") ComparisonMode mode,
        @RequestParam(value = "caseSensitivity", required = false, defaultValue = "CASE_SENSITIVE")
            CaseSensitivity caseSensitivity,
        @RequestParam(value = "value", required = true) String[] value,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant) {
  
      // Check whether tenant exists or retrieve default
      Tenant t = null;
      try {
        t = this.tenantRepository.getTenant(tenant);
      } catch (Exception e) {
        log.error("Error retrieving tenant: " + e);
        return new ResponseEntity<List<Space>>(HttpStatus.NOT_FOUND);
      }
      try {
        final StringList filter = new StringList();
        filter.addAll(value);
  
        final List<Space> matching_spaces = new ArrayList<Space>();
  
        // Loop over all spaces and compare the value of the given property
        final List<Space> spaces = this.spaceRepository.findAllTenantSpaces(t.getTenantToken());
        for (Space s : spaces) {
          final String p = s.getPropertyValue(propertyName);
          if (p != null && s.isPublic() && filter.contains(p, mode, caseSensitivity))
            matching_spaces.add(s);
        }
        return new ResponseEntity<List<Space>>(matching_spaces, HttpStatus.OK);
      } catch (EntityNotFoundException enfe) {
        return new ResponseEntity<List<Space>>(HttpStatus.NOT_FOUND);
      }
    }
focal_method.class_method_signature: SpaceController.searchSpaces(
        @RequestParam(value = "propertyName", required = true) String propertyName,
        @RequestParam(value = "mode", required = false, defaultValue = "EQUALS") ComparisonMode mode,
        @RequestParam(value = "caseSensitivity", required = false, defaultValue = "CASE_SENSITIVE")
            CaseSensitivity caseSensitivity,
        @RequestParam(value = "value", required = true) String[] value,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_method.full_signature: @RequestMapping( value = "search", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public ResponseEntity<List<Space>> searchSpaces(
        @RequestParam(value = "propertyName", required = true) String propertyName,
        @RequestParam(value = "mode", required = false, defaultValue = "EQUALS") ComparisonMode mode,
        @RequestParam(value = "caseSensitivity", required = false, defaultValue = "CASE_SENSITIVE")
            CaseSensitivity caseSensitivity,
        @RequestParam(value = "value", required = true) String[] value,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_method.identifier: searchSpaces
focal_method.invocations: getTenant error addAll findAllTenantSpaces getTenantToken getPropertyValue isPublic contains add
focal_method.modifiers: @RequestMapping( value = "search", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public
focal_method.parameters: (
        @RequestParam(value = "propertyName", required = true) String propertyName,
        @RequestParam(value = "mode", required = false, defaultValue = "EQUALS") ComparisonMode mode,
        @RequestParam(value = "caseSensitivity", required = false, defaultValue = "CASE_SENSITIVE")
            CaseSensitivity caseSensitivity,
        @RequestParam(value = "value", required = true) String[] value,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)
focal_method.return: ResponseEntity<List<Space>>
focal_method.signature: ResponseEntity<List<Space>> searchSpaces(
        @RequestParam(value = "propertyName", required = true) String propertyName,
        @RequestParam(value = "mode", required = false, defaultValue = "EQUALS") ComparisonMode mode,
        @RequestParam(value = "caseSensitivity", required = false, defaultValue = "CASE_SENSITIVE")
            CaseSensitivity caseSensitivity,
        @RequestParam(value = "value", required = true) String[] value,
        @ApiIgnore @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false)
            String tenant)