How to provide individual grades for group project work?
In "Assessing Individual Contributions to Group Software Projects" (WCCCE '03), William Gardner discusses a number of strategies for adjusting team programming project grades for individual performance and ends by recommending a "share-out" approach:


  The essence of share-out is that each student is conceptually given a
  pot of points, and must allocate them among their peers based on some
  stated criteria. The allocation then represents that student’s
  numerical evaluation of his or her team members.
  
  In order to provide a straightforward, effective criterion for the
  sharing out, each student was given 100 points and told to allocate
  them according to the amount of credit each team member deserved in
  terms of the total project work. The term “credit” was intentionally
  selected to be both intuitive and elastic, a single metric that could
  easily serve as a proxy for time and quality of effort....
  
  Students were required to give themselves at least 100/N points, in
  recognition that there would likely be little enthusiasm for
  self-incrimination, but then the self-evaluations were not averaged in
  with those of the team members. With this constraint in place, ethical
  struggles over whether to admit one’s own poor performance were
  shunted aside. If some students really performed poorly, their team
  members could do the dirty work; their own confessions were not
  required, nor could their grade be inflated by making phony claims.


The paper provides further details.

Update: Since the paper is 14 years old, I contacted the author to ask if he has any updates. He kindly replied that he had not taught a software engineering course since then so had no further experience to report and that he stands by his recommendation.