Since you'll be looping 100 times ahead, why do you calculate 'line number', getting 'variables' and updating the hashmap here? Why don't you just get these values in the method 'debug' for 100 times?