Sec. 14. Bail to secure appearance of material witness. – When the court  is satisfied, upon proof of oath, that a material  witness  will not  testify  when  required,  it  may,  upon  motion  of  either  party,
order  the  witness  to  post  bail  in  such  sum  as  may  be  deemed proper.  Upon  refusal  to  post  bail,  the  court  shall  commit  him  to prison until he complies or is legally discharged after his testimony has been taken.