SOC-4410 | Fix critical violations in Sonar.