SECTION 107 of CrPC states as under;
(1) When an Executive Magistrate receives information that any person is likely to commit a breach of the peace or disturb the public tranquility or to do any wrongful act that may probably occasion a breach of' the peace or disturb the public tranquility and is of opinion that there is sufficient ground for proceeding, he may in the manner hereinafter provided, require such person to show cause why he should not be ordered to execute a bond 1[with or without sureties] for keeping the peace for such period, not exceeding one year, as the Magistrate thinks fit.
(2) Proceeding under this section may be taken before any Executive Magistrate when either the place where the breach of the peace or disturbance is apprehended is within his local jurisdiction or there is within such jurisdiction a person who is likely to commit a breach of the peace or disturb the public tranquility or to do any wrongful act as aforesaid beyond such jurisdiction.
Furtherance for your information and details this matter is also term as CHAPTER CASE, Imposed on a person who endangers peace. For which one has to sign a bond with or without surety.