Any periods of time during all of which a person who was previously lawfully admitted for permanent residence has served honorably or with good conduct, in any capacity other than as a member of the Armed Forces of the United States,
(A)
on board a vessel operated by the United States, or an agency thereof, the full legal and equitable title to which is in the United States; or
(B)
on board a vessel whose home port is in the United States, and
(i)
which is registered under the laws of the United States, or
(ii)
the full legal and equitable title to which is in a citizen of the United States, or a corporation organized under the laws of any of the several States of the United States, shall be deemed residence and physical presence within the United States within the meaning of section
1427
(a) of this title, if such service occurred within five years immediately preceding the date such person shall file an application for naturalization. Service on vessels described in clause (A) of this section shall be proved by duly authenticated copies of the records of the executive departments or agency having custody of the records of such service. Service on vessels described in clause (B) of this section may be proved by certificates from the masters of such vessels.