(1)Whenever any person is convicted of an offence punishable under section 48 or 50 of this Act and the Court convicting him is of the opinion that it is necessary to require such person to execute a bond for abstaining from the commission of offences punishable under these sections, the Court may, at the time of passing sentence on such person, order him to execute a bond for a sum proportionate to his means, with or without sureties, for abstaining from the commission of such offences during such period not exceeding two years, as it thinks fit to fix.
(2) The bond shall be in the form contained in Schedule II of the [Criminal Procedure Code, 1973 (2 of 1974)]. The provisions of the said Code shall, in so far as they are applicable, apply to all matters connected with such bond as if it were a bond to keep the peace ordered to be executed under section 106 of the said Code.
(3) If the conviction is set aside on appeal, or in revision, the bond so executed shall become void.
(4) An order under this section may also be made by an appellate Court or by the High Court when exercising its powers of revision].