test_class.declarator: ROOT_CONTEXT_PATH = ""
test_class.modifier: private static final
test_class.original_string: private static final String ROOT_CONTEXT_PATH = "";
test_class.type: String
test_class.var_name: ROOT_CONTEXT_PATH
test_class.declarator: SUB_CONTEXT_PATH = "/foo"
test_class.modifier: private static final
test_class.original_string: private static final String SUB_CONTEXT_PATH = "/foo";
test_class.type: String
test_class.var_name: SUB_CONTEXT_PATH
test_class.declarator: matcher = new KeycloakCsrfRequestMatcher()
test_class.modifier: private
test_class.original_string: private KeycloakCsrfRequestMatcher matcher = new KeycloakCsrfRequestMatcher();
test_class.type: KeycloakCsrfRequestMatcher
test_class.var_name: matcher
test_class.declarator: request
test_class.modifier: private
test_class.original_string: private MockHttpServletRequest request;
test_class.type: MockHttpServletRequest
test_class.var_name: request
test_class.file: adapters/oidc/spring-security/src/test/java/org/keycloak/adapters/springsecurity/filter/KeycloakCsrfRequestMatcherTest.java
test_class.identifier: KeycloakCsrfRequestMatcherTest
test_case.body: @Test
      public void testMatchesMethodGet() throws Exception {
          request.setMethod(HttpMethod.GET.name());
          assertFalse(matcher.matches(request));
      }
test_case.class_method_signature: KeycloakCsrfRequestMatcherTest.testMatchesMethodGet()
test_case.full_signature: @Test public void testMatchesMethodGet()
test_case.identifier: testMatchesMethodGet
test_case.invocations: setMethod name assertFalse matches
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMatchesMethodGet()
focal_class.declarator: ALLOWED_ENDPOINTS = Arrays.asList(
              AdapterConstants.K_LOGOUT,
              AdapterConstants.K_PUSH_NOT_BEFORE,
              AdapterConstants.K_QUERY_BEARER_TOKEN,
              AdapterConstants.K_TEST_AVAILABLE
      )
focal_class.modifier: private static final
focal_class.original_string: private static final List<String> ALLOWED_ENDPOINTS = Arrays.asList(
              AdapterConstants.K_LOGOUT,
              AdapterConstants.K_PUSH_NOT_BEFORE,
              AdapterConstants.K_QUERY_BEARER_TOKEN,
              AdapterConstants.K_TEST_AVAILABLE
      );
focal_class.type: List<String>
focal_class.var_name: ALLOWED_ENDPOINTS
focal_class.declarator: allowedMethods = Pattern.compile("^(GET|HEAD|TRACE|OPTIONS)$")
focal_class.modifier: private
focal_class.original_string: private Pattern allowedMethods = Pattern.compile("^(GET|HEAD|TRACE|OPTIONS)$");
focal_class.type: Pattern
focal_class.var_name: allowedMethods
focal_class.declarator: allowedEndpoints = Pattern.compile(String.format("^\\/(%s)$", StringUtils.arrayToDelimitedString(ALLOWED_ENDPOINTS.toArray(), "|")))
focal_class.modifier: private
focal_class.original_string: private Pattern allowedEndpoints = Pattern.compile(String.format("^\\/(%s)$", StringUtils.arrayToDelimitedString(ALLOWED_ENDPOINTS.toArray(), "|")));
focal_class.type: Pattern
focal_class.var_name: allowedEndpoints
focal_class.file: adapters/oidc/spring-security/src/main/java/org/keycloak/adapters/springsecurity/filter/KeycloakCsrfRequestMatcher.java
focal_class.identifier: KeycloakCsrfRequestMatcher
focal_class.interfaces: implements RequestMatcher
focal_class.class_method_signature: KeycloakCsrfRequestMatcher.matches(HttpServletRequest request)
focal_class.full_signature: public boolean matches(HttpServletRequest request)
focal_class.identifier: matches
focal_class.modifiers: public
focal_class.parameters: (HttpServletRequest request)
focal_class.return: boolean
focal_class.signature: boolean matches(HttpServletRequest request)
focal_method.body: public boolean matches(HttpServletRequest request) {
          String uri = request.getRequestURI().replaceFirst(request.getContextPath(), "");
          return !allowedEndpoints.matcher(uri).matches() && !allowedMethods.matcher(request.getMethod()).matches();
      }
focal_method.class_method_signature: KeycloakCsrfRequestMatcher.matches(HttpServletRequest request)
focal_method.full_signature: public boolean matches(HttpServletRequest request)
focal_method.identifier: matches
focal_method.invocations: replaceFirst getRequestURI getContextPath matches matcher matches matcher getMethod
focal_method.modifiers: public
focal_method.parameters: (HttpServletRequest request)
focal_method.return: boolean
focal_method.signature: boolean matches(HttpServletRequest request)