Here’s why these pipes and fittings stocks gained up to 13% despite weak earnings