Unless you were predominantly invested in energy stocks, 2022 was likely a challenging year. The iconic Dow Jones Industrial Average, widely followed S&P 500, and growth-driven Nasdaq Composite all fell into respective bear markets and produced their worst full-year returns since 2008.

Unfortunately, Wall Street's headwinds could continue this year. According to the recently released Minutes of the Federal Open Market Committee (FOMC), a mild recession is expected for the U.S. economy during the second-half of the year. The FOMC attributes "recent banking-sector developments" for this weaker outlook, with the U.S. economy expected to recover over the subsequent two years. 

Warren Buffett at Berkshire Hathaway's annual shareholder meeting.

Berkshire Hathaway CEO Warren Buffett. Image source: The Motley Fool.

While recessions can lead to volatility and uncertainty on Wall Street, they're also known for providing opportunity to long-term investors, such as Berkshire Hathaway (BRK.A -0.28%) (BRK.B -0.68%) CEO Warren Buffett. Throughout history, the Oracle of Omaha has frequently used recessionary market downturns as the perfect excuse to do some shopping.

Berkshire Hathaway currently holds 49 securities (47 stocks and two exchange-traded funds) in its $343 billion investment portfolio. While some of Buffett's equity holdings are well-positioned to navigate a U.S. recession, others could struggle.

If the FOMC is correct and a mild recession does materialize later this year, two Warren Buffett stocks stand out as incredible buys, while another popular holding can be easily avoided.

Warren Buffett stock No. 1 to buy now if the U.S. is headed into a recession: Johnson & Johnson

Among the roughly four dozen securities held in Berkshire Hathaway's portfolio, arguably none is a safer, better buy during a recession than Johnson & Johnson (JNJ -0.69%).

Healthcare stocks tend to be defensive, which is what makes them such smart plays when the U.S. economy weakens. As much as we'd like to simply not get sick when it isn't financially convenient to do so, we don't have the ability to control what ailment(s) we develop or when we become ill. Demand for prescription drugs, devices, and various healthcare services remains relatively constant no matter how well or poorly the U.S. economy is performing.

What's made J&J such a success is its revenue mix. For more than a decade, Johnson & Johnson has been shifting more of its net sales to higher-margin, faster-growing therapeutics.

Of course, focusing on pharmaceuticals is a double-edged sword. While brand-name drugs are responsible for most of J&J's growth and operating margin, novel drugs have a finite period of sales exclusivity. Thankfully for its shareholders, J&J has answers to a possible patent cliff. It's been aggressively reinvesting in its pipeline, making acquisitions on an as-needed basis, and can turn to its world-leading medical-device segment to offset any future sales slowdowns from its pharmaceutical division.

Continuity at the top has also been crucial to Johnson & Johnson's steady earnings growth. In the 137 years it's been a publicly traded company, J&J has had just eight CEOs.  Having core management positions stick around for lengthy periods ensures that strategic initiatives and long-term visions are being met.

What's more, Johnson & Johnson is one of only two publicly traded companies with the highest possible credit rating (AAA) from Standard & Poor's, a division of S&P Global. This credit rating, which is one notch higher than the U.S. federal government, signals the utmost confidence that J&J can service and repay its outstanding debt.

Warren Buffett stock No. 2 to buy now if the U.S. is headed into a recession: Visa

The second Warren Buffett stock to buy with confidence if the nation's central bank is correct and the U.S. is headed into a mild recession is payment processor Visa (V 0.33%).

Some of you might be scratching your heads given that Visa is, indeed, a cyclical stock. Cyclical businesses ebb and flow with the U.S. economy. In Visa's case, the concern would be that a recession would coerce businesses and consumers to spend less, thereby netting the company less in the way of merchant fees. However, not all cyclical stocks are the same, and Visa comes with own set of competitive advantages.

Before digging into those competitive advantages, it's worth noting that the U.S personal saving rate has plunged over the past two years to levels not seen since late 2007 and early 2008.  With the U.S. inflation rate still above its historic norm, it wouldn't be a surprise to see businesses and consumers turn to credit to cover more of their expenses. In other words, even if consumer or business spending tapers off a bit during a mild recession, increased credit card usage could buffer Visa from any short-term pain.

One of the prime advantages Visa brings to the table is that it strictly focuses on processing payments. If Visa wanted, it could easily become a big player in the lending arena. However, management's approach to stick to payment facilitation looks like a genius move when recessions occur. While lending institutions are forced to set aside capital to cover loan losses and potential delinquencies, Visa doesn't have to set aside a dime. This allows it to maintain a 50% (or greater) profit margin, as well as bounce back from recessions faster than its peers.

Another advantage for Visa is its position in the world's No. 1 market for consumption (the U.S.). Based on filings with the Securities and Exchange Commission in 2021, Visa accounted for 52.6% of all credit card network purchase volume in the U.S., which was nearly 29 percentage points more than its next-closest competitor.  As the only company to gain meaningful payment-processing share following the Great Recession, Visa looks uniquely positioned to navigate a potential downturn with ease.

Two oil pumpjacks in operation at sunrise.

Image source: Getty Images.

The Warren Buffett stock to avoid like the plague if a recession is coming: Occidental Petroleum

On the other hand, energy stock Occidental Petroleum (OXY -0.09%) is the Warren Buffett stock investors would be smart to avoid if U.S. economic growth is about to shift into reverse.

Occidental Petroleum has been one of the Oracle of Omaha's favorite stocks to buy since the beginning of 2022. In a 15-month stretch, Buffett and his investing team gobbled up 211.7 million shares, equating to 23.6% of the company's outstanding shares. 

The reason Buffett piled into Occidental likely has to do with the globally broken energy supply chain. In addition to Russia invading Ukraine and putting Europe's energy commodity supply needs in doubt, the COVID-19 pandemic led to three years of drilling and infrastructure underinvestment by global energy majors. With oil and natural gas supply somewhat constrained, the expectation would be for these commodities (especially oil) to remain priced above their historic average.

Unfortunately, this thesis goes out the window during a recession. Energy commodities tend to struggle mightily when the biggest economy in the world by gross domestic product enters a recession and demand declines.

The reason I chose to single out Occidental Petroleum and not a larger Buffett holding, such as Chevron (CVX 0.44%), is because Occidental is more heavily levered to its drilling operations. Although Chevron and Occidental are both integrated operators, Chevron generates significant revenue from its midstream pipelines and downstream chemical plants and refineries. Occidental Petroleum brings in a relatively small percentage from its downstream operations. In short, it isn't hedged nearly as well as Chevron to handle an economic downturn.

Furthermore, Occidental Petroleum still has work to do on its balance sheet. Whereas Chevron closed out 2022 with a mere $5.4 billion in net debt, Occidental still has $19.7 billion in net debt following its very pricey deal to acquire Anadarko in 2019.  It simply doesn't have the room for error that other oil and gas companies possess, which is what makes Occidental Petroleum easily avoidable.