test_class.declarator: CLUSTER_1 = new Clusterable() {
          @Override
          public String getInstanceId() {
              return "1";
          }
  
          @Override
          public String getVisibilityToken() {
              return "";
          }
  
          @Override
          public boolean isVisible(String visibilityToken, long maxWaitMillis) throws InterruptedException {
              return true;
          }
      }
test_class.modifier: private static final
test_class.original_string: private static final Clusterable CLUSTER_1 = new Clusterable() {
          @Override
          public String getInstanceId() {
              return "1";
          }
  
          @Override
          public String getVisibilityToken() {
              return "";
          }
  
          @Override
          public boolean isVisible(String visibilityToken, long maxWaitMillis) throws InterruptedException {
              return true;
          }
      };
test_class.type: Clusterable
test_class.var_name: CLUSTER_1
test_class.declarator: CLUSTER_2 = new Clusterable() {
          @Override
          public String getInstanceId() {
              return "2";
          }
  
          @Override
          public String getVisibilityToken() {
              return "";
          }
  
          @Override
          public boolean isVisible(String visibilityToken, long maxWaitMillis) throws InterruptedException {
              return true;
          }
      }
test_class.modifier: private static final
test_class.original_string: private static final Clusterable CLUSTER_2 = new Clusterable() {
          @Override
          public String getInstanceId() {
              return "2";
          }
  
          @Override
          public String getVisibilityToken() {
              return "";
          }
  
          @Override
          public boolean isVisible(String visibilityToken, long maxWaitMillis) throws InterruptedException {
              return true;
          }
      };
test_class.type: Clusterable
test_class.var_name: CLUSTER_2
test_class.declarator: HOOK_NO_CLUSTER = new EditorHook(
          new TestableACEProvider(null, null, null, null))
test_class.modifier: private static final
test_class.original_string: private static final EditorHook HOOK_NO_CLUSTER = new EditorHook(
          new TestableACEProvider(null, null, null, null));
test_class.type: EditorHook
test_class.var_name: HOOK_NO_CLUSTER
test_class.declarator: HOOK_1_SYNC = new EditorHook(
          new TestableACEProvider(CLUSTER_1, null, null, null))
test_class.modifier: private static final
test_class.original_string: private static final EditorHook HOOK_1_SYNC = new EditorHook(
          new TestableACEProvider(CLUSTER_1, null, null, null));
test_class.type: EditorHook
test_class.var_name: HOOK_1_SYNC
test_class.declarator: HOOK_2_SYNC = new EditorHook(
          new TestableACEProvider(CLUSTER_2, null, null, null))
test_class.modifier: private static final
test_class.original_string: private static final EditorHook HOOK_2_SYNC = new EditorHook(
          new TestableACEProvider(CLUSTER_2, null, null, null));
test_class.type: EditorHook
test_class.var_name: HOOK_2_SYNC
test_class.declarator: INCREMENT_BY_1 = PropertyStates.createProperty(
          PROP_INCREMENT, 1L)
test_class.modifier: private static final
test_class.original_string: private static final PropertyState INCREMENT_BY_1 = PropertyStates.createProperty(
          PROP_INCREMENT, 1L);
test_class.type: PropertyState
test_class.var_name: INCREMENT_BY_1
test_class.declarator: INCREMENT_BY_2 = PropertyStates.createProperty(
          PROP_INCREMENT, 2L)
test_class.modifier: private static final
test_class.original_string: private static final PropertyState INCREMENT_BY_2 = PropertyStates.createProperty(
          PROP_INCREMENT, 2L);
test_class.type: PropertyState
test_class.var_name: INCREMENT_BY_2
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/atomic/AtomicCounterEditorTest.java
test_class.identifier: AtomicCounterEditorTest
test_case.body: @Test
      public void isConsolidate() {
          NodeBuilder b = EMPTY_NODE.builder();
          PropertyState counter, hidden1, hidden2;
          String hidden1Name = PREFIX_PROP_COUNTER + "1";
          String hidden2Name = PREFIX_PROP_COUNTER + "2";
          
          assertFalse(AtomicCounterEditor.isConsolidate(b));
          
          counter = LongPropertyState.createLongProperty(PROP_COUNTER, 0);
          hidden1 = LongPropertyState.createLongProperty(hidden1Name, 1);
          b.setProperty(counter);
          b.setProperty(hidden1);
          assertTrue(AtomicCounterEditor.isConsolidate(b));
  
          counter = LongPropertyState.createLongProperty(PROP_COUNTER, 1);
          hidden1 = LongPropertyState.createLongProperty(hidden1Name, 1);
          hidden2 = LongPropertyState.createLongProperty(hidden2Name, 1);
          b.setProperty(counter);
          b.setProperty(hidden1);
          b.setProperty(hidden2);
          assertTrue(AtomicCounterEditor.isConsolidate(b));
  
          counter = LongPropertyState.createLongProperty(PROP_COUNTER, 2);
          hidden1 = LongPropertyState.createLongProperty(hidden1Name, 1);
          hidden2 = LongPropertyState.createLongProperty(hidden2Name, 1);
          b.setProperty(counter);
          b.setProperty(hidden1);
          b.setProperty(hidden2);
          assertFalse(AtomicCounterEditor.isConsolidate(b));
      }
test_case.class_method_signature: AtomicCounterEditorTest.isConsolidate()
test_case.full_signature: @Test public void isConsolidate()
test_case.identifier: isConsolidate
test_case.invocations: builder assertFalse isConsolidate createLongProperty createLongProperty setProperty setProperty assertTrue isConsolidate createLongProperty createLongProperty createLongProperty setProperty setProperty setProperty assertTrue isConsolidate createLongProperty createLongProperty createLongProperty setProperty setProperty setProperty assertFalse isConsolidate
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void isConsolidate()
focal_class.declarator: PROP_INCREMENT = "oak:increment"
focal_class.modifier: public static final
focal_class.original_string: public static final String PROP_INCREMENT = "oak:increment";
focal_class.type: String
focal_class.var_name: PROP_INCREMENT
focal_class.declarator: PROP_COUNTER = "oak:counter"
focal_class.modifier: public static final
focal_class.original_string: public static final String PROP_COUNTER = "oak:counter";
focal_class.type: String
focal_class.var_name: PROP_COUNTER
focal_class.declarator: PREFIX_PROP_COUNTER = ":oak-counter-"
focal_class.modifier: public static final
focal_class.original_string: public static final String PREFIX_PROP_COUNTER = ":oak-counter-";
focal_class.type: String
focal_class.var_name: PREFIX_PROP_COUNTER
focal_class.declarator: PREFIX_PROP_REVISION = ":rev-"
focal_class.modifier: public static final
focal_class.original_string: public static final String PREFIX_PROP_REVISION = ":rev-";
focal_class.type: String
focal_class.var_name: PREFIX_PROP_REVISION
focal_class.declarator: LOG = LoggerFactory.getLogger(AtomicCounterEditor.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(AtomicCounterEditor.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: builder
focal_class.modifier: private final
focal_class.original_string: private final NodeBuilder builder;
focal_class.type: NodeBuilder
focal_class.var_name: builder
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: instanceId
focal_class.modifier: private final
focal_class.original_string: private final String instanceId;
focal_class.type: String
focal_class.var_name: instanceId
focal_class.declarator: executor
focal_class.modifier: private final
focal_class.original_string: private final ScheduledExecutorService executor;
focal_class.type: ScheduledExecutorService
focal_class.var_name: executor
focal_class.declarator: store
focal_class.modifier: private final
focal_class.original_string: private final NodeStore store;
focal_class.type: NodeStore
focal_class.var_name: store
focal_class.declarator: board
focal_class.modifier: private final
focal_class.original_string: private final Whiteboard board;
focal_class.type: Whiteboard
focal_class.var_name: board
focal_class.declarator: counterName
focal_class.modifier: private final
focal_class.original_string: private final String counterName;
focal_class.type: String
focal_class.var_name: counterName
focal_class.declarator: revisionName
focal_class.modifier: private final
focal_class.original_string: private final String revisionName;
focal_class.type: String
focal_class.var_name: revisionName
focal_class.declarator: update
focal_class.modifier: private
focal_class.original_string: private boolean update;
focal_class.type: boolean
focal_class.var_name: update
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/atomic/AtomicCounterEditor.java
focal_class.identifier: AtomicCounterEditor
focal_class.class_method_signature: AtomicCounterEditor.AtomicCounterEditor(@NotNull final NodeBuilder builder, 
                                 @Nullable String instanceId,
                                 @Nullable ScheduledExecutorService executor,
                                 @Nullable NodeStore store,
                                 @Nullable Whiteboard board)
focal_class.full_signature: public  AtomicCounterEditor(@NotNull final NodeBuilder builder, 
                                 @Nullable String instanceId,
                                 @Nullable ScheduledExecutorService executor,
                                 @Nullable NodeStore store,
                                 @Nullable Whiteboard board)
focal_class.identifier: AtomicCounterEditor
focal_class.modifiers: public
focal_class.parameters: (@NotNull final NodeBuilder builder, 
                                 @Nullable String instanceId,
                                 @Nullable ScheduledExecutorService executor,
                                 @Nullable NodeStore store,
                                 @Nullable Whiteboard board)
focal_class.signature:  AtomicCounterEditor(@NotNull final NodeBuilder builder, 
                                 @Nullable String instanceId,
                                 @Nullable ScheduledExecutorService executor,
                                 @Nullable NodeStore store,
                                 @Nullable Whiteboard board)
focal_class.class_method_signature: AtomicCounterEditor.AtomicCounterEditor(final String path, 
                                  final NodeBuilder builder, 
                                  @Nullable String instanceId, 
                                  @Nullable ScheduledExecutorService executor,
                                  @Nullable NodeStore store,
                                  @Nullable Whiteboard board)
focal_class.full_signature: private  AtomicCounterEditor(final String path, 
                                  final NodeBuilder builder, 
                                  @Nullable String instanceId, 
                                  @Nullable ScheduledExecutorService executor,
                                  @Nullable NodeStore store,
                                  @Nullable Whiteboard board)
focal_class.identifier: AtomicCounterEditor
focal_class.modifiers: private
focal_class.parameters: (final String path, 
                                  final NodeBuilder builder, 
                                  @Nullable String instanceId, 
                                  @Nullable ScheduledExecutorService executor,
                                  @Nullable NodeStore store,
                                  @Nullable Whiteboard board)
focal_class.signature:  AtomicCounterEditor(final String path, 
                                  final NodeBuilder builder, 
                                  @Nullable String instanceId, 
                                  @Nullable ScheduledExecutorService executor,
                                  @Nullable NodeStore store,
                                  @Nullable Whiteboard board)
focal_class.class_method_signature: AtomicCounterEditor.shallWeProcessProperty(final PropertyState property,
                                                    final String path,
                                                    final NodeBuilder builder)
focal_class.full_signature: private static boolean shallWeProcessProperty(final PropertyState property,
                                                    final String path,
                                                    final NodeBuilder builder)
focal_class.identifier: shallWeProcessProperty
focal_class.modifiers: private static
focal_class.parameters: (final PropertyState property,
                                                    final String path,
                                                    final NodeBuilder builder)
focal_class.return: boolean
focal_class.signature: boolean shallWeProcessProperty(final PropertyState property,
                                                    final String path,
                                                    final NodeBuilder builder)
focal_class.class_method_signature: AtomicCounterEditor.consolidateCount(@NotNull final NodeBuilder builder)
focal_class.full_signature: public static void consolidateCount(@NotNull final NodeBuilder builder)
focal_class.identifier: consolidateCount
focal_class.modifiers: public static
focal_class.parameters: (@NotNull final NodeBuilder builder)
focal_class.return: void
focal_class.signature: void consolidateCount(@NotNull final NodeBuilder builder)
focal_class.class_method_signature: AtomicCounterEditor.setUniqueCounter(final long value)
focal_class.full_signature: private void setUniqueCounter(final long value)
focal_class.identifier: setUniqueCounter
focal_class.modifiers: private
focal_class.parameters: (final long value)
focal_class.return: void
focal_class.signature: void setUniqueCounter(final long value)
focal_class.class_method_signature: AtomicCounterEditor.propertyAdded(final PropertyState after)
focal_class.full_signature: @Override public void propertyAdded(final PropertyState after)
focal_class.identifier: propertyAdded
focal_class.modifiers: @Override public
focal_class.parameters: (final PropertyState after)
focal_class.return: void
focal_class.signature: void propertyAdded(final PropertyState after)
focal_class.class_method_signature: AtomicCounterEditor.childNodeAdded(final String name, final NodeState after)
focal_class.full_signature: @Override public Editor childNodeAdded(final String name, final NodeState after)
focal_class.identifier: childNodeAdded
focal_class.modifiers: @Override public
focal_class.parameters: (final String name, final NodeState after)
focal_class.return: Editor
focal_class.signature: Editor childNodeAdded(final String name, final NodeState after)
focal_class.class_method_signature: AtomicCounterEditor.childNodeChanged(final String name, 
                                     final NodeState before, 
                                     final NodeState after)
focal_class.full_signature: @Override public Editor childNodeChanged(final String name, 
                                     final NodeState before, 
                                     final NodeState after)
focal_class.identifier: childNodeChanged
focal_class.modifiers: @Override public
focal_class.parameters: (final String name, 
                                     final NodeState before, 
                                     final NodeState after)
focal_class.return: Editor
focal_class.signature: Editor childNodeChanged(final String name, 
                                     final NodeState before, 
                                     final NodeState after)
focal_class.class_method_signature: AtomicCounterEditor.leave(final NodeState before, final NodeState after)
focal_class.full_signature: @Override public void leave(final NodeState before, final NodeState after)
focal_class.identifier: leave
focal_class.modifiers: @Override public
focal_class.parameters: (final NodeState before, final NodeState after)
focal_class.return: void
focal_class.signature: void leave(final NodeState before, final NodeState after)
focal_class.class_method_signature: AtomicCounterEditor.checkRevision(@NotNull NodeBuilder builder, @Nullable PropertyState revision)
focal_class.full_signature: static boolean checkRevision(@NotNull NodeBuilder builder, @Nullable PropertyState revision)
focal_class.identifier: checkRevision
focal_class.modifiers: static
focal_class.parameters: (@NotNull NodeBuilder builder, @Nullable PropertyState revision)
focal_class.return: boolean
focal_class.signature: boolean checkRevision(@NotNull NodeBuilder builder, @Nullable PropertyState revision)
focal_class.class_method_signature: AtomicCounterEditor.builderFromPath(@NotNull NodeBuilder ancestor, @NotNull String path)
focal_class.full_signature: private static NodeBuilder builderFromPath(@NotNull NodeBuilder ancestor, @NotNull String path)
focal_class.identifier: builderFromPath
focal_class.modifiers: private static
focal_class.parameters: (@NotNull NodeBuilder ancestor, @NotNull String path)
focal_class.return: NodeBuilder
focal_class.signature: NodeBuilder builderFromPath(@NotNull NodeBuilder ancestor, @NotNull String path)
focal_class.class_method_signature: AtomicCounterEditor.isConsolidate(@NotNull NodeBuilder b)
focal_class.full_signature: static boolean isConsolidate(@NotNull NodeBuilder b)
focal_class.identifier: isConsolidate
focal_class.modifiers: static
focal_class.parameters: (@NotNull NodeBuilder b)
focal_class.return: boolean
focal_class.signature: boolean isConsolidate(@NotNull NodeBuilder b)
focal_class.class_method_signature: AtomicCounterEditor.createCommitInfo()
focal_class.full_signature: private static CommitInfo createCommitInfo()
focal_class.identifier: createCommitInfo
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: CommitInfo
focal_class.signature: CommitInfo createCommitInfo()
focal_class.superclass: extends DefaultEditor
focal_method.body: static boolean isConsolidate(@NotNull NodeBuilder b) {
          checkNotNull(b);
          PropertyState counter = b.getProperty(PROP_COUNTER);
          if (counter == null) {
              counter = LongPropertyState.createLongProperty(PROP_COUNTER, 0);
          }
          
          long hiddensum = 0;
          for (PropertyState p : b.getProperties()) {
              if (p.getName().startsWith(PREFIX_PROP_COUNTER)) {
                  hiddensum += p.getValue(LONG);
              }
          }
          
          return counter.getValue(LONG) != hiddensum;
      }
focal_method.class_method_signature: AtomicCounterEditor.isConsolidate(@NotNull NodeBuilder b)
focal_method.full_signature: static boolean isConsolidate(@NotNull NodeBuilder b)
focal_method.identifier: isConsolidate
focal_method.invocations: checkNotNull getProperty createLongProperty getProperties startsWith getName getValue getValue
focal_method.modifiers: static
focal_method.parameters: (@NotNull NodeBuilder b)
focal_method.return: boolean
focal_method.signature: boolean isConsolidate(@NotNull NodeBuilder b)