Buggy code:
public class ObjectTable { public static final String TABLE = "object" ; public static final String COLUMN_ID = "id" ; public static final String COLUMN_NAME = "name" ; public static final String COLUMN_CLASS = "type" ; public static final String COLUMN_LINK = "link" ; public static final String COLUMN_DELETE = "deletets" ; public static final String COLUMN_GROUP = "groupid" ; private Connection _connection ; private JEVisDataSourceSQL _ds ; Logger logger = LoggerFactory . getLogger ( ObjectTable . class ) ; private Map < Long , JEVisObject > _cach = new HashMap < Long , JEVisObject > ( ) ; public ObjectTable ( JEVisDataSourceSQL ds ) throws JEVisException { } public JEVisObject loginUser ( String name , String pw ) throws JEVisException { } public List < JEVisObject > getObjects ( List < JEVisClass > classes ) throws JEVisException { String sql = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "select<seq2seq4repair_space>" + ( ObjectTable . TABLE ) ) + ".*" ) + "," ) + ( RelationshipTable . TABLE ) ) + ".*" ) + "<seq2seq4repair_space>from<seq2seq4repair_space>" ) + ( ObjectTable . TABLE ) ) + "<seq2seq4repair_space>left<seq2seq4repair_space>join<seq2seq4repair_space>" ) + ( RelationshipTable . TABLE ) ) + "<seq2seq4repair_space>on<seq2seq4repair_space>" ) + ( ObjectTable . TABLE ) ) + "." ) + ( ObjectTable . COLUMN_ID ) ) + "=" ) + ( RelationshipTable . TABLE ) ) + "." ) + ( RelationshipTable . COLUMN_START ) ) + "<seq2seq4repair_space>or<seq2seq4repair_space>" ) + ( ObjectTable . TABLE ) ) + "." ) + ( ObjectTable . COLUMN_ID ) ) + "=" ) + ( RelationshipTable . TABLE ) ) + "." ) + ( RelationshipTable . COLUMN_END ) ) + "<seq2seq4repair_space>where<seq2seq4repair_space>" ) + ( ObjectTable . TABLE ) ) + "." ) + ( ObjectTable . COLUMN_CLASS ) ) + "<seq2seq4repair_space>in<seq2seq4repair_space>(" ; PreparedStatement ps = null ; ResultSet rs = null ; List < JEVisObject > objects = new ArrayList < JEVisObject > ( ) ; _ds . addQuery ( ) ; try { boolean firstRun = true ; for ( JEVisClass cl : classes ) { if ( firstRun ) { sql += "?" ; firstRun = false ; } else { sql += ",?" ; } } sql += ( ( ( ")<seq2seq4repair_space>and<seq2seq4repair_space>" + ( ObjectTable . TABLE ) ) + "." ) + ( ObjectTable . COLUMN_DELETE ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>null" ; ps = _connection . prepareStatement ( sql ) ; for ( int i = 0 ; i < ( classes . size ( ) ) ; i ++ ) { JEVisClass cl = classes . get ( i ) ; ps . setString ( ( i + 1 ) , cl . getName ( ) ) ; } rs = ps . executeQuery ( ) ; <START_BUG> logger . error ( "getObject.SQl<seq2seq4repair_space>:<seq2seq4repair_space>{}.<seq2seq4repair_space>" , ps ) ; <END_BUG> while ( rs . next ( ) ) { boolean isCache = false ; for ( JEVisObject ob : objects ) { if ( ob . getID ( ) . equals ( rs . getLong ( ObjectTable . COLUMN_ID ) ) ) { isCache = true ; ( ( JEVisObjectSQL ) ( ob ) ) . addRelationship ( new JEVisRelationshipSQL ( _ds , rs ) ) ; } } if ( ! isCache ) { JEVisObjectSQL newObj = new JEVisObjectSQL ( _ds , rs ) ; newObj . addRelationship ( new JEVisRelationshipSQL ( _ds , rs ) ) ; objects . add ( newObj ) ; } } return objects ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; throw new JEVisException ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>inserting<seq2seq4repair_space>object" , 234234 , ex ) ; } finally { if ( rs != null ) { try { rs . close ( ) ; } catch ( SQLException ex ) { logger . debug ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>closing<seq2seq4repair_space>DB<seq2seq4repair_space>connection:<seq2seq4repair_space>{}.<seq2seq4repair_space>" , ex ) ; } } } } public JEVisObject insertObject ( String name , JEVisClass jclass , JEVisObject parent , long group ) throws JEVisException { } public JEVisObject updateObject ( JEVisObject object ) throws JEVisException { } public JEVisObject insertLink ( String name , JEVisObject linkParent , JEVisObject linkedObject ) throws JEVisException { } public JEVisObject getObject ( Long id , boolean cach ) throws JEVisException { } private void findChildren ( List < Long > children , Map < Long , Long > allID , Long parent ) { } public List < JEVisObject > getAllChildren ( List < JEVisObject > objs , JEVisObject obj ) { } public boolean deleteObject ( JEVisObject obj ) throws JEVisException { } public boolean isUserUnique ( String name ) { } }

Fix:
logger . debug ( "getObject.SQl<seq2seq4repair_space>:<seq2seq4repair_space>{}.<seq2seq4repair_space>" , ps ) ;