Resolved some sonar issues: Peformance

- inefficient keySet iterator were changed to entrySet iterator

Change-Id: I61da29807665a804593a435879ad24b3676fc0b7
Signed-off-by: Ladislav Borak <lborak@cisco.com>