private static PsiElement @NotNull [] extractTail(PsiStatement current, PsiCodeBlock block) {
    PsiElement[] children = block.getChildren();
    int pos = ArrayUtil.indexOf(children, current);
    assert pos >= 0;
    PsiElement rBrace = block.getRBrace();
    int endPos = rBrace == null ? children.length : ArrayUtil.lastIndexOf(children, rBrace);
    assert endPos >= pos;
    if (pos + 1 < children.length && children[pos + 1] instanceof PsiWhiteSpace) {
      pos++;
    }
    return Arrays.copyOfRange(children, pos + 1, endPos);
  }
private static PsiElement @NotNull [] extractTail(PsiStatement current, PsiCodeBlock block)