Added another variable called actualStats (HashMap) which gets the value...

...s from flowStats and will be passed as the statsReply to solve the problem of clearing of the map-flowStats and the flag is set as sent by the switch