test_class.declarator: STCS = "SizeTieredCompactionStrategy"
test_class.modifier: private static final
test_class.original_string: private static final String STCS = "SizeTieredCompactionStrategy";
test_class.type: String
test_class.var_name: STCS
test_class.declarator: TWCS = "TimeWindowCompactionStrategy"
test_class.modifier: private static final
test_class.original_string: private static final String TWCS = "TimeWindowCompactionStrategy";
test_class.type: String
test_class.var_name: TWCS
test_class.declarator: context
test_class.modifier: private
test_class.original_string: private AppContext context;
test_class.type: AppContext
test_class.var_name: context
test_class.declarator: service
test_class.modifier: private
test_class.original_string: private RepairUnitService service;
test_class.type: RepairUnitService
test_class.var_name: service
test_class.declarator: cluster = Cluster.builder()
        .withName("testcluster_" + RandomStringUtils.randomAlphabetic(6))
        .withPartitioner("murmur3")
        .withSeedHosts(Sets.newHashSet("127.0.0.1"))
        .withJmxPort(7199)
        .build()
test_class.modifier: private final
test_class.original_string: private final Cluster cluster = Cluster.builder()
        .withName("testcluster_" + RandomStringUtils.randomAlphabetic(6))
        .withPartitioner("murmur3")
        .withSeedHosts(Sets.newHashSet("127.0.0.1"))
        .withJmxPort(7199)
        .build();
test_class.type: Cluster
test_class.var_name: cluster
test_class.file: src/server/src/test/java/io/cassandrareaper/service/RepairUnitServiceTest.java
test_class.identifier: RepairUnitServiceTest
test_case.body: @Test(expected = IllegalStateException.class)
    public void getTablesToRepairRemoveAllFailingTest() throws ReaperException {
      JmxProxy proxy = JmxProxyTest.mockJmxProxyImpl();
      when(proxy.getCassandraVersion()).thenReturn("3.11.4");
      when(context.jmxConnectionFactory.connectAny(Mockito.any(Collection.class))).thenReturn(proxy);
  
      when(proxy.getTablesForKeyspace(Mockito.anyString()))
              .thenReturn(Sets.newHashSet(
                      Table.builder().withName("table1").withCompactionStrategy(STCS).build(),
                      Table.builder().withName("table2").withCompactionStrategy(STCS).build(),
                      Table.builder().withName("table3").withCompactionStrategy(STCS).build()));
  
      RepairUnit unit = RepairUnit.builder()
          .clusterName(cluster.getName())
          .keyspaceName("test")
          .blacklistedTables(Sets.newHashSet("table1", "table2", "table3"))
          .incrementalRepair(false)
          .repairThreadCount(4)
          .build(UUIDs.timeBased());
  
      service.getTablesToRepair(cluster, unit);
    }
test_case.class_method_signature: RepairUnitServiceTest.getTablesToRepairRemoveAllFailingTest()
test_case.full_signature: @Test(expected = IllegalStateException.class) public void getTablesToRepairRemoveAllFailingTest()
test_case.identifier: getTablesToRepairRemoveAllFailingTest
test_case.invocations: mockJmxProxyImpl thenReturn when getCassandraVersion thenReturn when connectAny any thenReturn when getTablesForKeyspace anyString newHashSet build withCompactionStrategy withName builder build withCompactionStrategy withName builder build withCompactionStrategy withName builder build repairThreadCount incrementalRepair blacklistedTables keyspaceName clusterName builder getName newHashSet timeBased getTablesToRepair
test_case.modifiers: @Test(expected = IllegalStateException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getTablesToRepairRemoveAllFailingTest()
focal_class.declarator: LOG = LoggerFactory.getLogger(RepairUnitService.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(RepairUnitService.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: BLACKLISTED_STRATEGEIS
        = ImmutableSet.of("TimeWindowCompactionStrategy", "DateTieredCompactionStrategy")
focal_class.modifier: private static final
focal_class.original_string: private static final Set<String> BLACKLISTED_STRATEGEIS
        = ImmutableSet.of("TimeWindowCompactionStrategy", "DateTieredCompactionStrategy");
focal_class.type: Set<String>
focal_class.var_name: BLACKLISTED_STRATEGEIS
focal_class.declarator: context
focal_class.modifier: private final
focal_class.original_string: private final AppContext context;
focal_class.type: AppContext
focal_class.var_name: context
focal_class.file: src/server/src/main/java/io/cassandrareaper/service/RepairUnitService.java
focal_class.identifier: RepairUnitService
focal_class.class_method_signature: RepairUnitService.RepairUnitService(AppContext context)
focal_class.full_signature: private  RepairUnitService(AppContext context)
focal_class.identifier: RepairUnitService
focal_class.modifiers: private
focal_class.parameters: (AppContext context)
focal_class.signature:  RepairUnitService(AppContext context)
focal_class.class_method_signature: RepairUnitService.create(AppContext context)
focal_class.full_signature: public static RepairUnitService create(AppContext context)
focal_class.identifier: create
focal_class.modifiers: public static
focal_class.parameters: (AppContext context)
focal_class.return: RepairUnitService
focal_class.signature: RepairUnitService create(AppContext context)
focal_class.class_method_signature: RepairUnitService.getOrCreateRepairUnit(Cluster cluster, RepairUnit.Builder params)
focal_class.full_signature: public RepairUnit getOrCreateRepairUnit(Cluster cluster, RepairUnit.Builder params)
focal_class.identifier: getOrCreateRepairUnit
focal_class.modifiers: public
focal_class.parameters: (Cluster cluster, RepairUnit.Builder params)
focal_class.return: RepairUnit
focal_class.signature: RepairUnit getOrCreateRepairUnit(Cluster cluster, RepairUnit.Builder params)
focal_class.class_method_signature: RepairUnitService.getTablesToRepair(Cluster cluster, RepairUnit repairUnit)
focal_class.full_signature:  Set<String> getTablesToRepair(Cluster cluster, RepairUnit repairUnit)
focal_class.identifier: getTablesToRepair
focal_class.parameters: (Cluster cluster, RepairUnit repairUnit)
focal_class.return: Set<String>
focal_class.signature: Set<String> getTablesToRepair(Cluster cluster, RepairUnit repairUnit)
focal_class.class_method_signature: RepairUnitService.findBlacklistedCompactionStrategyTables(Cluster clstr, Set<Table> tables)
focal_class.full_signature: public Set<String> findBlacklistedCompactionStrategyTables(Cluster clstr, Set<Table> tables)
focal_class.identifier: findBlacklistedCompactionStrategyTables
focal_class.modifiers: public
focal_class.parameters: (Cluster clstr, Set<Table> tables)
focal_class.return: Set<String>
focal_class.signature: Set<String> findBlacklistedCompactionStrategyTables(Cluster clstr, Set<Table> tables)
focal_class.class_method_signature: RepairUnitService.versionCompare(String str1, String str2)
focal_class.full_signature: private static Integer versionCompare(String str1, String str2)
focal_class.identifier: versionCompare
focal_class.modifiers: private static
focal_class.parameters: (String str1, String str2)
focal_class.return: Integer
focal_class.signature: Integer versionCompare(String str1, String str2)
focal_class.class_method_signature: RepairUnitService.isBlackListedCompactionStrategy(Table table)
focal_class.full_signature: private static boolean isBlackListedCompactionStrategy(Table table)
focal_class.identifier: isBlackListedCompactionStrategy
focal_class.modifiers: private static
focal_class.parameters: (Table table)
focal_class.return: boolean
focal_class.signature: boolean isBlackListedCompactionStrategy(Table table)
focal_class.class_method_signature: RepairUnitService.createRepairUnit(Cluster cluster, RepairUnit.Builder builder)
focal_class.full_signature: private RepairUnit createRepairUnit(Cluster cluster, RepairUnit.Builder builder)
focal_class.identifier: createRepairUnit
focal_class.modifiers: private
focal_class.parameters: (Cluster cluster, RepairUnit.Builder builder)
focal_class.return: RepairUnit
focal_class.signature: RepairUnit createRepairUnit(Cluster cluster, RepairUnit.Builder builder)
focal_class.class_method_signature: RepairUnitService.unitConflicts(Cluster cluster, RepairUnit.Builder builder)
focal_class.full_signature: private boolean unitConflicts(Cluster cluster, RepairUnit.Builder builder)
focal_class.identifier: unitConflicts
focal_class.modifiers: private
focal_class.parameters: (Cluster cluster, RepairUnit.Builder builder)
focal_class.return: boolean
focal_class.signature: boolean unitConflicts(Cluster cluster, RepairUnit.Builder builder)
focal_class.class_method_signature: RepairUnitService.conflictingUnits(Cluster cluster, RepairUnit unit, RepairUnit.Builder builder)
focal_class.full_signature:  boolean conflictingUnits(Cluster cluster, RepairUnit unit, RepairUnit.Builder builder)
focal_class.identifier: conflictingUnits
focal_class.parameters: (Cluster cluster, RepairUnit unit, RepairUnit.Builder builder)
focal_class.return: boolean
focal_class.signature: boolean conflictingUnits(Cluster cluster, RepairUnit unit, RepairUnit.Builder builder)
focal_class.class_method_signature: RepairUnitService.getTableNamesForKeyspace(Cluster cluster, String keyspace)
focal_class.full_signature: public Set<String> getTableNamesForKeyspace(Cluster cluster, String keyspace)
focal_class.identifier: getTableNamesForKeyspace
focal_class.modifiers: public
focal_class.parameters: (Cluster cluster, String keyspace)
focal_class.return: Set<String>
focal_class.signature: Set<String> getTableNamesForKeyspace(Cluster cluster, String keyspace)
focal_class.class_method_signature: RepairUnitService.listRepairTables(RepairUnit.Builder builder, Set<String> allTables)
focal_class.full_signature: private static Set<String> listRepairTables(RepairUnit.Builder builder, Set<String> allTables)
focal_class.identifier: listRepairTables
focal_class.modifiers: private static
focal_class.parameters: (RepairUnit.Builder builder, Set<String> allTables)
focal_class.return: Set<String>
focal_class.signature: Set<String> listRepairTables(RepairUnit.Builder builder, Set<String> allTables)
focal_method.body: Set<String> getTablesToRepair(Cluster cluster, RepairUnit repairUnit) throws ReaperException {
      String keyspace = repairUnit.getKeyspaceName();
      Set<String> result;
  
      if (repairUnit.getColumnFamilies().isEmpty()) {
        Set<Table> tables = ClusterFacade.create(context).getTablesForKeyspace(cluster, keyspace);
        Set<String> twcsBlacklisted = findBlacklistedCompactionStrategyTables(cluster, tables);
  
        result = tables.stream()
            .map(Table::getName)
            .filter(tableName -> !repairUnit.getBlacklistedTables().contains(tableName))
            .filter(tableName -> !twcsBlacklisted.contains(tableName))
            .collect(Collectors.toSet());
      } else {
        // if tables have been specified then don't apply the twcsBlacklisting
        result = repairUnit.getColumnFamilies().stream()
              .filter(tableName -> !repairUnit.getBlacklistedTables().contains(tableName))
              .collect(Collectors.toSet());
      }
  
      Preconditions.checkState(
          repairUnit.getBlacklistedTables().isEmpty() || !result.isEmpty(),
          "Invalid blacklist definition. It filtered out all tables in the keyspace.");
  
      return result;
    }
focal_method.class_method_signature: RepairUnitService.getTablesToRepair(Cluster cluster, RepairUnit repairUnit)
focal_method.full_signature:  Set<String> getTablesToRepair(Cluster cluster, RepairUnit repairUnit)
focal_method.identifier: getTablesToRepair
focal_method.invocations: getKeyspaceName isEmpty getColumnFamilies getTablesForKeyspace create findBlacklistedCompactionStrategyTables collect filter filter map stream contains getBlacklistedTables contains toSet collect filter stream getColumnFamilies contains getBlacklistedTables toSet checkState isEmpty getBlacklistedTables isEmpty
focal_method.parameters: (Cluster cluster, RepairUnit repairUnit)
focal_method.return: Set<String>
focal_method.signature: Set<String> getTablesToRepair(Cluster cluster, RepairUnit repairUnit)