A California appeals court judge facing sexual harassment allegations admitted in trial on Friday that he told an occasional “bad joke” and might have forgotten some details about an alleged incident, but he insisted that he did nothing unethical.

“I’m a flawed human being,” Justice Jeffrey Johnson told Emma Bradford, a Commission on Judicial Performance examiner, at a hearing in a judicial discipline proceeding. “And my memory is not perfect.”