In the case of a long-term contract, all costs (including research and experimental costs) which directly benefit, or are incurred by reason of, the long-term contract activities of the taxpayer shall be allocated to such contract in the same manner as costs are allocated to extended period long-term contracts under section
451 and the regulations thereunder.