reglab/housing_qa huggingface dataset:
NC Gen Stat § 17-3 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 2 - Application.|§ 17-3 - Who may prosecute writ.

 17-3. Who may prosecute writ.Every person imprisoned or restrained of his liberty within this State, for any criminal or supposed criminal matter, or on any pretense whatsoever, except in cases specified in G.S. 17-4, may prosecute a writ of habeas corpus, according to the provisions of this Chapter, to inquire into the cause of such imprisonment or restraint, and, if illegal, to be delivered therefrom. (1868-9, c. 116, s. 1; Code, s. 1623; Rev., s. 1821; C.S., s. 2205.)
NC Gen Stat § 17-4 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 2 - Application.|§ 17-4 - When application denied.

 17-4. When application denied. Application to prosecute the writ shall be denied in the following cases:(1) Where the persons are committed or detained by virtue of process issued by a court of the United States, or a judge thereof, in cases where such courts or judges have exclusive jurisdiction under the laws of the United States, or have acquired exclusive jurisdiction by the commencement of suits in such courts.(2) Where persons are committed or detained by virtue of the final order, judgment or decree of a competent tribunal of civil or criminal jurisdiction, or by virtue of an execution issued upon such final order, judgment or decree.(3) Where any person has willfully neglected, for the space of two whole sessions after his imprisonment, to apply for the writ to the superior court of the county in which he may be imprisoned, such person shall not have a habeas corpus in vacation time for his enlargement.(4) Where no probable ground for relief is shown in the application. (1868-9, c. 116, s. 2; Code, s. 1624; Rev., s. 1822; C.S., s. 2206; 1971, c. 528, s. 1.)
NC Gen Stat § 17-5 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 2 - Application.|§ 17-5 - By whom application is made.

 17-5. By whom application is made.Application for the writ may be made either by the party for whose relief it is intended or by any person in his behalf. (1868-9, c. 116, s. 3; Code, s. 1625; Rev., s. 1823; C.S., s. 2207.)
NC Gen Stat § 17-6 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 2 - Application.|§ 17-6 - To judge of appellate division or superior court in writing.

 17-6. To judge of appellate division or superior court in writing. Application for the writ shall be made in writing, signed by the applicant -(1) To any one of the justices or judges of the appellate division.(2) To any one of the superior court judges, either during a session or in vacation. (1868-9, c. 116, s. 4; Code, s. 1626; Rev., s. 1824; C.S., s. 2208; 1969, c. 44, s. 41; 1971, c. 528, s. 2.)
NC Gen Stat § 17-7 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 2 - Application.|§ 17-7 - Contents of application.

 17-7. Contents of application.The application must state, in substance, as follows:(1) That the party, in whose behalf the writ is applied for, is imprisoned or restrained of his liberty, the place where, and the officer or person by whom he is imprisoned or restrained, naming both parties, if their names are known, or describing them if they are not known.(2) The cause or pretense of such imprisonment or restraint, according to the knowledge or belief of the applicant.(3) If the imprisonment is by virtue of any warrant or other process, a copy thereof shall be annexed, or it shall be made to appear that a copy thereof has been demanded and refused, or that for some sufficient reason a demand for such copy could not be made.(4) If the imprisonment or restraint is alleged to be illegal, the application must state in what the alleged illegality consists; and that the legality of the imprisonment or restraint has not been already adjudged, upon a prior writ of habeas corpus, to the knowledge or belief of the applicant.(5) The facts set forth in the application must be verified by the oath of the applicant, or by that of some other credible witness, which oath may be administered by any person authorized by law to take affidavits. (1868-9, c. 116, s. 5; Code, s. 1627; Rev., s. 1825; C.S., s. 2209.)
NC Gen Stat § 17-8 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 2 - Application.|§ 17-8 - Issuance of writ without application.

 17-8. Issuance of writ without application.When the appellate division or superior court division, or any judge of either division, has evidence from any judicial proceeding before such court or judge that any person within this State is illegally imprisoned or restrained of his liberty, it is the duty of said court or judge to issue a writ of habeas corpus for his relief, although no application be made for such writ. (1868-9, c. 116, s. 10; Code, s. 1632; Rev., s. 1826; C.S., s. 2210; 1969, c. 44, s. 42.)
NC Gen Stat § 17-9 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 3 - Writ.|§ 17-9 - Writ granted without delay.

 17-9. Writ granted without delay.Any court or judge empowered to grant the writ, to whom such applications may be presented, shall grant the writ without delay, unless it appear from the application itself or from the documents annexed that the person applying or for whose benefit it is intended is, by this Chapter, prohibited from prosecuting the writ. (1868-9, c. 116, s. 6; Code, s. 1628; Rev., s. 1827; C.S., s. 2211.)
NC Gen Stat § 17-10 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 3 - Writ.|§ 17-10 - Penalty for refusal to grant.

 17-10. Penalty for refusal to grant.If any judge authorized by this Chapter to grant writs of habeas corpus refuses to grant such writ when legally applied for, every such judge shall forfeit to the party aggrieved two thousand five hundred dollars ($2,500). (1868-9, c. 116, s. 9; Code, s. 1631; Rev., s. 1828; C.S., s. 2212.)
NC Gen Stat § 17-11 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 3 - Writ.|§ 17-11 - Sufficiency of writ; defects of form immaterial.

 17-11. Sufficiency of writ; defects of form immaterial.No writ of habeas corpus shall be disobeyed on account of any defect of form. It shall be sufficient -(1) If the person having the custody of the party imprisoned or restrained be designated either by his name of office, if he have any, or by his own name, or, if both such names be unknown or uncertain, he may be described by an assumed appellation, and anyone who may be served with the writ shall be deemed the person to whom it is directed, although it may be directed to him by a wrong name, or description, or to another person.(2) If the person who is directed to be produced be designated by name, or if his name be uncertain or unknown, he may be described by an assumed appellation or in any other way, so as to designate the person intended. (1868-9, c. 116, ss. 7, 8; Code, ss. 1629, 1630; Rev., s. 1829; C.S., s. 2213.)
NC Gen Stat § 17-12 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 3 - Writ.|§ 17-12 - Service of writ.

 17-12. Service of writ.The writ of habeas corpus may be served by any qualified elector of this State thereto authorized by the court or judge allowing the same. It may be served by delivering the writ, or a copy thereof, to the person to whom it is directed; or, if such person cannot be found, by leaving it, or a copy, at the jail, or other place in which the party for whose relief it is intended is confined, with some under officer or other person of proper age; or, if none such can be found, or if the person attempting to serve the writ be refused admittance, by affixing a copy thereof in some conspicuous place on the outside, either of the dwelling house of the party to whom the writ is directed or of the place where the party is confined for whose relief it is sued out. (1868-9, c. 116, s. 32; Code, s. 1657; Rev., s. 1833; C.S., s. 2214.)
NC Gen Stat § 17-13 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 4 - Return.|§ 17-13 - When writ returnable.

 17-13. When writ returnable.Writs of habeas corpus may be made returnable at a certain time, or forthwith, as the case may require. If the writ be returnable at a certain time, such return shall be made and the party shall be produced at the time and place specified therein. (1868-9, c. 116, s. 31; Code, s. 1656; Rev., s. 1830; C.S., s. 2215.)
NC Gen Stat § 17-14 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 4 - Return.|§ 17-14 - Contents of return; verification.

 17-14. Contents of return; verification.The person or officer on whom the writ is served must make a return thereto in writing, and, except where such person is a sworn public officer and makes his return in his official capacity, it must be verified by his oath. The return must state plainly and unequivocally -(1) Whether he has or has not the party in his custody or under his power or restraint.(2) If he has the party in his custody or power, or under his restraint, the authority and the cause of such imprisonment or restraint, setting forth the same at large.(3) If the party is detained by virtue of any writ, warrant, or other written authority, a copy thereof shall be annexed to the return; and the original shall be produced and exhibited on the return of the writ to the court or judge before whom the same is returnable.(4) If the person or officer upon whom such writ is served has had the party in his power or custody, or under his restraint, at any time prior or subsequent to the date of the writ, but has transferred such custody or restraint to another, the return shall state particularly to whom, at what time, for what cause and by what authority such transfer took place. (1868-9, c. 116, s. 11; Code, s. 1633; Rev., s. 1831; C.S., s. 2216.)
NC Gen Stat § 17-15 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 4 - Return.|§ 17-15 - Production of body if required.

 17-15. Production of body if required.If the writ requires it, the officer or person on whom the same has been served shall also produce the body of the party in his custody or power, according to the command of the writ, except in the case of the sickness of such party, as hereinafter provided. (1868-9, c. 116, s. 14; Code, s. 1636; Rev., s. 1832; C.S., s. 2217.)
NC Gen Stat § 17-16 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 5 - Enforcement of Writ.|§ 17-16 - Attachment for failure to obey.

 17-16. Attachment for failure to obey.If the person or officer on whom any writ of habeas corpus has been duly served refuses or neglects to obey the same, by producing the body of the party named or described therein, and by making a full and explicit return thereto, within the time required, and no sufficient excuse is shown for such refusal or neglect, it is the duty of the court or judge before whom the writ has been made returnable, upon due proof of the service thereof, forthwith to issue an attachment against such person or officer, directed to the sheriff of any county within this State, and commanding him forthwith to apprehend such person or officer and bring him immediately before such court or judge. On being so brought such person or officer shall be committed to close custody in the jail of the county where such court or judge may be, without being allowed the liberties thereof, until such person or officer make return to such writ and comply with any order that may be made by such court or judge in relation to the party for whose relief the writ has been issued. (1868-9, c. 116, s. 15; Code, s. 1637; Rev., s. 1834; C.S., s. 2218.)
NC Gen Stat § 17-17 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 5 - Enforcement of Writ.|§ 17-17 - Liability of judge refusing attachment.

 17-17. Liability of judge refusing attachment.If any judge willfully refuses to grant the writ of attachment, as provided for in G.S. 17-16, he shall be liable to impeachment, and moreover shall forfeit to the party aggrieved twenty-five hundred dollars ($2,500). (1870-1, c. 221, s. 2; Code, s. 1638; Rev., s. 1835; C.S., s. 2219.)
NC Gen Stat § 17-18 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 5 - Enforcement of Writ.|§ 17-18 - Attachment against sheriff to be directed to coroner; procedure.

 17-18. Attachment against sheriff to be directed to coroner; procedure.If a sheriff has neglected to return the writ agreeably to the command thereof, the attachment against him may be directed to the coroner or to any other person to be designated therein, who shall have power to execute the same, and such sheriff, upon being brought up, may be committed to the jail of any county other than his own. (1868-9, c. 116, s. 16; Code, s. 1639; Rev., s. 1836; C.S., s. 2220.)
NC Gen Stat § 17-19 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 5 - Enforcement of Writ.|§ 17-19 - Precept to bring up party detained.

 17-19. Precept to bring up party detained.The court or judge by whom any such attachment may be issued may also at the same time, or afterwards, direct a precept to any sheriff, coroner, or other person to be designated therein, commanding him to bring forthwith before such court or judge the party, wherever to be found, for whose benefit the writ of habeas corpus has been granted. (1868-9, c. 116, s. 17; Code, s. 1640; Rev., s. 1837; C.S., s. 2221.)
NC Gen Stat § 17-20 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 5 - Enforcement of Writ.|§ 17-20 - Liability of judge refusing precept.

 17-20. Liability of judge refusing precept.If any judge refuses to grant the precept provided for in G.S. 17-19, he shall be liable to impeachment, and moreover shall forfeit to the party aggrieved twenty-five hundred dollars ($2,500). (1870-1, c. 221, s. 3; Code, s. 1641; Rev., s. 1838; C.S., s. 2222.)
NC Gen Stat § 17-21 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 5 - Enforcement of Writ.|§ 17-21 - Liability of judge conniving at insufficient return.

 17-21. Liability of judge conniving at insufficient return.If any judge grants the attachment, or the precept, and gives the officer or other person charged with the execution of the same verbal or written instructions not to execute the same, or to make any evasive or insufficient return, or any return other than that provided by law; or shall connive at the failing to make any return or any evasive or insufficient return, or any return other than that provided by law, he shall be liable to impeachment, and moreover shall forfeit to the party aggrieved twenty-five hundred dollars ($2,500). (1870-1, c. 221, s. 4; Code, s. 1642; Rev., s. 1839; C.S., s. 2223.)
NC Gen Stat § 17-22 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 5 - Enforcement of Writ.|§ 17-22 - Power of county to aid service.

 17-22. Power of county to aid service.In the execution of any such attachment, precept or writ, the sheriff, coroner, or other person to whom it may be directed, may call to his aid the power of the county, as in other cases. (1868-9, c. 116, s. 18; Code, s. 1643; Rev., s. 1840; C.S., s. 2224.)
NC Gen Stat § 17-23 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 5 - Enforcement of Writ.|§ 17-23 - Obedience to order of discharge compelled.

 17-23. Obedience to order of discharge compelled.Obedience to a judgment or order for the discharge of a prisoner or person restrained of his liberty, pursuant to the provisions of this Chapter, may be enforced by the court or judge by attachment in the same manner and with the same effect as for a neglect to make return to a writ of habeas corpus; and the person found guilty of such disobedience shall forfeit to the party aggrieved two thousand five hundred dollars ($2,500), besides any special damages which such party may have sustained. (1868-9, c. 116, s. 24; Code, s. 1649; Rev., s. 1841; C.S., s. 2225.)
NC Gen Stat § 17-24 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 5 - Enforcement of Writ.|§ 17-24 - No civil liability for obedience.

 17-24. No civil liability for obedience.No officer or other person shall be liable to any civil action for obeying a judgment or order of discharge upon writ of habeas corpus. (1868-9, c. 116, s. 25; Code, s. 1650; Rev., s. 1842; C.S., s. 2226.)
NC Gen Stat § 17-25 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 5 - Enforcement of Writ.|§ 17-25 - Recommittal after discharge; penalty.

 17-25. Recommittal after discharge; penalty.If any person shall knowingly again imprison or detain one who has been set at large upon any writ of habeas corpus, for the same cause, other than by the legal process or order of the court wherein he is bound by recognizance to appear, or of any other court having jurisdiction in the case, he shall be guilty of a Class 1 misdemeanor. (1868-9, c. 116, s. 26; Code, s. 1651; Rev., s. 3581; C.S., s. 2227; 1993, c. 539, s. 306; 1994, Ex. Sess., c. 24, s. 14(c).)
NC Gen Stat § 17-26 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 5 - Enforcement of Writ.|§ 17-26 - Disobedience to writ or refusing copy of process; penalty.

 17-26. Disobedience to writ or refusing copy of process; penalty.If any person to whom a writ of habeas corpus is directed shall neglect or refuse to make due return thereto, or to bring the body of the party detained according to the command of the writ without delay, or shall not, within six hours after demand made therefor, deliver a copy of the commitment or cause of detainer, such person shall, upon conviction on indictment, be fined one thousand dollars ($1,000), or imprisoned not exceeding 12 months, and if such person be an officer, shall moreover be removed from office. (1868-9, c. 116, s. 27; Code, s. 1652; Rev., s. 3597; C.S., s. 2228.)
NC Gen Stat § 17-27 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 5 - Enforcement of Writ.|§ 17-27 - Penalty for false return.

 17-27. Penalty for false return.If any person shall make a false return to a writ of habeas corpus, he shall be guilty of a Class 1 misdemeanor. (1868-9, c. 116, s. 28; Code, s. 1653; Rev., s. 3582; C.S., s. 2229; 1993, c. 539, s. 307; 1994, Ex. Sess., c. 24, s. 14(c).)
NC Gen Stat § 17-28 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 5 - Enforcement of Writ.|§ 17-28 - Penalty for concealing party entitled to writ.

 17-28. Penalty for concealing party entitled to writ.If anyone having in his custody, or under his power, any party who, by law, would be entitled to a writ of habeas corpus, or for whose relief such writ shall have been issued, shall, with intent to elude the service of such writ, or to avoid the effect thereof, transfer the party to the custody, or put him under the power or control, of another, or shall conceal or change the place of his confinement, or shall knowingly aid or abet another in so doing, he shall be guilty of a Class 1 misdemeanor. (1868-9, c. 116, ss. 29, 30; Code, ss. 1654, 1655; Rev., s. 3583; C.S., s. 2230; 1993, c. 539, s. 308; 1994, Ex. Sess., c. 24, s. 14(c).)
NC Gen Stat § 17-29 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 6 - Proceedings and Judgment.|§ 17-29 - Notice to interested parties.

 17-29. Notice to interested parties.When it appears from the return to the writ that the party named therein is in custody on any process, or by reason of any claim of right, under which any other person has an interest in continuing his imprisonment or restraint, no order shall be made for his discharge until it appears that the person so interested, or his attorney, if he have one, has had reasonable notice of the time and place at which such writ is returnable. (1868-9, c. 116, s. 12; 1870-1, c. 221, s. 1; Code, s. 1634; Rev., s. 1843; C.S., s. 2231.)
NC Gen Stat § 17-30 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 6 - Proceedings and Judgment.|§ 17-30 - Notice to district attorney.

 17-30. Notice to district attorney.When it appears from the return that such party is detained upon any criminal accusation, the court or judge may, if he thinks proper, make no order for the discharge of such party until sufficient notice of the time and place at which the writ has been returned, or is made returnable, is given to the district attorney of the district in which the person prosecuting the writ is detained. (1868-9, c. 116, s. 13; Code, s. 1635; Rev., s. 1844; C.S., s. 2232; 1973, c. 47, s. 2.)
NC Gen Stat § 17-31 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 6 - Proceedings and Judgment.|§ 17-31 - Subpoenas to witnesses.

 17-31. Subpoenas to witnesses.Any party to a proceeding on a writ of habeas corpus may procure the attendance of witnesses at the hearing, by subpoena, to be issued by the clerk of any superior court, under the same rules, regulations and penalties prescribed by law in other cases. (1868-9, c. 116, s. 34; Code, s. 1659; Rev., s. 1845; C.S., s. 2233.)
NC Gen Stat § 17-32 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 6 - Proceedings and Judgment.|§ 17-32 - Proceedings on return; facts examined; summary hearing of issues.

 17-32. Proceedings on return; facts examined; summary hearing of issues.The court or judge before whom the party is brought on a writ of habeas corpus shall, immediately after the return thereof, examine into the facts contained in such return, and into the cause of the confinement or restraint of such party, whether the same has been upon commitment for any criminal or supposed criminal matter or not; and if issue be taken upon the material facts in the return, or other facts are alleged to show that the imprisonment or detention is illegal, or that the party imprisoned is entitled to his discharge, the court or judge shall proceed, in a summary way, to hear the allegations and proofs on both sides, and to do what to justice appertains in delivering, bailing or remanding such party. (1868-9, c. 116, s. 19; Code, s. 1644; Rev., s. 1846; C.S., s. 2234.)
NC Gen Stat § 17-33 (2021)
2021 North Carolina General Statutes|Chapter 17 - Habeas Corpus|Article 6 - Proceedings and Judgment.|§ 17-33 - When party discharged.

 17-33. When party discharged.If no legal cause is shown for such imprisonment or restraint, or for the continuance thereof, the court or judge shall discharge the party from the custody or restraint under which he is held. But if it appears on the return to the writ that the party is in custody by virtue of civil process from any court legally constituted, or issued by any officer in the course of judicial proceedings before him, authorized by law, such party can be discharged only in one of the following cases:(1) Where the jurisdiction of such court or officer has been exceeded, either as to matter, place, sum or person.(2) Where, though the original imprisonment was lawful, yet by some act, omission or event, which has taken place afterwards, the party has become entitled to be discharged.(3) Where the process is defective in some matter of substance required by law, rendering such process void.(4) Where the process, though in proper form, has been issued in a case not allowed by law.(5) Where the person, having the custody of the party under such process, is not the person empowered by law to detain him.(6) Where the process is not authorized by any judgment, order or decree of any court, nor by any provision of law. (1868-9, c. 116, s. 20; Code, s. 1645; Rev., s. 1847; C.S., s. 2235.)