If a witness has been committed because of his inability to furnish sureties for his appearance before the superior court, the jailer shall forthwith give notice to the chief justice of the superior court, who shall direct the district attorney to inquire as to the importance of his testimony and the necessity for detaining him in jail, and the district attorney, if in his opinion the public interest will not suffer by the release of the witness on his own recognizance, shall so report to the chief justice, who may thereupon order the witness to be released upon his own recognizance.
Mass. Gen. Laws ch. 276, § 51