Any person who, in the presence of a judge, commits or threatens to commit an offense against the person or property of another or contends with another with angry words may be ordered, without process, to enter into an undertaking to keep the peace for a term not exceeding 12 months and, in event of refusal, may be committed as in other cases.
Ala. Code § 15-6-3 (1975)