(g) Whoever, within this commonwealth, produces for sale, delivers or causes to be delivered, orders for delivery, sells or offers for sale, or fails to keep records regarding, any rifle or shotgun without complying with the requirement of a serial number, as provided in section one hundred and twenty-nine B of chapter one hundred and forty, shall for the first offense be punished by confinement in a jail or house of correction for not more than two and one-half years, or by a fine of not more than five hundred dollars.
(h)(1) Whoever owns, possesses or transfers a firearm, rifle, shotgun or ammunition without complying with the provisions of section 129C of chapter 140 shall be punished by imprisonment in a jail or house of correction for not more than 2 years or by a fine of not more than $500. Whoever commits a second or subsequent violation of this paragraph shall be punished by imprisonment in a house of correction for not more than 2 years or by a fine of not more than $1,000, or both. Any officer authorized to make arrests may arrest without a warrant any person whom the officer has probable cause to believe has violated this paragraph.
(2) Any person who leaves a firearm, rifle, shotgun or ammunition unattended with the intent to transfer possession of such firearm, rifle, shotgun or ammunition to any person not licensed under section 129C of chapter 140 or section 131 of chapter 140 for the purpose of committing a crime or concealing a crime shall be punished by imprisonment in a house of correction for not more than 21/2 years or in state prison for not more than 5 years.
(i) Whoever knowingly fails to deliver or surrender a revoked or suspended license to carry or possess firearms or machine guns issued under the provisions of section one hundred and thirty-one or one hundred and thirty-one F of chapter one hundred and forty, or firearm identification card, or receipt for the fee for such card, or a firearm, rifle, shotgun or machine gun, as provided in section one hundred and twenty-nine D of chapter one hundred and forty, unless an appeal is pending, shall be punished by imprisonment in a jail or house of correction for not more than two and one-half years or by a fine of not more than one thousand dollars.