test_class.declarator: DEFAULT_CACHE_NAME = "default"
test_class.modifier: private static final
test_class.original_string: private static final String DEFAULT_CACHE_NAME = "default";
test_class.type: String
test_class.var_name: DEFAULT_CACHE_NAME
test_class.declarator: NODE_2 = UUID.randomUUID()
test_class.modifier: private static final
test_class.original_string: private static final UUID NODE_2 = UUID.randomUUID();
test_class.type: UUID
test_class.var_name: NODE_2
test_class.declarator: NODE_3 = UUID.randomUUID()
test_class.modifier: private static final
test_class.original_string: private static final UUID NODE_3 = UUID.randomUUID();
test_class.type: UUID
test_class.var_name: NODE_3
test_class.declarator: NODE_4 = UUID.randomUUID()
test_class.modifier: private static final
test_class.original_string: private static final UUID NODE_4 = UUID.randomUUID();
test_class.type: UUID
test_class.var_name: NODE_4
test_class.declarator: NODE_5 = UUID.randomUUID()
test_class.modifier: private static final
test_class.original_string: private static final UUID NODE_5 = UUID.randomUUID();
test_class.type: UUID
test_class.var_name: NODE_5
test_class.declarator: NODE_1 = UUID.randomUUID()
test_class.modifier: private static final
test_class.original_string: private static final UUID NODE_1 = UUID.randomUUID();
test_class.type: UUID
test_class.var_name: NODE_1
test_class.declarator: KEY = "some_key"
test_class.modifier: private static final
test_class.original_string: private static final String KEY = "some_key";
test_class.type: String
test_class.var_name: KEY
test_class.declarator: repairAlgorithm
test_class.modifier: @Parameterized.Parameter(0)
      public
test_class.original_string: @Parameterized.Parameter(0)
      public RepairAlgorithm repairAlgorithm;
test_class.type: RepairAlgorithm
test_class.var_name: repairAlgorithm
test_class.declarator: fixed
test_class.modifier: @Parameterized.Parameter(1)
      public
test_class.original_string: @Parameterized.Parameter(1)
      public boolean fixed;
test_class.type: boolean
test_class.var_name: fixed
test_class.file: modules/core/src/test/java/org/apache/ignite/internal/processors/cache/checker/tasks/RepairRequestTaskTest.java
test_class.identifier: RepairRequestTaskTest
test_case.body: @Test
      public void testNotFullSetOfOldKeysUsesUserRepairAlg() throws IllegalAccessException {
          Map<VersionedKey, Map<UUID, VersionedValue>> data = new HashMap<>();
          VersionedKey key = new VersionedKey(null, new KeyCacheObjectImpl(), null);
          Map<UUID, VersionedValue> keyVers = new HashMap<>();
          keyVers.put(NODE_1, versionedValue("1", 1));
          keyVers.put(NODE_2, versionedValue("2", 2));
          keyVers.put(NODE_3, versionedValue("2", 2));
          keyVers.put(NODE_4, versionedValue("4", 4));
          data.put(key, keyVers);
  
          IgniteEx igniteMock = igniteMock(true);
  
          ExecutionResult<RepairResult> res = injectIgnite(repairJob(data, 5, 1), igniteMock).execute();
  
          assertTrue(res.result().keysToRepair().isEmpty());
          assertEquals(1, res.result().repairedKeys().size());
  
          Map.Entry<VersionedKey, RepairMeta> entry = res.result()
              .repairedKeys().entrySet().iterator().next();
          assertEquals(keyVers, entry.getValue().getPreviousValue());
  
          RepairMeta repairMeta = entry.getValue();
          assertTrue(repairMeta.fixed());
          assertEquals(repairAlgorithm, repairMeta.repairAlg());
  
          switch (repairAlgorithm) {
              case LATEST:
                  assertCacheObjectEquals(keyVers.get(NODE_4).value(), repairMeta.value());
                  break;
              case PRIMARY:
                  assertCacheObjectEquals(keyVers.get(NODE_1).value(), repairMeta.value());
                  break;
              case MAJORITY:
                  assertCacheObjectEquals(keyVers.get(NODE_2).value(), repairMeta.value());
                  break;
              case REMOVE:
                  assertCacheObjectEquals(null, repairMeta.value());
                  break;
          }
      }
test_case.class_method_signature: RepairRequestTaskTest.testNotFullSetOfOldKeysUsesUserRepairAlg()
test_case.full_signature: @Test public void testNotFullSetOfOldKeysUsesUserRepairAlg()
test_case.identifier: testNotFullSetOfOldKeysUsesUserRepairAlg
test_case.invocations: put versionedValue put versionedValue put versionedValue put versionedValue put igniteMock execute injectIgnite repairJob assertTrue isEmpty keysToRepair result assertEquals size repairedKeys result next iterator entrySet repairedKeys result assertEquals getPreviousValue getValue getValue assertTrue fixed assertEquals repairAlg assertCacheObjectEquals value get value assertCacheObjectEquals value get value assertCacheObjectEquals value get value assertCacheObjectEquals value
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNotFullSetOfOldKeysUsesUserRepairAlg()
focal_class.declarator: serialVersionUID = 0L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 0L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: MAX_REPAIR_ATTEMPTS = 3
focal_class.modifier: public static final
focal_class.original_string: public static final int MAX_REPAIR_ATTEMPTS = 3;
focal_class.type: int
focal_class.var_name: MAX_REPAIR_ATTEMPTS
focal_class.declarator: log
focal_class.modifier: @SuppressWarnings("unused")
      @LoggerResource
      private
focal_class.original_string: @SuppressWarnings("unused")
      @LoggerResource
      private IgniteLogger log;
focal_class.type: IgniteLogger
focal_class.var_name: log
focal_class.declarator: ignite
focal_class.modifier: @SuppressWarnings("unused")
      @IgniteInstanceResource
      private
focal_class.original_string: @SuppressWarnings("unused")
      @IgniteInstanceResource
      private IgniteEx ignite;
focal_class.type: IgniteEx
focal_class.var_name: ignite
focal_class.declarator: repairReq
focal_class.modifier: private
focal_class.original_string: private RepairRequest repairReq;
focal_class.type: RepairRequest
focal_class.var_name: repairReq
focal_class.file: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/checker/tasks/RepairRequestTask.java
focal_class.identifier: RepairRequestTask
focal_class.class_method_signature: RepairRequestTask.map(List<ClusterNode> subgrid, RepairRequest arg)
focal_class.full_signature: @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, RepairRequest arg)
focal_class.identifier: map
focal_class.modifiers: @Override public
focal_class.parameters: (List<ClusterNode> subgrid, RepairRequest arg)
focal_class.return: Map<? extends ComputeJob, ClusterNode>
focal_class.signature: Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, RepairRequest arg)
focal_class.class_method_signature: RepairRequestTask.result(ComputeJobResult res, List<ComputeJobResult> rcvd)
focal_class.full_signature: @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd)
focal_class.identifier: result
focal_class.modifiers: @Override public
focal_class.parameters: (ComputeJobResult res, List<ComputeJobResult> rcvd)
focal_class.return: ComputeJobResultPolicy
focal_class.signature: ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd)
focal_class.class_method_signature: RepairRequestTask.reduce(
          List<ComputeJobResult> results)
focal_class.full_signature: @Override public ExecutionResult<RepairResult> reduce(
          List<ComputeJobResult> results)
focal_class.identifier: reduce
focal_class.modifiers: @Override public
focal_class.parameters: (
          List<ComputeJobResult> results)
focal_class.return: ExecutionResult<RepairResult>
focal_class.signature: ExecutionResult<RepairResult> reduce(
          List<ComputeJobResult> results)
focal_class.superclass: extends ComputeTaskAdapter<RepairRequest, ExecutionResult<RepairResult>>
focal_method.body: @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd) {
          ComputeJobResultPolicy superRes = super.result(res, rcvd);
  
          // Deny failover.
          if (superRes == ComputeJobResultPolicy.FAILOVER) {
              superRes = ComputeJobResultPolicy.WAIT;
  
              log.warning("CollectPartitionEntryHashesJob failed on node " +
                  "[consistentId=" + res.getNode().consistentId() + "]", res.getException());
          }
  
          return superRes;
      }
focal_method.class_method_signature: RepairRequestTask.result(ComputeJobResult res, List<ComputeJobResult> rcvd)
focal_method.full_signature: @Override public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd)
focal_method.identifier: result
focal_method.invocations: result warning consistentId getNode getException
focal_method.modifiers: @Override public
focal_method.parameters: (ComputeJobResult res, List<ComputeJobResult> rcvd)
focal_method.return: ComputeJobResultPolicy
focal_method.signature: ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd)