public static List<String> splitStatementsAcrossBlocks(CharSequence string) {
        List<String> statements = codeAwareSplitOnChar(string, false, true, ';', '\n', '{', '}');
        return statements.stream()
                .filter(stmt -> !(stmt.isEmpty()))
                .filter(stmt -> !(stmt.startsWith("//")))
                .collect(Collectors.toList());
    }
@Test
    public void splitStatementsAcrossBlocksDoWhile() {
        String text = "do {\n" +
                      "  $fact.value1 = 2;\n" +
                      "  drools.update($fact);\n" +
                      "} while (false);";
        List<String> statements = splitStatementsAcrossBlocks(text);
        assertThat(statements.get(0)).isEqualTo("do");
        assertThat(statements.get(1)).isEqualTo("$fact.value1 = 2");
        assertThat(statements.get(2)).isEqualTo("drools.update($fact)");
        assertThat(statements.get(3)).isEqualTo("while (false)");
    }