fixing snippet generation for java dsl