SONARPLUGINS-2390 Fix computation of complexity and statement metric