The election of a candidate, who has been guilty, by his agents, of the offence of treating and undue influence, and illegal practice, or of any such offences, in reference to such election shall not, by reason of such offences, be declared void, nor shall the candidate be subject to any incapacity under this Ordinance, if the court is satisfied after giving the Attorney General an opportunity of being heard that the candidate has proved -
(a) that no corrupt or illegal practice was committed at such election by the candidate or his election agent and the offences aforesaid were committed contrary to the orders and without the sanction or connivance of such candidate or his election agent; and
(b) that such candidate and his election agent took all reasonable means for preventing the commission of corrupt and illegal practices at such election; and
(c) that the offences aforesaid were of a trivial, unimportant and limited character; and
(d) that in all other respects the election was free from any corrupt or illegal practice on the part of such candidate and of his agents.