test_class.declarator: store = new MemoryDocumentStore()
test_class.modifier: private
test_class.original_string: private DocumentStore store = new MemoryDocumentStore();
test_class.type: DocumentStore
test_class.var_name: store
test_class.declarator: clock = new Clock.Virtual()
test_class.modifier: private
test_class.original_string: private Clock clock = new Clock.Virtual();
test_class.type: Clock
test_class.var_name: clock
test_class.declarator: executor = Executors.newCachedThreadPool()
test_class.modifier: private
test_class.original_string: private ExecutorService executor = Executors.newCachedThreadPool();
test_class.type: ExecutorService
test_class.var_name: executor
test_class.declarator: lock1 = new RecoveryLock(store, clock, 1)
test_class.modifier: private
test_class.original_string: private RecoveryLock lock1 = new RecoveryLock(store, clock, 1);
test_class.type: RecoveryLock
test_class.var_name: lock1
test_class.declarator: lock2 = new RecoveryLock(store, clock, 2)
test_class.modifier: private
test_class.original_string: private RecoveryLock lock2 = new RecoveryLock(store, clock, 2);
test_class.type: RecoveryLock
test_class.var_name: lock2
test_class.declarator: info1
test_class.modifier: private
test_class.original_string: private ClusterNodeInfo info1;
test_class.type: ClusterNodeInfo
test_class.var_name: info1
test_class.declarator: info2
test_class.modifier: private
test_class.original_string: private ClusterNodeInfo info2;
test_class.type: ClusterNodeInfo
test_class.var_name: info2
test_class.file: oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/RecoveryLockTest.java
test_class.identifier: RecoveryLockTest
test_case.body: @Test
      public void recoveryNotNeeded() {
          assertFalse(lock1.acquireRecoveryLock(2));
      }
test_case.class_method_signature: RecoveryLockTest.recoveryNotNeeded()
test_case.full_signature: @Test public void recoveryNotNeeded()
test_case.identifier: recoveryNotNeeded
test_case.invocations: assertFalse acquireRecoveryLock
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void recoveryNotNeeded()
focal_class.declarator: LOG = LoggerFactory.getLogger(RecoveryLock.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(RecoveryLock.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: store
focal_class.modifier: private final
focal_class.original_string: private final DocumentStore store;
focal_class.type: DocumentStore
focal_class.var_name: store
focal_class.declarator: clock
focal_class.modifier: private final
focal_class.original_string: private final Clock clock;
focal_class.type: Clock
focal_class.var_name: clock
focal_class.declarator: clusterId
focal_class.modifier: private final
focal_class.original_string: private final int clusterId;
focal_class.type: int
focal_class.var_name: clusterId
focal_class.file: oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/RecoveryLock.java
focal_class.identifier: RecoveryLock
focal_class.class_method_signature: RecoveryLock.RecoveryLock(DocumentStore store, Clock clock, int clusterId)
focal_class.full_signature:   RecoveryLock(DocumentStore store, Clock clock, int clusterId)
focal_class.identifier: RecoveryLock
focal_class.parameters: (DocumentStore store, Clock clock, int clusterId)
focal_class.signature:  RecoveryLock(DocumentStore store, Clock clock, int clusterId)
focal_class.class_method_signature: RecoveryLock.acquireRecoveryLock(int recoveredBy)
focal_class.full_signature:  boolean acquireRecoveryLock(int recoveredBy)
focal_class.identifier: acquireRecoveryLock
focal_class.parameters: (int recoveredBy)
focal_class.return: boolean
focal_class.signature: boolean acquireRecoveryLock(int recoveredBy)
focal_class.class_method_signature: RecoveryLock.releaseRecoveryLock(boolean success)
focal_class.full_signature:  void releaseRecoveryLock(boolean success)
focal_class.identifier: releaseRecoveryLock
focal_class.parameters: (boolean success)
focal_class.return: void
focal_class.signature: void releaseRecoveryLock(boolean success)
focal_class.class_method_signature: RecoveryLock.tryAcquireRecoveryLock(ClusterNodeInfoDocument info,
                                             int recoveredBy)
focal_class.full_signature: private boolean tryAcquireRecoveryLock(ClusterNodeInfoDocument info,
                                             int recoveredBy)
focal_class.identifier: tryAcquireRecoveryLock
focal_class.modifiers: private
focal_class.parameters: (ClusterNodeInfoDocument info,
                                             int recoveredBy)
focal_class.return: boolean
focal_class.signature: boolean tryAcquireRecoveryLock(ClusterNodeInfoDocument info,
                                             int recoveredBy)
focal_class.class_method_signature: RecoveryLock.tryBreakRecoveryLock(ClusterNodeInfoDocument doc,
                                           int recoveredBy)
focal_class.full_signature: private boolean tryBreakRecoveryLock(ClusterNodeInfoDocument doc,
                                           int recoveredBy)
focal_class.identifier: tryBreakRecoveryLock
focal_class.modifiers: private
focal_class.parameters: (ClusterNodeInfoDocument doc,
                                           int recoveredBy)
focal_class.return: boolean
focal_class.signature: boolean tryBreakRecoveryLock(ClusterNodeInfoDocument doc,
                                           int recoveredBy)
focal_method.body: boolean acquireRecoveryLock(int recoveredBy) {
          ClusterNodeInfoDocument doc = store.find(CLUSTER_NODES, String.valueOf(clusterId));
          if (doc == null) {
              // this is unexpected...
              return false;
          }
          if (!doc.isRecoveryNeeded(clock.getTime())) {
              return false;
          }
          if (tryAcquireRecoveryLock(doc, recoveredBy)) {
              return true;
          }
          // either we already own the lock or were able to break the lock
          return doc.isBeingRecoveredBy(recoveredBy)
                  || tryBreakRecoveryLock(doc, recoveredBy);
      }
focal_method.class_method_signature: RecoveryLock.acquireRecoveryLock(int recoveredBy)
focal_method.full_signature:  boolean acquireRecoveryLock(int recoveredBy)
focal_method.identifier: acquireRecoveryLock
focal_method.invocations: find valueOf isRecoveryNeeded getTime tryAcquireRecoveryLock isBeingRecoveredBy tryBreakRecoveryLock
focal_method.parameters: (int recoveredBy)
focal_method.return: boolean
focal_method.signature: boolean acquireRecoveryLock(int recoveredBy)