As per our discussion at https://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTi%3DGUGxk-hoR%3D9Dw7S1%2B9bAny0PXPFh32MWcKwgB%40mail.gmail.com&forum_name=ng4j-namedgraphs and https://sourceforge.net/mailarchive/forum.php?thread_name=alpine.DEB.2.00.1009131317280.22409%40rose.makesad.us&forum_name=ng4j-namedgraphs , here are the patches for NG4J to use PreparedStatement.
There are three patches -- I split this out so that it would be easier to understand, I hope.
Let me know if you have questions. The way I split them out, they should never break any tests in the test suite.
Patch 1 of 3
Patch 2 of 3
Patch 3 of 3