test_class.file: feya/libraries/archive_diff/diff.generator/src/test/java/com/google/archivepatcher/generator/bsdiff/BsDiffTest.java
test_class.identifier: BsDiffTest
test_case.body: @Test
    public void searchForMatchBaseCaseVeryLongGroupArrayTest() throws IOException {
      final RandomAccessObject groupArray3RO =
          intArrayToRandomAccessObject(BsDiffTestData.LONGER_GROUP_ARRAY_350);
  
      final int scan = 1;
      BsDiff.Match ret =
          BsDiff.searchForMatchBaseCase(
              groupArray3RO,
              BsDiffTestData.LONGER_DATA_349_RO,
              BsDiffTestData.LONGER_DATA_354_NEW_RO,
              scan,
              0,
              BsDiffTestData.LONGER_DATA_349.length);
      Assert.assertEquals(0, ret.length);
      Assert.assertEquals(246, ret.start);
  
      ret =
          BsDiff.searchForMatchBaseCase(
              groupArray3RO,
              BsDiffTestData.LONGER_DATA_349_RO,
              BsDiffTestData.LONGER_DATA_354_NEW_RO,
              scan,
              219,
              220);
      Assert.assertEquals(0, ret.length);
      Assert.assertEquals(251, ret.start);
    }
test_case.class_method_signature: BsDiffTest.searchForMatchBaseCaseVeryLongGroupArrayTest()
test_case.full_signature: @Test public void searchForMatchBaseCaseVeryLongGroupArrayTest()
test_case.identifier: searchForMatchBaseCaseVeryLongGroupArrayTest
test_case.invocations: intArrayToRandomAccessObject searchForMatchBaseCase assertEquals assertEquals searchForMatchBaseCase assertEquals assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void searchForMatchBaseCaseVeryLongGroupArrayTest()
focal_class.file: feya/libraries/archive_diff/diff.generator/src/main/java/com/google/archivepatcher/generator/bsdiff/BsDiff.java
focal_class.identifier: BsDiff
focal_class.class_method_signature: BsDiff.lengthOfMatch(
        final RandomAccessObject oldData,
        final int oldStart,
        final RandomAccessObject newData,
        final int newStart)
focal_class.full_signature: static int lengthOfMatch(
        final RandomAccessObject oldData,
        final int oldStart,
        final RandomAccessObject newData,
        final int newStart)
focal_class.identifier: lengthOfMatch
focal_class.modifiers: static
focal_class.parameters: (
        final RandomAccessObject oldData,
        final int oldStart,
        final RandomAccessObject newData,
        final int newStart)
focal_class.return: int
focal_class.signature: int lengthOfMatch(
        final RandomAccessObject oldData,
        final int oldStart,
        final RandomAccessObject newData,
        final int newStart)
focal_class.class_method_signature: BsDiff.searchForMatchBaseCase(
        final RandomAccessObject groupArray,
        final RandomAccessObject oldData,
        final RandomAccessObject newData,
        final int newStart,
        final int oldDataRangeStartA,
        final int oldDataRangeStartB)
focal_class.full_signature: static Match searchForMatchBaseCase(
        final RandomAccessObject groupArray,
        final RandomAccessObject oldData,
        final RandomAccessObject newData,
        final int newStart,
        final int oldDataRangeStartA,
        final int oldDataRangeStartB)
focal_class.identifier: searchForMatchBaseCase
focal_class.modifiers: static
focal_class.parameters: (
        final RandomAccessObject groupArray,
        final RandomAccessObject oldData,
        final RandomAccessObject newData,
        final int newStart,
        final int oldDataRangeStartA,
        final int oldDataRangeStartB)
focal_class.return: Match
focal_class.signature: Match searchForMatchBaseCase(
        final RandomAccessObject groupArray,
        final RandomAccessObject oldData,
        final RandomAccessObject newData,
        final int newStart,
        final int oldDataRangeStartA,
        final int oldDataRangeStartB)
focal_class.class_method_signature: BsDiff.searchForMatch(
        final RandomAccessObject groupArray,
        final RandomAccessObject oldData,
        final RandomAccessObject newData,
        final int newStart,
        final int oldDataRangeStartA,
        final int oldDataRangeStartB)
focal_class.full_signature: static Match searchForMatch(
        final RandomAccessObject groupArray,
        final RandomAccessObject oldData,
        final RandomAccessObject newData,
        final int newStart,
        final int oldDataRangeStartA,
        final int oldDataRangeStartB)
focal_class.identifier: searchForMatch
focal_class.modifiers: static
focal_class.parameters: (
        final RandomAccessObject groupArray,
        final RandomAccessObject oldData,
        final RandomAccessObject newData,
        final int newStart,
        final int oldDataRangeStartA,
        final int oldDataRangeStartB)
focal_class.return: Match
focal_class.signature: Match searchForMatch(
        final RandomAccessObject groupArray,
        final RandomAccessObject oldData,
        final RandomAccessObject newData,
        final int newStart,
        final int oldDataRangeStartA,
        final int oldDataRangeStartB)
focal_method.body: static Match searchForMatchBaseCase(
        final RandomAccessObject groupArray,
        final RandomAccessObject oldData,
        final RandomAccessObject newData,
        final int newStart,
        final int oldDataRangeStartA,
        final int oldDataRangeStartB)
        throws IOException {
      // Located the start of a matching range (no further search required) or the size of the range
      // has shrunk to one byte (no further search possible).
      groupArray.seekToIntAligned(oldDataRangeStartA);
      final int groupArrayOldDataRangeStartA = groupArray.readInt();
      final int lengthOfMatchA =
          lengthOfMatch(oldData, groupArrayOldDataRangeStartA, newData, newStart);
      groupArray.seekToIntAligned(oldDataRangeStartB);
      final int groupArrayOldDataRangeStartB = groupArray.readInt();
      final int lengthOfMatchB =
          lengthOfMatch(oldData, groupArrayOldDataRangeStartB, newData, newStart);
  
      if (lengthOfMatchA > lengthOfMatchB) {
        return Match.of(groupArrayOldDataRangeStartA, lengthOfMatchA);
      }
  
      return Match.of(groupArrayOldDataRangeStartB, lengthOfMatchB);
    }
focal_method.class_method_signature: BsDiff.searchForMatchBaseCase(
        final RandomAccessObject groupArray,
        final RandomAccessObject oldData,
        final RandomAccessObject newData,
        final int newStart,
        final int oldDataRangeStartA,
        final int oldDataRangeStartB)
focal_method.full_signature: static Match searchForMatchBaseCase(
        final RandomAccessObject groupArray,
        final RandomAccessObject oldData,
        final RandomAccessObject newData,
        final int newStart,
        final int oldDataRangeStartA,
        final int oldDataRangeStartB)
focal_method.identifier: searchForMatchBaseCase
focal_method.invocations: seekToIntAligned readInt lengthOfMatch seekToIntAligned readInt lengthOfMatch of of
focal_method.modifiers: static
focal_method.parameters: (
        final RandomAccessObject groupArray,
        final RandomAccessObject oldData,
        final RandomAccessObject newData,
        final int newStart,
        final int oldDataRangeStartA,
        final int oldDataRangeStartB)
focal_method.return: Match
focal_method.signature: Match searchForMatchBaseCase(
        final RandomAccessObject groupArray,
        final RandomAccessObject oldData,
        final RandomAccessObject newData,
        final int newStart,
        final int oldDataRangeStartA,
        final int oldDataRangeStartB)