A Commentary, Critical, Practical, and Explanatory on the Old and New Testaments, by Robert Jamieson, A.R. Fausset and David Brown [1882] at sacred-texts.com
If a man shall steal an ox, or a sheep--The law respects the theft of cattle which constituted the chief part of their property. The penalty for the theft of a sheep which was slain or sold, was fourfold; for an ox fivefold, because of its greater utility in labor; but, should the stolen animal have been recovered alive, a double compensation was all that was required, because it was presumable he (the thief) was not a practised adept in dishonesty. A robber breaking into a house at midnight might, in self-defense, be slain with impunity; but if he was slain after sunrise, it would be considered murder, for it was not thought likely an assault would then be made upon the lives of the occupants. In every case where a thief could not make restitution, he was sold as a slave for the usual term.
If fire break out, and catch in thorns--This refers to the common practice in the East of setting fire to the dry grass before the fall of the autumnal rains, which prevents the ravages of vermin, and is considered a good preparation of the ground for the next crop. The very parched state of the herbage and the long droughts of summer, make the kindling of a fire an operation often dangerous, and always requiring caution from its liability to spread rapidly.
stacks--or as it is rendered "shocks" (Jdg 15:5; Job 5:26), means simply a bundle of loose sheaves.
If thou at all take thy neighbour's raiment to pledge, &c.--From the nature of the case, this is the description of a poor man. No Orientals undress, but, merely throwing off their turbans and some of their heavy outer garments, they sleep in the clothes which they wear during the day. The bed of the poor is usually nothing else than a mat; and, in winter, they cover themselves with a cloak--a practice which forms the ground or reason of the humane and merciful law respecting the pawned coat.
gods--a word which is several times in this chapter rendered "judges" or magistrates.
the ruler of thy people--and the chief magistrate who was also the high priest, at least in the time of Paul (Act 23:1-5).