test_class.declarator: before
test_class.modifier: private final
test_class.original_string: private final NodeState before;
test_class.type: NodeState
test_class.var_name: before
test_class.declarator: nodeObserver
test_class.modifier: private
test_class.original_string: private TestNodeObserver nodeObserver;
test_class.type: TestNodeObserver
test_class.var_name: nodeObserver
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/NodeObserverTest.java
test_class.identifier: NodeObserverTest
test_case.body: @Test
      public void ignoreChange() {
          NodeBuilder builder = before.builder();
          builder.getChildNode("a").getChildNode("b").setProperty("p", 42);
          nodeObserver.contentChanged(builder.getNodeState(), CommitInfo.EMPTY);
  
          assertTrue(nodeObserver.added.isEmpty());
          assertTrue(nodeObserver.deleted.isEmpty());
          assertTrue(nodeObserver.changed.isEmpty());
          assertTrue(nodeObserver.properties.isEmpty());
      }
test_case.class_method_signature: NodeObserverTest.ignoreChange()
test_case.full_signature: @Test public void ignoreChange()
test_case.identifier: ignoreChange
test_case.invocations: builder setProperty getChildNode getChildNode contentChanged getNodeState assertTrue isEmpty assertTrue isEmpty assertTrue isEmpty assertTrue isEmpty
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void ignoreChange()
focal_class.declarator: PERF_LOGGER = new PerfLogger(
              LoggerFactory.getLogger(NodeObserver.class.getName()
                      + ".perf"))
focal_class.modifier: private static final
focal_class.original_string: private static final PerfLogger PERF_LOGGER = new PerfLogger(
              LoggerFactory.getLogger(NodeObserver.class.getName()
                      + ".perf"));
focal_class.type: PerfLogger
focal_class.var_name: PERF_LOGGER
focal_class.declarator: LOG = LoggerFactory.getLogger(NodeObserver.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(NodeObserver.class);
focal_class.type: Logger
focal_class.var_name: LOG
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: propertyNames = Sets.newHashSet()
focal_class.modifier: private final
focal_class.original_string: private final Set<String> propertyNames = Sets.newHashSet();
focal_class.type: Set<String>
focal_class.var_name: propertyNames
focal_class.declarator: previousRoot
focal_class.modifier: private
focal_class.original_string: private NodeState previousRoot;
focal_class.type: NodeState
focal_class.var_name: previousRoot
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/NodeObserver.java
focal_class.identifier: NodeObserver
focal_class.interfaces: implements Observer
focal_class.class_method_signature: NodeObserver.NodeObserver(String path, String... propertyNames)
focal_class.full_signature: protected  NodeObserver(String path, String... propertyNames)
focal_class.identifier: NodeObserver
focal_class.modifiers: protected
focal_class.parameters: (String path, String... propertyNames)
focal_class.signature:  NodeObserver(String path, String... propertyNames)
focal_class.class_method_signature: NodeObserver.added(
              @NotNull String path,
              @NotNull Set<String> added,
              @NotNull Set<String> deleted,
              @NotNull Set<String> changed,
              @NotNull Map<String, String> properties,
              @NotNull CommitInfo commitInfo)
focal_class.full_signature: protected abstract void added(
              @NotNull String path,
              @NotNull Set<String> added,
              @NotNull Set<String> deleted,
              @NotNull Set<String> changed,
              @NotNull Map<String, String> properties,
              @NotNull CommitInfo commitInfo)
focal_class.identifier: added
focal_class.modifiers: protected abstract
focal_class.parameters: (
              @NotNull String path,
              @NotNull Set<String> added,
              @NotNull Set<String> deleted,
              @NotNull Set<String> changed,
              @NotNull Map<String, String> properties,
              @NotNull CommitInfo commitInfo)
focal_class.return: void
focal_class.signature: void added(
              @NotNull String path,
              @NotNull Set<String> added,
              @NotNull Set<String> deleted,
              @NotNull Set<String> changed,
              @NotNull Map<String, String> properties,
              @NotNull CommitInfo commitInfo)
focal_class.class_method_signature: NodeObserver.deleted(
              @NotNull String path,
              @NotNull Set<String> added,
              @NotNull Set<String> deleted,
              @NotNull Set<String> changed,
              @NotNull Map<String, String> properties,
              @NotNull CommitInfo commitInfo)
focal_class.full_signature: protected abstract void deleted(
              @NotNull String path,
              @NotNull Set<String> added,
              @NotNull Set<String> deleted,
              @NotNull Set<String> changed,
              @NotNull Map<String, String> properties,
              @NotNull CommitInfo commitInfo)
focal_class.identifier: deleted
focal_class.modifiers: protected abstract
focal_class.parameters: (
              @NotNull String path,
              @NotNull Set<String> added,
              @NotNull Set<String> deleted,
              @NotNull Set<String> changed,
              @NotNull Map<String, String> properties,
              @NotNull CommitInfo commitInfo)
focal_class.return: void
focal_class.signature: void deleted(
              @NotNull String path,
              @NotNull Set<String> added,
              @NotNull Set<String> deleted,
              @NotNull Set<String> changed,
              @NotNull Map<String, String> properties,
              @NotNull CommitInfo commitInfo)
focal_class.class_method_signature: NodeObserver.changed(
              @NotNull String path,
              @NotNull Set<String> added,
              @NotNull Set<String> deleted,
              @NotNull Set<String> changed,
              @NotNull Map<String, String> properties,
              @NotNull CommitInfo commitInfo)
focal_class.full_signature: protected abstract void changed(
              @NotNull String path,
              @NotNull Set<String> added,
              @NotNull Set<String> deleted,
              @NotNull Set<String> changed,
              @NotNull Map<String, String> properties,
              @NotNull CommitInfo commitInfo)
focal_class.identifier: changed
focal_class.modifiers: protected abstract
focal_class.parameters: (
              @NotNull String path,
              @NotNull Set<String> added,
              @NotNull Set<String> deleted,
              @NotNull Set<String> changed,
              @NotNull Map<String, String> properties,
              @NotNull CommitInfo commitInfo)
focal_class.return: void
focal_class.signature: void changed(
              @NotNull String path,
              @NotNull Set<String> added,
              @NotNull Set<String> deleted,
              @NotNull Set<String> changed,
              @NotNull Map<String, String> properties,
              @NotNull CommitInfo commitInfo)
focal_class.class_method_signature: NodeObserver.contentChanged(@NotNull NodeState root, @NotNull CommitInfo info)
focal_class.full_signature: @Override public void contentChanged(@NotNull NodeState root, @NotNull CommitInfo info)
focal_class.identifier: contentChanged
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull NodeState root, @NotNull CommitInfo info)
focal_class.return: void
focal_class.signature: void contentChanged(@NotNull NodeState root, @NotNull CommitInfo info)
focal_method.body: @Override
      public void contentChanged(@NotNull NodeState root, @NotNull CommitInfo info) {
          if (previousRoot != null) {
              try {
                  long start = PERF_LOGGER.start();
                  NamePathMapper namePathMapper = new NamePathMapperImpl(
                          new GlobalNameMapper(RootFactory.createReadOnlyRoot(root)));
  
                  Set<String> oakPropertyNames = Sets.newHashSet();
                  for (String name : propertyNames) {
                      String oakName = namePathMapper.getOakNameOrNull(name);
                      if (oakName == null) {
                          LOG.warn("Ignoring invalid property name: {}", name);
                      } else {
                          oakPropertyNames.add(oakName);
                      }
                  }
  
                  NodeState before = previousRoot;
                  NodeState after = root;
                  EventHandler handler = new FilteredHandler(
                          VISIBLE_FILTER,
                          new NodeEventHandler("/", info, namePathMapper, oakPropertyNames));
  
                  String oakPath = namePathMapper.getOakPath(path);
                  if (oakPath == null) {
                      LOG.warn("Cannot listen for changes on invalid path: {}", path);
                      return;
                  }
  
                  for (String oakName : PathUtils.elements(oakPath)) {
                      before = before.getChildNode(oakName);
                      after = after.getChildNode(oakName);
                      handler = handler.getChildHandler(oakName, before, after);
                  }
  
                  EventGenerator generator = new EventGenerator(before, after, handler);
                  while (!generator.isDone()) {
                      generator.generate();
                  }
                  PERF_LOGGER.end(start, 100,
                          "Generated events (before: {}, after: {})",
                          previousRoot, root);
              } catch (Exception e) {
                  LOG.warn("Error while dispatching observation events", e);
              }
          }
  
          previousRoot = root;
      }
focal_method.class_method_signature: NodeObserver.contentChanged(@NotNull NodeState root, @NotNull CommitInfo info)
focal_method.full_signature: @Override public void contentChanged(@NotNull NodeState root, @NotNull CommitInfo info)
focal_method.identifier: contentChanged
focal_method.invocations: start createReadOnlyRoot newHashSet getOakNameOrNull warn add getOakPath warn elements getChildNode getChildNode getChildHandler isDone generate end warn
focal_method.modifiers: @Override public
focal_method.parameters: (@NotNull NodeState root, @NotNull CommitInfo info)
focal_method.return: void
focal_method.signature: void contentChanged(@NotNull NodeState root, @NotNull CommitInfo info)