Like Warren Buffett so often says, sometimes it pays to be greedy when others are fearful.

Jim Cramer thinks that's exactly the case in Domino's Pizza which sold-off more than 5% after the company reported earnings.

The sell-off may seem somewhat counter-intuitive. Domino's Pizza second-quarter profit rose 19 percent as sales grew in established stores and the pizza chain opened new locations outside the U.S.

"However, when you have a turbocharged stock that has doubled over the last twelve months, you have to knock the ball out of the park. Domino's didn't do that," Cramer explained.

Looking at the numbers a little more closely, Domino's earned $33.3 million, or 57 cents per share, for the period ended June 16. Analysts, on average, expected earnings of 56 cents per share, according to a FactSet poll.

"That's basically in-line," Cramer explained. "The Street sees that as 'nothing to write home about.' Therefore the stock got poleaxed."

Ivan Bliznetsov | E+ | Getty Images

Nonetheless, as an investor, that poleaxing is exactly what Cramer wanted to see.

"I think this weakness could be a terrific buying opportunity," he said.

First, Cramer reminded that some of the results were bullish. "Domino's did produce some excellent same store sales numbers, a 6.7% increase domestically and a 5.8% increase internationally, that exceeded the analysts' expectations."

"Remember, Domino's is one of the premier international growth stories out there, with a brilliant understanding of mobile technology. They have over 10,300 locations in more than 70 countries, and the company's adding 500 new international restaurants a year. Plus, Domino's is still eons away from saturating even their largest overseas markets," he said .

Also, looking back at the price action over several years, buying into weakness has been shrewd, historically.

"Domino's has generated a whopping 537% return since I first got behind it in January of 2010. For years this stock has been a terrific buy on weakness," Cramer said.

All told, Cramer is convinced, "the weakness presents a terrific opportunity," he said.