A bill to amend the Immigration and Nationality Act to enhance national security, combat illegal immigration, and promote job creation, innovation, investment, and research in the United States, and for other purposes.

SECTION 1. SHORT TITLE.

    This Act may be cited as the ``Benefits to Research and American 
Innovation through Nationality Statutes Act of 2012'' or the ``BRAINS 
Act''.

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 55,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) earned a graduate degree by taking 
                        no greater than 25 percent of classes by 
                        correspondence (including courses offered by 
                        telecommunications) and by taking all classes 
                        while physically present in the United States;
                            ``(iii) have an offer of employment from a 
                        United States employer in a field related to 
                        such degree;
                            ``(iv) are the subject of an approved labor 
                        certification as required under section 
                        212(a)(5)(A); and
                            ``(v) 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.--In this paragraph:
                            ``(i) Field of science, technology, 
                        engeering, or mathematics.--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) United states research institution 
                        of higher education.--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;
                                    ``(V) is accredited by an 
                                accrediting agency recognized by the 
                                Secretary of Education; and
                                    ``(VI) is not operating for 
                                profit.''.
    (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. VISA REVALIDATION.

    Section 222 of the Immigration and Nationality Act (8 U.S.C. 1202) 
is amended--
            (1) in subsection (h), in the matter preceding paragraph 
        (1), by inserting ``except as provided under subsection (i),'' 
        after ``Act,''; and
            (2) by adding at the end the following:
    ``(i) Visa Revalidation.--The Secretary of State shall permit an 
alien granted a nonimmigrant visa under subparagraph (E), (H), (I), 
(L), (O), or (P) of section 101(a)(15) to apply for a renewal of such 
visa within the United States if--
            ``(1) such visa expired during the 12-month period ending 
        on the date of such application;
            ``(2) the alien is seeking a nonimmigrant visa under the 
        same subparagraph under which the alien had previously received 
        a visa; and
            ``(3) the alien has complied with the immigration laws of 
        the United States.''.

SEC. 5. 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. 6. RETENTION OF PRIORITY DATES.

    (a) In General.--Section 203(h)(3) of the Immigration and 
Nationality Act (8 U.S.C. 1153(h)(3)) is amended to read follows:
            ``(3) Retention of priority date.--If the age of an alien 
        is determined under paragraph (1) to be 21 years of age or 
        older for the purposes of subsections (a)(2)(A) and (d), and a 
        parent of the alien files a petition under section 204 for 
        classification of such alien based upon a relationship 
        described in subsection (a), the priority date for such 
        petition shall be the original priority date issued upon 
        receipt of the original family-based or employment-based 
        petition for which either parent was a beneficiary.''.
    (b) Permanent Priority Dates.--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 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 petitions.--Subject to subsection (h)(3), 
        an alien who is the beneficiary of any 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 petition (including 
        self-petitions) of which the alien is a beneficiary.''.
    (c) Effective Date.--The amendments made by subsections (a) and (b) 
shall take effect on the date of the enactment of this Act and shall 
apply to any alien who is a beneficiary of a classification petition 
pending on or after such date.

SEC. 7. NUCLEAR FAMILY REUNIFICATIONS FOR HIGH-SKILLED WORKERS.

    Notwithstanding any other numerical limitation in law, the number 
of immigrant visas available to the spouse of an alien lawfully 
admitted for permanent residence pursuant to section 203(a)(2) of the 
Immigration and Nationality Act (8 U.S.C. 1153(a)(2)) shall be 
increased in each fiscal year by the number of aliens who were lawfully 
admitted for permanent residence that were removed from the United 
States in the preceding fiscal year.

Summary: Benefits to Research and American Innovation through Nationality Statutes Act of 2012 or the BRAINS Act - Amends the Immigration and Nationality Act to make up to 55,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 from a qualifying US research institution of higher education. (2) earned a graduate degree by taking no greater than 25 of classes by correspondence and by taking all classes while physically present in the United States. (3) have an employment offer from a US employer in a field related to such degree, (4) are the subject of an approved labor certification. And (5) 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 for the specific employment in question. 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. Authorizes temporary workers who have not violated their status to renew their same category visa from within the United States. 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 US citizen. States that the permanent priority date for an immigrant visa petition shall be the date on which the petition is filed with DHS , 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 any petition that was approvable when filed shall retain such petition's priority date in the consideration of any subsequently filed petition of which the alien is a beneficiary. Increases the number of immigrant visas available to the spouses of aliens lawfully admitted for permanent residence in each fiscal year by the number of aliens who were lawfully admitted for permanent residence who were removed from the United States in the preceding fiscal year.