test_class.declarator: ctx = UserContext.getInstance()
test_class.modifier: private final
test_class.original_string: private final Context ctx = UserContext.getInstance();
test_class.type: Context
test_class.var_name: ctx
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/UserContextTest.java
test_class.identifier: UserContextTest
test_class.interfaces: implements UserConstants
test_case.body: @Test
      public void testNonExistingTreeDefinesLocation() {
          for (String ntName : NT_NAMES) {
              Tree t = mockTree("anyName", ntName);
              TreeLocation location = Mockito.mock(TreeLocation.class);
              when(location.getTree()).thenReturn(t);
              when(location.exists()).thenReturn(false);
              when(location.getPath()).thenReturn("/somePath");
  
              assertFalse(ctx.definesLocation(location));
          }
      }
test_case.class_method_signature: UserContextTest.testNonExistingTreeDefinesLocation()
test_case.full_signature: @Test public void testNonExistingTreeDefinesLocation()
test_case.identifier: testNonExistingTreeDefinesLocation
test_case.invocations: mockTree mock thenReturn when getTree thenReturn when exists thenReturn when getPath assertFalse definesLocation
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNonExistingTreeDefinesLocation()
focal_class.declarator: INSTANCE = new UserContext()
focal_class.modifier: private static final
focal_class.original_string: private static final Context INSTANCE = new UserContext();
focal_class.type: Context
focal_class.var_name: INSTANCE
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserContext.java
focal_class.identifier: UserContext
focal_class.interfaces: implements Context, UserConstants
focal_class.class_method_signature: UserContext.UserContext()
focal_class.full_signature: private  UserContext()
focal_class.identifier: UserContext
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  UserContext()
focal_class.class_method_signature: UserContext.getInstance()
focal_class.full_signature: static Context getInstance()
focal_class.identifier: getInstance
focal_class.modifiers: static
focal_class.parameters: ()
focal_class.return: Context
focal_class.signature: Context getInstance()
focal_class.class_method_signature: UserContext.definesProperty(@NotNull Tree parent, @NotNull PropertyState property)
focal_class.full_signature: @Override public boolean definesProperty(@NotNull Tree parent, @NotNull PropertyState property)
focal_class.identifier: definesProperty
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Tree parent, @NotNull PropertyState property)
focal_class.return: boolean
focal_class.signature: boolean definesProperty(@NotNull Tree parent, @NotNull PropertyState property)
focal_class.class_method_signature: UserContext.definesContextRoot(@NotNull Tree tree)
focal_class.full_signature: @Override public boolean definesContextRoot(@NotNull Tree tree)
focal_class.identifier: definesContextRoot
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Tree tree)
focal_class.return: boolean
focal_class.signature: boolean definesContextRoot(@NotNull Tree tree)
focal_class.class_method_signature: UserContext.definesTree(@NotNull Tree tree)
focal_class.full_signature: @Override public boolean definesTree(@NotNull Tree tree)
focal_class.identifier: definesTree
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Tree tree)
focal_class.return: boolean
focal_class.signature: boolean definesTree(@NotNull Tree tree)
focal_class.class_method_signature: UserContext.definesLocation(@NotNull TreeLocation location)
focal_class.full_signature: @Override public boolean definesLocation(@NotNull TreeLocation location)
focal_class.identifier: definesLocation
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull TreeLocation location)
focal_class.return: boolean
focal_class.signature: boolean definesLocation(@NotNull TreeLocation location)
focal_class.class_method_signature: UserContext.definesInternal(@NotNull Tree tree)
focal_class.full_signature: @Override public boolean definesInternal(@NotNull Tree tree)
focal_class.identifier: definesInternal
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Tree tree)
focal_class.return: boolean
focal_class.signature: boolean definesInternal(@NotNull Tree tree)
focal_method.body: @Override
      public boolean definesLocation(@NotNull TreeLocation location) {
          Tree tree = location.getTree();
          if (tree != null && location.exists()) {
              PropertyState p = location.getProperty();
              return (p == null) ? definesTree(tree) : definesProperty(tree, p);
          } else {
              String path = location.getPath();
              String name = Text.getName(path);
              // NOTE: if none of the conditions below match, we are not able to
              // reliably determine if the specified location defines a user or
              // group node (missing node type information on non-existing location)
              return USER_PROPERTY_NAMES.contains(name)
                      || GROUP_PROPERTY_NAMES.contains(name)
                      || path.contains(REP_MEMBERS_LIST)
                      || path.contains(REP_MEMBERS)
                      || path.contains(REP_PWD);
          }
      }
focal_method.class_method_signature: UserContext.definesLocation(@NotNull TreeLocation location)
focal_method.full_signature: @Override public boolean definesLocation(@NotNull TreeLocation location)
focal_method.identifier: definesLocation
focal_method.invocations: getTree exists getProperty definesTree definesProperty getPath getName contains contains contains contains contains
focal_method.modifiers: @Override public
focal_method.parameters: (@NotNull TreeLocation location)
focal_method.return: boolean
focal_method.signature: boolean definesLocation(@NotNull TreeLocation location)