fixed sonar violations about parameter assignment, duplicated literals and variable naming