test_class.declarator: path = "/path"
test_class.modifier: private
test_class.original_string: private String path = "/path";
test_class.type: String
test_class.var_name: path
test_class.declarator: index = 15
test_class.modifier: private
test_class.original_string: private int index = 15;
test_class.type: int
test_class.var_name: index
test_class.declarator: entry = new PermissionEntry(path, true, index, PrivilegeBits.BUILT_IN.get(PrivilegeConstants.REP_READ_NODES), RestrictionPattern.EMPTY)
test_class.modifier: private
test_class.original_string: private PermissionEntry entry = new PermissionEntry(path, true, index, PrivilegeBits.BUILT_IN.get(PrivilegeConstants.REP_READ_NODES), RestrictionPattern.EMPTY);
test_class.type: PermissionEntry
test_class.var_name: entry
test_class.declarator: pattern = mock(RestrictionPattern.class)
test_class.modifier: private
test_class.original_string: private RestrictionPattern pattern = mock(RestrictionPattern.class);
test_class.type: RestrictionPattern
test_class.var_name: pattern
test_class.declarator: entryWithNonEmptyPattern = new PermissionEntry(path, false, index, PrivilegeBits.BUILT_IN.get(PrivilegeConstants.REP_ADD_PROPERTIES), pattern)
test_class.modifier: private
test_class.original_string: private PermissionEntry entryWithNonEmptyPattern = new PermissionEntry(path, false, index, PrivilegeBits.BUILT_IN.get(PrivilegeConstants.REP_ADD_PROPERTIES), pattern);
test_class.type: PermissionEntry
test_class.var_name: entryWithNonEmptyPattern
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/permission/PermissionEntryTest.java
test_class.identifier: PermissionEntryTest
test_case.body: @Test
      public void testCompareToDifferentPathLowerDepth() {
          String lowerDepthPath = PathUtils.getParentPath(path);
          PermissionEntry lowerDepthEntry = new PermissionEntry(lowerDepthPath, entry.isAllow, index, entry.privilegeBits, entry.restriction);
  
          assertEquals(-1, entry.compareTo(lowerDepthEntry));
      }
test_case.class_method_signature: PermissionEntryTest.testCompareToDifferentPathLowerDepth()
test_case.full_signature: @Test public void testCompareToDifferentPathLowerDepth()
test_case.identifier: testCompareToDifferentPathLowerDepth
test_case.invocations: getParentPath assertEquals compareTo
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCompareToDifferentPathLowerDepth()
focal_class.declarator: isAllow
focal_class.modifier: final
focal_class.original_string: final boolean isAllow;
focal_class.type: boolean
focal_class.var_name: isAllow
focal_class.declarator: privilegeBits
focal_class.modifier: final
focal_class.original_string: final PrivilegeBits privilegeBits;
focal_class.type: PrivilegeBits
focal_class.var_name: privilegeBits
focal_class.declarator: index
focal_class.modifier: private final
focal_class.original_string: private final int index;
focal_class.type: int
focal_class.var_name: index
focal_class.declarator: path
focal_class.modifier: private final
focal_class.original_string: private final String path;
focal_class.type: String
focal_class.var_name: path
focal_class.declarator: restriction
focal_class.modifier: final
focal_class.original_string: final RestrictionPattern restriction;
focal_class.type: RestrictionPattern
focal_class.var_name: restriction
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/PermissionEntry.java
focal_class.identifier: PermissionEntry
focal_class.interfaces: implements Comparable<PermissionEntry>, PermissionConstants
focal_class.class_method_signature: PermissionEntry.PermissionEntry(@NotNull String path, boolean isAllow, int index,
                      @NotNull PrivilegeBits privilegeBits,
                      @NotNull RestrictionPattern restriction)
focal_class.full_signature:   PermissionEntry(@NotNull String path, boolean isAllow, int index,
                      @NotNull PrivilegeBits privilegeBits,
                      @NotNull RestrictionPattern restriction)
focal_class.identifier: PermissionEntry
focal_class.parameters: (@NotNull String path, boolean isAllow, int index,
                      @NotNull PrivilegeBits privilegeBits,
                      @NotNull RestrictionPattern restriction)
focal_class.signature:  PermissionEntry(@NotNull String path, boolean isAllow, int index,
                      @NotNull PrivilegeBits privilegeBits,
                      @NotNull RestrictionPattern restriction)
focal_class.class_method_signature: PermissionEntry.matches(@NotNull Tree tree, @Nullable PropertyState property)
focal_class.full_signature:  boolean matches(@NotNull Tree tree, @Nullable PropertyState property)
focal_class.identifier: matches
focal_class.parameters: (@NotNull Tree tree, @Nullable PropertyState property)
focal_class.return: boolean
focal_class.signature: boolean matches(@NotNull Tree tree, @Nullable PropertyState property)
focal_class.class_method_signature: PermissionEntry.matches(@NotNull String treePath)
focal_class.full_signature:  boolean matches(@NotNull String treePath)
focal_class.identifier: matches
focal_class.parameters: (@NotNull String treePath)
focal_class.return: boolean
focal_class.signature: boolean matches(@NotNull String treePath)
focal_class.class_method_signature: PermissionEntry.matches()
focal_class.full_signature:  boolean matches()
focal_class.identifier: matches
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean matches()
focal_class.class_method_signature: PermissionEntry.matchesParent(@NotNull String parentPath)
focal_class.full_signature:  boolean matchesParent(@NotNull String parentPath)
focal_class.identifier: matchesParent
focal_class.parameters: (@NotNull String parentPath)
focal_class.return: boolean
focal_class.signature: boolean matchesParent(@NotNull String parentPath)
focal_class.class_method_signature: PermissionEntry.compareTo(@NotNull PermissionEntry pe)
focal_class.full_signature: @Override public int compareTo(@NotNull PermissionEntry pe)
focal_class.identifier: compareTo
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull PermissionEntry pe)
focal_class.return: int
focal_class.signature: int compareTo(@NotNull PermissionEntry pe)
focal_class.class_method_signature: PermissionEntry.equals(Object o)
focal_class.full_signature: @Override public boolean equals(Object o)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object o)
focal_class.return: boolean
focal_class.signature: boolean equals(Object o)
focal_class.class_method_signature: PermissionEntry.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_method.body: @Override
      public int compareTo(@NotNull PermissionEntry pe) {
          if (Objects.equal(path, pe.path)) {
              // reverse order
              return Integer.compare(pe.index, index);
          } else {
              final int depth = PathUtils.getDepth(path);
              final int otherDepth = PathUtils.getDepth(pe.path);
              if (depth == otherDepth) {
                  return path.compareTo(pe.path);
              } else {
                  return (depth < otherDepth) ? 1 : -1;
              }
          }
      }
focal_method.class_method_signature: PermissionEntry.compareTo(@NotNull PermissionEntry pe)
focal_method.full_signature: @Override public int compareTo(@NotNull PermissionEntry pe)
focal_method.identifier: compareTo
focal_method.invocations: equal compare getDepth getDepth compareTo
focal_method.modifiers: @Override public
focal_method.parameters: (@NotNull PermissionEntry pe)
focal_method.return: int
focal_method.signature: int compareTo(@NotNull PermissionEntry pe)