Upon the recovery of a judgment in favor of the plaintiff, the court may award costs in the action to a defendant without denying costs to the plaintiff, if it determines that a cause of action upon which the defendant prevailed is not substantially the same as any cause of action upon which the plaintiff recovered the judgment.
N.Y. CPLR 8103