test_class.file: oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlorUtilsTest.java
test_class.identifier: BundlorUtilsTest
test_case.body: @Test
      public void childNodeNames() throws Exception{
          List<String> testData = asList("x",
                  concat("jcr:content", META_PROP_BUNDLING_PATH),
                  "jcr:content/jcr:data",
                  concat("jcr:content/metadata", META_PROP_BUNDLING_PATH),
                  "jcr:content/metadata/format",
                  concat("jcr:content/comments", META_PROP_BUNDLING_PATH),
                  concat("jcr:content/renditions/original", META_PROP_BUNDLING_PATH)
          );
  
          Matcher m = new Include("jcr:content/*").createMatcher();
          Set<String> names = BundlorUtils.getChildNodeNames(testData, m);
          assertThat(names, hasItem("jcr:content"));
  
          names = BundlorUtils.getChildNodeNames(testData, m.next("jcr:content"));
          assertThat(names, hasItems("metadata", "comments"));
  
          names = BundlorUtils.getChildNodeNames(testData, m.next("jcr:content").next("metadata"));
          assertTrue(names.isEmpty());
      }
test_case.class_method_signature: BundlorUtilsTest.childNodeNames()
test_case.full_signature: @Test public void childNodeNames()
test_case.identifier: childNodeNames
test_case.invocations: asList concat concat concat concat createMatcher getChildNodeNames assertThat hasItem getChildNodeNames next assertThat hasItems getChildNodeNames next next assertTrue isEmpty
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void childNodeNames()
focal_class.declarator: NOT_BUNDLOR_PROPS = new Predicate<PropertyState>() {
          @Override
          public boolean apply(PropertyState input) {
              return !input.getName().startsWith(DocumentBundlor.BUNDLOR_META_PROP_PREFIX);
          }
      }
focal_class.modifier: public static final
focal_class.original_string: public static final Predicate<PropertyState> NOT_BUNDLOR_PROPS = new Predicate<PropertyState>() {
          @Override
          public boolean apply(PropertyState input) {
              return !input.getName().startsWith(DocumentBundlor.BUNDLOR_META_PROP_PREFIX);
          }
      };
focal_class.type: Predicate<PropertyState>
focal_class.var_name: NOT_BUNDLOR_PROPS
focal_class.file: oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/bundlor/BundlorUtils.java
focal_class.identifier: BundlorUtils
focal_class.class_method_signature: BundlorUtils.getMatchingProperties(Map<String, PropertyState> props, Matcher matcher)
focal_class.full_signature: public static Map<String, PropertyState> getMatchingProperties(Map<String, PropertyState> props, Matcher matcher)
focal_class.identifier: getMatchingProperties
focal_class.modifiers: public static
focal_class.parameters: (Map<String, PropertyState> props, Matcher matcher)
focal_class.return: Map<String, PropertyState>
focal_class.signature: Map<String, PropertyState> getMatchingProperties(Map<String, PropertyState> props, Matcher matcher)
focal_class.class_method_signature: BundlorUtils.getChildNodeNames(Collection<String> keys, Matcher matcher)
focal_class.full_signature: public static Set<String> getChildNodeNames(Collection<String> keys, Matcher matcher)
focal_class.identifier: getChildNodeNames
focal_class.modifiers: public static
focal_class.parameters: (Collection<String> keys, Matcher matcher)
focal_class.return: Set<String>
focal_class.signature: Set<String> getChildNodeNames(Collection<String> keys, Matcher matcher)
focal_class.class_method_signature: BundlorUtils.isBundlingRoot(NodeState state)
focal_class.full_signature: static boolean isBundlingRoot(NodeState state)
focal_class.identifier: isBundlingRoot
focal_class.modifiers: static
focal_class.parameters: (NodeState state)
focal_class.return: boolean
focal_class.signature: boolean isBundlingRoot(NodeState state)
focal_class.class_method_signature: BundlorUtils.isBundledChild(NodeState state)
focal_class.full_signature: static boolean isBundledChild(NodeState state)
focal_class.identifier: isBundledChild
focal_class.modifiers: static
focal_class.parameters: (NodeState state)
focal_class.return: boolean
focal_class.signature: boolean isBundledChild(NodeState state)
focal_class.class_method_signature: BundlorUtils.isBundledNode(NodeState state)
focal_class.full_signature: static boolean isBundledNode(NodeState state)
focal_class.identifier: isBundledNode
focal_class.modifiers: static
focal_class.parameters: (NodeState state)
focal_class.return: boolean
focal_class.signature: boolean isBundledNode(NodeState state)
focal_method.body: public static Set<String> getChildNodeNames(Collection<String> keys, Matcher matcher){
          Set<String> childNodeNames = Sets.newHashSet();
  
          //Immediate child should have depth 1 more than matcher depth
          int expectedDepth = matcher.depth() + 1;
  
          for (String key : keys){
              List<String> elements = ImmutableList.copyOf(PathUtils.elements(key));
              int depth = elements.size() - 1;
  
              if (depth == expectedDepth
                      && key.startsWith(matcher.getMatchedPath())
                      && elements.get(elements.size() - 1).equals(META_PROP_BUNDLING_PATH)){
                  //Child node name is the second last element
                  //[jcr:content/:self -> [jcr:content, :self]
                  childNodeNames.add(elements.get(elements.size() - 2));
              }
          }
          return childNodeNames;
      }
focal_method.class_method_signature: BundlorUtils.getChildNodeNames(Collection<String> keys, Matcher matcher)
focal_method.full_signature: public static Set<String> getChildNodeNames(Collection<String> keys, Matcher matcher)
focal_method.identifier: getChildNodeNames
focal_method.invocations: newHashSet depth copyOf elements size startsWith getMatchedPath equals get size add get size
focal_method.modifiers: public static
focal_method.parameters: (Collection<String> keys, Matcher matcher)
focal_method.return: Set<String>
focal_method.signature: Set<String> getChildNodeNames(Collection<String> keys, Matcher matcher)