After suffering a major legal setback in the summer, Arizona regained its footing in court Friday when a federal judge dismissed parts of the U.S. Justice Department’s challenge to the state’s new immigration law and rejected several claims made by Hispanic activists and Phoenix police officers.