Image source: Getty Images.

What: Shares of Whiting Petroleum (WLL) slumped in June, ending down 26.6%.

So what: Fueling Whiting's sell-off last month was the announcement that it would exchange $1.06 billion of notes for new convertible notes. While this move has the potential to wipe out a meaningful amount of debt, it could also lead to substantial dilution for shareholders. Depending on the conversion rate, Whiting could issue between 83 million and 114.8 million new shares, which is a lot considering that the company's share count stood at 210 million shares at the end of last year.

Analysts, however, were mainly positive on the move. Morgan Stanley (MS -1.31%), for example, upgraded the stock from underweight to equal weight and lifted its price target to $13. It did so saying that the exchange will remove a significant overhang on the stock. Meanwhile, Canaccord maintained its buy rating citing the progress the company has made to clean up its balance sheet. Though it did lower its price target from $14 to $13.50 due in part to account for the dilution.

Rising oil prices have fueled an important rebound in the stock prices of oil companies giving producers an opportunity to use their stock as currency to reduce debt. Chesapeake Energy (CHKA.Q), for example, recently joined Whiting in using its stock to reduce debt, though it took a slightly different route. Chesapeake Energy agreed to debt-for-equity exchanges with some of its bondholders, which reduced its debt by 4% in return for 10% of its stock. That was a smaller percentage of Chesapeake's overall debt compared to Whiting Petroleum, which could eliminate roughly 20% of its outstanding debt.

Now what: Whiting Petroleum is making meaningful progress to address its balance sheet concerns. That said, this improvement is coming at a high cost, with the company potentially issuing a ton of stock to get its balance sheet into better shape. This dilution, however, is better than the alternative, which is the potential that Whiting's debt could sink it into bankruptcy if market conditions do not vastly improve.