test_class.file: clients/src/test/java/org/apache/kafka/common/ClusterTest.java
test_class.identifier: ClusterTest
test_case.body: @Test
      public void testBootstrap() {
          String ipAddress = "140.211.11.105";
          String hostName = "www.example.com";
          Cluster cluster = Cluster.bootstrap(Arrays.asList(
                  new InetSocketAddress(ipAddress, 9002),
                  new InetSocketAddress(hostName, 9002)
          ));
          Set<String> expectedHosts = Utils.mkSet(ipAddress, hostName);
          Set<String> actualHosts = new HashSet<>();
          for (Node node : cluster.nodes())
              actualHosts.add(node.host());
          assertEquals(expectedHosts, actualHosts);
      }
test_case.class_method_signature: ClusterTest.testBootstrap()
test_case.full_signature: @Test public void testBootstrap()
test_case.identifier: testBootstrap
test_case.invocations: bootstrap asList mkSet nodes add host assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBootstrap()
focal_class.declarator: isBootstrapConfigured
focal_class.modifier: private final
focal_class.original_string: private final boolean isBootstrapConfigured;
focal_class.type: boolean
focal_class.var_name: isBootstrapConfigured
focal_class.declarator: nodes
focal_class.modifier: private final
focal_class.original_string: private final List<Node> nodes;
focal_class.type: List<Node>
focal_class.var_name: nodes
focal_class.declarator: unauthorizedTopics
focal_class.modifier: private final
focal_class.original_string: private final Set<String> unauthorizedTopics;
focal_class.type: Set<String>
focal_class.var_name: unauthorizedTopics
focal_class.declarator: partitionsByTopicPartition
focal_class.modifier: private final
focal_class.original_string: private final Map<TopicPartition, PartitionInfo> partitionsByTopicPartition;
focal_class.type: Map<TopicPartition, PartitionInfo>
focal_class.var_name: partitionsByTopicPartition
focal_class.declarator: partitionsByTopic
focal_class.modifier: private final
focal_class.original_string: private final Map<String, List<PartitionInfo>> partitionsByTopic;
focal_class.type: Map<String, List<PartitionInfo>>
focal_class.var_name: partitionsByTopic
focal_class.declarator: availablePartitionsByTopic
focal_class.modifier: private final
focal_class.original_string: private final Map<String, List<PartitionInfo>> availablePartitionsByTopic;
focal_class.type: Map<String, List<PartitionInfo>>
focal_class.var_name: availablePartitionsByTopic
focal_class.declarator: partitionsByNode
focal_class.modifier: private final
focal_class.original_string: private final Map<Integer, List<PartitionInfo>> partitionsByNode;
focal_class.type: Map<Integer, List<PartitionInfo>>
focal_class.var_name: partitionsByNode
focal_class.declarator: nodesById
focal_class.modifier: private final
focal_class.original_string: private final Map<Integer, Node> nodesById;
focal_class.type: Map<Integer, Node>
focal_class.var_name: nodesById
focal_class.file: clients/src/main/java/org/apache/kafka/common/Cluster.java
focal_class.identifier: Cluster
focal_class.class_method_signature: Cluster.Cluster(Collection<Node> nodes,
          Collection<PartitionInfo> partitions,
          Set<String> unauthorizedTopics)
focal_class.full_signature: public  Cluster(Collection<Node> nodes,
          Collection<PartitionInfo> partitions,
          Set<String> unauthorizedTopics)
focal_class.identifier: Cluster
focal_class.modifiers: public
focal_class.parameters: (Collection<Node> nodes,
          Collection<PartitionInfo> partitions,
          Set<String> unauthorizedTopics)
focal_class.signature:  Cluster(Collection<Node> nodes,
          Collection<PartitionInfo> partitions,
          Set<String> unauthorizedTopics)
focal_class.class_method_signature: Cluster.Cluster(boolean isBootstrapConfigured,
          Collection<Node> nodes,
          Collection<PartitionInfo> partitions,
          Set<String> unauthorizedTopics)
focal_class.full_signature: private  Cluster(boolean isBootstrapConfigured,
          Collection<Node> nodes,
          Collection<PartitionInfo> partitions,
          Set<String> unauthorizedTopics)
focal_class.identifier: Cluster
focal_class.modifiers: private
focal_class.parameters: (boolean isBootstrapConfigured,
          Collection<Node> nodes,
          Collection<PartitionInfo> partitions,
          Set<String> unauthorizedTopics)
focal_class.signature:  Cluster(boolean isBootstrapConfigured,
          Collection<Node> nodes,
          Collection<PartitionInfo> partitions,
          Set<String> unauthorizedTopics)
focal_class.class_method_signature: Cluster.empty()
focal_class.full_signature: public static Cluster empty()
focal_class.identifier: empty
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Cluster
focal_class.signature: Cluster empty()
focal_class.class_method_signature: Cluster.bootstrap(List<InetSocketAddress> addresses)
focal_class.full_signature: public static Cluster bootstrap(List<InetSocketAddress> addresses)
focal_class.identifier: bootstrap
focal_class.modifiers: public static
focal_class.parameters: (List<InetSocketAddress> addresses)
focal_class.return: Cluster
focal_class.signature: Cluster bootstrap(List<InetSocketAddress> addresses)
focal_class.class_method_signature: Cluster.withPartitions(Map<TopicPartition, PartitionInfo> partitions)
focal_class.full_signature: public Cluster withPartitions(Map<TopicPartition, PartitionInfo> partitions)
focal_class.identifier: withPartitions
focal_class.modifiers: public
focal_class.parameters: (Map<TopicPartition, PartitionInfo> partitions)
focal_class.return: Cluster
focal_class.signature: Cluster withPartitions(Map<TopicPartition, PartitionInfo> partitions)
focal_class.class_method_signature: Cluster.nodes()
focal_class.full_signature: public List<Node> nodes()
focal_class.identifier: nodes
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Node>
focal_class.signature: List<Node> nodes()
focal_class.class_method_signature: Cluster.nodeById(int id)
focal_class.full_signature: public Node nodeById(int id)
focal_class.identifier: nodeById
focal_class.modifiers: public
focal_class.parameters: (int id)
focal_class.return: Node
focal_class.signature: Node nodeById(int id)
focal_class.class_method_signature: Cluster.leaderFor(TopicPartition topicPartition)
focal_class.full_signature: public Node leaderFor(TopicPartition topicPartition)
focal_class.identifier: leaderFor
focal_class.modifiers: public
focal_class.parameters: (TopicPartition topicPartition)
focal_class.return: Node
focal_class.signature: Node leaderFor(TopicPartition topicPartition)
focal_class.class_method_signature: Cluster.partition(TopicPartition topicPartition)
focal_class.full_signature: public PartitionInfo partition(TopicPartition topicPartition)
focal_class.identifier: partition
focal_class.modifiers: public
focal_class.parameters: (TopicPartition topicPartition)
focal_class.return: PartitionInfo
focal_class.signature: PartitionInfo partition(TopicPartition topicPartition)
focal_class.class_method_signature: Cluster.partitionsForTopic(String topic)
focal_class.full_signature: public List<PartitionInfo> partitionsForTopic(String topic)
focal_class.identifier: partitionsForTopic
focal_class.modifiers: public
focal_class.parameters: (String topic)
focal_class.return: List<PartitionInfo>
focal_class.signature: List<PartitionInfo> partitionsForTopic(String topic)
focal_class.class_method_signature: Cluster.availablePartitionsForTopic(String topic)
focal_class.full_signature: public List<PartitionInfo> availablePartitionsForTopic(String topic)
focal_class.identifier: availablePartitionsForTopic
focal_class.modifiers: public
focal_class.parameters: (String topic)
focal_class.return: List<PartitionInfo>
focal_class.signature: List<PartitionInfo> availablePartitionsForTopic(String topic)
focal_class.class_method_signature: Cluster.partitionsForNode(int nodeId)
focal_class.full_signature: public List<PartitionInfo> partitionsForNode(int nodeId)
focal_class.identifier: partitionsForNode
focal_class.modifiers: public
focal_class.parameters: (int nodeId)
focal_class.return: List<PartitionInfo>
focal_class.signature: List<PartitionInfo> partitionsForNode(int nodeId)
focal_class.class_method_signature: Cluster.partitionCountForTopic(String topic)
focal_class.full_signature: public Integer partitionCountForTopic(String topic)
focal_class.identifier: partitionCountForTopic
focal_class.modifiers: public
focal_class.parameters: (String topic)
focal_class.return: Integer
focal_class.signature: Integer partitionCountForTopic(String topic)
focal_class.class_method_signature: Cluster.topics()
focal_class.full_signature: public Set<String> topics()
focal_class.identifier: topics
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<String>
focal_class.signature: Set<String> topics()
focal_class.class_method_signature: Cluster.unauthorizedTopics()
focal_class.full_signature: public Set<String> unauthorizedTopics()
focal_class.identifier: unauthorizedTopics
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<String>
focal_class.signature: Set<String> unauthorizedTopics()
focal_class.class_method_signature: Cluster.isBootstrapConfigured()
focal_class.full_signature: public boolean isBootstrapConfigured()
focal_class.identifier: isBootstrapConfigured
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isBootstrapConfigured()
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 static Cluster bootstrap(List<InetSocketAddress> addresses) {
          List<Node> nodes = new ArrayList<>();
          int nodeId = -1;
          for (InetSocketAddress address : addresses)
              nodes.add(new Node(nodeId--, address.getHostString(), address.getPort()));
          return new Cluster(true, nodes, new ArrayList<PartitionInfo>(0), Collections.<String>emptySet());
      }
focal_method.class_method_signature: Cluster.bootstrap(List<InetSocketAddress> addresses)
focal_method.full_signature: public static Cluster bootstrap(List<InetSocketAddress> addresses)
focal_method.identifier: bootstrap
focal_method.invocations: add getHostString getPort emptySet
focal_method.modifiers: public static
focal_method.parameters: (List<InetSocketAddress> addresses)
focal_method.return: Cluster
focal_method.signature: Cluster bootstrap(List<InetSocketAddress> addresses)