Buggy code:
private Tile i ; private Tile j ; private Tile k ; private Tile l ; private final SubTile _d = new SubTile ( Part . BOTTOM_RIGHT ) ; private final SubTile _e = new SubTile ( Part . BOTTOM_LEFT ) ; private final SubTile _h = new SubTile ( Part . TOP_RIGHT ) ; private final SubTile _i = new SubTile ( Part . TOP_LEFT ) ; private final SubTileQuartet quartet = new SubTileQuartet ( _d , _e , _h , _i ) ; private int chunkX ; private int chunkY ; private int subtileX = - 1 ; private int subtileY = - 1 ; public TileRenderIterator ( ITileStorage tiles ) { } @ Override public boolean hasNext ( ) { } @ Override public SubTileQuartet next ( ) { a = b ; b = tiles . getTile ( chunkX , ( ( chunkY ) - ( ( step ) * 2 ) ) ) ; c = d ; d = e ; e = f ; f = tiles . getTile ( ( ( chunkX ) + ( step ) ) , ( ( chunkY ) - ( step ) ) ) ; g = h ; h = i ; i = j ; j = tiles . getTile ( ( ( chunkX ) + ( step ) ) , chunkY ) ; k = l ; l = tiles . getTile ( chunkX , ( ( chunkY ) + ( step ) ) ) ; quartet . setCoords ( subtileX , subtileY ) ; _d . tile = d ; _e . tile = e ; _h . tile = h ; _i . tile = i ; for ( SubTile subtile : quartet ) { subtile . shape = Shape . CONVEX ; } if ( TileRenderIterator . shouldStitchTo ( d , e ) ) { TileRenderIterator . stitchHorizontally ( _d ) ; } if ( TileRenderIterator . shouldStitchTo ( e , d ) ) { TileRenderIterator . stitchHorizontally ( _e ) ; } if ( TileRenderIterator . shouldStitchTo ( h , i ) ) { TileRenderIterator . stitchHorizontally ( _h ) ; } if ( TileRenderIterator . shouldStitchTo ( i , h ) ) { TileRenderIterator . stitchHorizontally ( _i ) ; } if ( TileRenderIterator . shouldStitchTo ( d , h ) ) { TileRenderIterator . stitchVertically ( _d ) ; if ( ( ( _d . shape ) == ( Shape . CONCAVE ) ) && ( TileRenderIterator . shouldStitchTo ( d , i ) ) ) { _d . shape = Shape . FULL ; } } if ( TileRenderIterator . shouldStitchTo ( h , d ) ) { TileRenderIterator . stitchVertically ( _h ) ; if ( ( ( _h . shape ) == ( Shape . CONCAVE ) ) && ( TileRenderIterator . shouldStitchTo ( h , e ) ) ) { _h . shape = Shape . FULL ; } } if ( TileRenderIterator . shouldStitchTo ( e , i ) ) { TileRenderIterator . stitchVertically ( _e ) ; if ( ( ( _e . shape ) == ( Shape . CONCAVE ) ) && ( TileRenderIterator . shouldStitchTo ( e , h ) ) ) { _e . shape = Shape . FULL ; } } if ( TileRenderIterator . shouldStitchTo ( i , e ) ) { TileRenderIterator . stitchVertically ( _i ) ; if ( ( ( _i . shape ) == ( Shape . CONCAVE ) ) && ( TileRenderIterator . shouldStitchTo ( i , d ) ) ) { _i . shape = Shape . FULL ; } } if ( ( ( ( _d . shape ) == ( Shape . CONVEX ) ) && ( ! ( TileRenderIterator . shouldStitchTo ( d , a ) ) ) ) && ( ! ( TileRenderIterator . shouldStitchTo ( d , c ) ) ) ) { _d . shape = Shape . SINGLE_OBJECT ; } if ( ( ( ( _e . shape ) == ( Shape . CONVEX ) ) && ( ! ( TileRenderIterator . shouldStitchTo ( e , b ) ) ) ) && ( ! ( TileRenderIterator . shouldStitchTo ( e , f ) ) ) ) { _e . shape = Shape . SINGLE_OBJECT ; } if ( ( ( ( _h . shape ) == ( Shape . CONVEX ) ) && ( ! ( TileRenderIterator . shouldStitchTo ( h , g ) ) ) ) && ( ! ( TileRenderIterator . shouldStitchTo ( h , k ) ) ) ) { _h . shape = Shape . SINGLE_OBJECT ; } <START_BUG> if ( ( ( ( _i . shape ) == ( Shape . CONVEX ) ) && ( ! ( TileRenderIterator . shouldStitchTo ( i , k ) ) ) ) && ( ! ( TileRenderIterator . shouldStitchTo ( i , l ) ) ) ) { <END_BUG> _i . shape = Shape . SINGLE_OBJECT ; } chunkX += step ; subtileX += 2 ; if ( ( chunkX ) > ( ( scope . maxX ) + 1 ) ) { chunkX = scope . minX ; subtileX = - 1 ; chunkY += step ; subtileY += 2 ; a = null ; b = null ; c = null ; d = null ; e = null ; f = tiles . getTile ( chunkX , ( ( chunkY ) - ( step ) ) ) ; g = null ; h = null ; i = null ; j = tiles . getTile ( chunkX , chunkY ) ; k = null ; l = null ; } return quartet ; } private static boolean shouldStitchTo ( Tile tile , Tile to ) { } private static void stitchVertically ( SubTile subtile ) { } private static void stitchHorizontally ( SubTile subtile ) { } @ Override public void remove ( ) { } }

Fix:
if ( ( ( ( _i . shape ) == ( Shape . CONVEX ) ) && ( ! ( TileRenderIterator . shouldStitchTo ( i , j ) ) ) ) && ( ! ( TileRenderIterator . shouldStitchTo ( i , l ) ) ) ) {