Unfortunately not, except for certain reinvestments in qualified small business stock or empowerment zone business stock (see the Schedule D instructions for these special rollover rules). Apart from these exceptions, all of the gain on the sale of one stock must be reported even if other stock is purchased. The like-kind exchange rules do not apply to securities (stocks, bonds, notes, etc.).
Release of a debt without consideration by a creditor. Cancellations of debt are generally taxable.