The court shall adjudge whether the incumbent or any other person was duly elected, and that the person elected is entitled to the certificate. If the court finds that the election resulted in a tie vote for any office, the tie shall be resolved pursuant to section 50.44. If the judgment is against the incumbent, and the incumbent has already received the certificate, the judgment shall annul the certificate. If the court finds that no person was elected, the judgment shall be that the election be set aside.