Section 2. (a) Whoever, directly or indirectly, corruptly gives, offers or promises anything of value to any state, county or municipal employee, or to any person who has been selected to be such an employee, or to any member of the judiciary, or who offers or promises any such employee or any member of the judiciary, or any person who has been selected to be such an employee or member of the judiciary, to give anything of value to any other person or entity, with intent
(1) to influence any official act or any act within the official responsibility of such employee or member of the judiciary or person who has been selected to be such employee or member of the judiciary, or
(2) to influence such an employee or member of the judiciary or person who has been selected to be such an employee or member of the judiciary, to commit or aid in committing, or collude in, or allow, any fraud, or make opportunity for the commission of any fraud on the commonwealth or a state, county or municipal agency, or
(3) to induce such an employee or member of the judiciary or person who has been selected to be such an employee or member of the judiciary to do or omit to do any act in violation of his lawful duty; or
(b) Whoever, being a state, county or municipal employee or a member of the judiciary or a person selected to be such an employee or member of the judiciary, directly or indirectly, corruptly asks, demands, exacts, solicits, seeks, accepts, receives or agrees to receive anything of value for himself or for any other person or entity, in return for
(1) being influenced in his performance of any official act or any act within his official responsibility, or
(2) being influenced to commit or aid in committing, or to collude in, or allow any fraud, or make opportunity for the commission of any fraud, on the commonwealth or on a state, county or municipal agency, or
(3) being induced to do or omit to do any acts in violation of his official duty; or
(c) Whoever, directly or indirectly, corruptly gives, offers or promises anything of value to any person, or offers or promises such person to give anything of value to any other person or entity, with intent to influence the testimony under oath or affirmation of such first-mentioned person or any other person as a witness upon a trial, or other proceeding, before any court, any committee of either house or both houses of the general court, or any agency, commission or officer authorized by the laws of the commonwealth to hear evidence or take testimony, or with intent to influence such witness to absent himself therefrom; or
(d) Whoever, directly or indirectly, corruptly asks, demands, exacts, solicits, seeks, accepts, receives or agrees to receive anything of value for himself or for any other person or entity in return for influence upon the testimony under oath or affirmation of himself or any other person as a witness upon any such trial, hearing or other proceeding or in return for the absence of himself or any other person therefrom;—shall be punished by a fine of not more than $100,000, or by imprisonment in the state prison for not more than 10 years, or in a jail or house of correction for not more than 2 1/2 years, or both; and in the event of final conviction shall be incapable of holding any office of honor, trust or profit under the commonwealth or under any state, county or municipal agency.
Clauses (c) and (d) shall not be construed to prohibit the payment or receipt of witness fees provided by law or the payment by the party upon whose behalf a witness is called and receipt by a witness of the reasonable cost of travel and subsistence incurred and the reasonable value of time lost in attendance at any such trial, hearing or proceeding, or, in the case of expert witnesses, involving a technical or professional opinion, a reasonable fee for time spent in the preparation of such opinion, in appearing or testifying.