boolean (@Nullable ASTNode node, int minCount) { if (isWhitespace(node)) { if (minCount == 1) { return node.textContains('\n'); } final String prevNodeText = node.getText(); int count = 0; for (int i = 0; i < prevNodeText.length(); i++) { if (prevNodeText.charAt(i) == '\n') { count++; if (count == minCount) { return true; } } } } return false; }