—(1) When a person is charged with and convicted of —
rioting, assault or any other breach of the peace or abetting any such offence;
an offence under section 143, 144, 145, 153, 504 or 510 of the Penal Code (Cap. 224) or under section 13A, 13B, 13C or 13D of the Miscellaneous Offences (Public Order and Nuisance) Act (Cap. 184);
assembling armed men or taking other unlawful measures for such purpose; or
committing criminal intimidation by threatening injury to any person or property,
and the court before which he is convicted believes that that person must execute a bond for keeping the peace, then the court may, at the time of passing sentence on that person, or instead of any sentence, order him to execute a bond for a sum proportionate to his means, with or without sureties, for keeping the peace for a period not exceeding 2 years.
(2) If the conviction is set aside on appeal or otherwise, the bond so executed becomes void.