It happens to every company sooner or later: Wall Street sets a mark for quarterly earnings, and the company misses that goal. Sometimes an earnings stumble is a signal to sell, but digging in the dirt is also a good way to find turnaround candidates while they're getting beaten down. Today, we'll pick apart another week of market negativity to X-ray one unfortunate Rule Breaker, play games with another, and debug a storied software maker. See whether you can spot the common thread today.

Today's first stumbler is American Science & Engineering (NASDAQ:ASEI), makers of backscatter X-ray devices that can see through your clothes without looking at your bones. The company's results were apparently not that transparent to Wall Street analysts, who had expected $37.8 million in sales for the quarter and $0.76 of earnings per diluted share. Actual results beat the sales estimate handily at $40.8 million but fell far short of the earnings goal, with only $0.51 per share.

So what happened? There was clearly no problem with the demand for the security and inspection systems, as evidenced by the sales figure. I can see two items that may have slipped by our analyst friend: an income tax charge not present last year (though that should have been expected) and a $4 million writedown of warrant valuation.

Warrants are a form of stock options, and it can be hard to predict the gyrations of options values and expirations. I'd feel safer if the company reduced their exposure to unpredictable market changes, but if that's the worst problem on board this ship, it still looks seaworthy.

Our second Rule Breaker with a earnings headache this week is Shanda (NASDAQ:SNDA). The Chinese gaming powerhouse recently switched from a completely subscription-backed business model to a mix of advertising, subscriptions, and real-money purchasing of in-game items. As a result of that change, last quarter was rough, and nobody expected much from Shanda this time around.

The results came in as a mixed bag. Shanda beat revenue expectations -- $42.6 million reported, $39.8 million forecast -- but missed on earnings, with $0.02 where $0.07 was expected. Things would sound bleak if that was the whole story, but the user base is growing fast and the freefall of last quarter appears to have been a one-time deal. The stock closed at $13.95 per ADR the day after reporting earnings, 9% higher than the day before. That sounds like a huge sigh of relief.

Finally, let's see whether we can compile Borland's (NASDAQ:BORL) code. Analysts were looking for a $0.06 GAAP loss per diluted share, but the maker of software development and testing tools clocked in a loss exactly twice that size. Sales were down 2.4% year over year, to $69.6 million, which still beat the analyst target by 5.6%. Have you noticed last week's pattern yet?

The revenue dip seems to be mainly due to increased costs in running the fledgling support and consulting division. Borland is relatively new in this game, and the company had to temporarily take on outside consultants to support the 9% increase in orders for these services.

The future doesn't look too bright either, at least in the near term. The company is looking for bidders on its software development products, including classics like Delphi and Borland C/C++. This arm of the company delivers 30% of the revenue today, so expect some bumps in the road ahead as Borland refocuses on its testing and lifecycle management businesses. It could be a smart move to take a few steps away from direct competition with Sun (NASDAQ:SUNW) and Microsoft (NASDAQ:MSFT), and deeper into the realm of smaller companies like Compuware, Serena, and Telelogic. Check back in a few years.

Some of these underperformers are victims of larger circumstances, while others might have only themselves to blame. It's up to you to decide which down-on-their-luck companies should be able to pull themselves up by the bootstraps, and which really are stuck in the mud. Come back next Monday, and we'll take a look at another batch of mishaps and disappointments. I promise it will be fun and educational.

Further Foolishness that won't disappoint:

Seeking great deals on unfairly punished stocks? Philip Durell and his merry band of Fools at the Motley Fool Inside Value newsletter service are standing by to help you find great stocks at ridiculously low markdowns. Try a 30-day trial subscription to see whether bargain-hunting is right for you.

Microsoft is a Motley Fool Inside Value selection, while American Science & Engineering and Shanda both frolic in the land of theRule Breakers.

Fool contributor Anders Bylund knows Visual Basic much better than Delphi, though Perl is like a second language to him. Too bad you can't invest directly in it. He owns no part of the companies discussed today. Fool disclosure sees right through you.