test_class.declarator: OLD_VALUE = "old_value"
test_class.modifier: private static final
test_class.original_string: private static final String OLD_VALUE = "old_value";
test_class.type: String
test_class.var_name: OLD_VALUE
test_class.declarator: OLD_CACHE_VALUE = new CacheObjectImpl(OLD_VALUE, OLD_VALUE.getBytes())
test_class.modifier: private static final
test_class.original_string: private static final CacheObject OLD_CACHE_VALUE = new CacheObjectImpl(OLD_VALUE, OLD_VALUE.getBytes());
test_class.type: CacheObject
test_class.var_name: OLD_CACHE_VALUE
test_class.declarator: NEW_VALUE = "new_value"
test_class.modifier: private static final
test_class.original_string: private static final String NEW_VALUE = "new_value";
test_class.type: String
test_class.var_name: NEW_VALUE
test_class.declarator: RECHECK_VALUE = "updated_value"
test_class.modifier: private static final
test_class.original_string: private static final String RECHECK_VALUE = "updated_value";
test_class.type: String
test_class.var_name: RECHECK_VALUE
test_class.declarator: RECHECK_CACHE_VALUE = new CacheObjectImpl(RECHECK_VALUE, RECHECK_VALUE.getBytes())
test_class.modifier: private static final
test_class.original_string: private static final CacheObject RECHECK_CACHE_VALUE = new CacheObjectImpl(RECHECK_VALUE, RECHECK_VALUE.getBytes());
test_class.type: CacheObject
test_class.var_name: RECHECK_CACHE_VALUE
test_class.declarator: LOCAL_NODE_ID = UUID.randomUUID()
test_class.modifier: private static final
test_class.original_string: private static final UUID LOCAL_NODE_ID = UUID.randomUUID();
test_class.type: UUID
test_class.var_name: LOCAL_NODE_ID
test_class.declarator: OTHRER_NODE_ID = UUID.randomUUID()
test_class.modifier: private static final
test_class.original_string: private static final UUID OTHRER_NODE_ID = UUID.randomUUID();
test_class.type: UUID
test_class.var_name: OTHRER_NODE_ID
test_class.declarator: RMV_QUEUE_MAX_SIZE = 12
test_class.modifier: private static final
test_class.original_string: private static final int RMV_QUEUE_MAX_SIZE = 12;
test_class.type: int
test_class.var_name: RMV_QUEUE_MAX_SIZE
test_class.declarator: cctx
test_class.modifier: private
test_class.original_string: private GridCacheContext cctx;
test_class.type: GridCacheContext
test_class.var_name: cctx
test_class.file: modules/core/src/test/java/org/apache/ignite/internal/processors/cache/checker/tasks/RepairEntryProcessorTest.java
test_class.identifier: RepairEntryProcessorTest
test_case.body: @Test
      public void testForceRepairApplyRemove() {
          final boolean forceRepair = true;
  
          Map<UUID, VersionedValue> data = new HashMap<>();
          data.put(OTHRER_NODE_ID, new VersionedValue(
              OLD_CACHE_VALUE,
              new GridCacheVersion(1, 1, 1),
              1,
              1
          ));
  
          RepairEntryProcessor repairProcessor = new RepairEntryProcessorStub(
              null,
              data,
              RMV_QUEUE_MAX_SIZE,
              forceRepair,
              new AffinityTopologyVersion(1)
          ).setKeyVersion(new GridCacheVersion(0, 0, 0));
  
          MutableEntry entry = mock(MutableEntry.class);
  
          assertEquals(repairProcessor.process(entry), RepairEntryProcessor.RepairStatus.SUCCESS);
  
          verify(entry, times(1)).remove();
      }
test_case.class_method_signature: RepairEntryProcessorTest.testForceRepairApplyRemove()
test_case.full_signature: @Test public void testForceRepairApplyRemove()
test_case.identifier: testForceRepairApplyRemove
test_case.invocations: put setKeyVersion mock assertEquals process remove verify times
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testForceRepairApplyRemove()
focal_class.declarator: val
focal_class.modifier: private
focal_class.original_string: private Object val;
focal_class.type: Object
focal_class.var_name: val
focal_class.declarator: data
focal_class.modifier: private
focal_class.original_string: private Map<UUID, VersionedValue> data;
focal_class.type: Map<UUID, VersionedValue>
focal_class.var_name: data
focal_class.declarator: rmvQueueMaxSize
focal_class.modifier: private
focal_class.original_string: private long rmvQueueMaxSize;
focal_class.type: long
focal_class.var_name: rmvQueueMaxSize
focal_class.declarator: forceRepair
focal_class.modifier: private
focal_class.original_string: private boolean forceRepair;
focal_class.type: boolean
focal_class.var_name: forceRepair
focal_class.declarator: startTopVer
focal_class.modifier: private
focal_class.original_string: private AffinityTopologyVersion startTopVer;
focal_class.type: AffinityTopologyVersion
focal_class.var_name: startTopVer
focal_class.file: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/checker/tasks/RepairEntryProcessor.java
focal_class.identifier: RepairEntryProcessor
focal_class.interfaces: implements EntryProcessor
focal_class.class_method_signature: RepairEntryProcessor.RepairEntryProcessor(
          Object val,
          Map<UUID, VersionedValue> data,
          long rmvQueueMaxSize,
          boolean forceRepair,
          AffinityTopologyVersion startTopVer)
focal_class.full_signature: @SuppressWarnings("AssignmentOrReturnOfFieldWithMutableType") public  RepairEntryProcessor(
          Object val,
          Map<UUID, VersionedValue> data,
          long rmvQueueMaxSize,
          boolean forceRepair,
          AffinityTopologyVersion startTopVer)
focal_class.identifier: RepairEntryProcessor
focal_class.modifiers: @SuppressWarnings("AssignmentOrReturnOfFieldWithMutableType") public
focal_class.parameters: (
          Object val,
          Map<UUID, VersionedValue> data,
          long rmvQueueMaxSize,
          boolean forceRepair,
          AffinityTopologyVersion startTopVer)
focal_class.signature:  RepairEntryProcessor(
          Object val,
          Map<UUID, VersionedValue> data,
          long rmvQueueMaxSize,
          boolean forceRepair,
          AffinityTopologyVersion startTopVer)
focal_class.class_method_signature: RepairEntryProcessor.process(MutableEntry entry, Object... arguments)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public Object process(MutableEntry entry, Object... arguments)
focal_class.identifier: process
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (MutableEntry entry, Object... arguments)
focal_class.return: Object
focal_class.signature: Object process(MutableEntry entry, Object... arguments)
focal_class.class_method_signature: RepairEntryProcessor.cacheContext(MutableEntry entry)
focal_class.full_signature: protected GridCacheContext cacheContext(MutableEntry entry)
focal_class.identifier: cacheContext
focal_class.modifiers: protected
focal_class.parameters: (MutableEntry entry)
focal_class.return: GridCacheContext
focal_class.signature: GridCacheContext cacheContext(MutableEntry entry)
focal_class.class_method_signature: RepairEntryProcessor.topologyChanged(GridCacheContext cctx, AffinityTopologyVersion expTop)
focal_class.full_signature: protected boolean topologyChanged(GridCacheContext cctx, AffinityTopologyVersion expTop)
focal_class.identifier: topologyChanged
focal_class.modifiers: protected
focal_class.parameters: (GridCacheContext cctx, AffinityTopologyVersion expTop)
focal_class.return: boolean
focal_class.signature: boolean topologyChanged(GridCacheContext cctx, AffinityTopologyVersion expTop)
focal_class.class_method_signature: RepairEntryProcessor.keyVersion(MutableEntry entry)
focal_class.full_signature: protected GridCacheVersion keyVersion(MutableEntry entry)
focal_class.identifier: keyVersion
focal_class.modifiers: protected
focal_class.parameters: (MutableEntry entry)
focal_class.return: GridCacheVersion
focal_class.signature: GridCacheVersion keyVersion(MutableEntry entry)
focal_class.class_method_signature: RepairEntryProcessor.updateCounter(GridCacheContext cctx, Object affKey)
focal_class.full_signature: protected long updateCounter(GridCacheContext cctx, Object affKey)
focal_class.identifier: updateCounter
focal_class.modifiers: protected
focal_class.parameters: (GridCacheContext cctx, Object affKey)
focal_class.return: long
focal_class.signature: long updateCounter(GridCacheContext cctx, Object affKey)
focal_class.class_method_signature: RepairEntryProcessor.minValue(Function<VersionedValue, Long> mapper)
focal_class.full_signature: private long minValue(Function<VersionedValue, Long> mapper)
focal_class.identifier: minValue
focal_class.modifiers: private
focal_class.parameters: (Function<VersionedValue, Long> mapper)
focal_class.return: long
focal_class.signature: long minValue(Function<VersionedValue, Long> mapper)
focal_method.body: @SuppressWarnings("unchecked")
      @Override public Object process(MutableEntry entry, Object... arguments) throws EntryProcessorException {
          GridCacheContext cctx = cacheContext(entry);
          GridCacheVersion currKeyGridCacheVer = keyVersion(entry);
  
          if (topologyChanged(cctx, startTopVer))
              throw new EntryProcessorException("Topology version was changed");
  
          UUID locNodeId = cctx.localNodeId();
          VersionedValue versionedVal = data.get(locNodeId);
  
          if (versionedVal != null) {
              if (currKeyGridCacheVer.compareTo(versionedVal.version()) == 0) {
                  if (val == null)
                      entry.remove();
                  else
                      entry.setValue(val);
  
                  return RepairStatus.SUCCESS;
              }
              else
                  return RepairStatus.CONCURRENT_MODIFICATION;
          }
          else {
              if (currKeyGridCacheVer.compareTo(new GridCacheVersion(0, 0, 0)) == 0) {
                  long recheckStartTime = minValue(VersionedValue::recheckStartTime);
  
                  boolean inEntryTTLBounds =
                      (System.currentTimeMillis() - recheckStartTime) < Long.getLong(IGNITE_CACHE_REMOVED_ENTRIES_TTL, 10_000);
  
                  // Min available update counter for the key at all nodes.
                  // It just fast solution for null value problem. We should use other way to fix it (versionedVal.updateCounter()).
                  long minUpdateCntr = minValue(VersionedValue::updateCounter);
                  long currUpdateCntr = updateCounter(cctx, entry.getKey());
  
                  boolean inDeferredDelQueueBounds = ((currUpdateCntr - minUpdateCntr) < rmvQueueMaxSize);
  
                  //TODO Remove it after fixes: https://ggsystems.atlassian.net/browse/GG-27419
                  if (cctx.config().getAtomicityMode() != CacheAtomicityMode.ATOMIC || inEntryTTLBounds && inDeferredDelQueueBounds) {
                      if (val == null)
                          entry.remove();
                      else
                          entry.setValue(val);
  
                      return RepairStatus.SUCCESS;
                  }
              }
              else
                  return RepairStatus.CONCURRENT_MODIFICATION;
  
              if (forceRepair) {
                  if (val == null)
                      entry.remove();
                  else
                      entry.setValue(val);
  
                  return RepairStatus.SUCCESS;
              }
  
              return RepairStatus.FAIL;
          }
      }
focal_method.class_method_signature: RepairEntryProcessor.process(MutableEntry entry, Object... arguments)
focal_method.full_signature: @SuppressWarnings("unchecked") @Override public Object process(MutableEntry entry, Object... arguments)
focal_method.identifier: process
focal_method.invocations: cacheContext keyVersion topologyChanged localNodeId get compareTo version remove setValue compareTo minValue currentTimeMillis getLong minValue updateCounter getKey getAtomicityMode config remove setValue remove setValue
focal_method.modifiers: @SuppressWarnings("unchecked") @Override public
focal_method.parameters: (MutableEntry entry, Object... arguments)
focal_method.return: Object
focal_method.signature: Object process(MutableEntry entry, Object... arguments)