The XQuery parser may report that duplicate function
declarations exist when they do not.
The error is new in 8.1 and results from an incorrect
calculation of a key that combines the function name
The calculation is written as
Long keyObj = new Long(((long)arity)<<32 + (long)fp);
which should be
Long keyObj = new Long((((long)arity)<<32) + (long)fp);
because + has higher precedence than <<.
The incorrect calculation appears in five places in
module XQueryFunctionLibrary.java: on lines 74, 105,
155, 197, and 264.
(Also, line 154 should be
int fp = getNamePool().allocate("", uri, local) &
to mask off any differences in the prefix used for the
Source code fixed.