The code does not compile because of missing class.

Try debugging the code by adding println statements at the locations the double jump is detected.
Print out the values of all the variables...