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.file: oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/CommitTest.java
test_class.identifier: CommitTest
test_case.body: @Test
      public void mergeExceptionMessage() throws Exception {
          // prepare node store
          DocumentNodeStore ns = builderProvider.newBuilder().getNodeStore();
          NodeBuilder b = ns.getRoot().builder();
          b.child("foo");
          ns.merge(b, EmptyHook.INSTANCE, CommitInfo.EMPTY);
          b = ns.getRoot().builder();
          b.child("bar");
          ns.merge(b, EmptyHook.INSTANCE, CommitInfo.EMPTY);
  
          // this commit should fail
          Commit c = ns.newCommit(changes -> {
              changes.addNode(Path.fromString("/foo"));
          }, ns.getHeadRevision(), null);
          try {
              c.apply();
              ns.done(c, false, CommitInfo.EMPTY);
              fail("commit must fail");
          } catch (ConflictException e) {
              // expected
              assertTrue("Unexpected exception message: " + e.getMessage(),
                      e.getMessage().contains("older than base"));
          } finally {
              ns.canceled(c);
          }
      }
test_case.class_method_signature: CommitTest.mergeExceptionMessage()
test_case.full_signature: @Test public void mergeExceptionMessage()
test_case.identifier: mergeExceptionMessage
test_case.invocations: getNodeStore newBuilder builder getRoot child merge builder getRoot child merge newCommit addNode fromString getHeadRevision apply done fail assertTrue getMessage contains getMessage canceled
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void mergeExceptionMessage()
focal_class.declarator: LOG = LoggerFactory.getLogger(Commit.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(Commit.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: nodeStore
focal_class.modifier: protected final
focal_class.original_string: protected final DocumentNodeStore nodeStore;
focal_class.type: DocumentNodeStore
focal_class.var_name: nodeStore
focal_class.declarator: baseRevision
focal_class.modifier: private final
focal_class.original_string: private final RevisionVector baseRevision;
focal_class.type: RevisionVector
focal_class.var_name: baseRevision
focal_class.declarator: startRevisions
focal_class.modifier: private final
focal_class.original_string: private final RevisionVector startRevisions;
focal_class.type: RevisionVector
focal_class.var_name: startRevisions
focal_class.declarator: revision
focal_class.modifier: private final
focal_class.original_string: private final Revision revision;
focal_class.type: Revision
focal_class.var_name: revision
focal_class.declarator: operations = new LinkedHashMap<>()
focal_class.modifier: private final
focal_class.original_string: private final HashMap<Path, UpdateOp> operations = new LinkedHashMap<>();
focal_class.type: HashMap<Path, UpdateOp>
focal_class.var_name: operations
focal_class.declarator: collisions = new LinkedHashSet<Revision>()
focal_class.modifier: private final
focal_class.original_string: private final Set<Revision> collisions = new LinkedHashSet<Revision>();
focal_class.type: Set<Revision>
focal_class.var_name: collisions
focal_class.declarator: b
focal_class.modifier: private
focal_class.original_string: private Branch b;
focal_class.type: Branch
focal_class.var_name: b
focal_class.declarator: rollback = Rollback.NONE
focal_class.modifier: private
focal_class.original_string: private Rollback rollback = Rollback.NONE;
focal_class.type: Rollback
focal_class.var_name: rollback
focal_class.declarator: modifiedNodes = new HashSet<>()
focal_class.modifier: private final
focal_class.original_string: private final HashSet<Path> modifiedNodes = new HashSet<>();
focal_class.type: HashSet<Path>
focal_class.var_name: modifiedNodes
focal_class.declarator: addedNodes = new HashSet<>()
focal_class.modifier: private final
focal_class.original_string: private final HashSet<Path> addedNodes = new HashSet<>();
focal_class.type: HashSet<Path>
focal_class.var_name: addedNodes
focal_class.declarator: removedNodes = new HashSet<>()
focal_class.modifier: private final
focal_class.original_string: private final HashSet<Path> removedNodes = new HashSet<>();
focal_class.type: HashSet<Path>
focal_class.var_name: removedNodes
focal_class.declarator: nodesWithBinaries = new HashSet<>()
focal_class.modifier: private final
focal_class.original_string: private final HashSet<Path> nodesWithBinaries = new HashSet<>();
focal_class.type: HashSet<Path>
focal_class.var_name: nodesWithBinaries
focal_class.declarator: bundledNodes = new HashMap<>()
focal_class.modifier: private final
focal_class.original_string: private final HashMap<Path, Path> bundledNodes = new HashMap<>();
focal_class.type: HashMap<Path, Path>
focal_class.var_name: bundledNodes
focal_class.declarator: KEY_TO_NAME =
              new Function<UpdateOp.Key, String>() {
          @Override
          public String apply(UpdateOp.Key input) {
              return input.getName();
          }
      }
focal_class.modifier: private static final
focal_class.original_string: private static final Function<UpdateOp.Key, String> KEY_TO_NAME =
              new Function<UpdateOp.Key, String>() {
          @Override
          public String apply(UpdateOp.Key input) {
              return input.getName();
          }
      };
focal_class.type: Function<UpdateOp.Key, String>
focal_class.var_name: KEY_TO_NAME
focal_class.file: oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/Commit.java
focal_class.identifier: Commit
focal_class.class_method_signature: Commit.Commit(@NotNull DocumentNodeStore nodeStore,
             @NotNull Revision revision,
             @Nullable RevisionVector baseRevision,
             @NotNull RevisionVector startRevisions)
focal_class.full_signature:   Commit(@NotNull DocumentNodeStore nodeStore,
             @NotNull Revision revision,
             @Nullable RevisionVector baseRevision,
             @NotNull RevisionVector startRevisions)
focal_class.identifier: Commit
focal_class.parameters: (@NotNull DocumentNodeStore nodeStore,
             @NotNull Revision revision,
             @Nullable RevisionVector baseRevision,
             @NotNull RevisionVector startRevisions)
focal_class.signature:  Commit(@NotNull DocumentNodeStore nodeStore,
             @NotNull Revision revision,
             @Nullable RevisionVector baseRevision,
             @NotNull RevisionVector startRevisions)
focal_class.class_method_signature: Commit.Commit(@NotNull DocumentNodeStore nodeStore,
             @NotNull Revision revision,
             @Nullable RevisionVector baseRevision,
             @NotNull RevisionVector startRevisions,
             @NotNull Map<Path, UpdateOp> operations,
             @NotNull Set<Path> addedNodes,
             @NotNull Set<Path> removedNodes,
             @NotNull Set<Path> nodesWithBinaries,
             @NotNull Map<Path, Path> bundledNodes)
focal_class.full_signature:   Commit(@NotNull DocumentNodeStore nodeStore,
             @NotNull Revision revision,
             @Nullable RevisionVector baseRevision,
             @NotNull RevisionVector startRevisions,
             @NotNull Map<Path, UpdateOp> operations,
             @NotNull Set<Path> addedNodes,
             @NotNull Set<Path> removedNodes,
             @NotNull Set<Path> nodesWithBinaries,
             @NotNull Map<Path, Path> bundledNodes)
focal_class.identifier: Commit
focal_class.parameters: (@NotNull DocumentNodeStore nodeStore,
             @NotNull Revision revision,
             @Nullable RevisionVector baseRevision,
             @NotNull RevisionVector startRevisions,
             @NotNull Map<Path, UpdateOp> operations,
             @NotNull Set<Path> addedNodes,
             @NotNull Set<Path> removedNodes,
             @NotNull Set<Path> nodesWithBinaries,
             @NotNull Map<Path, Path> bundledNodes)
focal_class.signature:  Commit(@NotNull DocumentNodeStore nodeStore,
             @NotNull Revision revision,
             @Nullable RevisionVector baseRevision,
             @NotNull RevisionVector startRevisions,
             @NotNull Map<Path, UpdateOp> operations,
             @NotNull Set<Path> addedNodes,
             @NotNull Set<Path> removedNodes,
             @NotNull Set<Path> nodesWithBinaries,
             @NotNull Map<Path, Path> bundledNodes)
focal_class.class_method_signature: Commit.getUpdateOperationForNode(Path path)
focal_class.full_signature:  UpdateOp getUpdateOperationForNode(Path path)
focal_class.identifier: getUpdateOperationForNode
focal_class.parameters: (Path path)
focal_class.return: UpdateOp
focal_class.signature: UpdateOp getUpdateOperationForNode(Path path)
focal_class.class_method_signature: Commit.createUpdateOp(Path path,
                                     Revision revision,
                                     boolean isBranch)
focal_class.full_signature: static UpdateOp createUpdateOp(Path path,
                                     Revision revision,
                                     boolean isBranch)
focal_class.identifier: createUpdateOp
focal_class.modifiers: static
focal_class.parameters: (Path path,
                                     Revision revision,
                                     boolean isBranch)
focal_class.return: UpdateOp
focal_class.signature: UpdateOp createUpdateOp(Path path,
                                     Revision revision,
                                     boolean isBranch)
focal_class.class_method_signature: Commit.getRevision()
focal_class.full_signature: @NotNull Revision getRevision()
focal_class.identifier: getRevision
focal_class.modifiers: @NotNull
focal_class.parameters: ()
focal_class.return: Revision
focal_class.signature: Revision getRevision()
focal_class.class_method_signature: Commit.getBaseRevision()
focal_class.full_signature: @Nullable RevisionVector getBaseRevision()
focal_class.identifier: getBaseRevision
focal_class.modifiers: @Nullable
focal_class.parameters: ()
focal_class.return: RevisionVector
focal_class.signature: RevisionVector getBaseRevision()
focal_class.class_method_signature: Commit.getModifiedPaths()
focal_class.full_signature: @NotNull Iterable<Path> getModifiedPaths()
focal_class.identifier: getModifiedPaths
focal_class.modifiers: @NotNull
focal_class.parameters: ()
focal_class.return: Iterable<Path>
focal_class.signature: Iterable<Path> getModifiedPaths()
focal_class.class_method_signature: Commit.isEmpty()
focal_class.full_signature:  boolean isEmpty()
focal_class.identifier: isEmpty
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isEmpty()
focal_class.class_method_signature: Commit.rollback()
focal_class.full_signature:  boolean rollback()
focal_class.identifier: rollback
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean rollback()
focal_class.class_method_signature: Commit.apply()
focal_class.full_signature:  void apply()
focal_class.identifier: apply
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void apply()
focal_class.class_method_signature: Commit.applyInternal()
focal_class.full_signature: private void applyInternal()
focal_class.identifier: applyInternal
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void applyInternal()
focal_class.class_method_signature: Commit.prepare(RevisionVector baseRevision)
focal_class.full_signature: private void prepare(RevisionVector baseRevision)
focal_class.identifier: prepare
focal_class.modifiers: private
focal_class.parameters: (RevisionVector baseRevision)
focal_class.return: void
focal_class.signature: void prepare(RevisionVector baseRevision)
focal_class.class_method_signature: Commit.updateBinaryStatus()
focal_class.full_signature: private void updateBinaryStatus()
focal_class.identifier: updateBinaryStatus
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void updateBinaryStatus()
focal_class.class_method_signature: Commit.applyToDocumentStore()
focal_class.full_signature:  void applyToDocumentStore()
focal_class.identifier: applyToDocumentStore
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void applyToDocumentStore()
focal_class.class_method_signature: Commit.applyToDocumentStoreWithTiming(RevisionVector baseBranchRevision)
focal_class.full_signature: private void applyToDocumentStoreWithTiming(RevisionVector baseBranchRevision)
focal_class.identifier: applyToDocumentStoreWithTiming
focal_class.modifiers: private
focal_class.parameters: (RevisionVector baseBranchRevision)
focal_class.return: void
focal_class.signature: void applyToDocumentStoreWithTiming(RevisionVector baseBranchRevision)
focal_class.class_method_signature: Commit.applyToDocumentStore(RevisionVector baseBranchRevision)
focal_class.full_signature: private void applyToDocumentStore(RevisionVector baseBranchRevision)
focal_class.identifier: applyToDocumentStore
focal_class.modifiers: private
focal_class.parameters: (RevisionVector baseBranchRevision)
focal_class.return: void
focal_class.signature: void applyToDocumentStore(RevisionVector baseBranchRevision)
focal_class.class_method_signature: Commit.conditionalCommit(List<UpdateOp> changedNodes,
                                        String commitValue)
focal_class.full_signature: private boolean conditionalCommit(List<UpdateOp> changedNodes,
                                        String commitValue)
focal_class.identifier: conditionalCommit
focal_class.modifiers: private
focal_class.parameters: (List<UpdateOp> changedNodes,
                                        String commitValue)
focal_class.return: boolean
focal_class.signature: boolean conditionalCommit(List<UpdateOp> changedNodes,
                                        String commitValue)
focal_class.class_method_signature: Commit.removeCollisionMarker(String id)
focal_class.full_signature: private void removeCollisionMarker(String id)
focal_class.identifier: removeCollisionMarker
focal_class.modifiers: private
focal_class.parameters: (String id)
focal_class.return: void
focal_class.signature: void removeCollisionMarker(String id)
focal_class.class_method_signature: Commit.updateParentChildStatus()
focal_class.full_signature: private void updateParentChildStatus()
focal_class.identifier: updateParentChildStatus
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void updateParentChildStatus()
focal_class.class_method_signature: Commit.createOrUpdateNode(DocumentStore store, UpdateOp op)
focal_class.full_signature: private void createOrUpdateNode(DocumentStore store, UpdateOp op)
focal_class.identifier: createOrUpdateNode
focal_class.modifiers: private
focal_class.parameters: (DocumentStore store, UpdateOp op)
focal_class.return: void
focal_class.signature: void createOrUpdateNode(DocumentStore store, UpdateOp op)
focal_class.class_method_signature: Commit.checkSplitCandidate(Iterable<NodeDocument> docs)
focal_class.full_signature: private void checkSplitCandidate(Iterable<NodeDocument> docs)
focal_class.identifier: checkSplitCandidate
focal_class.modifiers: private
focal_class.parameters: (Iterable<NodeDocument> docs)
focal_class.return: void
focal_class.signature: void checkSplitCandidate(Iterable<NodeDocument> docs)
focal_class.class_method_signature: Commit.checkSplitCandidate(@Nullable NodeDocument doc)
focal_class.full_signature: private void checkSplitCandidate(@Nullable NodeDocument doc)
focal_class.identifier: checkSplitCandidate
focal_class.modifiers: private
focal_class.parameters: (@Nullable NodeDocument doc)
focal_class.return: void
focal_class.signature: void checkSplitCandidate(@Nullable NodeDocument doc)
focal_class.class_method_signature: Commit.checkConflicts(@NotNull UpdateOp op,
                                  @Nullable NodeDocument before)
focal_class.full_signature: private void checkConflicts(@NotNull UpdateOp op,
                                  @Nullable NodeDocument before)
focal_class.identifier: checkConflicts
focal_class.modifiers: private
focal_class.parameters: (@NotNull UpdateOp op,
                                  @Nullable NodeDocument before)
focal_class.return: void
focal_class.signature: void checkConflicts(@NotNull UpdateOp op,
                                  @Nullable NodeDocument before)
focal_class.class_method_signature: Commit.checkConflicts(List<NodeDocument> oldDocs,
                                  List<UpdateOp> updates)
focal_class.full_signature: private void checkConflicts(List<NodeDocument> oldDocs,
                                  List<UpdateOp> updates)
focal_class.identifier: checkConflicts
focal_class.modifiers: private
focal_class.parameters: (List<NodeDocument> oldDocs,
                                  List<UpdateOp> updates)
focal_class.return: void
focal_class.signature: void checkConflicts(List<NodeDocument> oldDocs,
                                  List<UpdateOp> updates)
focal_class.class_method_signature: Commit.formatConflictRevision(Revision r)
focal_class.full_signature: private String formatConflictRevision(Revision r)
focal_class.identifier: formatConflictRevision
focal_class.modifiers: private
focal_class.parameters: (Revision r)
focal_class.return: String
focal_class.signature: String formatConflictRevision(Revision r)
focal_class.class_method_signature: Commit.isConflicting(@Nullable NodeDocument doc,
                                    @NotNull UpdateOp op)
focal_class.full_signature: private boolean isConflicting(@Nullable NodeDocument doc,
                                    @NotNull UpdateOp op)
focal_class.identifier: isConflicting
focal_class.modifiers: private
focal_class.parameters: (@Nullable NodeDocument doc,
                                    @NotNull UpdateOp op)
focal_class.return: boolean
focal_class.signature: boolean isConflicting(@Nullable NodeDocument doc,
                                    @NotNull UpdateOp op)
focal_class.class_method_signature: Commit.allowConcurrentAddRemove(@Nullable NodeDocument before,
                                               @NotNull UpdateOp op)
focal_class.full_signature: private boolean allowConcurrentAddRemove(@Nullable NodeDocument before,
                                               @NotNull UpdateOp op)
focal_class.identifier: allowConcurrentAddRemove
focal_class.modifiers: private
focal_class.parameters: (@Nullable NodeDocument before,
                                               @NotNull UpdateOp op)
focal_class.return: boolean
focal_class.signature: boolean allowConcurrentAddRemove(@Nullable NodeDocument before,
                                               @NotNull UpdateOp op)
focal_class.class_method_signature: Commit.getBranch()
focal_class.full_signature: @Nullable private Branch getBranch()
focal_class.identifier: getBranch
focal_class.modifiers: @Nullable private
focal_class.parameters: ()
focal_class.return: Branch
focal_class.signature: Branch getBranch()
focal_class.class_method_signature: Commit.isBranchCommit()
focal_class.full_signature: private boolean isBranchCommit()
focal_class.identifier: isBranchCommit
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isBranchCommit()
focal_class.class_method_signature: Commit.applyLastRevUpdates(boolean isBranchCommit)
focal_class.full_signature:  void applyLastRevUpdates(boolean isBranchCommit)
focal_class.identifier: applyLastRevUpdates
focal_class.parameters: (boolean isBranchCommit)
focal_class.return: void
focal_class.signature: void applyLastRevUpdates(boolean isBranchCommit)
focal_class.class_method_signature: Commit.applyToCache(RevisionVector before, boolean isBranchCommit)
focal_class.full_signature: public void applyToCache(RevisionVector before, boolean isBranchCommit)
focal_class.identifier: applyToCache
focal_class.modifiers: public
focal_class.parameters: (RevisionVector before, boolean isBranchCommit)
focal_class.return: void
focal_class.signature: void applyToCache(RevisionVector before, boolean isBranchCommit)
focal_class.class_method_signature: Commit.markChanged(Path path)
focal_class.full_signature:  void markChanged(Path path)
focal_class.identifier: markChanged
focal_class.parameters: (Path path)
focal_class.return: void
focal_class.signature: void markChanged(Path path)
focal_class.class_method_signature: Commit.getStartRevisions()
focal_class.full_signature: @NotNull RevisionVector getStartRevisions()
focal_class.identifier: getStartRevisions
focal_class.modifiers: @NotNull
focal_class.parameters: ()
focal_class.return: RevisionVector
focal_class.signature: RevisionVector getStartRevisions()
focal_class.class_method_signature: Commit.addChangesToDiffCacheEntry(Path path,
                                              List<Path> added,
                                              List<Path> removed,
                                              List<Path> changed,
                                              DiffCache.Entry cacheEntry)
focal_class.full_signature: private void addChangesToDiffCacheEntry(Path path,
                                              List<Path> added,
                                              List<Path> removed,
                                              List<Path> changed,
                                              DiffCache.Entry cacheEntry)
focal_class.identifier: addChangesToDiffCacheEntry
focal_class.modifiers: private
focal_class.parameters: (Path path,
                                              List<Path> added,
                                              List<Path> removed,
                                              List<Path> changed,
                                              DiffCache.Entry cacheEntry)
focal_class.return: void
focal_class.signature: void addChangesToDiffCacheEntry(Path path,
                                              List<Path> added,
                                              List<Path> removed,
                                              List<Path> changed,
                                              DiffCache.Entry cacheEntry)
focal_class.class_method_signature: Commit.isBundled(Path path)
focal_class.full_signature: private boolean isBundled(Path path)
focal_class.identifier: isBundled
focal_class.modifiers: private
focal_class.parameters: (Path path)
focal_class.return: boolean
focal_class.signature: boolean isBundled(Path path)
focal_class.class_method_signature: Commit.hasContentChanges(UpdateOp op)
focal_class.full_signature: private static boolean hasContentChanges(UpdateOp op)
focal_class.identifier: hasContentChanges
focal_class.modifiers: private static
focal_class.parameters: (UpdateOp op)
focal_class.return: boolean
focal_class.signature: boolean hasContentChanges(UpdateOp op)
focal_method.body: void apply() throws ConflictException, DocumentStoreException {
          boolean success = false;
          RevisionVector baseRev = getBaseRevision();
          boolean isBranch = baseRev != null && baseRev.isBranch();
          Revision rev = getRevision();
          if (isBranch && !nodeStore.isDisableBranches()) {
              try {
                  // prepare commit
                  prepare(baseRev);
                  success = true;
              } finally {
                  if (!success) {
                      rollback();
                      Branch branch = getBranch();
                      if (branch != null) {
                          branch.removeCommit(rev.asBranchRevision());
                          if (!branch.hasCommits()) {
                              nodeStore.getBranches().remove(branch);
                          }
                      }
                  }
              }
          } else {
              applyInternal();
          }
      }
focal_method.class_method_signature: Commit.apply()
focal_method.full_signature:  void apply()
focal_method.identifier: apply
focal_method.invocations: getBaseRevision isBranch getRevision isDisableBranches prepare rollback getBranch removeCommit asBranchRevision hasCommits remove getBranches applyInternal
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void apply()