test_class.file: oak-core-spi/src/test/java/org/apache/jackrabbit/oak/spi/mount/MountInfoTest.java
test_class.identifier: MountInfoTest
test_case.body: @Test
      public void testIsMountedWithFragments() {
          MountInfo md = new MountInfo("foo", false, of("/apps", "/libs/*/site", "/content/*$", "/var$"), Collections.emptyList());
  
          assertFalse(md.isMounted("/oak:mount-foo"));
          assertTrue(md.isMounted("/apps/oak:mount-foo"));
          assertTrue(md.isMounted("/apps/oak:mount-foo/xyz"));
          assertTrue(md.isMounted("/apps/acme/oak:mount-foo"));
          assertTrue(md.isMounted("/apps/acme/oak:mount-foo/xyz"));
  
          assertFalse(md.isMounted("/libs/oak:mount-foo"));
          assertFalse(md.isMounted("/libs/acme/oak:mount-foo"));
          assertTrue(md.isMounted("/libs/acme/site/oak:mount-foo"));
          assertTrue(md.isMounted("/libs/acme/site/oak:mount-foo/xyz"));
          assertTrue(md.isMounted("/libs/acme/site/abc/oak:mount-foo"));
  
          assertFalse(md.isMounted("/oak:mount-foo"));
          assertFalse(md.isMounted("/content/oak:mount-foo"));
          assertTrue(md.isMounted("/content/site/oak:mount-foo"));
          assertTrue(md.isMounted("/content/site/oak:mount-foo/xyz"));
          assertFalse(md.isMounted("/content/site/abc/oak:mount-foo"));
          assertFalse(md.isMounted("/content/site/abc/oak:mount-foo/xyz"));
  
          assertTrue(md.isMounted("/var/oak:mount-foo"));
          assertFalse(md.isMounted("/var/abc/oak:mount-foo"));
      }
test_case.class_method_signature: MountInfoTest.testIsMountedWithFragments()
test_case.full_signature: @Test public void testIsMountedWithFragments()
test_case.identifier: testIsMountedWithFragments
test_case.invocations: of emptyList assertFalse isMounted assertTrue isMounted assertTrue isMounted assertTrue isMounted assertTrue isMounted assertFalse isMounted assertFalse isMounted assertTrue isMounted assertTrue isMounted assertTrue isMounted assertFalse isMounted assertFalse isMounted assertTrue isMounted assertTrue isMounted assertFalse isMounted assertFalse isMounted assertTrue isMounted assertFalse isMounted
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIsMountedWithFragments()
focal_class.declarator: SANITIZE_PATH =  new Function<String, String>() {
          @Override
          public String apply(String input) {
              if (input.endsWith("/") && input.length() > 1) {
                  return input.substring(0, input.length() - 1); 
              }
              return input;
          }
      }
focal_class.modifier: private static final
focal_class.original_string: private static final Function<String, String> SANITIZE_PATH =  new Function<String, String>() {
          @Override
          public String apply(String input) {
              if (input.endsWith("/") && input.length() > 1) {
                  return input.substring(0, input.length() - 1); 
              }
              return input;
          }
      };
focal_class.type: Function<String, String>
focal_class.var_name: SANITIZE_PATH
focal_class.declarator: name
focal_class.modifier: private final
focal_class.original_string: private final String name;
focal_class.type: String
focal_class.var_name: name
focal_class.declarator: readOnly
focal_class.modifier: private final
focal_class.original_string: private final boolean readOnly;
focal_class.type: boolean
focal_class.var_name: readOnly
focal_class.declarator: pathFragmentName
focal_class.modifier: private final
focal_class.original_string: private final String pathFragmentName;
focal_class.type: String
focal_class.var_name: pathFragmentName
focal_class.declarator: pathsSupportingFragments
focal_class.modifier: private final
focal_class.original_string: private final Set<String> pathsSupportingFragments;
focal_class.type: Set<String>
focal_class.var_name: pathsSupportingFragments
focal_class.declarator: includedPaths
focal_class.modifier: private final
focal_class.original_string: private final NavigableSet<String> includedPaths;
focal_class.type: NavigableSet<String>
focal_class.var_name: includedPaths
focal_class.file: oak-core-spi/src/main/java/org/apache/jackrabbit/oak/spi/mount/MountInfo.java
focal_class.identifier: MountInfo
focal_class.interfaces: implements Mount
focal_class.class_method_signature: MountInfo.MountInfo(String name, boolean readOnly, List<String> pathsSupportingFragments,
                List<String> includedPaths)
focal_class.full_signature: public  MountInfo(String name, boolean readOnly, List<String> pathsSupportingFragments,
                List<String> includedPaths)
focal_class.identifier: MountInfo
focal_class.modifiers: public
focal_class.parameters: (String name, boolean readOnly, List<String> pathsSupportingFragments,
                List<String> includedPaths)
focal_class.signature:  MountInfo(String name, boolean readOnly, List<String> pathsSupportingFragments,
                List<String> includedPaths)
focal_class.class_method_signature: MountInfo.isUnder(String path)
focal_class.full_signature: @Override public boolean isUnder(String path)
focal_class.identifier: isUnder
focal_class.modifiers: @Override public
focal_class.parameters: (String path)
focal_class.return: boolean
focal_class.signature: boolean isUnder(String path)
focal_class.class_method_signature: MountInfo.isDirectlyUnder(String path)
focal_class.full_signature: @Override public boolean isDirectlyUnder(String path)
focal_class.identifier: isDirectlyUnder
focal_class.modifiers: @Override public
focal_class.parameters: (String path)
focal_class.return: boolean
focal_class.signature: boolean isDirectlyUnder(String path)
focal_class.class_method_signature: MountInfo.isMounted(String path)
focal_class.full_signature: @Override public boolean isMounted(String path)
focal_class.identifier: isMounted
focal_class.modifiers: @Override public
focal_class.parameters: (String path)
focal_class.return: boolean
focal_class.signature: boolean isMounted(String path)
focal_class.class_method_signature: MountInfo.getName()
focal_class.full_signature: @Override public String getName()
focal_class.identifier: getName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: MountInfo.isReadOnly()
focal_class.full_signature: @Override public boolean isReadOnly()
focal_class.identifier: isReadOnly
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isReadOnly()
focal_class.class_method_signature: MountInfo.isDefault()
focal_class.full_signature: @Override public boolean isDefault()
focal_class.identifier: isDefault
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isDefault()
focal_class.class_method_signature: MountInfo.isSupportFragment(String path)
focal_class.full_signature: @Override public boolean isSupportFragment(String path)
focal_class.identifier: isSupportFragment
focal_class.modifiers: @Override public
focal_class.parameters: (String path)
focal_class.return: boolean
focal_class.signature: boolean isSupportFragment(String path)
focal_class.class_method_signature: MountInfo.isSupportFragmentUnder(String path)
focal_class.full_signature: @Override public boolean isSupportFragmentUnder(String path)
focal_class.identifier: isSupportFragmentUnder
focal_class.modifiers: @Override public
focal_class.parameters: (String path)
focal_class.return: boolean
focal_class.signature: boolean isSupportFragmentUnder(String path)
focal_class.class_method_signature: MountInfo.getPathFragmentName()
focal_class.full_signature: @Override public String getPathFragmentName()
focal_class.identifier: getPathFragmentName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPathFragmentName()
focal_class.class_method_signature: MountInfo.cleanCopy(Collection<String> includedPaths)
focal_class.full_signature: private static TreeSet<String> cleanCopy(Collection<String> includedPaths)
focal_class.identifier: cleanCopy
focal_class.modifiers: private static
focal_class.parameters: (Collection<String> includedPaths)
focal_class.return: TreeSet<String>
focal_class.signature: TreeSet<String> cleanCopy(Collection<String> includedPaths)
focal_class.class_method_signature: MountInfo.getPathsSupportingFragments()
focal_class.full_signature: public Set<String> getPathsSupportingFragments()
focal_class.identifier: getPathsSupportingFragments
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<String>
focal_class.signature: Set<String> getPathsSupportingFragments()
focal_class.class_method_signature: MountInfo.getIncludedPaths()
focal_class.full_signature: public Set<String> getIncludedPaths()
focal_class.identifier: getIncludedPaths
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<String>
focal_class.signature: Set<String> getIncludedPaths()
focal_class.class_method_signature: MountInfo.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: MountInfo.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: MountInfo.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_method.body: @Override
      public boolean isMounted(String path) {
          if (path.contains(pathFragmentName)) {
              String parent = path.substring(0, path.indexOf(pathFragmentName));
              parent = parent.substring(0, parent.lastIndexOf('/'));
              if (isSupportFragment(parent)) {
                  return true;
              }
          }
  
          path = SANITIZE_PATH.apply(path);
  
          String previousPath = includedPaths.floor(path);
          return previousPath != null && (previousPath.equals(path) || isAncestor(previousPath, path));
      }
focal_method.class_method_signature: MountInfo.isMounted(String path)
focal_method.full_signature: @Override public boolean isMounted(String path)
focal_method.identifier: isMounted
focal_method.invocations: contains substring indexOf substring lastIndexOf isSupportFragment apply floor equals isAncestor
focal_method.modifiers: @Override public
focal_method.parameters: (String path)
focal_method.return: boolean
focal_method.signature: boolean isMounted(String path)