Sonar Major:Merge if statement.