Sonarfix: Reduce cognitive complexity