A witty judge has dismissed a $42-million US lawsuit against Taylor Swift with a ruling filled with lyrics from the pop star herself.

United States District Court Judge Gail Standish used lyrics from Swift hits such as We Are Never Ever Getting Back Together, Blank Space, Bad Blood and Shake It Off (the song in question) when she tossed a case brought by Jesse Braham in California court.

A ridiculous Taylor Swift dismissal order is the only way to toss out a ridiculous Taylor Swift <a href="https://twitter.com/hashtag/copyright?src=hash">#copyright</a> lawsuit. <a href="https://t.co/5JAc7iAzVz">pic.twitter.com/5JAc7iAzVz</a> —@BDonahueLaw360

The musician had claimed Swift stole lyrics for Shake It Off from his earlier song Haters Gone Hate.

"At present, the Court is not saying that Braham can never, ever, ever get his case back in court. But, for now, we have got problems, and the Court is not sure Braham can solve them," Standish wrote in her ruling issued Tuesday.

She also observed that "as currently drafted, the Complaint has a blank space – one that requires Braham to do more than write his name" and went on to conclude that "defendants have shaken off this lawsuit."

Representatives for Swift have not commented. But the Twitterverse has.

World’s best judge expertly uses Taylor Swift’s own lyrics to dismiss copyright lawsuit: <a href="https://t.co/Ig7NWR8uTx">https://t.co/Ig7NWR8uTx</a> <a href="https://t.co/IEo7aRsm0a">pic.twitter.com/IEo7aRsm0a</a> —@vulture

Judge dismisses frivolous Taylor Swift lawsuit with Taylor Swift lyrics <a href="https://t.co/f51fkFSo92">https://t.co/f51fkFSo92</a> <a href="https://t.co/7i5WpBgzn9">pic.twitter.com/7i5WpBgzn9</a> —@wfederman

Shake It Off, which was the lead single from Swift's blockbuster 1989 album, debuted in August 2014. Co-written by Swift, Max Martin and Shellback, the track topped music charts. The accompanying music video has been a hit online, racking up more than one billion views on YouTube.