All this absolute value business is unnecessary and frankly confusing and it has the edge-case that Math.abs(Integer.MIN_VALUE) is negative (not that weird when you get down to it, but it doesn't look like this code expects it), you can calculate the carry in simpler ways . For example using the...

assembly,integer-overflow,carryflag

If you have a look at the pseudo algorithm of IMUL, you'll see IF OperandSize = 16 THEN TMP_XP ← AX ∗ SRC (* Signed multiplication; TMP_XP is a signed integer at twice the width of the SRC *) DX:AX ← TMP_XP[31:0]; SF ← TMP_XP[15]; IF SignExtend(TMP_XP[15:0]) = TMP_XP THEN...