A FlowerPot's contents cannot be set or retrieved correctly using the existing API calls.
The code used in testing:
FlowerPot fp = (FlowerPot) block.getState().getData(); MaterialData d = new MaterialData(Material.RED_ROSE); fp.setContents(d); block.getState().update(true);
Also, see the test done by Spigot user Mareckoo01: