This recent article in The Guardian reports how “Doctors and psychologists working for the US military violated the ethical codes of their profession under instruction from the defence department and the CIA to become involved in the torture and degrading treatment of suspected terrorists.” It raises the question whether embedded professional codes apply in wartime or when national security is under direct threat. Were these doctors and psychologists acting in an ethical way by breaking the medical code to torture suspected terrorists?
The hypothetical ticking time bomb dilemma is difficult to illustrate with real life examples (see here for a North Carolina electoral judiciary debate during the time of the Obama / Clinto election).
This page has some interesting thinking on the ethics of torture …. Philosophical Disquisitions