Removed swap JDK function

Placed code in a gist here: https://gist.github.com/akenn/4784738cb6c1fd767456