Whenever complaint is made under oath by a credible person to a justice of the peace that any person has threatened to commit an offense against the person or property of another, and such justice is satisfied that there is good reason to fear the commission of such offense, he may issue a warrant to arrest and bring the person complained of before him or some other justice of the peace; and the justice of the peace before whom such person may be brought shall examine into the charge, and if there be just reason to apprehend that such person will commit the offense, he shall be required by the justice to enter into bond in such sum, with such sureties, and for such time not exceeding twelve months, as the justice may prescribe, conditioned to keep the peace toward the person against whom or whose property there is reason to fear the offense may be committed.