Uploaded image for project: 'Terrier Core'
  1. Terrier Core
  2. TR-121

Distance.noTimesSameOrder() can throw ArrayIndexOutOfBoundsException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.5
    • Component/s: .utility
    • Labels:
      None

      Description

      Distance.noTimesSameOrder() can throw ArrayIndexOutOfBoundsException. See http://terrier.org/forum//read.php?3,1535 and also email to my by Nicola Tonnelotto.

      For instance, Distance.noTimesSameOrder(x, y, 2, 872).

      Problem is that the final loop of noTimesSameOrder() iterates over documentLengthInTokens, not numberOfNGrams, while the matchingWindows array is only numberOfNGrams in length.

        Attachments

          Activity

          Hide
          craigm Craig Macdonald added a comment -

          This has been committed to trunk.

          Show
          craigm Craig Macdonald added a comment - This has been committed to trunk.

            People

            • Assignee:
              craigm Craig Macdonald
              Reporter:
              craigm Craig Macdonald
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: