William Lee had named 22 people he wanted to rebut testimony given by Samsung's choice of experts.
"Unless you're smoking crack you know these witnesses aren't going to be called" said Judge Lucy Koh.
Mr Lee replied: "Your honour, I'm not smoking crack. I can promise you that."
The clash, reported by the Verge news site, took place close to the end of the trial after Mr Lee presented a 75-page document detailing the witnesses.
The judge had previously made it clear she wanted closing arguments to be presented next week. She has given each side a maximum of 25 hours to make its case.
Of that time Apple has less than four hours of witness testimony remaining on its clock, and Mr Lee said he honestly believed he could cover all the people he had named within that period.
The move could potentially have made it harder for Samsung's legal team to prepare.
His evidence was intended to undermine the US firm's claim that it was owed $2.5bn (£1.6bn) in damages.
In addition to denying the allegations the South Korean firm is also pursuing its rival for royalty payments.