boolean (AbstractBlockWrapper block1, AbstractBlockWrapper block2) { if (block1 == null || block2 == null) { return true; } AbstractBlockWrapper leftBlock = block1.getStartOffset() <= block2.getStartOffset() ? block1 : block2; AbstractBlockWrapper rightBlock = block1.getStartOffset() > block2.getStartOffset() ? block1 : block2; for (; rightBlock != null && rightBlock.getStartOffset() > leftBlock.getStartOffset(); rightBlock = rightBlock.getPreviousBlock()) { if (rightBlock.getWhiteSpace().containsLineFeeds()) { return true; } } return false; }