Section 2. A registrar or assistant registrar who refuses or wilfully neglects to require, under section forty-four of chapter fifty-one, an applicant for registration to submit an affidavit in compliance with said section, or who knowingly prevents or seeks to prevent the registration of any legal voter, or who knowingly registers the name of any person not qualified to vote, or who is guilty of any fraud or corrupt conduct in the execution of the duties of his office, shall be punished by a fine of not more than one thousand dollars or by imprisonment for not more than one year.