Value investing is one of the most successful money-making strategies in the market. Master investor Warren Buffett, for example, has earned annualized returns of more than 20% for the past 40 years by buying good companies when they're cheap.

Unfortunately, companies often get cheap for a reason: Something may be wrong with them.

The ugly
One of Buffett's best investments was taking a major stake in Coca-Cola in the fall of 1988 -- in the aftermath of 1987's Black Monday crash, when most analysts thought Coke's growth prospects looked dim.

Since 1988, Buffett's investment in Coke has earned annualized returns of approximately 15%. That's both impressive and market-beating. Yet analysts as recently as 2005 and 2006 continued to doubt the brand's power and growth prospects.

Was Coke going to stay down for the count that time? Motley Fool Inside Value lead analyst Philip Durell didn't think so. He recommended the company to subscribers in the January 2005 issue for many of the same reasons Buffett bought in 1988. Coke's situation was just ugly enough to get you a great price on a good company -- and Philip's pick has beaten the market by 20 percentage points since.

The same could also be said for the public-relations difficulties facing Wal-Mart. Similarly, the slowdown in listings and Meg Whitman's departure has investors suspicious of eBay (NASDAQ:EBAY). Or how about the glut of hotel rooms and visa restrictions coming to Macau that has hurt the outlook for Las Vegas Sands (NYSE:LVS) and Melco (NASDAQ:MPEL)? Other sticky situations include the prediction of slowing premium spending that has hampered Whole Foods (NASDAQ:WFMI), and the impression that Starbucks (NASDAQ:SBUX) has commoditized its brand.

Although these stocks aren't firing on all cylinders right now, there are no illegalities and the problems facing each are fixable. The returns should be solid from here.

When ugly is too ugly
But it can get pretty ugly out there on the market. Master small-cap investor David Nierenberg has told Fool co-founder Tom Gardner that there are two clear indications that can help you avoid an ugly situation. First, "If we see an ethical blemish on the part of the incumbent management or the board, we are absolutely not interested. The second is: If we cannot trust or understand their accounting, we are absolutely not interested."

Krispy Kreme Doughnuts (NYSE:KKD) is one stock Nierenberg was avoiding when Tom interviewed him in 2005. Although new management was trying to turn around the business, the company had not yet released any new, reliable 10-Ks or 10-Qs. (It did so in April 2006.) As Nierenberg wondered to Tom before those releases, "[Has] this company ever earned a real profit? And what return on invested capital has it actually made at the newly opened stores?" Without answers to those questions, it was impossible to determine in 2005 at what price Krispy Kreme was a value -- if any.

Fool's final word
When you're trolling for values in the market, you'll find some ugly situations. Without reliable management and financials, you should consider the situation too ugly for your dollars.

Separating the ugly from the too ugly can be tricky. If you'd like some help, consider a 30-day free trial to Motley Fool Inside Value. Philip specializes in finding ugly situations ripe for a profitable turnaround -- whether it's because of new management, new strategies, or new events. Click here to learn more.

This article was originally published on Jan. 31, 2006. It has been updated.

Tim Hanson owns shares of Melco, Whole Foods, and Starbucks. Starbucks, Coca-Cola, and Wal-Mart are Inside Value picks. eBay, Whole Foods, and Starbucks are Motley Fool Stock Advisor recommendations. Melco is a Global Gains selection. The Motley Fool owns shares of Starbucks. No Fool is too cool for disclosure.