Notwithstanding any provision of this chapter to the contrary, any member inactive of a retirement system appointed by the governor to a position as a chief justice, justice, associate justice, judge, associate judge or special justice may elect within thirty days of such appointment to become a member in service of the system pertaining to the position to which he is appointed, subject to the provisions of sections sixty-five A to sixty-five D, inclusive; provided, however, that any such member inactive who is receiving or had received a retirement allowance shall repay into the system from which he is receiving or had received such allowance the total amount of any such allowance received from the date of his retirement to the date of his again becoming a member in service, together with buyback interest.
Mass. Gen. Laws ch. 32, § 65D 1/2