Finding subtuple in larger collection?
Here is an O(mn) solution.  Given that haystack is about 1000 in length and needle is 5 or smaller, the simplest code to do the search is probably the best.  But if testing for equality is expensive, there are things we can do to mitigate that, although I'm not sure switching to KMP or BM will help so much given that we're dealing with Object here.

// assumes no null entries
// returns starting index of first occurrence of needle within haystack or -1
public int indexOf(final Object[] haystack, final Object[] needle) 
{
    foo: for (int a = 0; a &lt; haystack.length - needle.length; a++) {
        for (int b = 0; b &lt; needle.length; b++) {
            if (!haystack[a+b].equals(needle[b])) continue foo;
        }
        return a;
    }
    return -1;
}