1. A method for dynamically replacing code within a software application on a device, the method comprising: a computer receiving an annotated code segment that performs a function according to a first data policy; and the computer determining an alternate code segment that performs the function according to a second data policy.