[TR-121] Distance.noTimesSameOrder() can throw ArrayIndexOutOfBoundsException Created: 17/May/10  Updated: 20/May/10  Resolved: 20/May/10

Status: Resolved
Project: Terrier Core
Component/s: .utility
Affects Version/s: 3.0
Fix Version/s: 3.5

Type: Bug Priority: Minor
Reporter: Craig Macdonald Assignee: Craig Macdonald
Resolution: Fixed  
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.

 Comments   
Comment by Craig Macdonald [ 20/May/10 ]

This has been committed to trunk.

Generated at Tue Dec 12 10:03:41 GMT 2017 using JIRA 7.1.1#71004-sha1:d6b2c0d9b7051e9fb5e4eb8ce177ca56d91d7bd8.