if (!inodeLocks.getInode().isDirectory()) {

This line occurs twice....