According to the Code of Hammurabi a thief should die if he could not repay what he had stolen [1] or if he stole by breaking in. [2] The Torah modified this law by annulling the death penalty and substituting the penalty of being sold into slavery, in the first case. In the second case, it annulled the death penalty and protected the life of the victim. Exodus 22:1; Exodus 22:4 of chapter22go together and deal with theft generally. The reason for the fivefold and fourfold penalties appears to be that the thief was taking the means of another person"s livelihood. [3]Exodus 22:2-3, which deal with breaking and entering, address a special type of theft. Perhaps the law assumed that the thief"s intent was murder as well as theft if he broke in at night but only theft if he broke in in daylight. If Song of Solomon , we might assume that if his intentions turned out to have been otherwise, the law would deal with him accordingly. The text gives only the typical case. Perhaps the logic was that at night the victim"s life was in greater danger so the law allowed him to use more force in resisting his assailant than in the daytime. [source][source][source]