test_class.declarator: builderProvider = new DocumentMKBuilderProvider()
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public DocumentMKBuilderProvider builderProvider = new DocumentMKBuilderProvider();
test_class.type: DocumentMKBuilderProvider
test_class.var_name: builderProvider
test_class.declarator: clock
test_class.modifier: private
test_class.original_string: private Clock clock;
test_class.type: Clock
test_class.var_name: clock
test_class.file: oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/JournalDiffLoaderTest.java
test_class.identifier: JournalDiffLoaderTest
test_case.body: @Test
      public void emptyBranchCommit() throws Exception {
          DocumentNodeStore ns = builderProvider.newBuilder()
                  .clock(clock).setAsyncDelay(0).disableBranches().getNodeStore();
          DocumentStore store = ns.getDocumentStore();
          DocumentNodeState before = ns.getRoot();
          String id = Utils.getIdFromPath("/node-0");
          NodeBuilder builder = ns.getRoot().builder();
          int i = 0;
          while (store.find(Collection.NODES, id) == null) {
              NodeBuilder child = builder.child("node-" + i++);
              for (int j = 0; j < 20; j++) {
                  child.setProperty("p-" + j, "value");
              }
          }
          merge(ns, builder);
          DocumentNodeState after = ns.getRoot();
          new JournalDiffLoader(before, after, ns).call();
      }
test_case.class_method_signature: JournalDiffLoaderTest.emptyBranchCommit()
test_case.full_signature: @Test public void emptyBranchCommit()
test_case.identifier: emptyBranchCommit
test_case.invocations: getNodeStore disableBranches setAsyncDelay clock newBuilder getDocumentStore getRoot getIdFromPath builder getRoot find child setProperty merge getRoot call
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void emptyBranchCommit()
focal_class.declarator: LOG = LoggerFactory.getLogger(JournalDiffLoader.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(JournalDiffLoader.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: base
focal_class.modifier: private final
focal_class.original_string: private final AbstractDocumentNodeState base;
focal_class.type: AbstractDocumentNodeState
focal_class.var_name: base
focal_class.declarator: node
focal_class.modifier: private final
focal_class.original_string: private final AbstractDocumentNodeState node;
focal_class.type: AbstractDocumentNodeState
focal_class.var_name: node
focal_class.declarator: ns
focal_class.modifier: private final
focal_class.original_string: private final DocumentNodeStore ns;
focal_class.type: DocumentNodeStore
focal_class.var_name: ns
focal_class.declarator: stats
focal_class.modifier: private
focal_class.original_string: private Stats stats;
focal_class.type: Stats
focal_class.var_name: stats
focal_class.file: oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/JournalDiffLoader.java
focal_class.identifier: JournalDiffLoader
focal_class.interfaces: implements DiffCache.Loader
focal_class.class_method_signature: JournalDiffLoader.JournalDiffLoader(@NotNull AbstractDocumentNodeState base,
                        @NotNull AbstractDocumentNodeState node,
                        @NotNull DocumentNodeStore ns)
focal_class.full_signature:   JournalDiffLoader(@NotNull AbstractDocumentNodeState base,
                        @NotNull AbstractDocumentNodeState node,
                        @NotNull DocumentNodeStore ns)
focal_class.identifier: JournalDiffLoader
focal_class.parameters: (@NotNull AbstractDocumentNodeState base,
                        @NotNull AbstractDocumentNodeState node,
                        @NotNull DocumentNodeStore ns)
focal_class.signature:  JournalDiffLoader(@NotNull AbstractDocumentNodeState base,
                        @NotNull AbstractDocumentNodeState node,
                        @NotNull DocumentNodeStore ns)
focal_class.class_method_signature: JournalDiffLoader.call()
focal_class.full_signature: @Override public String call()
focal_class.identifier: call
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String call()
focal_class.class_method_signature: JournalDiffLoader.readBranchChanges(Path path,
                                     RevisionVector rv,
                                     StringSort changes)
focal_class.full_signature: private void readBranchChanges(Path path,
                                     RevisionVector rv,
                                     StringSort changes)
focal_class.identifier: readBranchChanges
focal_class.modifiers: private
focal_class.parameters: (Path path,
                                     RevisionVector rv,
                                     StringSort changes)
focal_class.return: void
focal_class.signature: void readBranchChanges(Path path,
                                     RevisionVector rv,
                                     StringSort changes)
focal_class.class_method_signature: JournalDiffLoader.readTrunkChanges(Path path,
                                    RevisionVector beforeRev,
                                    RevisionVector afterRev,
                                    StringSort changes)
focal_class.full_signature: private void readTrunkChanges(Path path,
                                    RevisionVector beforeRev,
                                    RevisionVector afterRev,
                                    StringSort changes)
focal_class.identifier: readTrunkChanges
focal_class.modifiers: private
focal_class.parameters: (Path path,
                                    RevisionVector beforeRev,
                                    RevisionVector afterRev,
                                    StringSort changes)
focal_class.return: void
focal_class.signature: void readTrunkChanges(Path path,
                                    RevisionVector beforeRev,
                                    RevisionVector afterRev,
                                    StringSort changes)
focal_class.class_method_signature: JournalDiffLoader.getBaseRevision(RevisionVector rv)
focal_class.full_signature: @NotNull private RevisionVector getBaseRevision(RevisionVector rv)
focal_class.identifier: getBaseRevision
focal_class.modifiers: @NotNull private
focal_class.parameters: (RevisionVector rv)
focal_class.return: RevisionVector
focal_class.signature: RevisionVector getBaseRevision(RevisionVector rv)
focal_class.class_method_signature: JournalDiffLoader.missingBranch(RevisionVector rv)
focal_class.full_signature: private static void missingBranch(RevisionVector rv)
focal_class.identifier: missingBranch
focal_class.modifiers: private static
focal_class.parameters: (RevisionVector rv)
focal_class.return: void
focal_class.signature: void missingBranch(RevisionVector rv)
focal_class.class_method_signature: JournalDiffLoader.logStats()
focal_class.full_signature: private void logStats()
focal_class.identifier: logStats
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void logStats()
focal_method.body: @Override
      public String call() {
          RevisionVector afterRev = node.getRootRevision();
          RevisionVector beforeRev = base.getRootRevision();
          stats = new Stats(node.getPath(), beforeRev, afterRev);
  
          StringSort changes = JournalEntry.newSorter();
          try {
              Path path = node.getPath();
              readTrunkChanges(path, beforeRev, afterRev, changes);
  
              readBranchChanges(path, beforeRev, changes);
              readBranchChanges(path, afterRev, changes);
  
              changes.sort();
              DiffCache df = ns.getDiffCache();
              WrappedDiffCache wrappedCache = new WrappedDiffCache(node.getPath(), df, stats);
              JournalEntry.applyTo(changes, wrappedCache, node.getPath(), beforeRev, afterRev);
  
              return wrappedCache.changes;
          } catch (IOException e) {
              throw DocumentStoreException.convert(e);
          } finally {
              Utils.closeIfCloseable(changes);
              logStats();
          }
      }
focal_method.class_method_signature: JournalDiffLoader.call()
focal_method.full_signature: @Override public String call()
focal_method.identifier: call
focal_method.invocations: getRootRevision getRootRevision getPath newSorter getPath readTrunkChanges readBranchChanges readBranchChanges sort getDiffCache getPath applyTo getPath convert closeIfCloseable logStats
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: String
focal_method.signature: String call()