Instead of imposing sentence, the court or justice may order the person complained of to enter into a recognizance, with sufficient sureties, in such sum as the court or justice orders, to keep the peace toward all the people of the commonwealth, and especially toward the person requiring such security, for such term, not exceeding six months, as the court or justice may order. The court or justice may, for good cause, revoke such order or reduce the amount of the recognizance, or order that it be taken without surety.
Massachusetts Legal Code