   */
  private static InsertBlocksResult InsertBlocks(String source) {
    boolean changed = false;
    String[] blocks = {"if", "for", "while", "else", "do"};
    String[] lines = source.split("\n");

    StringBuffer bf = new StringBuffer();
    Stack<Integer> bracesScope = new Stack<>();
