In this task, you are given text for US Congressional and California state bills, your task is to generate a summary for this bill.

SECTION 1. SHORT TITLE.

    This Act may be cited as the ``Saving Family Homes Act of 2008''.

SEC. 2. RIGHT TO RENT HOME SUBJECT TO FORECLOSURE.

    (a) Exercise of Right.--If, at any time after notice under 
subsection (b) for an eligible mortgage is provided to the eligible 
mortgagor and before the commencement of the 7-day period that ends on 
the first date that the foreclosing creditor may first commence or 
execute such foreclosure pursuant to such notice, the eligible 
mortgagor under the eligible mortgage that is subject to such 
foreclosure provides notice in accordance with section 3, 
notwithstanding such foreclosure or any other interests in the 
property, the eligible mortgagor may, at the sole option of the 
eligible mortgagor, continue to occupy the foreclosed property during 
the 20-year period that begins upon the commencement of such occupancy, 
subject to the requirements of subsection (c).
    (b) Limitation on Timing of Foreclosure; Notice of Default and 
Right To Rent.--Notwithstanding any other provision of law or any 
contract, a foreclosure of an eligible mortgage may not be commenced or 
executed before the expiration of the 28-day period beginning upon the 
receipt, by the eligible mortgagor, of written notice provided by the 
foreclosing creditor for the mortgage that--
            (1) clearly states that--
                    (A) the eligible mortgagor is in default on the 
                mortgage; and
                    (B) foreclosure on the mortgage may or will be 
                commenced on account of such default;
            (2) clearly states that the eligible mortgagor has the 
        right, notwithstanding foreclosure, to continue to occupy the 
        foreclosed property in accordance with this Act, and sets forth 
        the terms of such occupancy under subsections (a) and (c); and
            (3) identifies the first date, pursuant to this section and 
        any other provisions of law and contract, that such foreclosure 
        may be commenced.
    (c) Terms of Periodic Tenancy.--Occupancy, by an eligible 
mortgagor, of a foreclosed property pursuant to subsection (a) shall be 
under a periodic month-to-month tenancy under which the owner of the 
property may terminate the tenancy for material breach but shall have 
no authority, at will, to terminate the tenancy during the occupancy 
pursuant to subsection (a) if the mortgagor--
            (1) timely pays to the owner of the foreclosed property 
        rent on a monthly basis in the amount of the fair market rent 
        for the property determined in accordance with section 4; and
            (2) uses property as the principal residence of the 
        mortgagor.

SEC. 3. REQUIRED NOTICE.

    With respect to an eligible mortgage for which notice under 
subsection (b) has been provided, notice in accordance with this 
section is notice that--
            (1) is made in writing;
            (2) is submitted to--
                    (A) the court having jurisdiction and venue to 
                conduct the covered foreclosure proceeding for the 
                eligible mortgage or, in the case of nonjudicial 
                foreclosure, the court in which an action is brought 
                pursuant to section 5; and
                    (B) the foreclosing creditor; and
            (3) states that the eligible mortgagor is exercising the 
        authority under section 2(a) to continue to occupy the 
        foreclosed property.

SEC. 4. DETERMINATION OF FAIR MARKET RENT.

    (a) Initial Determination.--For purposes of this Act, the fair 
market rent for a foreclosed property involved in a covered foreclosure 
proceeding shall be the amount that is determined by an independent 
appraiser who is licensed or certified, as applicable, to conduct 
appraisals in the jurisdiction in which the property is located, who 
shall be appointed for such purpose by the court conducting such 
proceeding or hearing an action pursuant to section 5.
    (b) Periodic Adjustments.--The fair market rent determined under 
subsection (a) for a foreclosed property shall be adjusted annually to 
reflect changes in the owners' equivalent rent of primary residence 
component, for the appropriate city, region, or class of city, as 
available, of the Consumer Price Index for All Urban Consumers of the 
Bureau of Labor Statistics of the Department of Labor.
    (c) Redetermination.--If the owner of a foreclosed property or the 
eligible mortgagor under the eligible mortgage requests the court 
described in subsection (a) to redetermine the fair market rent for a 
foreclosed property determined pursuant to this section (as such amount 
may have been adjusted pursuant to subsection (b)) and agrees to pay 
any costs of such redetermination (including costs of the appraisal 
involved), the court shall provide for redetermination of the fair 
market rent for the foreclosed property in the manner provided under 
subsection (a), except that no such redetermination shall be made 
pursuant to a request under this subsection made before the expiration 
of the 12-month period beginning upon the most recent redetermination 
conducted at the request of the same party.

SEC. 5. NONJUDICIAL FORECLOSURE PROCEEDINGS.

    In the case of any covered foreclosure proceeding that is not 
conducted or administered by a court, the eligible mortgagor may bring 
an action in an appropriate court of the State in which the foreclosed 
property is located for a determination of fair market rent for the 
foreclosed property for purposes of this Act, by filing notice in 
accordance with section 3 with such court and otherwise complying with 
the rules of such court.

SEC. 6. NO BAR TO FORECLOSURE.

    This Act may not be construed to delay, or otherwise modify, 
affect, or alter any right of a creditor under an eligible mortgage to 
foreclose on the mortgage and to sell the foreclosed property in 
connection with such foreclosure, except that the right of any owner of 
the property to possession of the property shall be subject to the 
leasehold interest established pursuant to section 2(c).

SEC. 7. RIGHT TO REINSTATEMENT.

    This Act may not be construed to affect any right of any eligible 
mortgagor to reinstatement of an eligible mortgage, including any right 
established under contract or State law.

SEC. 8. JURISDICTION OF FEDERAL COURTS.

    At the option of the eligible mortgagor, a proceeding under section 
4 or 5 shall be removed to the appropriate district court of the United 
States in accordance with section 1441 of title 28, United States Code.

SEC. 9. EFFECT ON STATE LAW.

    This Act does not annul, alter, affect, or exempt any person 
subject to the provisions of this Act from complying with the laws of 
any State regarding foreclosure on residential properties, except to 
the extent that such laws are inconsistent with any provision of this 
Act, and then only to the extent of such inconsistency.

SEC. 10. DEFINITIONS.

    For purposes of this Act, the following definitions apply:
            (1) Covered foreclosure proceeding.--The term ``covered 
        foreclosure proceeding'' means a foreclosure proceeding with 
        respect to an eligible mortgage, and includes any foreclosure 
        proceeding authorized under the law of the applicable State, 
        including judicial and non-judicial foreclosure proceedings.
            (2) Eligible mortgagor.--The term ``eligible mortgagor'' 
        means a mortgagor under an eligible mortgage.
            (3) Eligible mortgage.--The term ``eligible mortgage'' 
        means a first mortgage--
                    (A) on property that--
                            (i) is a single family property; and
                            (ii) has been used as the principal 
                        residence of the eligible mortgagor for a 
                        period of not less than 2 years immediately 
                        preceding the initiation of the covered 
                        foreclosure proceeding involved;
                    (B) that was made in connection with the purchase 
                of the property by the mortgagor for a purchase price 
                that is less than the median purchase price for 
                residences that are located in--
                            (i) the same metropolitan statistical area; 
                        or
                            (ii) if the property is not located in a 
                        metropolitan statistical area or information 
                        for the area is not available, the same State; 
                        and
                    (C) that was originated before July 1, 2007.
        For purposes of subparagraph (B), the median purchase price of 
        residences located within a metropolitan area or State shall be 
        determined according to information collected and made 
        available by the National Association of Realtors for such area 
        or State for the most recently completed month for which such 
        information is available.
            (4) Foreclosed property.--The term ``foreclosed property'' 
        means, with respect to a covered foreclosure proceeding, the 
        single family property that is subject to the eligible mortgage 
        being foreclosed under the proceeding.
            (5) Foreclosing creditor.--The term ``foreclosing 
        creditor'' means, with respect to a covered foreclosure 
        proceeding, the creditor that is foreclosing the eligible 
        mortgage through such proceeding.
            (6) Owner.--The term ``owner'' means, with respect to a 
        foreclosed property, the person who has title to the property 
        pursuant to the foreclosure proceeding for the property, and 
        any successor or assign of such person.
            (7) Single family property.--The term ``single family 
        property'' means--
                    (A) a structure consisting of 1 to 4 dwelling 
                units;
                    (B) a dwelling unit in a multi-unit condominium 
                property together with an undivided interest in the 
                common areas and facilities serving the property; or
                    (C) a dwelling unit in a multi-unit project for 
                which purchase of stock or a membership interest 
                entitles the purchaser to permanent occupancy of that 
                unit.

SEC. 11. APPLICABILITY AND SUNSET.

    (a) Applicability.--Subject to subsection (b), this Act shall apply 
to any covered foreclosure proceeding that has not been finally 
adjudicated as of the date of the enactment of this Act.
    (b) Sunset.--This Act shall not apply to any foreclosure proceeding 
commenced after the expiration of the 5-year period beginning on the 
date of the enactment of this Act.
Saving Family Homes Act of 2008 - Grants eligible mortgagors subject to foreclosure proceedings the right to continue to occupy forclosed properties subject to the payment of fair market rent for a period of 20 years that begins upon the commencement of occupancy of such property.

SECTION 1. SHORT TITLE.

    This Act may be cited as ``State Business Law Conformity Act of 
2004''.

SEC. 2. REFERENCES TO GENERAL PARTNERS.

    (a) Exclusion of Certain Active Businesses From at Risk Rules.--
Subclause (I) of section 465(c)(7)(D)(ii) of the Internal Revenue Code 
of 1986 (defining qualified corporate partner) is amended to read as 
follows:
                                    ``(I) such corporation is not 
                                prohibited or limited under State law 
                                from participation in the management or 
                                business of the partnership.''.
    (b) Payments to Retiring Partners.--Subparagraph (B) of section 
736(b)(3) of such Code (relating to limitation on application of 
paragraph (2)) is amended to read as follows:
                    ``(B) any portion of the retiring or deceased 
                partner's distributive share of partnership income was 
                subject to tax under section 1401.''.
    (c) Foreign Currency Transactions.--Subclause (I) of section 
988(c)(1)(E)(v) of such Code is amended to read as follows:
                                    ``(I) Certain general partners.--
                                The interest of a partner in the 
                                partnership shall not be treated as 
                                failing to meet the 20-percent 
                                ownership requirements of clause 
                                (iii)(I) for any taxable year of the 
                                partnership if for the taxable year of 
                                the partner in which such partnership 
                                taxable year ends--
                                            ``(aa) the partner is not 
                                        limited as to participation in 
                                        the management or activity of 
                                        the qualified fund, and
                                            ``(bb) such partner (and 
                                        each corporation filing a 
                                        consolidated return with such 
                                        partner) had no ordinary income 
                                        or loss from a section 988 
                                        transaction which is foreign 
                                        currency gain or loss (as the 
                                        case may be).''.
    (d) Special Valuation Rules for Generation-Skipping Tax.--Clause 
(ii) of section 2701(b)(2)(B) of such Code (relating to partnerships) 
is amended to read as follows:
                            ``(ii) in the case of a limited 
                        partnership, the holding of any interest as a 
                        partner who is not limited as to participation 
                        in management or activity of the 
                        partnership.''.
    (e) Tax Matters Partner.--Paragraph (7) of section 6231(a) of such 
Code (defining tax matters partner) is amended to read as follows:
            ``(7) Tax matters partner.--
                    ``(A) In general.--The tax matters partner of any 
                partnership is--
                            ``(i) the partner designated as the tax 
                        matters partner as provided in regulations, or
                            ``(ii) if there is no partner who has been 
                        so designated, the partner having the largest 
                        profits interest in the partnership at the 
                        close of the taxable year involved (or, where 
                        there is more than 1 such partner, the 1 of 
                        such partners whose name would appear first in 
                        an alphabetical listing).
                    ``(B) Selection by secretary.--If there is no 
                partner designated under subparagraph (A)(i) and the 
                Secretary determines that it is impracticable to apply 
                subparagraph (A)(ii), the partner selected by the 
                Secretary shall be treated as the tax matters partner. 
                The Secretary shall, within 30 days of selecting a tax 
                matters partner under the preceding sentence, notify 
                all partners required to receive notice under section 
                6223(a) of the name and address of the person selected.
                    ``(C) Restriction on designation of partner.--A 
                partner may not be designated as a tax matters partner 
                under subparagraph (A)(i) unless such partner is not 
                limited as to participation in management or activity 
                of the partnership.''.
    (f) Effective Date.--The amendments made by this section shall 
apply to taxable years beginning after December 31, 2004.

SEC. 3. REFERENCES TO LIMITED PARTNERS.

    (a) Limited Entrepreneur.--
            (1) In general.--Subparagraph (A) of section 464(e)(2) of 
        the Internal Revenue Code of 1986 (defining limited 
        entrepreneur) is amended by striking ``other than as a limited 
        partner''.
            (2) Conforming amendments.--
                    (A) Section 464(c) of such Code is amended--
                            (i) by striking ``limited partners or'' in 
                        paragraph (1)(B),
                            (ii) by striking ``a limited partner or'' 
                        in paragraph (2).
                    (B) Section 1256 of such Code is amended--
                            (i) by striking ``limited partners or'' 
                        each place it appears in subsections (e)(3)(B) 
                        and (f)(4),
                            (ii) by striking ``a limited partner or'' 
                        in subsection (e)(3)(C), and
                            (iii) by striking ``limited partner or'' 
                        both places it appears in the heading and text 
                        of subsection (e)(4)(A)(i).
                    (C) Section 1258(d)(5)(C) of such Code is amended--
                            (i) by striking ``limited partner or'' in 
                        the matter preceding subclause (i),
                            (ii) by striking ``limited partner's (or 
                        limited entrepreneur's) in subclause (i) and 
                        inserting ``limited entrepreneur's'', and
                            (iii) by striking ``partners and limited'' 
                        in the heading.
    (b) Passive Loss Rules.--
            (1) Subsection (h) of section 469 of such Code is amended 
        by striking paragraph (2) and by redesignating paragraphs (3), 
        (4), and (5) as paragraphs (2), (3), and (4), respectively.
            (2) Subparagraph (A) of section 469(c)(7) of such Code is 
        amended by striking the last sentence.
            (3) Paragraph (6) of section 469(i) of such Code is amended 
        by striking subparagraph (C) and by redesignating subparagraph 
        (D) as subparagraph (C).
            (4) Subsection (f) of section 772 of such Code (relating to 
        special rules for applying passive loss limitations) is amended 
        to read as follows:
    ``(f) Special Rules for Applying Passive Loss Limitations.--
            ``(1) In general.--If any person holds an interest in an 
        electing large partnership other than as a partner described in 
        paragraph (3)--
                    ``(A) paragraph (2) of subsection (c) shall not 
                apply to such partner, and
                    ``(B) such partner's distributive share of the 
                partnership items allocable to passive loss limitation 
                activities shall be taken into account separately to 
                the extent necessary to comply with the provisions of 
                section 469.
            ``(2) Exception.--Paragraph (1) shall not apply to any 
        items allocable to an interest held as a partner described in 
        paragraph (3).
            ``(3) Partner described.--For purposes of this subsection, 
        a partner is described in this paragraph if the partner is a 
        person whose participation in the management or business 
        activity of the partnership is limited under applicable State 
        law.''.
    (c) Effective Date.--The amendments made by this section shall 
apply to taxable years beginning after December 31, 2004.

SEC. 4. PARTNERSHIP INCOME ATTRIBUTABLE TO CAPITAL EXCLUDED FROM NET 
              EARNINGS FROM SELF-EMPLOYMENT.

    (a) In General.--Paragraph (13) of section 1402(a) of the Internal 
Revenue Code of 1986 is amended to read as follows:
            ``(13) there shall be excluded the distributive share of 
        net income of a partner attributable to capital;''.
    (b) Partnership Income Attributable to Capital.--Section 1402 of 
such Code is amended by adding at the end the following new subsection:
    ``(l) Partnership Income Attributable to Capital.--
            ``(1) In general.--For purposes of subsection (a)(13), the 
        following amounts shall be treated as income attributable to 
        capital--
                    ``(A) the amount, if any, in excess of what would 
                constitute reasonable compensation for services 
                rendered by such partner to the partnership, and
                    ``(B) an amount equal to a reasonable rate of 
                return on unreturned capital of the partner determined 
                as of the beginning of the taxable year.
            ``(2) Definitions.--For purposes of paragraph (1)--
                    ``(A) Unreturned capital.--The term `unreturned 
                capital' means the excess of the aggregate amount of 
                money and the fair market value as of the date of 
                contribution of other consideration (net of 
                liabilities) contributed by the partner over the 
                aggregate amount of money and the fair market value as 
                of the date of distribution of other consideration (net 
                of liabilities) distributed by the partnership to the 
                partner, increased or decreased for the partner's 
                distributive share of all reportable items as 
                determined in section 702. If the partner acquires a 
                partnership interest and the partnership makes an 
                election under section 754, the partner's unreturned 
                capital shall take into account appropriate adjustments 
                under section 743.
                    ``(B) Reasonable rate of return.--A reasonable rate 
                of return on unreturned capital shall equal 150 percent 
                (or such higher rate as is established in regulations) 
                of the highest applicable Federal rate, as determined 
                under section 1274(d)(1), at the beginning of the 
                partnership's taxable year.
            ``(3) Regulations.--The Secretary shall prescribe such 
        regulations as may be necessary to carry out the purposes of 
        this subsection.''.
    (c) Effective Date.--The amendments made by this section shall 
apply with respect to services performed in taxable years beginning 
after December 31, 2004.

SEC. 5. REPEAL OF ABILITY TO ELECT LARGE PARTNERSHIP REPORTING RULES.

    (a) In General.--Paragraph (2) of section 775(a) of the Internal 
Revenue Code of 1986 (relating to election) is amended by adding at the 
end the following: ``No election under this subsection shall be made 
after December 31, 2004.''.
    (b) Effective Date.--The amendment made by this section shall apply 
to partnership taxable years beginning after December 31, 2004.
State Business Law Conformity Act of 2004 - Amends the Internal Revenue Code to: (1) revise certain partnership tax definitions and rules relating to general and limited partners; (2) exclude from net earnings from self-employment partnership income attributable to capital; and (3) repeal, after 2004, the election to apply large partnership (100 partners or more) tax rules.

SECTION 1. SHORT TITLE; TABLE OF CONTENTS.

    (a) Short Title.--This Act may be cited as the ``Keeping Families 
Together Act of 2005''.
    (b) Table of Contents.--The table of contents of this Act is as 
follows:

Sec. 1. Short title; table of contents.
Sec. 2. Restoration of definition of aggravated felony (repeal of 
                            section 321 of IIRIRA).
Sec. 3. Restoration of detention policy.
Sec. 4. Repeal of time stop provisions.
Sec. 5. Repeal of section 101(a)(48).
Sec. 6. Restoration of section 212(c).
Sec. 7. Restoration of judicial review provisions.
Sec. 8. Post-proceeding relief for affected aliens.

SEC. 2. RESTORATION OF DEFINITION OF AGGRAVATED FELONY (REPEAL OF 
              SECTION 321 OF IIRIRA).

    (a) In General.--Effective as if included in the enactment of the 
Illegal Immigration Reform and Immigrant Responsibility Act of 1996 
(division C of Public Law 104-208), section 321 of such Act is repealed 
and the provisions of law amended by such section are restored as if 
such section had not been enacted.
    (b) Restoration of Rights.--Any alien whose legal permanent 
resident status, application for permanent residence, or application 
for cancellation of removal, was affected by the changes in the 
definition of ``aggravated felony'' made by such section 321 may apply 
to the Secretary of Homeland Security to be considered for adjustment 
of status or cancellation of removal in conformance with the provisions 
of section 101(a)(43) of the Immigration and Nationality Act, as 
restored by subsection (a).

SEC. 3. RESTORATION OF DETENTION POLICY.

    (a) In General.--Section 236(c) of the Immigration and Nationality 
Act (8 U.S.C. 1226(c)) is amended to read as follows:
    ``(c) Detention of Criminal Aliens.--
            ``(1) In general.--The Secretary of Homeland Security shall 
        take into custody any alien convicted of an aggravated felony 
        upon release of the alien (regardless of whether or not such 
        release is on parole, supervised release, or probation, and 
        regardless of the possibility of rearrest or further 
        confinement in respect of the same offense). Notwithstanding 
        subsection (a) or section 241(a) but subject to paragraph (2), 
        the Secretary of Homeland Security shall not release such felon 
        from custody.
            ``(2) Non-release.--The Secretary of Homeland Security may 
        not release from custody any who has been convicted of an 
        aggravated felony, either before or after a determination of 
        removability, unless--
                    ``(A)(i) the alien was lawfully admitted, or
                    ``(ii) the alien was not lawfully admitted but the 
                alien cannot be removed because the designated country 
                of removal will not accept the alien; and
                    ``(B) the alien satisfies the Secretary of Homeland 
                Security that the alien will not pose a danger to the 
                safety of other persons or of property and is likely to 
                appear for any scheduled proceeding.''.
    (b) Effective Date.--The amendment made by subsection (a) shall be 
effective as if included in the Illegal Immigration Reform and 
Immigrant Responsibility Act of 1996.

SEC. 4. REPEAL OF TIME STOP PROVISIONS.

    (a) In General.--Section 240A(d) of the Immigration and Nationality 
Act (8 U.S.C. 1229b(d)) is repealed.
    (b) Effective Date.--The repeal made by subsection (a) shall be 
effective as if included in the enactment of subtitle A of title III of 
the Illegal Immigration Reform and Immigrant Responsibility Act of 
1996.

SEC. 5. REPEAL OF SECTION 101(A)(48).

    (a) In General.--Paragraph (48) of section 101(a)(48) of the 
Immigration and Nationality Act (8 U.S.C. 1101(a)) is repealed.
    (b) Effective Date.--The repeal made by subsection (a) shall take 
effect as if included in the enactment of section 322(a) of the Illegal 
Immigration Reform and Immigrant Responsibility Act of 1996.

SEC. 6. RESTORATION OF SECTION 212(C).

    (a) In General.--Section 212 of the Immigration and Nationality Act 
(8 U.S.C. 1182) is amended by inserting after subsection (b) the 
following new subsection:
    ``(c) Aliens lawfully admitted for permanent residence who 
temporarily proceeded abroad voluntarily and not under an order of 
deportation or removal, and who are returning to a lawful 
unrelinquished domicile of seven consecutive years, may be admitted in 
the discretion of the Secretary of Homeland Security without regard to 
the provisions of subsection (a) (other than paragraphs (3) and 
(10)(C)). Nothing contained in this subsection shall limit the 
authority of the Secretary of Homeland Security to exercise the 
discretion vested in him under section 211(b). The first sentence of 
this subsection shall not apply to an alien who has been convicted of 
one or more aggravated felonies and has served for such felony or 
felonies a term of imprisonment of at least 5 years.''.
    (b) Effective Date.--The amendment made by subsection (a) applies 
as of April 24, 1996, as if section 440(d) of the Antiterrorism and 
Effective Death Penalty Act of 1996 (Public Law 104-132) and section 
304(b) of Illegal Immigration Reform and Immigrant Responsibility Act 
of 1996 (division C of Public Law 104-208) had not been enacted.

SEC. 7. RESTORATION OF JUDICIAL REVIEW PROVISIONS.

    (a) In General.--Section 242 of the Immigration and Nationality Act 
(8 U.S.C. 1252) is amended to read as follows:

                 ``judicial review of orders of removal

    ``Sec. 242.  (a) The procedure prescribed by, and all the 
provisions of chapter 158 of title 28, United States Code, shall apply 
to, and shall be the sole and exclusive procedure for, the judicial 
review of all final orders of removal heretofore or hereafter made 
against aliens within the United States pursuant to administrative 
proceedings under section 240 of this Act or comparable provisions of 
any prior Act, except that--
            ``(1) a petition for review may be filed not later than 90 
        days after the date of the issuance of the final removal order, 
        or, in the case of an alien convicted of an aggravated felony 
        not later than 30 days after the issuance of such order;
            ``(2) the venue of any petition for review under this 
        section shall be in the judicial circuit in which the 
        administrative proceedings before an immigration judge were 
        conducted in whole or in part, or in the judicial circuit 
        wherein is the residence, as defined in this Act, of the 
        petitioner, but not in more than one circuit;
            ``(3) the action shall be brought against the Department of 
        Homeland Security, as respondent. Service of the petition to 
        review shall be made upon the Secretary of Homeland Security of 
        the United States and upon the official of the Department of 
        Homeland Security in charge of the district in which the office 
        of the clerk of the court is located. The service of the 
        petition for review upon such official of the Service shall 
        stay the removal of the alien pending determination of the 
        petition by the court, unless the court otherwise directs or 
        unless the alien is convicted of an aggravated felony, in which 
        case the Service shall not stay the removal of the alien 
        pending determination of the petition of the court unless the 
        court otherwise directs;
            ``(4) except as provided in clause (B) of paragraph (5) of 
        this subsection, the petition shall be determined solely upon 
        the administrative record upon which the removal order is based 
        and the Secretary of Homeland Security's findings of fact, if 
        supported by reasonable, substantial, and probative evidence on 
        the record considered as a whole, shall be conclusive;
            ``(5) whenever any petitioner, who seeks review of an order 
        under this section, claims to be a national of the United 
        States and makes a showing that his claim is not frivolous, the 
        court shall (A) pass upon the issues presented when it appears 
        from the pleadings and affidavits filed by the parties that no 
        genuine issue of material fact is presented; or (B) where a 
        genuine issue of material fact as to the petitioner's 
        nationality is presented, transfer the proceedings to a United 
        States district court for the district where the petitioner has 
        his residence for hearing de novo of the nationality claim and 
        determination as if such proceedings were originally initiated 
        in the district court under the provisions of section 2201 of 
        title 28, United States Code. Any such petitioner shall not be 
        entitled to have such issue determined under section 360(a) of 
        this Act or otherwise;
            ``(6) whenever a petitioner seeks review of an order under 
        this section, any review sought with respect to a motion to 
        reopen or reconsider such an order shall be consolidated with 
        the review of the order;
            ``(7) if the validity of a removal order has not been 
        judicially determined, its validity may be challenged in a 
        criminal proceeding against the alien for violation of 
        subsection (a) or (b) of section 243 of this Act only by 
        separate motion for judicial review before trial. Such motion 
        shall be determined by the court without a jury and before the 
        trial of the general issue. Whenever a claim to United States 
        nationality is made in such motion, and in the opinion of the 
        court, a genuine issue of material fact as to the alien's 
        nationality is presented, the court shall accord him a hearing 
        de novo on the nationality claim and determine that issue as if 
        proceedings had been initiated under the provisions of section 
        2201 of title 28, United States Code. Any such alien shall not 
        be entitled to have such issue determined under section 360(a) 
        of this Act or otherwise. If no such hearing de novo as to 
        nationality is conducted, the determination shall be made 
        solely upon the administrative record upon which the removal 
        order is based and the Secretary of Homeland Security's 
        findings of fact, if supported by reasonable, substantial, and 
        probative evidence on the record considered as a whole, shall 
        be conclusive. If the removal order is held invalid, the court 
        shall dismiss the indictment and the United States shall have 
        the right to appeal to the court of appeals within 30 days. The 
        procedure on such appeals shall be as provided in the Federal 
        rules of criminal procedure. No petition for review under this 
        section may be filed by any alien during the pendency of a 
        criminal proceeding against such alien for violation of 
        subsection (a) or (b) of section 243 of this Act;
            ``(8) nothing in this section shall be construed to require 
        the Secretary of Homeland Security to defer removal of an alien 
        after the issuance of a removal order because of the right of 
        judicial review of the order granted by this section, or to 
        relieve any alien from compliance with subsections (a) and (b) 
        of section 243 of this Act. Nothing contained in this section 
        shall be construed to preclude the Secretary of Homeland 
        Security from detaining or continuing to detain an alien or 
        from taking the alien into custody pursuant to section 241 of 
        this Act at any time after the issuance of a removal order;
            ``(9) it shall not be necessary to print the record or any 
        part thereof, or the briefs, and the court shall review the 
        proceedings on a typewritten record and on typewritten briefs; 
        and
            ``(10) any alien held in custody pursuant to an order of 
        removal may obtain judicial review thereof by habeas corpus 
        proceedings.
    ``(b) Notwithstanding the provisions of any other law, any alien 
against whom a final order of removal has been made heretofore or 
hereafter under the provisions of section 235 of this Act or comparable 
provisions of any prior Act may obtain judicial review of such order by 
habeas corpus proceedings and not otherwise.
    ``(c) An order of removal shall not be reviewed by any court if the 
alien has not exhausted the administrative remedies available to the 
alien as of right under the immigration laws and regulations or if the 
alien has departed from the United States after the issuance of the 
order. Every petition for review or for habeas corpus shall state 
whether the validity of the order has been upheld in any prior judicial 
proceeding, and, if so, the nature and date thereof, and the court in 
which such proceeding took place. No petition for review or for habeas 
corpus shall be entertained if the validity of the order has been 
previously determined in any civil or criminal proceeding, unless the 
petition presents grounds which the court finds could not have been 
presented in such prior proceeding, or the court finds that the remedy 
provided by such prior proceeding was inadequate or ineffective to test 
the validity of the order.
    ``(d)(1) A petition for review or for habeas corpus on behalf of an 
alien against whom a final order of removal has been issued pursuant to 
section 238(b) may challenge only--
            ``(A) whether the alien is in fact the alien described in 
        the order;
            ``(B) whether the alien is in fact an alien described in 
        section 238(b)(2);
            ``(C) whether the alien has been convicted of an aggravated 
        felony and such conviction has become final; and
            ``(D) whether the alien was afforded the procedures 
        required by section 238(b)(4).
    ``(2) No court shall have jurisdiction to review any issue other 
than an issue described in paragraph (1).''.
    (b) Effective Date.--The amendment made by subsection (a) shall 
take effect on the date of the enactment of this Act and shall apply to 
determinations pending on or after such date with respect to which--
            (1) a final administrative decision has been/not been 
        rendered as of such date; or
            (2) such a decision has been rendered but the period for 
        seeking judicial review of the decision has not expired.

SEC. 8. POST-PROCEEDING RELIEF FOR AFFECTED ALIENS.

    (a) In General.--Notwithstanding section 240(c)(6) of the 
Immigration and Nationality Act (8 U.S.C. 1229a(c)(6)) or any other 
limitation imposed by law on motions to reopen removal proceedings, the 
Secretary of Homeland Security shall establish a process (whether 
through permitting the reopening of a removal proceeding or otherwise) 
under which an alien--
            (1) who is (or was) in removal proceedings before the date 
        of the enactment of this Act (whether or not the alien has been 
        removed as of such date); and
            (2) whose eligibility for cancellation of removal has been 
        established by this Act;
may apply (or reapply) for cancellation of removal under section 
240A(a) of the Immigration and Nationality Act (8 U.S.C. 1229b(a)) as a 
beneficiary of the relief provided under this Act.
    (b) Parole.--The Secretary of Homeland Security should exercise the 
parole authority under section 212(d)(5)(A) of the Immigration and 
Nationality Act (8 U.S.C. 1182(d)(5)(A)) for the purpose of permitting 
aliens removed from the United States to participate in the process 
established under subsection (a).

Keeping Families Together Act of 2005 - Amends the Illegal Immigration Reform and Immigrant Responsibility Act of 1996 (Act) to repeal the provision amending the definition of "aggravated felony," and restore provisions of law amended by such provision as if it had not been enacted, including residency-or status-related rights of an affected legal alien.

Amends the Immigration and Nationality Act to revise detention of criminal alien provisions, effective as if included in the Act.

Repeals, as if included in the Act: (1) certain provisions respecting termination of continuous presence or physical presence in the United States; and (2) the definition of "conviction."

Authorizes the Secretary of Homeland Security to admit certain lawfully admitted permanent resident aliens returning to the United States who temporarily proceeded abroad voluntarily and not under an order of deportation or removal, effective as of a specified date, as if certain sections of the Antiterrorism and Effective Death Penalty Act of 1996 and the Illegal Immigration Reform and Immigrant Responsibility Act of 1996 had not been enacted.

Revises provisions respecting judicial review of removal orders.

Requires the Secretary to establish a post-proceeding removal relief process for affected aliens.