for subpart F of part III of subchapter N of chapter 1 of such Code is amended by striking the item relating to section 965 and inserting the following: Sec. 965. Inclusion of previously deferred foreign income. . (3) Effective date The amendments made by this subsection shall apply to taxable years beginning after December 31, 2017. 3. Modifications of foreign tax credit rules applicable to large integrated oil companies which are dual capacity taxpayers (a) In general Section 901 of the Internal Revenue Code of 1986 is amended by redesignating subsection (n) as subsection (o) and by inserting after subsection (m) the following new subsection: (n) Special rules relating to large integrated oil companies which are dual capacity taxpayers (1) General rule Notwithstanding any other provision of this chapter, any amount paid or accrued by a dual capacity taxpayer which is a large integrated oil company to a foreign country or possession of the United States for any period shall not be considered a tax— (A) if, for such period, the foreign country or possession does not impose a generally applicable income tax, or (B) to the extent such amount exceeds the amount (determined in accordance with regulations) which— (i) is paid by such dual capacity taxpayer pursuant to the generally applicable income tax imposed by the country or possession, or (ii) would be paid if the generally applicable income tax imposed by the country or possession were applicable to such dual capacity taxpayer. Nothing in this paragraph shall be construed to imply the proper treatment of any such amount not in excess of the amount determined under subparagraph (B). (2) Dual capacity taxpayer For purposes of this subsection, the term dual capacity taxpayer means, with respect to any foreign country or possession of the United States, a person who— (A) is subject to a levy of such country or possession, and (B) receives (or will receive) directly or indirectly a specific economic benefit (as determined in accordance with regulations) from such