Two different animals. Stalemate is when one side is on the move and not in check, but has no legal moves and the game is automaticlly a draw. Three position repetition is when the same position has come up 3 times (not only just in a row) and the player on the move can claim a draw, but is not required to do so.