Buggy code:
public class Field extends TileMap { public static final int END = 0 ; public static final int CONTINUE = 1 ; public static final int NORMAL = 2 ; public static final int ANIMATE = 3 ; private static final int UP = 0 ; private static final int DOWN = 1 ; private static final int LEFT = 2 ; private static final int RIGHT = 3 ; private int state ; private List < MovingBlock > fallingBlocks ; private boolean checkBlocks ; public Field ( Tile [ ] [ ] map ) { } @ Override public void draw ( int x , int y ) { } public void update ( int delta ) { } public void reset ( ) { } public void addMap ( MovingBlock block , boolean breakBlocks ) { } public void addMap ( MovingBlock block ) { } public void addMap ( TileMap map , int rotation , int x , double y ) { } public void addMap ( Tile [ ] [ ] map , int x , double y , boolean breakBlocks ) { } private void findFallingBlocks ( ) { List < String > antiFallingBlocks = new ArrayList < > ( ) ; for ( int i = 0 ; i < ( map . length ) ; i ++ ) { for ( int j = 0 ; j < ( map [ i ] . length ) ; j ++ ) { if ( ( ( map [ i ] [ j ] ) instanceof LinkedTile ) && ( ! ( map [ i ] [ j ] . hasGravity ( ) ) ) ) { if ( ( ( i < ( ( map . length ) - 1 ) ) && ( ( map [ i ] [ j ] ) != null ) ) && ( ( ( map [ ( i + 1 ) ] [ j ] ) == null ) || ( ( ( map [ ( i + 1 ) ] [ j ] ) instanceof LinkedTile ) && ( ( ( LinkedTile ) ( map [ i ] [ j ] ) ) . getBlockId ( ) . equals ( ( ( LinkedTile ) ( map [ ( i + 1 ) ] [ j ] ) ) . getBlockId ( ) ) ) ) ) ) { fallingBlocks . add ( new MovingBlock ( new Tile [ ] [ ] { new Tile [ ] { map [ i ] [ j ] } } , TileMap . ROTATENONE , j , ( i * ( Config . BLOCKSIZE ) ) ) ) ; } else { antiFallingBlocks . add ( ( ( LinkedTile ) ( map [ i ] [ j ] ) ) . getBlockId ( ) ) ; } } else if ( i < ( ( map . length ) - 1 ) ) { if ( ( ( map [ i ] [ j ] ) != null ) && ( ( map [ ( i + 1 ) ] [ j ] ) == null ) ) { fallingBlocks . add ( new MovingBlock ( new Tile [ ] [ ] { new Tile [ ] { map [ i ] [ j ] } } , TileMap . ROTATENONE , j , ( i * ( Config . BLOCKSIZE ) ) ) ) ; } } } } for ( String blockId : antiFallingBlocks ) { for ( MovingBlock block : fallingBlocks ) { <START_BUG> if ( ( ( block . getMap ( ) [ 0 ] [ 0 ] ) instanceof LinkedTile ) && ( ( ( LinkedTile ) ( block . getMap ( ) [ 0 ] [ 0 ] ) ) . getBlockId ( ) . equals ( blockId ) ) ) { <END_BUG> fallingBlocks . remove ( block ) ; } } } for ( MovingBlock block : fallingBlocks ) { map [ ( ( ( int ) ( block . getY ( ) ) ) // ( Config . BLOCKSIZE ) ) ] [ block . getX ( ) ] = null ; } } private void breakBlocks ( ) { } public boolean isRoom ( MovingBlock block , double tolerance , boolean falling ) { } public boolean isRoom ( Tile [ ] [ ] map , int x , double y , double tolerance , boolean falling ) { } public void yLimit ( MovingBlock block , double tolerance ) { } public void updateState ( ) { } public int getState ( ) { } private boolean isFull ( ) { } private boolean isTunnel ( ) { } private boolean isTunnel ( int x , int y , int direction ) { } }

Fix:
if ( ( ( ( block . getMap ( ) [ 0 ] [ 0 ] ) instanceof LinkedTile ) && ( ! ( block . getMap ( ) [ 0 ] [ 0 ] . hasGravity ( ) ) ) ) && ( ( ( LinkedTile ) ( block . getMap ( ) [ 0 ] [ 0 ] ) ) . getBlockId ( ) . equals ( blockId ) ) ) {