new version with java procedure to replace predicate name