Sonar Code Optimization