Apple won sanctions against Samsung Electronics for its failure to produce source code in a patent-infringement case in federal court in San Jose, California. US Magistrate Judge Paul S. Grewal wrote in his order that Samsung \"plainly violated\" a court order requiring it to turn over code to Apple, and ruled that Samsung won\'t be able to offer evidence in the case about its efforts to \"design- around\" three patents at issue in the case. In its lawsuit, Apple claims that Samsung\'s 4G smartphone and Galaxy Tab 10.1 tablet computer infringe its patents. In December, US District Judge Lucy Koh in San Jose ruled against Apple\'s request to block Samsung from selling that phone and tablet in the US. That order followed an Australian court ruling lifting an injunction on the tablet there. Samsung, which was the world\'s largest seller of smartphones last year, and Apple have filed at least 30 lawsuits against each other on four continents since April 2011. In his ruling, Grewal said producing source code in patent litigation is \"disruptive, expensive, and fraught with monumental opportunities to screw up.\" Under federal law there is no exception to the requirement, the judge wrote, especially when a defendant in a patent suit challenges the opposition\'s failure to analyse the accused product\'s source code. Grewal said he focused on Samsung\'s so-called design-around source code developed for products with the \"specific intent\" of avoiding Apple\'s patent claims. The ruling targets that code because \"by their very nature design-arounds impact key questions of liability, damages, and injunctive relief,\" Grewal wrote. \"They are inevitably designed with substantial input from counsel for the specific purpose of distinguishing other products at issue,\" Grewal wrote. \"In short, they matter. A lot.\" Adam Yates, a Samsung spokesman, didn\'t immediately return an e-mail after business hours seeking comment on the ruling. Kristin Huguet, an Apple spokeswoman, didn\'t immediately return an e-mail after regular business hours seeking comment.