; or (2) in the case of an alien who expresses an intent to file such an application, the date on which any applicable time limitation for the filing of such an application under section 208 of such Act has ended and no application has been filed. (b) Affirmative defense In a case in which an individual is prosecuted under section 275(a) or 276(a) of the Immigration and Nationality Act ( 8 U.S.C. 1325(a) , 1326(a)) in violation of subsection (a), it shall be a defense that the alien has expressed a credible or reasonable fear of persecution, filed an application for asylum or another form of protection as described in subsection (a), or expressed an intent to file such an application, and that such application has not been finally adjudicated and denied, including any appeals thereto. 505. Expanding alternatives to detention (a) Family case management program The Secretary of Homeland Security shall expand use of the Family Case Management Program (described in section 226 of Public Law 116–6 ) for apprehended aliens who are members of family units arriving in the United States, and develop additional community-based programs to increase the number of enrollees in the Alternatives to Detention program. (b) Nonprofit entity contracting partner The Secretary of Homeland Security shall contract with qualified nonprofit entities for the operation of the Alternatives to Detention program, including the Family Case Management Program and other community-based programs described in subsection (a). (c) Legal orientation The Secretary of Homeland Security shall ensure that enrollees in the Alternatives to Detention program, including the Family Case Management Program and other community-based programs described in subsection (a), are provided a legal orientation consistent with program elements described in section 604(a)(2). 506. Eliminating immigration court backlogs (a) Addressing immigration judge shortages The Attorney General shall increase the total number of immigration judges by at least 55 judges per year for