(a)  General rule.–The plaintiff spouse shall be entitled, out of the proceeds of this sale, to such sums of money as represents the share in the property, based on the proportionate part of the original purchase money furnished by the plaintiff spouse for the purchase of the property.

(b)  Petition to court.–The plaintiff spouse may petition the court of common pleas of the county where the real property is situated, either before or after the sale of the property by execution, setting forth plaintiff’s claim, and the court shall fix a date for a hearing on the petition.

(c)  Hearing and decree.–After notice and hearing, the court shall make such decree as shall be proper. At the hearing, both spouses shall be competent witnesses.