Inferring Visual Contracts from Java Applications