Long and short positions in the same instrument or contract are netted because the net market risk and payoff from the combined long and short positions is identical to that resulting from holding the net position in the instrument or contract (i.e. longs and shorts are exact opposites and there is no basis risk).
Pursuant to Article 360(1)(a), for net positions ("long or short") positions in the same commodity, or commodity derivative contracts (futures, options, forwards, warrants, etc.) are netted in order to calculate the net position in that particular contract. Article 357(3) of Regulation (EU) No 575/2013 (CRR) allows the net positions in different contracts (including the physical commodity stock) of the same commodity to be netted against each other to calculate the net position in the commodity. On the other hand, pursuant to Article 360(1)(b) the gross position("long plus short") in a commodity is the sum of absolute values of net positions in different contracts (including the physical commodity stock) of the same commodity. This means that net positions in different contracts of the same commodity cannot be netted against each other.
Provided the Long CFD in the example is on the same underlying as the Short FCD, the first calculation would therefore be the correct one.