If happening at the right moment, a re-compilation request may cause duplicate entries in the XPLAIN statement tables.
I have only confirmed this for the SYSXPLAIN_STATEMENTS table, and I do not know if the other XPLAIN tables are affected.
The error is highly intermittent, and so far I have only been able to trigger it when testing the automatic index statistics update prototype.
See the attached stack-trace for some more details.
DERBY-4881 Deadlock accessing SYS.SYSSTATISTICS