When the person complained of appears or is brought before the judge or magistrate, if the charge in the complaint is controverted, the judge or magistrate may subpoena witnesses, hear any statement to the charges made by the person complained of, and hear all other testimony.