I agree with ChrisF that this goes back to the same problem with any measurement. What you praise is what you get. There are always going to be people that game the system, whatever that system is going to be.
The only real effective method that I've found for rewarding programmer's comes with three steps.
- Leads know and understand the abilities of the people on their team.
- Managers listen to the recommendations of the leads for team members who aren't pulling their weight.
- The team is praised as a whole for successful sprints.
The entire key is that programmer's are not cogs in a machine that can be 'tuned' by looking at statistics. The real people need to be examined and improved as whole and the team needs to be able to rely on each other in a cooperative, and not a competitive manner.
The poor performers on the team are given every opportunity for improvement and enrichment before they are considered to be let go. Ultimately, good programmers will thrive in this environment and the poor programmers, who refuse to be improved, will be let go.