Is this action a Hamilton's principal function? In Ref. 1, in section 3, they wrote:
\begin{equation}
L'(q,\dot{q},\ddot{q},t)~=~L(q,\dot{q},\ddot{q},t)-\frac{dS(q,\dot{q},t)}{dt}.\tag{14}
\end{equation}
Then the Hamilton-Jacobi equation is 
\begin{equation}
\frac{\partial S}{\partial t}~=~-H_0,\tag{27}
\end{equation}
where $$H_0~=~p\dot{q}+\pi\ddot{q}-L,\tag{28}$$ where 
$$p~=~\dfrac{\partial S}{\partial q}\quad\text{and}\quad
\pi~=~\dfrac{\partial S}{\partial \dot{q}}.\tag{29}$$
I was confused because here the action is a function of $\dot{q}$ ! Then I read this answer by Qmechanic, and I had this question: is this action a Hamilton's principle function? If yes, in Hamilton's principal function $S(q,\alpha,t)$, the $\alpha$ is an integration constant. But here we have $S(q,\dot{q},t)$;  $\dot{q}$ is not an integration constant. If no, what is that action? 
EDIT: I want to know if the function $S$ is considered as an action. If yes, I need an explanation on how an action could be a function of $\dot{q}$? And if no, how is this function related to the known action $S[q]$?
References:


*

*B.M. Pimentel & R.G. Teixeira, Hamilton-Jacobi formulation for singular systems with second order Lagrangians, arXiv:hep-th/9512099.

 A: OP is asking about Ref. 1. This touches upon several topics:


*

*Second-order Lagrangian formulations and their corresponding Ostrogradsky Hamiltonian formulation. This is discussed in e.g. this Phys.SE post, where it is explained how to reduce to first-order formulation in the non-singular case.

*Singular Legendre transformations, and constraints. See e.g. Ref. 2 & 3.

*Caratheodory’s method of equivalent Lagrangians, and its connection to Hamilton-Jacobi theory. This is explained in Ref. 4 in the first-order case.
Now let us return to OP's title question. Let us stress that the Hamilton's principal function $S$ and the off-shell action functional $S[q]$ are different objects. (For first-order Lagrangians, this is e.g. explained in my Phys.SE answers here & here.) In particular, eq. (14) is part of Caratheodory’s method of equivalent Lagrangians. The $S$ appearing in eq. (14) is Hamilton's principal function, not the off-shell action functional. It depends on velocities because the theory is of second order. 
References:


*

*B.M. Pimentel & R.G. Teixeira, Hamilton-Jacobi formulation for singular systems with second order Lagrangians, arXiv:hep-th/9512099.

*P.A.M. Dirac, Lectures on QM, (1964).

*M. Henneaux and C. Teitelboim, Quantization of Gauge Systems, 1994.

*H.A. Kastrup, Canonical theories of Lagrangian dynamical systems in physics, Phys. Rep. 101 (1983) 1; Section 2.4.
