Buggy code:
public class Grid { private class NConnectedSequers { public boolean isNotNull = false ; public ArrayList < int [ ] > sequersPostion = new ArrayList < > ( ) ; } public Grid ( ) { } public void validMoves ( List < Integer > valid ) { } public int lastRow ( int col ) { } public void removeMove ( int col , int row ) { } public void drawBoard ( ) { } public boolean refreshBoard ( int col , char disc ) { } public boolean boardFull ( ) { } public List < Integer > checkLines ( char p ) { } private List < Integer > checkR ( int n , int col , int row ) { } private Grid . NConnectedSequers checkRWhitPostions ( int n , int col , int row ) { } private List < Integer > checkC ( int n , int col , int row ) { } private Grid . NConnectedSequers checkCWhitPostions ( int n , int col , int row ) { } private List < Integer > checkDU ( int n , int col , int row ) { } private Grid . NConnectedSequers checkDUWhitPostions ( int n , int col , int row ) { } private List < Integer > checkDD ( int n , int col , int row ) { } private Grid . NConnectedSequers checkDDWhitPostions ( int n , int col , int row ) { } private boolean diagonalNE ( char player , int col , int row ) { } private boolean diagonalSE ( char player , int col , int row ) { } private boolean vertical ( char player , int col , int row ) { } private boolean horizontal ( char player , int col , int row ) { } public boolean hasWon ( char player ) { int startPointDSE = 0 ; int startPointDNE = 0 ; if ( player == 'X' ) { startPointDSE = ( this . x_LastTry_C ) + ( this . x_lastTry_R ) ; startPointDNE = ( this . x_LastTry_C ) - ( this . x_lastTry_R ) ; if ( ( this . x_lastTry_R ) >= 3 ) { if ( this . vertical ( player , this . x_LastTry_C , this . x_lastTry_R ) ) { this . hasWon = true ; return hasWon ; } } if ( this . horizontal ( player , 0 , this . x_lastTry_R ) ) { this . hasWon = true ; return hasWon ; } } else { startPointDSE = ( this . y_LastTry_C ) + ( this . y_lastTry_R ) ; startPointDNE = ( this . y_LastTry_C ) - ( this . y_lastTry_R ) ; if ( ( this . y_lastTry_R ) >= 3 ) { if ( this . vertical ( player , this . y_LastTry_C , this . y_lastTry_R ) ) { this . hasWon = true ; return hasWon ; } } <START_BUG> if ( this . horizontal ( player , 0 , this . x_lastTry_R ) ) { <END_BUG> this . hasWon = true ; return hasWon ; } } if ( startPointDNE == 0 ) { if ( this . diagonalNE ( player , startPointDNE , startPointDNE ) ) { this . hasWon = true ; return hasWon ; } } else if ( ( startPointDNE < 0 ) && ( startPointDNE > ( - 3 ) ) ) { if ( this . diagonalNE ( player , 0 , Math . abs ( startPointDNE ) ) ) { this . hasWon = true ; return hasWon ; } } else if ( ( startPointDNE > 0 ) && ( startPointDNE < 4 ) ) { if ( this . diagonalNE ( player , startPointDNE , 0 ) ) { this . hasWon = true ; return hasWon ; } } if ( ( startPointDSE >= 3 ) && ( startPointDSE <= 5 ) ) { if ( this . diagonalSE ( player , 0 , startPointDSE ) ) { this . hasWon = true ; return hasWon ; } } else if ( ( startPointDSE >= 6 ) && ( startPointDSE <= 8 ) ) { if ( this . diagonalSE ( player , ( startPointDSE - 5 ) , 5 ) ) { this . hasWon = true ; return hasWon ; } } return false ; } public boolean getHasWon ( ) { } private int x_LastTry_C ; private int x_lastTry_R ; private int y_LastTry_C ; private int y_lastTry_R ; private boolean hasWon ; private int rows ; private int cols ; private char [ ] [ ] grid ; }

Fix:
if ( this . horizontal ( player , 0 , this . y_lastTry_R ) ) {