A defendant arrested may at any time before judgment apply on motion to vacate the order of arrest or to reduce the amount of bail. He may deny upon oath the facts alleged in the affidavit of the plaintiff on which the order of arrest was granted, and demand that the issue so raised by the plaintiff's affidavit and the defendant's denial be submitted to the jury and tried in the same manner as other issues. If the issues are found by the jury in favor of the defendant, judgment shall be rendered discharging him from arrest and vacating the order of arrest, and he shall recover of the plaintiff all costs of the proceeding in such arrest incurred by him in defending the action.
N.C. Gen. Stat. § 1-417