It was a guess.  Every call into JNI that returns an object creates a new local reference, and there are a number of those calls in javaembed.cpp (some of them embedded as arguments to other calls, so they're technically leaks).  If you have only a single imported Java function, the impact is less but still present.  IIRC, in my simple test of a single Java function with two string arguments there were about eight local references created.  It would be easy to imagine the number of references increasing beyond 16 if you either had a more complicated calling pattern or if there were more Java functions used during a single thread lifetime (information about a single call is cached, and switching causes more lookups and local references), so I increased the capacity.  The alternative would be to explicitly free every local reference as it is created.