The probate court may, upon petition of an administrator, administrator with the will annexed, or executor filed within one year after the date of the giving of the executor's or administrator's bond, or, if an administrator de bonis non shall be appointed within one year after the date of the original appointment of the executor or administrator, then within six months after the date of the giving of a bond by such administrator de bonis non, or within the remainder of said last mentioned period of one year, whichever is the longer period, with the consent of all parties interested or after notice, license him to sell the whole or any part of the real estate or any undivided interest therein belonging to the estate of the deceased, in such manner and upon such notice as the court orders; and the net proceeds of such sale, after deducting the expenses thereof and such amount as may be required for the payment of debts, legacies and charges of administration, in consequence of a deficiency in the personal property, shall be paid over to the person or persons who would have been entitled to such real estate and in the proportions to which they would have been entitled had it not been sold. Before any such license shall be issued, the petitioner shall file in the probate court an affidavit containing the names of all persons known to him as having or claiming any interest in said real estate derived from any deed of conveyance or mortgage by, through or under any of the heirs or devisees, and if it appears that there are any such persons, they shall be made parties to the proceedings, and notified in such manner as the court orders.
Mass. Gen. Laws ch. 202, § 19