Section 34A. (a) Any owner, occupant, lessee or other person having control or supervision of any assembly use group building, as defined by the state building code, and who causes or permits a dangerous condition to exist on the premises at anytime shall be punished by a fine of not more than $5,000 or by imprisonment in the house of correction for not more than 2 1/2 years, or both.
For the purposes of this section, ''dangerous condition'' shall mean:—
(1) any blocked or impeded ingress or egress;
(2) the failure to maintain or the shutting off of any fire protection or fire warning system required by law;
(3) the storage of any flammable or explosive without a properly issued permit in quantities in excess of allowable limits of any permit to store;
(4) the use of any firework or pyrotechnic device, as defined by the board of fire prevention regulations, without a properly issued permit; or
(5) exceeding the occupancy limit established by the local building inspector pursuant to chapter 143.
Nothing in this section shall preclude the issuance of a citation for a code violation, as provided for by chapter 148A.
(b) Whoever is convicted of a second or subsequent violation of paragraph (a) shall be punished by a fine of not more than $25,000 or by imprisonment in the state prison for not more than 5 years or in a house of correction for not more than 2 1/2 years, or both such fine and imprisonment.