(If I remember correctly, Randy Weaver's trouble started because of overall length.)
For rifles, barrels must be no less than 16".
Of course, individuals who hold "Class III" licenses can legally own "short-barreled" shotguns and rifles, in addition to full-auto weapons.
When you legally purchase a variety of firearms, in a State like Massachusetts, you find these things out. 8-)
Regards
On 12 February 1999, the US Army Armaments Research, Development, and Engineering Center awarded a contract to Heckler and Koch, in Sterling, Virginia for a 12 gauge semi-automatic shotgun, the new HK/Benelli M4 Super 90 (M4S90) for the US Armed Forces.
Designated the XM1014 Joint Services Combat Shotgun (JSCS), the shotgun was developed by Benelli Armi S.p.A. of Urbino, Italy for HK, Inc.
It comes stock with an 18.5" barrel, but if you'd like you can get a militia approved 14" barrel. So apparently barrels less than 21" are appropriate militia weapons; incorrect understanding of English language grammer with respect to the 2nd Ammendment notwithstanding. Dah. What lumbskulls them judges are.