Hammurabi v. NY on Stolen Goods
Hammurabi's Code and the NY Penal Code were written at different times in history and are obviously quite unlike one another. They exhibit, however, also some similarities. It would be impossible to do an exhaustive comparison here. I will focus therefore on a specific issue. What happens if someone finds you in possession of a good they claim to be their own, say a donkey or a laptop? You might respond that you did not steal it and insist you purchased the good from someone else, a merchant, and you did not know it was stolen.
Hammurabi's code offers a detailed solution to this type of controversy.
 If any one lose an article, and find it in the possession of another: if the person in whose possession the thing is found say “A merchant sold it to me, I paid for it before witnesses,” and if the owner of the thing say, “I will bring witnesses who know my property,” then shall the purchaser bring the merchant who sold it to him, and the witnesses before whom he bought it, and the owner shall bring witnesses who can identify his property. The judge shall examine their testimony–both of the witnesses before whom the price was paid, and of the witnesses who identify the lost article on oath. The merchant is then proved to be a thief and shall be put to death.
In other words, if someone claims that a good in your possession is theirs and you claim that you purcharsed it from a merchant, the dispute can be resolved by consulting witnesses. The alleged owner shall bring to court a witness attesting that the good is indeed theirs. You shall bring to court the merchant who sold you the good along with the witness before whom you made the purchase. If the witnesses are deeemed reliable by the judge, the merchant is considered guilty of theft and punished.
But punishment itself does not solve the controversy. If the merchant is the thief, there are two individuals who can legitimately claim ownership of the same good, the original owner and the purchaser. In modern legal terminology, this would no longer be a criminal case, but a civil case. Punishment cannot be enough to solve the controversy. Another form of compensation is nedded. In that case, as  says,
The owner of the lost article receives his property, and he who bought it receives the money he paid from the estate of the merchant.
What if you cannot find the merchant or the witness before whom you purchased the good, but the owner brings a witness in their favor? The evidence available would tip against you and in favor of the owner. You would then be considered guilty of theft and punished. As  states,
 If the purchaser does not bring the merchant and the witnesses before whom he bought the article, but its owner bring witnesses who identify it, then the buyer is the thief and shall be put to death, and the owner receives the lost article.
What if the alleged owner cannot bring any witness in their favor?
 If the owner do not bring witnesses to identify the lost article, he is an evil-doer, he has traduced, and shall be put to death.
In this case, the owner is guilty of making a false accusation against you and shall be punished.
Hammurabi's code also considers the special case of witness unavailability.
 If the witnesses be not at hand, then shall the judge set a limit, at the expiration of six months. If his witnesses have not appeared within the six months, he is an evil-doer, and shall bear the fine of the pending case.
Hammurabi's code covers all possible cases – (a) the merchant stole the good, (b) you stole the good, and (c) the owner made a false accusation against you – and determines the quantum of evidence required to establish each claim and the related punishment, usually death.
NY Penal Code
The NY Penal Code deals with the same type of controversy in a similar yet different way. Some of the basic legal principles are the same. For example, NY law defines theft as knowingly possessing a stolen good. For example,
S 165.50 Criminal possession of stolen property in the third degree. A person is guilty of criminal possession of stolen property in the third degree when he knowingly possesses stolen property, with intent to benefit himself or a person other than an owner thereof or to impede the recovery by an owner thereof, and when the value of the property exceeds three thousand dollars.
Details aside, the key expression here is knowingly possesses. There is no theft without knowledge. After all, if you acquired the good through a gift or you purchased it and did not know it was stolen, you cannot be guilty of theft. This is the same situation dealt with in Hammurabi's code.
According to the NY Penal Code, before you are convicted of theft, the prosecutor must charge you and produce evidence that establishes you knowingly stole the good beyond a reasoable doubt.
S 70.20 Standards of proof for conviction. No conviction of an offense by verdict is valid unless based upon trial evidence which is legally sufficient and which establishes beyond a reasonable doubt every element of such offense and the defendant`s commission thereof.
Proof beyond a reasonable doubt is a very stringent standard of proof althought it is also quite hard to define precisely. This standard is general and applies to anyone who is accused of thef or any other crime.
Standards of Proof
The standard of proof in Hammurabi's code is not stated explicitly but implicitly operates in different ways in different contexts. According to article  cited above, the testimony of a witness who claims that the good belongs to the original owner, toghether with evidence that you purchased the good from the merchant, is enough to establish the merchant's guilt. Note that  also says that “[t]he judge shall examine their testimony”. So the evidence should be subject to scrutiny. The evidentiary standard that is applied here is demanding because it requires the convergence of two distinct lines of evidence. If you cannot produce evidence against the merchant or if the alleged owner cannot produce evidence that the good is theirs, the merchant cannot be convicted.
The situation is different if the owner can produce evidence that the good is theirs but you fail to produce evidence that you purchased the good from the merchant. Following , this is enough to establish you are guilty of theft. This is a less demanding standard compared to when the accusation of theft is made against the merchant. This almost appears to be a form of “presumption of guilt unless you can show otherwise”. Perhaps, this rule was enforced on the assumption that any important purchase was made in the presence of a witness. If someone could not find a witness before whom the purchase was made, this was strong indication of theft.
Civil v. Criminal Theft
Another notable difference is that Hammurabi's code deals with criminal and civil matters at once. It determines the punishment for theft as well as the compensation that the injured party should receive, such as the restitution of the stolen good or a monetary amount equal to the value of the good. One would be hard pressed to find similar measures in the NY Penal Code. If someone wants to recover stolen property, they should file a claim in a civil court against whoever they believe to be responsible. If they prevail in civil court, they will secure some monetary compensation.
Interestingly, the standard of proof in civil cases is not proof beyond a reasonable doubt, but the less stringent standard preponderance of the evidence. So, in theory, a defedant accused of theft could escape conviction in a criminal case and be found liable in a civil case simply because the standard of proof that applies to civil and criminal cases is different. This difference in standards of proof between civil and criminal cases is absent from Hammurabi's Code. The same evidentiary standard governs decisions about punishment and decsions about how to compensate an unjured party.