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

          craigm Craig Macdonald created issue -
          craigm Craig Macdonald made changes -
          Field Original Value New Value
          Priority Major [ 3 ] Minor [ 4 ]
          craigm Craig Macdonald made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: