Former judge, who rebuked Apple, will give evidence for Samsung in patent case