test_class.declarator: GRPC_LOGGER
test_class.modifier: private static final
test_class.original_string: private static final Logger GRPC_LOGGER;
test_class.type: Logger
test_class.var_name: GRPC_LOGGER
test_class.declarator: NETTY_LOGGER
test_class.modifier: private static final
test_class.original_string: private static final Logger NETTY_LOGGER;
test_class.type: Logger
test_class.var_name: NETTY_LOGGER
test_class.declarator: instances = new ConcurrentHashMap<>()
test_class.modifier: private final
test_class.original_string: private final Map<Endpoint, Cluster> instances = new ConcurrentHashMap<>();
test_class.type: Map<Endpoint, Cluster>
test_class.var_name: instances
test_class.declarator: staticFds = new ConcurrentHashMap<>()
test_class.modifier: private final
test_class.original_string: private final Map<Endpoint, StaticFailureDetector.Factory> staticFds = new ConcurrentHashMap<>();
test_class.type: Map<Endpoint, StaticFailureDetector.Factory>
test_class.var_name: staticFds
test_class.declarator: serverInterceptors = new ConcurrentHashMap<>()
test_class.modifier: private final
test_class.original_string: private final Map<Endpoint, List<ServerDropInterceptors.FirstN>> serverInterceptors = new ConcurrentHashMap<>();
test_class.type: Map<Endpoint, List<ServerDropInterceptors.FirstN>>
test_class.var_name: serverInterceptors
test_class.declarator: clientInterceptors = new ConcurrentHashMap<>()
test_class.modifier: private final
test_class.original_string: private final Map<Endpoint, List<ClientInterceptors.Delayer>> clientInterceptors = new ConcurrentHashMap<>();
test_class.type: Map<Endpoint, List<ClientInterceptors.Delayer>>
test_class.var_name: clientInterceptors
test_class.declarator: useStaticFd = false
test_class.modifier: private
test_class.original_string: private boolean useStaticFd = false;
test_class.type: boolean
test_class.var_name: useStaticFd
test_class.declarator: addMetadata = true
test_class.modifier: private
test_class.original_string: private boolean addMetadata = true;
test_class.type: boolean
test_class.var_name: addMetadata
test_class.declarator: random = null
test_class.modifier: @Nullable private
test_class.original_string: @Nullable private Random random = null;
test_class.type: Random
test_class.var_name: random
test_class.declarator: seed
test_class.modifier: private
test_class.original_string: private long seed;
test_class.type: long
test_class.var_name: seed
test_class.declarator: basePort
test_class.modifier: private
test_class.original_string: private int basePort;
test_class.type: int
test_class.var_name: basePort
test_class.declarator: portCounter = null
test_class.modifier: @Nullable private
test_class.original_string: @Nullable private AtomicInteger portCounter = null;
test_class.type: AtomicInteger
test_class.var_name: portCounter
test_class.declarator: settings = new Settings()
test_class.modifier: private
test_class.original_string: private Settings settings = new Settings();
test_class.type: Settings
test_class.var_name: settings
test_class.declarator: testWatcher = new TestWatcher() {
          @Override
          protected void failed(final Throwable e, final Description description) {
  
              System.out.println("\u001B[31m     [FAILED] [Seed: " + seed + "] " + description.getMethodName()
                                 + "\u001B[0m");
          }
      }
test_class.modifier: @Rule
      public final
test_class.original_string: @Rule
      public final TestWatcher testWatcher = new TestWatcher() {
          @Override
          protected void failed(final Throwable e, final Description description) {
  
              System.out.println("\u001B[31m     [FAILED] [Seed: " + seed + "] " + description.getMethodName()
                                 + "\u001B[0m");
          }
      };
test_class.type: TestWatcher
test_class.var_name: testWatcher
test_class.file: rapid/src/test/java/com/vrg/rapid/ClusterTest.java
test_class.identifier: ClusterTest
test_case.body: @Test(timeout = 30000)
      public void failRandomThirdOfNodes() throws IOException, InterruptedException {
          useStaticFd = true;
          final int numNodes = 50;
          final int numFailingNodes = 16;
          final Endpoint seedEndpoint = Utils.hostFromParts("127.0.0.1", basePort);
          createCluster(numNodes, seedEndpoint);
          verifyCluster(numNodes);
          // Fail the first 3 nodes.
          final Set<Endpoint> failingNodes = getRandomHosts(numFailingNodes);
          staticFds.values().forEach(e -> e.addFailedNodes(failingNodes));
          failingNodes.forEach(h -> instances.remove(h).shutdown());
          waitAndVerifyAgreement(numNodes - failingNodes.size(), 20, 1500);
          // Nodes do not actually shutdown(), but are detected faulty. The faulty nodes have active
          // cluster instances and identify themselves as kicked out.
          verifyNumClusterInstances(numNodes - failingNodes.size());
      }
test_case.class_method_signature: ClusterTest.failRandomThirdOfNodes()
test_case.full_signature: @Test(timeout = 30000) public void failRandomThirdOfNodes()
test_case.identifier: failRandomThirdOfNodes
test_case.invocations: hostFromParts createCluster verifyCluster getRandomHosts forEach values addFailedNodes forEach shutdown remove waitAndVerifyAgreement size verifyNumClusterInstances size
test_case.modifiers: @Test(timeout = 30000) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void failRandomThirdOfNodes()
focal_class.declarator: LOG = LoggerFactory.getLogger(Cluster.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(Cluster.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: K = 10
focal_class.modifier: private static final
focal_class.original_string: private static final int K = 10;
focal_class.type: int
focal_class.var_name: K
focal_class.declarator: H = 9
focal_class.modifier: private static final
focal_class.original_string: private static final int H = 9;
focal_class.type: int
focal_class.var_name: H
focal_class.declarator: L = 4
focal_class.modifier: private static final
focal_class.original_string: private static final int L = 4;
focal_class.type: int
focal_class.var_name: L
focal_class.declarator: RETRIES = 5
focal_class.modifier: private static final
focal_class.original_string: private static final int RETRIES = 5;
focal_class.type: int
focal_class.var_name: RETRIES
focal_class.declarator: membershipService
focal_class.modifier: private final
focal_class.original_string: private final MembershipService membershipService;
focal_class.type: MembershipService
focal_class.var_name: membershipService
focal_class.declarator: rpcServer
focal_class.modifier: private final
focal_class.original_string: private final IMessagingServer rpcServer;
focal_class.type: IMessagingServer
focal_class.var_name: rpcServer
focal_class.declarator: sharedResources
focal_class.modifier: private final
focal_class.original_string: private final SharedResources sharedResources;
focal_class.type: SharedResources
focal_class.var_name: sharedResources
focal_class.declarator: listenAddress
focal_class.modifier: private final
focal_class.original_string: private final Endpoint listenAddress;
focal_class.type: Endpoint
focal_class.var_name: listenAddress
focal_class.declarator: hasShutdown = false
focal_class.modifier: private
focal_class.original_string: private boolean hasShutdown = false;
focal_class.type: boolean
focal_class.var_name: hasShutdown
focal_class.file: rapid/src/main/java/com/vrg/rapid/Cluster.java
focal_class.identifier: Cluster
focal_class.class_method_signature: Cluster.Cluster(final IMessagingServer rpcServer,
                      final MembershipService membershipService,
                      final SharedResources sharedResources,
                      final Endpoint listenAddress)
focal_class.full_signature: private  Cluster(final IMessagingServer rpcServer,
                      final MembershipService membershipService,
                      final SharedResources sharedResources,
                      final Endpoint listenAddress)
focal_class.identifier: Cluster
focal_class.modifiers: private
focal_class.parameters: (final IMessagingServer rpcServer,
                      final MembershipService membershipService,
                      final SharedResources sharedResources,
                      final Endpoint listenAddress)
focal_class.signature:  Cluster(final IMessagingServer rpcServer,
                      final MembershipService membershipService,
                      final SharedResources sharedResources,
                      final Endpoint listenAddress)
focal_class.class_method_signature: Cluster.getMemberlist()
focal_class.full_signature: public List<Endpoint> getMemberlist()
focal_class.identifier: getMemberlist
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Endpoint>
focal_class.signature: List<Endpoint> getMemberlist()
focal_class.class_method_signature: Cluster.getMembershipSize()
focal_class.full_signature: public int getMembershipSize()
focal_class.identifier: getMembershipSize
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMembershipSize()
focal_class.class_method_signature: Cluster.getClusterMetadata()
focal_class.full_signature: public Map<Endpoint, Metadata> getClusterMetadata()
focal_class.identifier: getClusterMetadata
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<Endpoint, Metadata>
focal_class.signature: Map<Endpoint, Metadata> getClusterMetadata()
focal_class.class_method_signature: Cluster.registerSubscription(final ClusterEvents event,
                                       final BiConsumer<Long, List<NodeStatusChange>> callback)
focal_class.full_signature: public void registerSubscription(final ClusterEvents event,
                                       final BiConsumer<Long, List<NodeStatusChange>> callback)
focal_class.identifier: registerSubscription
focal_class.modifiers: public
focal_class.parameters: (final ClusterEvents event,
                                       final BiConsumer<Long, List<NodeStatusChange>> callback)
focal_class.return: void
focal_class.signature: void registerSubscription(final ClusterEvents event,
                                       final BiConsumer<Long, List<NodeStatusChange>> callback)
focal_class.class_method_signature: Cluster.leaveGracefully()
focal_class.full_signature: public void leaveGracefully()
focal_class.identifier: leaveGracefully
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void leaveGracefully()
focal_class.class_method_signature: Cluster.shutdown()
focal_class.full_signature: public void shutdown()
focal_class.identifier: shutdown
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void shutdown()
focal_class.class_method_signature: Cluster.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: public void shutdown() {
          LOG.debug("Shutting down RpcServer and MembershipService");
          rpcServer.shutdown();
          membershipService.shutdown();
          sharedResources.shutdown();
          this.hasShutdown = true;
      }
focal_method.class_method_signature: Cluster.shutdown()
focal_method.full_signature: public void shutdown()
focal_method.identifier: shutdown
focal_method.invocations: debug shutdown shutdown shutdown
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void shutdown()