Buggy code:
private void checkPrefixSuffix ( String word , int prefixSpace , int suffixSpace , ScrabbleTile [ ] [ ] scrabbleBoard , ArrayList < Character > rackAL , ArrayList < ScrabblePlay > plays , int x , int y ) { } public static String reverse ( String word ) { } private ScrabblePlay scoreWord ( ScrabbleTile [ ] [ ] scrabbleBoard , ArrayList < Character > rackAL , String word , int x , int y , int tilesAlreadyPlaced ) { ScrabbleTile [ ] [ ] scrabbleBoardTemp = new ScrabbleTile [ 15 ] [ 15 ] ; String wildcardMask = new String ( word ) ; ArrayList < Character > rackALcopy = new ArrayList < Character > ( rackAL ) ; rackALcopy . add ( scrabbleBoard [ x ] [ y ] . getLetter ( ) ) ; for ( int i = 0 ; i < ( word . length ( ) ) ; i ++ ) { if ( rackALcopy . contains ( word . charAt ( i ) ) ) { rackALcopy . remove ( ( ( Character ) ( word . charAt ( i ) ) ) ) ; } else { wildcardMask = ( ( wildcardMask . substring ( 0 , i ) ) + '*' ) + ( wildcardMask . substring ( ( i + 1 ) ) ) ; rackALcopy . remove ( ( ( Character ) ( '*' ) ) ) ; } } char anchorChar = scrabbleBoard [ x ] [ y ] . getLetter ( ) ; ArrayList < Integer > indices = new ArrayList < Integer > ( ) ; int lastIndex = 0 ; while ( lastIndex != ( - 1 ) ) { int index = word . indexOf ( anchorChar , lastIndex ) ; if ( index != ( - 1 ) ) { indices . add ( index ) ; } else { break ; } lastIndex = index + 1 ; } int largestScore = - 1 ; int bestDirection = 0 ; Coord horzOrigin ; Coord vertOrigin ; Coord bestOrigin = null ; int lettersPlaced ; for ( int anchor : indices ) { int scoreHorizontal = 0 ; int scoreVertical = 0 ; try { ArrayCopy2D ( scrabbleBoard , scrabbleBoardTemp , 15 , 15 ) ; lettersPlaced = tilesAlreadyPlaced ; horzOrigin = new Coord ( ( x - anchor ) , y ) ; for ( int i = 0 ; i < ( word . length ( ) ) ; i ++ ) { if ( i != anchor ) { if ( ! ( scrabbleBoard [ ( ( x + i ) - anchor ) ] [ y ] . isEmpty ( ) ) ) { if ( ( scrabbleBoard [ ( ( x + i ) - anchor ) ] [ y ] . getLetter ( ) ) != ( word . charAt ( i ) ) ) { scoreHorizontal = - 1 ; break ; } } else { scrabbleBoardTemp [ ( ( x + i ) - anchor ) ] [ y ] = new ScrabbleTile ( word . charAt ( i ) , true ) ; lettersPlaced ++ ; if ( ( wildcardMask . charAt ( i ) ) == '*' ) { scrabbleBoardTemp [ ( ( x + i ) - anchor ) ] [ y ] . setWildcard ( true ) ; } } } } if ( ( scoreHorizontal == 0 ) && ( ( lettersPlaced - tilesAlreadyPlaced ) > 0 ) ) { scoreHorizontal = verifyAndScore ( scrabbleBoardTemp , lettersPlaced ) ; } if ( scoreHorizontal > largestScore ) { bestOrigin = horzOrigin ; bestDirection = ScrabblePlay . HORIZONTAL ; largestScore = scoreHorizontal ; } } catch ( ArrayIndexOutOfBoundsException e ) { } try { ArrayCopy2D ( scrabbleBoard , scrabbleBoardTemp , 15 , 15 ) ; lettersPlaced = tilesAlreadyPlaced ; vertOrigin = new Coord ( x , ( y - anchor ) ) ; for ( int i = 0 ; i < ( word . length ( ) ) ; i ++ ) { if ( i != anchor ) { if ( ! ( scrabbleBoard [ x ] [ ( ( y + i ) - anchor ) ] . isEmpty ( ) ) ) { if ( ( scrabbleBoard [ ( ( x + i ) - anchor ) ] [ y ] . getLetter ( ) ) != ( word . charAt ( i ) ) ) { scoreVertical = - 1 ; break ; } } else { scrabbleBoardTemp [ x ] [ ( ( y + i ) - anchor ) ] = new ScrabbleTile ( word . charAt ( i ) , true ) ; lettersPlaced ++ ; if ( ( wildcardMask . charAt ( i ) ) == '*' ) { <START_BUG> scrabbleBoardTemp [ ( ( x + i ) - anchor ) ] [ y ] . setWildcard ( true ) ; <END_BUG> } } } } if ( ( scoreVertical == 0 ) && ( ( lettersPlaced - tilesAlreadyPlaced ) > 0 ) ) { scoreVertical = verifyAndScore ( scrabbleBoardTemp , lettersPlaced ) ; } if ( scoreVertical > largestScore ) { bestOrigin = vertOrigin ; bestDirection = ScrabblePlay . VERTICAL ; largestScore = scoreVertical ; } } catch ( ArrayIndexOutOfBoundsException e ) { } } if ( largestScore > 0 ) { return new ScrabblePlay ( bestOrigin , bestDirection , word , largestScore ) ; } return null ; } private int verifyAndScore ( ScrabbleTile [ ] [ ] board , int tilesPlaced ) { } private void ArrayCopy2D ( ScrabbleTile [ ] [ ] scrabbleBoard , ScrabbleTile [ ] [ ] scrabbleBoardTemp , int rows , int cols ) { } private int tileValue ( ScrabbleTile tile , int x , int y ) { } public static boolean contains ( Coord coord , Coord [ ] tripleWords2 ) { } }

Fix:
scrabbleBoardTemp [ x ] [ ( ( y + i ) - anchor ) ] . setWildcard ( true ) ;