Mr. Menendez, a Democrat representing New Jersey, and Dr. Melgen, a wealthy eye doctor from Florida, face charges of bribery and fraud related to the gifts. Both men have denied any wrongdoing.

Mr. Kelly testified that after reports of Mr. Menendez’s flights on Dr. Melgen’s plane appeared in the news media in late 2012, he spent the next year searching flight, credit card and email records to compile a list of all of the senator’s international travels. He admitted in court, however, that his search failed to turn up everything: When asked by a prosecutor, Monique Abrishami, about a January 2013 news release sent from Mr. Menendez’s office stating that Mr. Menendez had taken only three flights on Dr. Melgen’s plane, Mr. Kelly said that it was not accurate.

“I would later find out there were more flights,” he said.

On large projection screens inside the courtroom, Ms. Abrishami showed records of Mr. Menendez’s travels to Florida and the Dominican Republic on Dr. Melgen’s plane, followed by copies of financial disclosure reports in which he said that he had not received any gifts.

In a tense exchange, Ms. Abrishami asked Mr. Kelly if Mr. Menendez’s 2007 form was accurate. He replied that he had not seen that form, so she showed it on the screen, revealing that Mr. Menendez had again said that he had not received any reportable gifts, despite having flown on Dr. Melgen’s plane. Around the courtroom, several of Mr. Menendez’s supporters variously sighed and hung their heads. The senator himself, stoic throughout most of the trial, chuckled.

Mr. Kelly testified that he had “scanned” the financial disclosure form rules and was “vaguely familiar” about what types of gifts could go unreported. Ms. Abrishami went through the rules and pointed out to the jury that the word “friendship” never appeared.