test_class.declarator: root = ROOT
test_class.modifier: private final
test_class.original_string: private final Path root = ROOT;
test_class.type: Path
test_class.var_name: root
test_class.declarator: foo = new Path(root, "foo")
test_class.modifier: private final
test_class.original_string: private final Path foo = new Path(root, "foo");
test_class.type: Path
test_class.var_name: foo
test_class.declarator: fooBar = new Path(foo, "bar")
test_class.modifier: private final
test_class.original_string: private final Path fooBar = new Path(foo, "bar");
test_class.type: Path
test_class.var_name: fooBar
test_class.declarator: fooBarQuux = new Path(fooBar, "quux")
test_class.modifier: private final
test_class.original_string: private final Path fooBarQuux = new Path(fooBar, "quux");
test_class.type: Path
test_class.var_name: fooBarQuux
test_class.declarator: relFoo = new Path("foo")
test_class.modifier: private final
test_class.original_string: private final Path relFoo = new Path("foo");
test_class.type: Path
test_class.var_name: relFoo
test_class.declarator: relFooBar = new Path(relFoo, "bar")
test_class.modifier: private final
test_class.original_string: private final Path relFooBar = new Path(relFoo, "bar");
test_class.type: Path
test_class.var_name: relFooBar
test_class.declarator: relFooBarQuux = new Path(relFooBar, "quux")
test_class.modifier: private final
test_class.original_string: private final Path relFooBarQuux = new Path(relFooBar, "quux");
test_class.type: Path
test_class.var_name: relFooBarQuux
test_class.file: oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/PathTest.java
test_class.identifier: PathTest
test_case.body: @Test
      public void getAncestor() {
          assertEquals(root, root.getAncestor(-1));
          assertEquals(root, root.getAncestor(0));
          assertEquals(root, root.getAncestor(1));
          assertEquals(foo, foo.getAncestor(0));
          assertEquals(root, foo.getAncestor(1));
          assertEquals(root, foo.getAncestor(2));
          assertEquals(fooBar, fooBar.getAncestor(0));
          assertEquals(foo, fooBar.getAncestor(1));
          assertEquals(root, fooBar.getAncestor(2));
          assertEquals(root, fooBar.getAncestor(3));
          assertEquals(fooBar, fooBarQuux.getAncestor(1));
  
          assertEquals(relFoo, relFoo.getAncestor(-1));
          assertEquals(relFoo, relFoo.getAncestor(0));
          assertEquals(relFoo, relFoo.getAncestor(1));
          assertEquals(relFooBar, relFooBar.getAncestor(0));
          assertEquals(relFoo, relFooBar.getAncestor(1));
          assertEquals(relFoo, relFooBar.getAncestor(2));
          assertEquals(relFoo, relFooBar.getAncestor(3));
          assertEquals(relFooBar, relFooBarQuux.getAncestor(1));
      }
test_case.class_method_signature: PathTest.getAncestor()
test_case.full_signature: @Test public void getAncestor()
test_case.identifier: getAncestor
test_case.invocations: assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor assertEquals getAncestor
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getAncestor()
focal_class.declarator: ROOT = new Path(null, "", "".hashCode())
focal_class.modifier: public static final
focal_class.original_string: public static final Path ROOT = new Path(null, "", "".hashCode());
focal_class.type: Path
focal_class.var_name: ROOT
focal_class.declarator: parent
focal_class.modifier: @Nullable
      private final
focal_class.original_string: @Nullable
      private final Path parent;
focal_class.type: Path
focal_class.var_name: parent
focal_class.declarator: name
focal_class.modifier: @NotNull
      private final
focal_class.original_string: @NotNull
      private final String name;
focal_class.type: String
focal_class.var_name: name
focal_class.declarator: hash
focal_class.modifier: private
focal_class.original_string: private int hash;
focal_class.type: int
focal_class.var_name: hash
focal_class.file: oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Path.java
focal_class.identifier: Path
focal_class.interfaces: implements CacheValue, Comparable<Path>
focal_class.class_method_signature: Path.Path(@Nullable Path parent,
                   @NotNull String name,
                   int hash)
focal_class.full_signature: private  Path(@Nullable Path parent,
                   @NotNull String name,
                   int hash)
focal_class.identifier: Path
focal_class.modifiers: private
focal_class.parameters: (@Nullable Path parent,
                   @NotNull String name,
                   int hash)
focal_class.signature:  Path(@Nullable Path parent,
                   @NotNull String name,
                   int hash)
focal_class.class_method_signature: Path.Path(@NotNull Path parent, @NotNull String name)
focal_class.full_signature: public  Path(@NotNull Path parent, @NotNull String name)
focal_class.identifier: Path
focal_class.modifiers: public
focal_class.parameters: (@NotNull Path parent, @NotNull String name)
focal_class.signature:  Path(@NotNull Path parent, @NotNull String name)
focal_class.class_method_signature: Path.Path(@NotNull String name)
focal_class.full_signature: public  Path(@NotNull String name)
focal_class.identifier: Path
focal_class.modifiers: public
focal_class.parameters: (@NotNull String name)
focal_class.signature:  Path(@NotNull String name)
focal_class.class_method_signature: Path.getName()
focal_class.full_signature: @NotNull public String getName()
focal_class.identifier: getName
focal_class.modifiers: @NotNull public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: Path.elements()
focal_class.full_signature: @NotNull public Iterable<String> elements()
focal_class.identifier: elements
focal_class.modifiers: @NotNull public
focal_class.parameters: ()
focal_class.return: Iterable<String>
focal_class.signature: Iterable<String> elements()
focal_class.class_method_signature: Path.isRoot()
focal_class.full_signature: public boolean isRoot()
focal_class.identifier: isRoot
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isRoot()
focal_class.class_method_signature: Path.getParent()
focal_class.full_signature: @Nullable public Path getParent()
focal_class.identifier: getParent
focal_class.modifiers: @Nullable public
focal_class.parameters: ()
focal_class.return: Path
focal_class.signature: Path getParent()
focal_class.class_method_signature: Path.length()
focal_class.full_signature: public int length()
focal_class.identifier: length
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int length()
focal_class.class_method_signature: Path.getDepth()
focal_class.full_signature: public int getDepth()
focal_class.identifier: getDepth
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getDepth()
focal_class.class_method_signature: Path.getAncestor(int nth)
focal_class.full_signature: @NotNull public Path getAncestor(int nth)
focal_class.identifier: getAncestor
focal_class.modifiers: @NotNull public
focal_class.parameters: (int nth)
focal_class.return: Path
focal_class.signature: Path getAncestor(int nth)
focal_class.class_method_signature: Path.isAncestorOf(@NotNull Path other)
focal_class.full_signature: public boolean isAncestorOf(@NotNull Path other)
focal_class.identifier: isAncestorOf
focal_class.modifiers: public
focal_class.parameters: (@NotNull Path other)
focal_class.return: boolean
focal_class.signature: boolean isAncestorOf(@NotNull Path other)
focal_class.class_method_signature: Path.isAbsolute()
focal_class.full_signature: public boolean isAbsolute()
focal_class.identifier: isAbsolute
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isAbsolute()
focal_class.class_method_signature: Path.fromString(@NotNull String path)
focal_class.full_signature: @NotNull public static Path fromString(@NotNull String path)
focal_class.identifier: fromString
focal_class.modifiers: @NotNull public static
focal_class.parameters: (@NotNull String path)
focal_class.return: Path
focal_class.signature: Path fromString(@NotNull String path)
focal_class.class_method_signature: Path.toStringBuilder(@NotNull StringBuilder sb)
focal_class.full_signature: @NotNull public StringBuilder toStringBuilder(@NotNull StringBuilder sb)
focal_class.identifier: toStringBuilder
focal_class.modifiers: @NotNull public
focal_class.parameters: (@NotNull StringBuilder sb)
focal_class.return: StringBuilder
focal_class.signature: StringBuilder toStringBuilder(@NotNull StringBuilder sb)
focal_class.class_method_signature: Path.getMemory()
focal_class.full_signature: @Override public int getMemory()
focal_class.identifier: getMemory
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMemory()
focal_class.class_method_signature: Path.compareTo(@NotNull Path other)
focal_class.full_signature: @Override public int compareTo(@NotNull Path other)
focal_class.identifier: compareTo
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Path other)
focal_class.return: int
focal_class.signature: int compareTo(@NotNull Path other)
focal_class.class_method_signature: Path.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: Path.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: Path.equals(Object obj)
focal_class.full_signature: @Override public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_class.class_method_signature: Path.elements(boolean withRoot)
focal_class.full_signature: private Iterable<String> elements(boolean withRoot)
focal_class.identifier: elements
focal_class.modifiers: private
focal_class.parameters: (boolean withRoot)
focal_class.return: Iterable<String>
focal_class.signature: Iterable<String> elements(boolean withRoot)
focal_class.class_method_signature: Path.buildPath(StringBuilder sb)
focal_class.full_signature: private StringBuilder buildPath(StringBuilder sb)
focal_class.identifier: buildPath
focal_class.modifiers: private
focal_class.parameters: (StringBuilder sb)
focal_class.return: StringBuilder
focal_class.signature: StringBuilder buildPath(StringBuilder sb)
focal_class.class_method_signature: Path.getNumberOfPathElements(boolean withRoot)
focal_class.full_signature: private int getNumberOfPathElements(boolean withRoot)
focal_class.identifier: getNumberOfPathElements
focal_class.modifiers: private
focal_class.parameters: (boolean withRoot)
focal_class.return: int
focal_class.signature: int getNumberOfPathElements(boolean withRoot)
focal_class.class_method_signature: Path.comparePath(Path a, Path b)
focal_class.full_signature: private static int comparePath(Path a, Path b)
focal_class.identifier: comparePath
focal_class.modifiers: private static
focal_class.parameters: (Path a, Path b)
focal_class.return: int
focal_class.signature: int comparePath(Path a, Path b)
focal_method.body: @NotNull
      public Path getAncestor(int nth) {
          Path p = this;
          while (nth-- > 0 && p.parent != null) {
              p = p.parent;
          }
          return p;
      }
focal_method.class_method_signature: Path.getAncestor(int nth)
focal_method.full_signature: @NotNull public Path getAncestor(int nth)
focal_method.identifier: getAncestor
focal_method.modifiers: @NotNull public
focal_method.parameters: (int nth)
focal_method.return: Path
focal_method.signature: Path getAncestor(int nth)