Bukkit/CraftBukkit — comment on commit 68f5ce93d4e8a8d13e2d933225204a17b7a1e706
File: src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java line 481
By feildmaster:

This function is incorrect.

You are setting level to experience, then setting total to the same value.