To amend the Immigration and Nationality Act to provide for immigrant visas for certain advanced STEM graduates, and for other purposes.

Summary: Attracting the Best and Brightest Act of 2012 - Amends the Immigration and Nationality Act to make up to 50,000 visas available to qualified immigrants who: (1) possess a graduate degree at the level of master's or higher in a field of science, technology, engineering, or mathematics (STEM degree) from a qualifying U.S. research institution of higher education; (2) have an employment offer from a U.S. employer in a field related to such degree; (3) are the subject of an approved labor certification; and (4) will receive a wage for such employment that is at least the actual wage paid by the employer to all other individuals with similar experience and qualifications.

Makes unused STEM visas available for other employment-based visa categories.

Requires: (1) employers of foreign STEM graduates to submit a job order for the position with the appropriate state workforce agency, (2) such agency to post the position on its website for at least 30 days, and (3) employers to demonstrate that the total amount of compensation to be paid to a foreign STEM graduate meets or exceeds the total amount of compensation paid by the employer to all other employees with similar experience and qualifications working in the same occupational classification.

Requires the Department of Homeland Security (DHS) to make available on its website specified information regarding foreign STEM employers, the number of aliens granted STEM status, and their occupations.

Repeals such STEM and related provisions two years after enactment of this Act.

Eliminates the foreign residency requirement for certain foreign students.

States that a determination of whether an alien is a child for purposes of: (1) a petition for immigrant status or a petition for adjustment of refugee status to immigrant status shall be made using the alien's age on the date on which the petition is filed with DHS, and (2) a petition for nonimmigrant admission or an application for adjustment of status from nonimmigrant to conditional (fiance) immigrant shall be made using the alien's age on the date on which the petition is filed with DHS to classify such alien's parent as the fiance of a U.S. citizen.

States that the permanent priority date for any family- or employment-based petition shall be the date on which the petition is filed with DHS (or the Secretary of State, if applicable), unless such filing was preceded by the filing of a labor certification with the Secretary of Labor, in which case that date shall constitute the priority date.

States that an alien who is the beneficiary of a family- or employment-based petition that was approvable when filed shall retain such petition's priority date in the consideration of any subsequently filed family- or employment-based petition.

SECTION 1. SHORT TITLE.

    This Act may be cited as the ``Attracting the Best and Brightest 
Act of 2012''.

SEC. 2. IMMIGRANT VISAS FOR CERTAIN ADVANCED STEM GRADUATES.

    (a) Advanced Stem Graduates.--Section 203(b) of the Immigration and 
Nationality Act (8 U.S.C. 1153(b)) is amended--
            (1) by redesignating paragraph (6) as paragraph (7); and
            (2) by inserting after paragraph (5) the following:
            ``(6) Advanced graduates in science, technology, 
        engineering and mathematics.--
                    ``(A) In general.--Notwithstanding section 201, 
                visas shall be made available, in a number not to 
                exceed 50,000, to qualified immigrants who--
                            ``(i) possess a graduate degree at the 
                        level of master's or higher in a field of 
                        science, technology, engineering, or 
                        mathematics from a United States research 
                        institution of higher education;
                            ``(ii) have an offer of employment from a 
                        United States employer in a field related to 
                        such degree;
                            ``(iii) are the subject of an approved 
                        labor certification as required under section 
                        212(a)(5)(A); and
                            ``(iv) will receive a wage level from the 
                        employer that is at least the actual wage level 
                        paid by the employer to all other individuals 
                        with similar experience and qualifications for 
                        the specific employment in question.
                    ``(B) Definitions.--For purposes of this paragraph:
                            ``(i) The term `field of science, 
                        technology, engineering, or mathematics' means 
                        a field included in the Department of 
                        Education's Classification of Instructional 
                        Programs taxonomy within the summary groups of 
                        computer and information sciences and support 
                        services, engineering, mathematics and 
                        statistics, and physical sciences.
                            ``(ii) The term `United States research 
                        institution of higher education' `' means an 
                        institution in the United States that--
                                    ``(I) is described in section 
                                101(a) of the Higher Education Act of 
                                1965 (20 U.S.C. 1001(a));
                                    ``(II) is classified by the 
                                Director of the National Science 
                                Foundation as a research institution or 
                                as otherwise excelling at instruction 
                                in a field of science, technology, 
                                engineering, or mathematics;
                                    ``(III) has been in existence for 
                                at least 10 years;
                                    ``(IV) does not provide any 
                                commission, bonus, or other incentive 
                                payment based directly or indirectly on 
                                success in securing enrollments or 
                                financial aid to any persons or 
                                entities engaged in any recruitment or 
                                admission activities for nonimmigrant 
                                students or in making decisions 
                                regarding the award of student 
                                financial assistance to nonimmigrant 
                                students; and
                                    ``(V) is accredited by an 
                                accrediting agency recognized by the 
                                Secretary of Education.''.
    (b) Unused Visas; Limitation to Foreign States.--
            (1) Unused visas.--Section 203(b)(1) of such Act (8 U.S.C. 
        1153(b)(1)) is amended by striking ``(4) and (5)'' and 
        inserting ``(4), (5) and (6)''.
            (2) Limitation to any single foreign state.--Section 
        202(a)(5)(A) of such Act (8 U.S.C. 1152(a)(5)(A)) is amended by 
        striking ``or (5)'' and inserting ``(5), or (6)''.
    (c) Procedure for Granting Immigrant Status.--Section 204(a)(1)(F) 
of such Act (8 U.S.C. 1154(a)(1)(F)) is amended--
            (1) by striking ``or 203(b)(3)'' and inserting ``203(b)(3), 
        or 203(b)(6)''; and
            (2) by striking ``Attorney General'' and inserting 
        ``Secretary of Homeland Security''.
    (d) Labor Certification and Qualification for Certain Immigrants.--
Section 212(a)(5) of such Act (8 U.S.C. 1182(a)(5)) is amended--
            (1) in subparagraph (A)--
                    (A) in clause (ii)--
                            (i) in subclause (I), by striking ``, or'' 
                        at the end and inserting a semicolon;
                            (ii) in subclause (II), by striking the 
                        period at the end and inserting ``; or''; and
                            (iii) by adding at the end the following:
                                    ``(III) holds a doctorate degree in 
                                a field of science, technology, 
                                engineering, or mathematics (as defined 
                                in section 203(b)(6)(B)(i)) from a 
                                United States research institution of 
                                higher education (as defined in section 
                                203(b)(6)(B)(ii)).'';
                    (B) by redesignating clauses (iii) and (iv) as 
                clauses (iv) and (v), respectively; and
                    (C) by inserting after clause (ii) the following:
                            ``(iii) Job order.--
                                    ``(I) In general.--An employer who 
                                files an application under clause (i) 
                                shall submit a job order for the labor 
                                the alien seeks to perform to the State 
                                workforce agency in the State in which 
                                the alien seeks to perform the labor. 
                                The State workforce agency shall post 
                                the job order on its official agency 
                                website for a minimum of 30 days and 
                                not later than 3 days after receipt 
                                using the employment statistics system 
                                authorized under section 15 of the 
                                Wagner-Peyser Act (29 U.S.C. 49 et 
                                seq.).
                                    ``(II) Links.--The Secretary of 
                                Labor shall include links to the 
                                official websites of all State 
                                workforce agencies on a single webpage 
                                of the official website of the 
                                Department of Labor.''; and
            (2) in subparagraph (D), by striking ``(2) or (3)'' and 
        inserting ``(2), (3), or (6)''.
    (e) Further Protecting American Workers.--Section 212(p) of such 
Act (8 U.S.C. 1182(p)) is amended by adding at the end the following:
            ``(5) To satisfy the requirement under section 
        203(b)(6)(A)(iv), an employer must demonstrate that the total 
        amount of compensation to be paid to the alien (including 
        health insurance, stock options, and other benefits provided by 
        the employer) must meet or exceed the total amount of 
        compensation paid by the employer to all other employees with 
        similar experience and qualifications working in the same 
        occupational classification.''.
    (f) GAO Study.--Not later than June 30, 2017, the Comptroller 
General of the United States shall provide to the Congress the results 
of a study on the use by the National Science Foundation of the 
classification authority provided under section 203(b)(6)(B)(ii)(II) of 
the Immigration and Nationality Act (8 U.S.C. 1153(b)(6)(B)(ii)(II)), 
as added by this section.
    (g) Public Information.--The Secretary of Homeland Security shall 
make available to the public on the official website of the Department 
of Homeland Security, and shall update not less than monthly, the 
following information (which shall be organized according to month and 
fiscal year) with respect to aliens granted status under section 
203(b)(6) of the Immigration and Nationality Act (8 U.S.C. 1153(b)(6)), 
as added by this section:
            (1) The name, city, and State of each employer who 
        petitioned pursuant to either of such paragraphs on behalf of 
        one or more aliens who were granted status in the month and 
        fiscal year to date.
            (2) The number of aliens granted status under either of 
        such paragraphs in the month and fiscal year to date based upon 
        a petition filed by such employer.
            (3) The occupations for which such alien or aliens were 
        sought by such employer and the job titles listed by such 
        employer on the petition.
    (h) Effective Date; Sunset.--
            (1) Effective date.--The amendments made by this section 
        shall take effect on October 1, 2012, and shall apply with 
        respect to fiscal years beginning on or after such date.
            (2) Sunset.--The amendments made by subsections (a) through 
        (e) shall be repealed after the 2-year period beginning on the 
        date of the enactment of this Act.

SEC. 3. STUDENT VISA REFORM.

    (a) In General.--Section 101(a)(15)(F)(i) of the Immigration and 
Nationality Act (8 U.S.C. 1101(a)(15)(F)(i)) is amended by striking 
``an alien having a residence in a foreign country which he has no 
intention of abandoning, who is a bona fide student qualified to pursue 
a full course of study and who'' and inserting ``an alien who is a bona 
fide student qualified to pursue a full course of study, who (except 
for a student qualified to pursue a full course of study in a field of 
science, technology, engineering, or mathematics (as defined in section 
203(b)(6)(B)(i)) at an institution of higher education) has a residence 
in a foreign country which the alien has no intention of abandoning, 
and who''.
    (b) Conforming Amendments.--
            (1) Section 214(b) of the Immigration and Nationality Act 
        (8 U.S.C. 1184(b)) is amended by striking ``(other than a 
        nonimmigrant'' and inserting ``(other than a nonimmigrant 
        described in section 101(a)(15)(F)) if the alien is qualified 
        to pursue a full course of study in a field of science, 
        technology, engineering, or mathematics (as defined in section 
        203(b)(6)(B)(i)) at an institution of higher education, other 
        than a nonimmigrant''.
            (2) Section 214(h) of the Immigration and Nationality Act 
        (8 U.S.C. 1184(h)) is amended by inserting ``(F) (if the alien 
        is qualified to pursue a full course of study in a field of 
        science, technology, engineering, or mathematics (as defined in 
        section 203(b)(6)(B)(i)) at an institution of higher 
        education),'' before ``H(i)(b)''.

SEC. 4. AGE-OUT PROTECTIONS FOR CHILDREN.

    Section 101(b)(1) of the Immigration and Nationality Act (8 U.S.C. 
1101(b)) is amended by adding at the end the following--
                    ``(H) Rules for determining age of a child.--
                            ``(i) Immigrant petitions.--Notwithstanding 
                        any other provision of the Act, a determination 
                        of whether an alien is a child for the purposes 
                        of a petition under sections 204 and 209 shall 
                        be made using the age of the alien on the date 
                        on which the petition is filed with the 
                        Secretary of Homeland Security.
                            ``(ii) Child of u.s. citizen fiance.--A 
                        determination of whether an alien is a child 
                        for the purposes of a petition under section 
                        214 or an application for adjustment of status 
                        under section 245(d) shall be made using the 
                        age of the alien on the date on which the 
                        petition is filed with the Secretary of 
                        Homeland Security to classify the alien's 
                        parent as the fiance of a U.S. citizen.''.

SEC. 5. PERMANENT PRIORITY DATES.

    (a) In General.--Section 203 of the Immigration and Nationality Act 
(8 U.S.C. 1153) is amended by adding at the end the following:
    ``(i) Permanent Priority Dates.--
            ``(1) In general.--Subject to subsection (h)(3) and 
        paragraph (2), the priority date for any family- or employment-
        based petition shall be the date of filing of the petition with 
        the Secretary of Homeland Security (or the Secretary of State, 
        if applicable), unless the filing of the petition was preceded 
        by the filing of a labor certification with the Secretary of 
        Labor, in which case that date shall constitute the priority 
        date.
            ``(2) Subsequent family- and employment-based petitions.--
        Subject to subsection (h)(3), an alien who--
                    ``(A) is the beneficiary of any family-based 
                petition that was approvable when filed (including 
                self-petitioners) shall retain the priority date 
                assigned with respect to that petition in the 
                consideration of any subsequently filed family-based 
                petition (including self-petitions); or
                    ``(B) is the beneficiary of any employment-based 
                petition that was approvable when filed (including 
                self-petitioners) shall retain the priority date 
                assigned with respect to that petition in the 
                consideration of any subsequently filed employment-
                based petition (including self-petitions).''.
    (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 
aliens who are a beneficiary of a classification petition pending on or 
after such date.