(a) In this section, “legacy” or “legacies” does not include assets passing by the exercise of the decedent of a testamentary power of appointment.
(b) (1) Unless a contrary intent is expressed in the will and except as provided in §§ 3–208 and 3–303 of this article and subsection (c) of this section, shares of legatees abate without preference or priority as between real and personal property, in the following order:
(i) Property not disposed of by the will;
(ii) Residuary legacies;
(iii) General legacy, other than items (iv), (v), and (vi) of this paragraph;
(iv) General legacy to dependents of testator;
(v) General legacy to creditor of testator in satisfaction of a just debt;
(vi) General legacy to surviving spouse of testator; and
(vii) Specific and demonstrative legacies.
(2) Abatement within each classification is in proportion to the amounts of property each of the legatees or heirs would have received, had full distribution of the property been made in accordance with the terms of the will.
(c) When the subject matter of a preferred legacy is sold or used as an incident to administration, appropriate adjustments in, or contributions from, other interests in the remaining assets shall be effected.