Section 27. Executions between the same parties may, if required by either party, be set off one against the other. In such case, the debtor in an execution which has been delivered to an officer to be served shall deliver his execution to the same officer, whether directed to him or to another, and the officer shall apply the smaller execution, so far as it will extend, to the satisfaction of the larger execution, and the balance due on the larger execution may be collected and paid by him as if there had been no set-off; but such set-off shall not be allowed?
First, If the creditor in one of the executions is not, in the same capacity and trust, the debtor in the other.
Second, If the amount due on the first execution was lawfully and in good faith assigned to another person before the creditor in the second execution became entitled to the amount due thereon.
Third, If there are several creditors in one execution, from a part of whom only the amount due on the other is due.
Fourth, If there are several debtors in one execution, to a part of whom only the amount due on the other is due.
Fifth, As to the portion of either execution upon which the attorney has a lien under section fifty of chapter two hundred and twenty-one.