Habeas Corpus Act Article 8

The court shall base its review of the legality of the arrest or detention on the following: the alleged legal basis of the arrest or detention; the alleged factual circumstances that have given rise to the arrest or detention; and the procedural regularity of the arrest or detention.In conducting the review in accordance with the preceding paragraph, the court shall grant an opportunity to be heard to the petitioner, the person under arrest or detention, and the organ that made the arrest or detention. When necessary, the court may notify other interested parties to be present in the court proceedings to be heard therefrom.With respect to the handling of the petition for habeas corpus, in addition to the provisions of this Act, the court shall apply, mutatis mutandis, other related procedural provisions in the statutory law.
中文原文 提審法第8條
法院審查逮捕、拘禁之合法性,應就逮捕、拘禁之法律依據、原因及程序為之。
前項審查,應予聲請人、被逮捕、拘禁人及逮捕、拘禁之機關到場陳述意見之機會。
必要時,並得通知相關第三人到場陳述意見。
法院關於提審聲請之處理,除本法規定外,準用其他相關法律規定之程序。

English translation for reference only; the Chinese text prevails. Not legal advice.