Symerille,
I do not know if I can give a yes or no answer to your question, but I will try. I do not believe this is a question that can be outright answered in this manner for all circumstances. It depends on the situation and the intent behind your actions. I am one who very much believes in honesty, however there is a point when I feel honesty is no longer the best course of action. Again prudence comes into play here. I take responsibility for my own words and actions. I will tell the truth, even if it leads to my death. However, if my honesty would lead to another's harm or death I may tell a lie to spare them. I do not think that because someone does not follow the code they are a bad person. Though, if more often than not they go against the tenants of the code then it is fair to say they may indeed be a bad person. In my opinion the person in your example is a good person. They said what they needed to bring a criminal to justice and to spare an innocent.
Life is mutable. Situations are always different; one solution may not work under other circumstances. Rather than the Code being something written in stone, black and white, I think it should more be viewed as a moral compass. The general ideas you should aspire to live by, but not be so blinded by the literal wording of them as to do something so counter-intuitive as to tell the truth to an enemy most likely costing the life of the hostage and your own. I think the intent behind the Code saying we should not lie is to create people whose words can be trusted, not to harm innocents through honesty. Then again these are just my views, I am but one voice. I am glad you posed your question, it has given me time to reflect on my own beliefs.
-Gwendara Alanik
Seneschal of the Stormblades