test_class.declarator: PAGE_SIZE = 4096
test_class.modifier: public static final
test_class.original_string: public static final int PAGE_SIZE = 4096;
test_class.type: int
test_class.var_name: PAGE_SIZE
test_class.declarator: io = TrackingPageIO.VERSIONS.latest()
test_class.modifier: private final
test_class.original_string: private final TrackingPageIO io = TrackingPageIO.VERSIONS.latest();
test_class.type: TrackingPageIO
test_class.var_name: io
test_class.file: modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/TrackingPageIOTest.java
test_class.identifier: TrackingPageIOTest
test_case.body: @Test
      public void testFindNextChangedPage() throws Exception {
          ByteBuffer buf = createBuffer();
  
          for (int i = 0; i < 101; i++)
              checkFindingRandomly(buf, i);
      }
test_case.class_method_signature: TrackingPageIOTest.testFindNextChangedPage()
test_case.full_signature: @Test public void testFindNextChangedPage()
test_case.identifier: testFindNextChangedPage
test_case.invocations: createBuffer checkFindingRandomly
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFindNextChangedPage()
focal_class.declarator: VERSIONS = new IOVersions<>(
          new TrackingPageIO(1)
      )
focal_class.modifier: public static final
focal_class.original_string: public static final IOVersions<TrackingPageIO> VERSIONS = new IOVersions<>(
          new TrackingPageIO(1)
      );
focal_class.type: IOVersions<TrackingPageIO>
focal_class.var_name: VERSIONS
focal_class.declarator: CORRUPT_FLAG_MASK = 1L << 63
focal_class.modifier: public static final
focal_class.original_string: public static final long CORRUPT_FLAG_MASK = 1L << 63;
focal_class.type: long
focal_class.var_name: CORRUPT_FLAG_MASK
focal_class.declarator: CORRUPT_FLAG_FILTER_MASK = ~CORRUPT_FLAG_MASK
focal_class.modifier: public static final
focal_class.original_string: public static final long CORRUPT_FLAG_FILTER_MASK = ~CORRUPT_FLAG_MASK;
focal_class.type: long
focal_class.var_name: CORRUPT_FLAG_FILTER_MASK
focal_class.declarator: LAST_SNAPSHOT_TAG_OFFSET = COMMON_HEADER_END
focal_class.modifier: public static final
focal_class.original_string: public static final int LAST_SNAPSHOT_TAG_OFFSET = COMMON_HEADER_END;
focal_class.type: int
focal_class.var_name: LAST_SNAPSHOT_TAG_OFFSET
focal_class.declarator: SIZE_FIELD_OFFSET = LAST_SNAPSHOT_TAG_OFFSET + 8
focal_class.modifier: public static final
focal_class.original_string: public static final int SIZE_FIELD_OFFSET = LAST_SNAPSHOT_TAG_OFFSET + 8;
focal_class.type: int
focal_class.var_name: SIZE_FIELD_OFFSET
focal_class.declarator: SIZE_FIELD_SIZE = 2
focal_class.modifier: public static final
focal_class.original_string: public static final int SIZE_FIELD_SIZE = 2;
focal_class.type: int
focal_class.var_name: SIZE_FIELD_SIZE
focal_class.declarator: BITMAP_OFFSET = SIZE_FIELD_OFFSET + SIZE_FIELD_SIZE
focal_class.modifier: public static final
focal_class.original_string: public static final int BITMAP_OFFSET = SIZE_FIELD_OFFSET + SIZE_FIELD_SIZE;
focal_class.type: int
focal_class.var_name: BITMAP_OFFSET
focal_class.declarator: COUNT_OF_EXTRA_PAGE = 1
focal_class.modifier: public static final
focal_class.original_string: public static final int COUNT_OF_EXTRA_PAGE = 1;
focal_class.type: int
focal_class.var_name: COUNT_OF_EXTRA_PAGE
focal_class.file: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/TrackingPageIO.java
focal_class.identifier: TrackingPageIO
focal_class.class_method_signature: TrackingPageIO.TrackingPageIO(int ver)
focal_class.full_signature: protected  TrackingPageIO(int ver)
focal_class.identifier: TrackingPageIO
focal_class.modifiers: protected
focal_class.parameters: (int ver)
focal_class.signature:  TrackingPageIO(int ver)
focal_class.class_method_signature: TrackingPageIO.markChanged(ByteBuffer buf, long pageId, long nextSnapshotTag, long lastSuccessfulSnapshotTag, int pageSize)
focal_class.full_signature: public long markChanged(ByteBuffer buf, long pageId, long nextSnapshotTag, long lastSuccessfulSnapshotTag, int pageSize)
focal_class.identifier: markChanged
focal_class.modifiers: public
focal_class.parameters: (ByteBuffer buf, long pageId, long nextSnapshotTag, long lastSuccessfulSnapshotTag, int pageSize)
focal_class.return: long
focal_class.signature: long markChanged(ByteBuffer buf, long pageId, long nextSnapshotTag, long lastSuccessfulSnapshotTag, int pageSize)
focal_class.class_method_signature: TrackingPageIO.validateSnapshotTag(ByteBuffer buf, long nextSnapshotTag, long lastSuccessfulSnapshotTag, int pageSize)
focal_class.full_signature: private long validateSnapshotTag(ByteBuffer buf, long nextSnapshotTag, long lastSuccessfulSnapshotTag, int pageSize)
focal_class.identifier: validateSnapshotTag
focal_class.modifiers: private
focal_class.parameters: (ByteBuffer buf, long nextSnapshotTag, long lastSuccessfulSnapshotTag, int pageSize)
focal_class.return: long
focal_class.signature: long validateSnapshotTag(ByteBuffer buf, long nextSnapshotTag, long lastSuccessfulSnapshotTag, int pageSize)
focal_class.class_method_signature: TrackingPageIO.setLastSnasphotTag(ByteBuffer buf, long nextSnapshotTag)
focal_class.full_signature: private void setLastSnasphotTag(ByteBuffer buf, long nextSnapshotTag)
focal_class.identifier: setLastSnasphotTag
focal_class.modifiers: private
focal_class.parameters: (ByteBuffer buf, long nextSnapshotTag)
focal_class.return: void
focal_class.signature: void setLastSnasphotTag(ByteBuffer buf, long nextSnapshotTag)
focal_class.class_method_signature: TrackingPageIO.setLastSnasphotTag0(ByteBuffer buf, long nextSnapshotTag)
focal_class.full_signature: private void setLastSnasphotTag0(ByteBuffer buf, long nextSnapshotTag)
focal_class.identifier: setLastSnasphotTag0
focal_class.modifiers: private
focal_class.parameters: (ByteBuffer buf, long nextSnapshotTag)
focal_class.return: void
focal_class.signature: void setLastSnasphotTag0(ByteBuffer buf, long nextSnapshotTag)
focal_class.class_method_signature: TrackingPageIO.setLastSnasphotTag0(long addr, long nextSnapshotTag)
focal_class.full_signature: private void setLastSnasphotTag0(long addr, long nextSnapshotTag)
focal_class.identifier: setLastSnasphotTag0
focal_class.modifiers: private
focal_class.parameters: (long addr, long nextSnapshotTag)
focal_class.return: void
focal_class.signature: void setLastSnasphotTag0(long addr, long nextSnapshotTag)
focal_class.class_method_signature: TrackingPageIO.getLastSnapshotTag(ByteBuffer buf)
focal_class.full_signature: private long getLastSnapshotTag(ByteBuffer buf)
focal_class.identifier: getLastSnapshotTag
focal_class.modifiers: private
focal_class.parameters: (ByteBuffer buf)
focal_class.return: long
focal_class.signature: long getLastSnapshotTag(ByteBuffer buf)
focal_class.class_method_signature: TrackingPageIO.getLastSnapshotTag0(ByteBuffer buf)
focal_class.full_signature: private long getLastSnapshotTag0(ByteBuffer buf)
focal_class.identifier: getLastSnapshotTag0
focal_class.modifiers: private
focal_class.parameters: (ByteBuffer buf)
focal_class.return: long
focal_class.signature: long getLastSnapshotTag0(ByteBuffer buf)
focal_class.class_method_signature: TrackingPageIO.getLastSnapshotTag(long addr)
focal_class.full_signature: private long getLastSnapshotTag(long addr)
focal_class.identifier: getLastSnapshotTag
focal_class.modifiers: private
focal_class.parameters: (long addr)
focal_class.return: long
focal_class.signature: long getLastSnapshotTag(long addr)
focal_class.class_method_signature: TrackingPageIO.getLastSnapshotTag0(long addr)
focal_class.full_signature: private long getLastSnapshotTag0(long addr)
focal_class.identifier: getLastSnapshotTag0
focal_class.modifiers: private
focal_class.parameters: (long addr)
focal_class.return: long
focal_class.signature: long getLastSnapshotTag0(long addr)
focal_class.class_method_signature: TrackingPageIO.isCorrupted(ByteBuffer buf)
focal_class.full_signature: public boolean isCorrupted(ByteBuffer buf)
focal_class.identifier: isCorrupted
focal_class.modifiers: public
focal_class.parameters: (ByteBuffer buf)
focal_class.return: boolean
focal_class.signature: boolean isCorrupted(ByteBuffer buf)
focal_class.class_method_signature: TrackingPageIO.resetCorruptFlag(ByteBuffer buf)
focal_class.full_signature: public void resetCorruptFlag(ByteBuffer buf)
focal_class.identifier: resetCorruptFlag
focal_class.modifiers: public
focal_class.parameters: (ByteBuffer buf)
focal_class.return: void
focal_class.signature: void resetCorruptFlag(ByteBuffer buf)
focal_class.class_method_signature: TrackingPageIO.resetCorruptFlag(long addr)
focal_class.full_signature: public void resetCorruptFlag(long addr)
focal_class.identifier: resetCorruptFlag
focal_class.modifiers: public
focal_class.parameters: (long addr)
focal_class.return: void
focal_class.signature: void resetCorruptFlag(long addr)
focal_class.class_method_signature: TrackingPageIO.wasChanged(ByteBuffer buf, long pageId, long curSnapshotTag, long lastSuccessfulSnapshotTag, int pageSize)
focal_class.full_signature: public boolean wasChanged(ByteBuffer buf, long pageId, long curSnapshotTag, long lastSuccessfulSnapshotTag, int pageSize)
focal_class.identifier: wasChanged
focal_class.modifiers: public
focal_class.parameters: (ByteBuffer buf, long pageId, long curSnapshotTag, long lastSuccessfulSnapshotTag, int pageSize)
focal_class.return: boolean
focal_class.signature: boolean wasChanged(ByteBuffer buf, long pageId, long curSnapshotTag, long lastSuccessfulSnapshotTag, int pageSize)
focal_class.class_method_signature: TrackingPageIO.countOfChangedPage(ByteBuffer buf, long snapshotTag, int pageSize)
focal_class.full_signature: public short countOfChangedPage(ByteBuffer buf, long snapshotTag, int pageSize)
focal_class.identifier: countOfChangedPage
focal_class.modifiers: public
focal_class.parameters: (ByteBuffer buf, long snapshotTag, int pageSize)
focal_class.return: short
focal_class.signature: short countOfChangedPage(ByteBuffer buf, long snapshotTag, int pageSize)
focal_class.class_method_signature: TrackingPageIO.useLeftHalf(long snapshotTag)
focal_class.full_signature: private boolean useLeftHalf(long snapshotTag)
focal_class.identifier: useLeftHalf
focal_class.modifiers: private
focal_class.parameters: (long snapshotTag)
focal_class.return: boolean
focal_class.signature: boolean useLeftHalf(long snapshotTag)
focal_class.class_method_signature: TrackingPageIO.trackingPageFor(long pageId, int pageSize)
focal_class.full_signature: public long trackingPageFor(long pageId, int pageSize)
focal_class.identifier: trackingPageFor
focal_class.modifiers: public
focal_class.parameters: (long pageId, int pageSize)
focal_class.return: long
focal_class.signature: long trackingPageFor(long pageId, int pageSize)
focal_class.class_method_signature: TrackingPageIO.countOfPageToTrack(int pageSize)
focal_class.full_signature: public int countOfPageToTrack(int pageSize)
focal_class.identifier: countOfPageToTrack
focal_class.modifiers: public
focal_class.parameters: (int pageSize)
focal_class.return: int
focal_class.signature: int countOfPageToTrack(int pageSize)
focal_class.class_method_signature: TrackingPageIO.findNextChangedPage(ByteBuffer buf, long start, long curSnapshotTag,
          long lastSuccessfulSnapshotTag, int pageSize)
focal_class.full_signature: @Nullable public Long findNextChangedPage(ByteBuffer buf, long start, long curSnapshotTag,
          long lastSuccessfulSnapshotTag, int pageSize)
focal_class.identifier: findNextChangedPage
focal_class.modifiers: @Nullable public
focal_class.parameters: (ByteBuffer buf, long start, long curSnapshotTag,
          long lastSuccessfulSnapshotTag, int pageSize)
focal_class.return: Long
focal_class.signature: Long findNextChangedPage(ByteBuffer buf, long start, long curSnapshotTag,
          long lastSuccessfulSnapshotTag, int pageSize)
focal_class.class_method_signature: TrackingPageIO.foundSetBit(byte byteToTest, int firstBitToTest)
focal_class.full_signature: private static int foundSetBit(byte byteToTest, int firstBitToTest)
focal_class.identifier: foundSetBit
focal_class.modifiers: private static
focal_class.parameters: (byte byteToTest, int firstBitToTest)
focal_class.return: int
focal_class.signature: int foundSetBit(byte byteToTest, int firstBitToTest)
focal_class.class_method_signature: TrackingPageIO.printPage(long addr, int pageSize, GridStringBuilder sb)
focal_class.full_signature: @Override protected void printPage(long addr, int pageSize, GridStringBuilder sb)
focal_class.identifier: printPage
focal_class.modifiers: @Override protected
focal_class.parameters: (long addr, int pageSize, GridStringBuilder sb)
focal_class.return: void
focal_class.signature: void printPage(long addr, int pageSize, GridStringBuilder sb)
focal_class.superclass: extends PageIO
focal_method.body: @Nullable public Long findNextChangedPage(ByteBuffer buf, long start, long curSnapshotTag,
          long lastSuccessfulSnapshotTag, int pageSize) throws TrackingPageIsCorruptedException {
          if (isCorrupted(buf))
              throw TrackingPageIsCorruptedException.INSTANCE;
  
          long lastTag = validateSnapshotTag(buf, curSnapshotTag + 1, lastSuccessfulSnapshotTag, pageSize);
  
          if (lastTag >= 0)
              throw new TrackingPageIsCorruptedException(lastTag, curSnapshotTag);
  
          int cntOfPage = countOfPageToTrack(pageSize);
  
          long trackingPage = trackingPageFor(start, pageSize);
  
          if (start == trackingPage)
              return trackingPage;
  
          if (countOfChangedPage(buf, curSnapshotTag, pageSize) <= 0)
              return null;
  
          int idxToStartTest = (PageIdUtils.pageIndex(start) - COUNT_OF_EXTRA_PAGE) % cntOfPage;
  
          int zeroIdx = useLeftHalf(curSnapshotTag) ? BITMAP_OFFSET : BITMAP_OFFSET + SIZE_FIELD_SIZE + (cntOfPage >> 3);
  
          int startIdx = zeroIdx + (idxToStartTest >> 3);
  
          int idx = startIdx;
  
          int stopIdx = zeroIdx + (cntOfPage >> 3);
  
          while (idx < stopIdx) {
              byte byteToTest = buf.get(idx);
  
              if (byteToTest != 0) {
                  int foundSetBit;
                  if ((foundSetBit = foundSetBit(byteToTest, idx == startIdx ? (idxToStartTest & 0b111) : 0)) != -1) {
                      long foundPageId = PageIdUtils.pageId(
                          PageIdUtils.partId(start),
                          PageIdUtils.flag(start),
                          PageIdUtils.pageIndex(trackingPage) + ((idx - zeroIdx) << 3) + foundSetBit);
  
                      assert wasChanged(buf, foundPageId, curSnapshotTag, lastSuccessfulSnapshotTag, pageSize);
                      assert trackingPageFor(foundPageId, pageSize) == trackingPage;
  
                      return foundPageId;
                  }
              }
  
              idx++;
          }
  
          return null;
      }
focal_method.class_method_signature: TrackingPageIO.findNextChangedPage(ByteBuffer buf, long start, long curSnapshotTag,
          long lastSuccessfulSnapshotTag, int pageSize)
focal_method.full_signature: @Nullable public Long findNextChangedPage(ByteBuffer buf, long start, long curSnapshotTag,
          long lastSuccessfulSnapshotTag, int pageSize)
focal_method.identifier: findNextChangedPage
focal_method.invocations: isCorrupted validateSnapshotTag countOfPageToTrack trackingPageFor countOfChangedPage pageIndex useLeftHalf get foundSetBit pageId partId flag pageIndex wasChanged trackingPageFor
focal_method.modifiers: @Nullable public
focal_method.parameters: (ByteBuffer buf, long start, long curSnapshotTag,
          long lastSuccessfulSnapshotTag, int pageSize)
focal_method.return: Long
focal_method.signature: Long findNextChangedPage(ByteBuffer buf, long start, long curSnapshotTag,
          long lastSuccessfulSnapshotTag, int pageSize)