Program: 86700
Project: 86700
Buggy source:
/** 
 * Renders the scoreboard
 * @param canvas
 */
public void drawScoreboard(Canvas canvas){
  if (!isVisible()) {
    return;
  }
  int yIncBig=50;
  int y=140;
  int x=40;
  setBigFont(canvas);
  int defaultColor=0xffffffff;
  RenderFont.drawShadedString(canvas,"String_Node_Str",x,y,defaultColor);
  List<ClientPlayer> vals=game.getPlayers().asList();
  Map<ClientTeam,List<ClientPlayer>> teams=new HashMap<ClientTeam,List<ClientPlayer>>();
  teams.put(ClientTeam.NONE,new ArrayList<ClientPlayer>());
  teams.put(ClientTeam.ALLIES,new ArrayList<ClientPlayer>());
  teams.put(ClientTeam.AXIS,new ArrayList<ClientPlayer>());
  Collections.sort(vals,new Comparator<ClientPlayer>(){
    @Override public int compare(    ClientPlayer a,    ClientPlayer b){
      return b.getKills() - a.getKills();
    }
  }
);
  for (  ClientPlayer player : vals) {
    ClientTeam team=player.getTeam();
    if (team != null) {
      teams.get(team).add(player);
    }
 else {
      teams.get(ClientTeam.NONE).add(player);
    }
  }
  int numberOfBlue=teams.get(ClientTeam.ALLIES).size();
  int numberOfRed=teams.get(ClientTeam.AXIS).size();
  int numberOfIndividuals=teams.get(ClientTeam.NONE).size();
  if (numberOfIndividuals > 0) {
    if (numberOfBlue > 0 || numberOfRed > 0) {
      y+=yIncBig;
      RenderFont.drawShadedString(canvas,"String_Node_Str",x,y,defaultColor);
      y=drawTeam(canvas,teams.get(ClientTeam.NONE),x,y);
    }
  }
  int redScore=this.teamScores.get(ClientTeam.AXIS);
  int blueScore=this.teamScores.get(ClientTeam.ALLIES);
  if (blueScore > redScore) {
    if (numberOfBlue > 0) {
      y+=yIncBig;
      RenderFont.drawShadedString(canvas,"String_Node_Str" + blueScore,x,y,ClientTeam.ALLIES.getColor());
      y=drawTeam(canvas,teams.get(ClientTeam.ALLIES),x,y);
    }
    if (numberOfRed > 0) {
      y+=yIncBig;
      RenderFont.drawShadedString(canvas,"String_Node_Str" + redScore,x,y,ClientTeam.AXIS.getColor());
      y=drawTeam(canvas,teams.get(ClientTeam.AXIS),x,y);
    }
  }
 else {
    if (numberOfRed > 0) {
      y+=yIncBig;
      RenderFont.drawShadedString(canvas,"String_Node_Str" + redScore,x,y,ClientTeam.AXIS.getColor());
      y=drawTeam(canvas,teams.get(ClientTeam.AXIS),x,y);
    }
    if (numberOfBlue > 0) {
      y+=yIncBig;
      RenderFont.drawShadedString(canvas,"String_Node_Str" + blueScore,x,y,ClientTeam.ALLIES.getColor());
      y=drawTeam(canvas,teams.get(ClientTeam.ALLIES),x,y);
    }
  }
  if (gameEnded) {
    String winner="String_Node_Str";
    int color=0xffffffff;
    if (winningTeam != null) {
      winner=winningTeam.getName() + "String_Node_Str";
      color=winningTeam.getColor();
    }
 else {
      if (blueScore > redScore) {
        winner="String_Node_Str";
        color=ClientTeam.ALLIES.getColor();
      }
 else       if (blueScore < redScore) {
        winner="String_Node_Str";
        color=ClientTeam.AXIS.getColor();
      }
 else {
        winner="String_Node_Str";
      }
    }
    y+=yIncBig;
    int strWidth=canvas.getWidth(winner);
    RenderFont.drawShadedString(canvas,winner,canvas.getWidth() / 2 - strWidth / 2,y,color);
  }
}

Fixed version (ground truth):
/** 
 * Renders the scoreboard
 * @param canvas
 */
public void drawScoreboard(Canvas canvas){
  if (!isVisible()) {
    return;
  }
  int yIncBig=50;
  int y=140;
  int x=40;
  setBigFont(canvas);
  int defaultColor=0xffffffff;
  RenderFont.drawShadedString(canvas,"String_Node_Str",x,y,defaultColor);
  List<ClientPlayer> vals=game.getPlayers().asList();
  Map<ClientTeam,List<ClientPlayer>> teams=new HashMap<ClientTeam,List<ClientPlayer>>();
  teams.put(ClientTeam.NONE,new ArrayList<ClientPlayer>());
  teams.put(ClientTeam.ALLIES,new ArrayList<ClientPlayer>());
  teams.put(ClientTeam.AXIS,new ArrayList<ClientPlayer>());
  Collections.sort(vals,new Comparator<ClientPlayer>(){
    @Override public int compare(    ClientPlayer a,    ClientPlayer b){
      return b.getKills() - a.getKills();
    }
  }
);
  for (  ClientPlayer player : vals) {
    ClientTeam team=player.getTeam();
    if (team != null) {
      teams.get(team).add(player);
    }
 else {
      teams.get(ClientTeam.NONE).add(player);
    }
  }
  int numberOfBlue=teams.get(ClientTeam.ALLIES).size();
  int numberOfRed=teams.get(ClientTeam.AXIS).size();
  int numberOfIndividuals=teams.get(ClientTeam.NONE).size();
  if (numberOfIndividuals > 0) {
    if (numberOfBlue > 0 || numberOfRed > 0) {
      y+=yIncBig;
      RenderFont.drawShadedString(canvas,"String_Node_Str",x,y,defaultColor);
      y=drawTeam(canvas,teams.get(ClientTeam.NONE),x,y);
    }
  }
  int redScore=this.teamScores.get(ClientTeam.AXIS);
  int blueScore=this.teamScores.get(ClientTeam.ALLIES);
  if (blueScore > redScore) {
    if (numberOfBlue > 0) {
      y+=yIncBig;
      RenderFont.drawShadedString(canvas,"String_Node_Str" + blueScore,x,y,ClientTeam.ALLIES.getColor());
      y=drawTeam(canvas,teams.get(ClientTeam.ALLIES),x,y);
    }
    if (numberOfRed > 0) {
      y+=yIncBig;
      RenderFont.drawShadedString(canvas,"String_Node_Str" + redScore,x,y,ClientTeam.AXIS.getColor());
      y=drawTeam(canvas,teams.get(ClientTeam.AXIS),x,y);
    }
  }
 else {
    if (numberOfRed > 0) {
      y+=yIncBig;
      RenderFont.drawShadedString(canvas,"String_Node_Str" + redScore,x,y,ClientTeam.AXIS.getColor());
      y=drawTeam(canvas,teams.get(ClientTeam.AXIS),x,y);
    }
    if (numberOfBlue > 0) {
      y+=yIncBig;
      RenderFont.drawShadedString(canvas,"String_Node_Str" + blueScore,x,y,ClientTeam.ALLIES.getColor());
      y=drawTeam(canvas,teams.get(ClientTeam.ALLIES),x,y);
    }
  }
  if (gameEnded) {
    String winner="String_Node_Str";
    int color=0xffffffff;
    if (winningTeam != null && winningTeam != ClientTeam.NONE) {
      winner=winningTeam.getName() + "String_Node_Str";
      color=winningTeam.getColor();
    }
 else {
      if (blueScore > redScore) {
        winner="String_Node_Str";
        color=ClientTeam.ALLIES.getColor();
      }
 else       if (blueScore < redScore) {
        winner="String_Node_Str";
        color=ClientTeam.AXIS.getColor();
      }
 else {
        winner="String_Node_Str";
      }
    }
    y+=yIncBig;
    int strWidth=canvas.getWidth(winner);
    RenderFont.drawShadedString(canvas,winner,canvas.getWidth() / 2 - strWidth / 2,y,color);
  }
}