Source:
<code>private void processEntryForLogSegmentBucket(ScanResults results, IndexEntry indexEntry, Map<StoreKey, IndexFinalState> keyFinalStates) throws StoreException { IndexValue indexValue = indexEntry.getValue(); results.updateLogSegmentBaseBucket(indexValue.getOffset().getName(), indexValue.getSize()); if (indexValue.isPut()) { long expiresAtMs = indexValue.getExpiresAtMs(); long deleteAtMs = Utils.Infinite_Time; IndexFinalState finalState = keyFinalStates.get(indexEntry.getKey()); if (finalState != null && finalState.isDelete()) { deleteAtMs = finalState.getOperationTime(); } if (expiresAtMs == Utils.Infinite_Time && deleteAtMs != Utils.Infinite_Time) { handleLogSegmentDeletedBucketUpdate(results, indexValue, deleteAtMs, SUBTRACT); } else if (expiresAtMs != Utils.Infinite_Time && deleteAtMs == Utils.Infinite_Time) { handleLogSegmentExpiredBucketUpdate(results, indexValue, expiresAtMs, SUBTRACT); } else if (expiresAtMs != Utils.Infinite_Time && deleteAtMs != Utils.Infinite_Time) { if (expiresAtMs < deleteAtMs) { handleLogSegmentExpiredBucketUpdate(results, indexValue, expiresAtMs, SUBTRACT); } else { handleLogSegmentDeletedBucketUpdate(results, indexValue, deleteAtMs, SUBTRACT); } } <START> } else if (!indexValue.isDelete() && !indexValue.isUndelete() && indexValue.isTtlUpdate()) { <END> IndexFinalState finalState = keyFinalStates.get(indexEntry.getKey()); if (finalState != null && finalState.isDelete()) { IndexValue putValue = index.findKey(indexEntry.getKey(), new FileSpan(index.getStartOffset(), indexValue.getOffset()), EnumSet.of(PersistentIndex.IndexEntryType.PUT)); if (putValue.getOffset().getName().equals(indexValue.getOffset().getName())) { handleLogSegmentDeletedBucketUpdate(results, indexValue, finalState.getOperationTime(), SUBTRACT); } } } }</code><technical_language>indexValue is findKey() method, I this simplified indexValue.isTtlUpdate()</technical_language>

Target:
private void processEntryForLogSegmentBucket(ScanResults results, IndexEntry indexEntry, Map<StoreKey, IndexFinalState> keyFinalStates) throws StoreException { IndexValue indexValue = indexEntry.getValue(); results.updateLogSegmentBaseBucket(indexValue.getOffset().getName(), indexValue.getSize()); if (indexValue.isPut()) { long expiresAtMs = indexValue.getExpiresAtMs(); long deleteAtMs = Utils.Infinite_Time; IndexFinalState finalState = keyFinalStates.get(indexEntry.getKey()); if (finalState != null && finalState.isDelete()) { deleteAtMs = finalState.getOperationTime(); } if (expiresAtMs == Utils.Infinite_Time && deleteAtMs != Utils.Infinite_Time) { handleLogSegmentDeletedBucketUpdate(results, indexValue, deleteAtMs, SUBTRACT); } else if (expiresAtMs != Utils.Infinite_Time && deleteAtMs == Utils.Infinite_Time) { handleLogSegmentExpiredBucketUpdate(results, indexValue, expiresAtMs, SUBTRACT); } else if (expiresAtMs != Utils.Infinite_Time && deleteAtMs != Utils.Infinite_Time) { if (expiresAtMs < deleteAtMs) { handleLogSegmentExpiredBucketUpdate(results, indexValue, expiresAtMs, SUBTRACT); } else { handleLogSegmentDeletedBucketUpdate(results, indexValue, deleteAtMs, SUBTRACT); } } } else if (!indexValue.isDelete() && !indexValue.isUndelete() && indexValue.isTtlUpdate()) { IndexFinalState finalState = keyFinalStates.get(indexEntry.getKey()); if (finalState != null && finalState.isDelete()) { Offset beginningOfThisLogSegment = new Offset(indexValue.getOffset().getName(), LogSegment.HEADER_SIZE); IndexValue putValue = index.findKey(indexEntry.getKey(), new FileSpan(beginningOfThisLogSegment, indexValue.getOffset()), EnumSet.of(PersistentIndex.IndexEntryType.PUT)); if (putValue != null) { handleLogSegmentDeletedBucketUpdate(results, indexValue, finalState.getOperationTime(), SUBTRACT); } } } }