Chapter 2. Setting Aside The Indictment Or Information 995-999a of California Penal Code >> Title 6. >> Part 2. >> Chapter 2.

(a) Subject to subdivision (b) of Section 995a, the indictment or information shall be set aside by the court in which the defendant is arraigned, upon his or her motion, in either of the following cases:
  (1) If it is an indictment:
  (A) Where it is not found, endorsed, and presented as prescribed in this code.
  (B) That the defendant has been indicted without reasonable or probable cause.
  (2) If it is an information:
  (A) That before the filing thereof the defendant had not been legally committed by a magistrate.
  (B) That the defendant had been committed without reasonable or probable cause.
  (b) In cases in which the procedure set out in subdivision (b) of Section 995a is utilized, the court shall reserve a final ruling on the motion until those procedures have been completed.
995a. (a) If the names of the witnesses examined before the grand jury are not inserted at the foot of the indictment or indorsed thereon, the court shall order them to be so inserted or indorsed; and if the information be not subscribed by the district attorney, the court may order it to be so subscribed.
  (b) (1) Without setting aside the information, the court may, upon motion of the prosecuting attorney, order further proceedings to correct errors alleged by the defendant if the court finds that such errors are minor errors of omission, ambiguity, or technical defect which can be expeditiously cured or corrected without a rehearing of a substantial portion of the evidence. The court may remand the cause to the committing magistrate for further proceedings, or if the parties and the court agree, the court may itself sit as a magistrate and conduct further proceedings. When remanding the cause to the committing magistrate, the court shall state in its remand order which minor errors it finds could be expeditiously cured or corrected.
  (2) Any further proceedings conducted pursuant to this subdivision may include the taking of testimony and shall be deemed to be a part of the preliminary examination.
  (3) The procedure specified in this subdivision may be utilized only once for each information filed. Any further proceedings conducted pursuant to this subdivision shall not be deemed to extend the time within which a defendant must be brought to trial under Section 1382.
If the motion to set aside the indictment or information is not made, the defendant is precluded from afterwards taking the objections mentioned in Section 995.
The motion must be heard at the time it is made, unless for cause the court postpones the hearing to another time. The court may entertain such motion prior to trial whether or not a plea has been entered and such plea need not be set aside in order to consider the motion. If the motion is denied, and the accused has not previously answered the indictment or information, either by demurring or pleading thereto, he shall immediately do so. If the motion is granted, the court must order that the defendant, if in custody, be discharged therefrom; or, if admitted to bail, that his bail be exonerated; or, if he has deposited money, or if money has been deposited by another or others instead of bail for his appearance, that the same be refunded to him or to the person or persons found by the court to have deposited said money on behalf of said defendant, unless it directs that the case be resubmitted to the same or another grand jury, or that an information be filed by the district attorney; provided, that after such order of resubmission the defendant may be examined before a magistrate, and discharged or committed by him, as in other cases, if before indictment or information filed he has not been examined and committed by a magistrate.
If the court directs the case to be resubmitted, or an information to be filed, the defendant, if already in custody, shall remain, unless he or she is admitted to bail; or, if already admitted to bail, or money has been deposited instead thereof, the bail or money is answerable for the appearance of the defendant to answer a new indictment or information; and, unless a new indictment is found or information filed before the next grand jury of the county is discharged, the court shall, on the discharge of such grand jury, make the order prescribed by Section 997.
An order to set aside an indictment or information, as provided in this chapter, is no bar to a future prosecution for the same offense.
999a. A petition for a writ of prohibition, predicated upon the ground that the indictment was found without reasonable or probable cause or that the defendant had been committed on an information without reasonable or probable cause, or that the court abused its discretion in utilizing the procedure set out in subdivision (b) of Section 995a, must be filed in the appellate court within 15 days after a motion made under Section 995 to set aside the indictment on the ground that the defendant has been indicted without reasonable or probable cause or that the defendant had been committed on an information without reasonable or probable cause, has been denied by the trial court. A copy of such petition shall be served upon the district attorney of the county in which the indictment is returned or the information is filed. The alternative writ shall not issue until five days after the service of notice upon the district attorney and until he has had an opportunity to appear before the appellate court and to indicate to the court the particulars in which the evidence is sufficient to sustain the indictment or commitment.