There are certain cases where being able to kill somebody else can be defended in court; one case is when you are killing in self-defense, another case is when, in the United States, you encounter a robber in your home, and in the course of defending your home, you kill the intruder.
Imagine a case when a person intrudes into a house, especially a house where there have been things stolen, and then finds himself encountering a sword wielding resident of the house who is ready to confront you.
In this case, the resident of the house used the sword to deadly effect, killing the intruder. The police normally have trouble arresting the residents involved in such incidents, since a person has the right to defend his home. (link to article):
Baltimore homicide detectives don’t believe a Johns Hopkins University student had “the intent to kill” when he used a samurai sword to confront an intruder behind his home, a police spokesman said Thursday. John Pontolillo, 20, a junior chemistry major from New Jersey, killed the man with a single blow early Tuesday after police said the suspected burglar lunged at him.
Pontolillo has not been charged in the death of Donald D. Rice, 49, who had a long rap sheet of burglary arrests and was released from jail just two days before the altercation. Prosecutors will determine whether charges are appropriate after consulting with police, a process that could take weeks.