BB&T Corp. will study a court decision that found Bank of New York Mellon Corp. improperly used foreign tax credits, a ruling that could impact BB&T's own dispute with the Internal Revenue Service. The Winston-Salem-based bank (NYSE:BBT) has a court case pending in which it is trying to get back $892 million in payments demanded by the IRS for its own use of so-called STARS — short for Structured Trust Advantage Repackaged Securities. A U.S. Tax Court ruling disallowing Bank of New York's credits…