R.S., c. C-46 Criminal Code 1 Subsection 524(4) of the  Criminal Code  is replaced by the following: Detention (4) If the judge or justice cancels the summons, appearance notice, undertaking or release order, the judge or justice shall order that the accused be detained in custody unless, (a) having been given a reasonable opportunity to do so, the accused shows cause why their detention in custody is not justified under subsection 515(10);  or (b) in the case of an accused who has been charged more than twice with an indictable offence punishable by five years or more of imprisonment while subject to the summons, appearance notice, undertaking or release order, the judge or justice is satisfied that exceptional circumstances warrant their release.