Currently, whenever you have complex C++ types, you can obtain a mangled string of several hundreds of chars.
It translates into SWIGTYPE_xxxx, so it may produce files with very long names.
Windows, even its most recent versions, has very poor support for these files (it just fails silently).
If you want to reproduce the problem, try producing java swig bindings for Ogre3D...
The workaround produced by this patch is that it shortens the mangled string when it is over 100 characters and that the platform is windows.
To be sure not to run into names collision, a hash of the full string is appended to the sortened string.
This patch was produced against svn rev 13637