(1)
If—
(A)
a judge making an election under subsection (b) of this section dies while in office
(i)
before having rendered 5 years of civilian service computed as prescribed in subsection (l) of this section, or
(ii)
after having rendered 5 years of such civilian service but without a survivor entitled to annuity benefits provided by subsection (f) of this section; or
(B)
the right of all persons entitled to an annuity under subsection (f) of this section based on the service of such judge terminates before a claim for such benefits has been established,
the total amount credited to the individual account of such judge (with interest at 3 percent per year, compounded on December 31 of each year, to the date of the death of such judge) shall be paid in the manner specified in paragraph (2) of this subsection.