Program: 158757
Project: 158757
Buggy source:
/** 
 */
@Override public void updateResults(){
  for (  TournamentPlayer player : players.values()) {
    player.setResults("String_Node_Str");
    player.setPoints(0);
    player.setStateInfo("String_Node_Str");
  }
  for (  Round round : rounds) {
    for (    TournamentPairing pair : round.getPairs()) {
      Match match=pair.getMatch();
      if (match != null && match.hasEnded()) {
        TournamentPlayer tp1=pair.getPlayer1();
        TournamentPlayer tp2=pair.getPlayer2();
        MatchPlayer mp1=match.getPlayer(pair.getPlayer1().getPlayer().getId());
        MatchPlayer mp2=match.getPlayer(pair.getPlayer2().getPlayer().getId());
        if (round.getRoundNumber() == rounds.size()) {
          match.setTournamentRound(round.getRoundNumber());
          if (tp1.getState().equals(TournamentPlayerState.DUELING)) {
            if (round.getRoundNumber() == getNumberRounds()) {
              tp1.setState(TournamentPlayerState.FINISHED);
            }
 else {
              tp1.setState(TournamentPlayerState.WAITING);
            }
          }
          if (tp2.getState().equals(TournamentPlayerState.DUELING)) {
            if (round.getRoundNumber() == getNumberRounds()) {
              tp2.setState(TournamentPlayerState.FINISHED);
            }
 else {
              tp2.setState(TournamentPlayerState.WAITING);
            }
          }
        }
        tp1.setResults(addRoundResult(round.getRoundNumber(),pair,tp1,tp2));
        tp2.setResults(addRoundResult(round.getRoundNumber(),pair,tp2,tp1));
        if (mp2.hasQuit() || mp1.getWins() > mp2.getWins()) {
          tp1.setPoints(tp1.getPoints() + 3);
        }
 else         if (mp1.hasQuit() || mp1.getWins() < mp2.getWins()) {
          tp2.setPoints(tp2.getPoints() + 3);
        }
 else {
          tp1.setPoints(tp1.getPoints() + 1);
          tp2.setPoints(tp2.getPoints() + 1);
        }
      }
    }
    for (    TournamentPlayer tp : round.getPlayerByes()) {
      tp.setResults(new StringBuilder(tp.getResults()).append("String_Node_Str").append(round.getRoundNumber()).append("String_Node_Str").append("String_Node_Str").toString());
      tp.setPoints(tp.getPoints() + 3);
    }
  }
}

Fixed version (ground truth):
/** 
 */
@Override public void updateResults(){
  for (  TournamentPlayer player : players.values()) {
    player.setResults("String_Node_Str");
    player.setPoints(0);
    player.setStateInfo("String_Node_Str");
  }
  for (  Round round : rounds) {
    for (    TournamentPairing pair : round.getPairs()) {
      Match match=pair.getMatch();
      if (match != null && match.hasEnded()) {
        TournamentPlayer tp1=pair.getPlayer1();
        TournamentPlayer tp2=pair.getPlayer2();
        MatchPlayer mp1=match.getPlayer(pair.getPlayer1().getPlayer().getId());
        MatchPlayer mp2=match.getPlayer(pair.getPlayer2().getPlayer().getId());
        if (round.getRoundNumber() == rounds.size()) {
          match.setTournamentRound(round.getRoundNumber());
          if (tp1.getState().equals(TournamentPlayerState.DUELING)) {
            if (round.getRoundNumber() == getNumberRounds()) {
              tp1.setState(TournamentPlayerState.FINISHED);
            }
 else {
              tp1.setState(TournamentPlayerState.WAITING);
            }
          }
          if (tp2.getState().equals(TournamentPlayerState.DUELING)) {
            if (round.getRoundNumber() == getNumberRounds()) {
              tp2.setState(TournamentPlayerState.FINISHED);
            }
 else {
              tp2.setState(TournamentPlayerState.WAITING);
            }
          }
        }
        tp1.setResults(addRoundResult(round.getRoundNumber(),pair,tp1,tp2));
        tp2.setResults(addRoundResult(round.getRoundNumber(),pair,tp2,tp1));
        if ((!mp1.hasQuit() && mp1.getWins() > mp2.getWins()) || mp2.hasQuit()) {
          tp1.setPoints(tp1.getPoints() + 3);
        }
 else         if ((!mp2.hasQuit() && mp1.getWins() < mp2.getWins()) || mp1.hasQuit()) {
          tp2.setPoints(tp2.getPoints() + 3);
        }
 else {
          tp1.setPoints(tp1.getPoints() + 1);
          tp2.setPoints(tp2.getPoints() + 1);
        }
      }
    }
    for (    TournamentPlayer tp : round.getPlayerByes()) {
      tp.setResults(new StringBuilder(tp.getResults()).append("String_Node_Str").append(round.getRoundNumber()).append("String_Node_Str").append("String_Node_Str").toString());
      tp.setPoints(tp.getPoints() + 3);
    }
  }
}