Section 60. Whoever commits a misdemeanor, as defined by a by-law, regulation or ordinance of a town or authority therein, in the presence of a police officer or an officer authorized to serve criminal process, the substance of which misdemeanor is the placing on or in or throwing into a public way, the sidewalk of a public way or a public alley, filth, rubbish or other substance, and, being requested by such officer forthwith to remove it, refuses or neglects so to do, and if the identity of such person is unknown to the officer, may be arrested by such officer and detained in a safe place without a warrant until his identity is ascertained. Reasonable diligence shall be exercised by the arresting officer in ascertaining the identity of the offender and when identified he shall be released from arrest unless a warrant has issued against him.