(1) Whenever any person is convicted of an offence punishable under any provision of Chapter IV and the court convicting him is of opinion that it is necessary to require such person to execute a bond for abstaining from the commission of any offence under this Act, 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 commission of any offence under Chapter IV during such period not exceeding three years as it thinks fit to fix.
(2) The bond shall be in such form as may be prescribed by the Central Government and the provisions of the Code of Criminal Procedure, 1973 (2 of 1974), 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 that Code.
(3) If the conviction is set aside on appeal or otherwise, 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 or Sessions Judge when exercising the powers of revision.