Depending on how you look at Core Laboratories (NYSE:CLB), buying shares today looks really good or really bad. Those in the bad camp will point to weakness in the overall oil and gas market, while the more optimistic will look at the company's niche offerings in the oil and gas market and how its technology advantage and strong financials should help shield it from the worst of the market. 

If you were to ask management what they thought, you can probably say rather emphatically that investors should be optimistic, and they are backing up those statements by continuing to repurchase gobs of stock from the market. Let's take a look at management's spending habits and see if you should follow management's lead and buy shares of Core Labs as well.

Buying in
If you are a shareholder or have been following the company for a while as you decide what to do, you will probably know that the company buys back shares on a pretty routine basis. Over the past 10 years the company has retired close to 18% of all shares outstanding, which has helped to contribute to returns that have walloped the S&P 500.

^SPXTR Chart

^SPXTR data by YCharts

And despite the fact that the company's prospects don't look quite as rosy as they did when the price of oil was more than $100 a barrel, management has kept on buying back shares at a very decent clip. Since the beginning of the year up until its most recent share repurchase update, Core's management has repurchased about 950,000 shares -- a little more than 2% of all shares outstanding-- for a total of about $115 million.

Where is the money for this coming from?
Looking at the income statement, there might be some reasons to throw caution to the wind. How can a company that only earned $31 million in net income last quarter dedicate so much to share repurchases and even pay out a dividend? On the surface, this looks like an unsustainable path, but in the case of Core Labs the income statement doesn't tell the whole story. It's the cash flow that counts.

Last quarter, Core was able to generate about $72 million in free cash flow. One reason that it is able to generate more in free cash flow than net income is because unlike so many other companies in the oil and gas space, it doesn't require the massive amounts of capital spending to keep itself going. Over the past 5 years the company has only needed to invest $195 million in capital expenditures. That's less than a month's worth of capital expenditures for Halliburton. 

With so little in capital needed to generate future cash flows, it allows management to buy back shares on a pretty routine basis without needing to keep a lot of "dry powder" cash around for downturns in the industry. 

What a Fool Believes
Core's stock has been in a free fall since last spring when management announced that slower than expected activity in the offshore market caused it to lower guidance, but so far most of the company's woes have resulted from a cyclical downturn in the market rather than major changes at the company itself. It's recent acquisition of monitoring equipment and instrument manufacturer Sanchez Technologies will bolster its position as a leading reservoir data analysis firm even further, and the low capital obligations of the company should give it the wiggle room to manage any further decline in the oil and gas market.

Considering this, today's less than stellar market could be just the right time to jump into shares of Core Labs. The company sure seems to think it's a worthwhile investment.

Tyler Crowe owns shares of Core Laboratories. You can follow him at Fool.com or on Twitter @TylerCroweFool.

The Motley Fool recommends Core Laboratories and Halliburton. The Motley Fool owns shares of Core Laboratories and Halliburton. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.