Buggy code:
public class TileSet { private static Logger log = LogManager . getLogger ( TileSet . class ) ; public Map < String , BufferedImage > textures = new TreeMap < > ( ) ; public int tileSize = 24 ; private BufferedImage texture = new BufferedImage ( tileSize , tileSize , BufferedImage . TYPE_4BYTE_ABGR ) ; private EventBus eventBus ; public TileSet ( final Path path , final EventBus eventBus ) { } private void load ( final Path path ) throws IOException { JsonNode root = new ObjectMapper ( ) . readTree ( path . resolve ( "tile_config.json" ) . toFile ( ) ) ; TileSet . log . debug ( ( "TileSet<seq2seq4repair_space>Size:<seq2seq4repair_space>" + ( root . get ( "tile_info" ) . get ( 0 ) ) ) ) ; tileSize = root . get ( "tile_info" ) . get ( 0 ) . get ( "width" ) . asInt ( ) ; Path tileImagePath = null ; JsonNode tiles ; if ( root . has ( "tiles-new" ) ) { tiles = root . get ( "tiles-new" ) . get ( 0 ) . get ( "tiles" ) ; if ( root . get ( "tiles-new" ) . get ( 0 ) . has ( "file" ) ) { <START_BUG> tileImagePath = Paths . get ( root . get ( "tiles-new" ) . get ( 0 ) . get ( "file" ) . asText ( ) ) ; <END_BUG> } } else { tiles = root . get ( "tiles" ) ; } if ( tileImagePath == null ) { Optional < Path > potentialPath = Files . find ( path , 1 , ( path1 , basicFileAttributes ) -> path1 . getFileName ( ) . toString ( ) . endsWith ( ".png" ) ) . findFirst ( ) ; if ( potentialPath . isPresent ( ) ) { tileImagePath = potentialPath . get ( ) ; } else { throw new IOException ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>tileset<seq2seq4repair_space>image<seq2seq4repair_space>for<seq2seq4repair_space>tileset<seq2seq4repair_space>'" + path ) + "'." ) ) ; } } try { texture = ImageIO . read ( tileImagePath . toFile ( ) ) ; } catch ( IOException e ) { TileSet . log . error ( ( ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>attempting<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>tileset<seq2seq4repair_space>image<seq2seq4repair_space>'" + ( tileImagePath . toString ( ) ) ) + "':" ) , e ) ; } tiles . forEach ( ( tileDef ) -> { TileConfiguration tileConfiguration = new TileConfiguration ( tileDef . get ( "id" ) . asText ( ) ) ; int foreground = - 1 ; int background = - 1 ; if ( tileDef . has ( "fg" ) ) { foreground = tileDef . get ( "fg" ) . asInt ( ) ; } if ( tileDef . has ( "bg" ) ) { background = tileDef . get ( "bg" ) . asInt ( ) ; } if ( tileDef . has ( "rotates" ) ) { tileConfiguration . rotates = tileDef . get ( "rotates" ) . asBoolean ( ) ; } createTileImage ( tileConfiguration . getID ( ) , foreground , background ) ; if ( ( tileDef . has ( "multitile" ) ) && ( tileDef . get ( "multitile" ) . asBoolean ( ) ) ) { tileDef . get ( "additional_tiles" ) . forEach ( ( additionalTileDef ) -> { TileConfiguration additionalTileConfiguration = new TileConfiguration ( ( ( ( tileConfiguration . getID ( ) ) + ">>" ) + ( additionalTileDef . get ( "id" ) . asText ( ) ) ) ) ; int foregroundID = - 1 ; int backgroundID = - 1 ; if ( additionalTileDef . has ( "fg" ) ) { foregroundID = additionalTileDef . get ( "fg" ) . asInt ( ) ; } if ( additionalTileDef . has ( "bg" ) ) { backgroundID = additionalTileDef . get ( "bg" ) . asInt ( ) ; } if ( additionalTileDef . has ( "rotates" ) ) { additionalTileConfiguration . rotates = additionalTileDef . get ( "rotates" ) . asBoolean ( ) ; } createTileImage ( additionalTileConfiguration . getID ( ) , foregroundID , backgroundID ) ; tileConfiguration . addMultiTile ( additionalTileConfiguration , AdditionalTileType . valueOf ( additionalTileDef . get ( "id" ) . asText ( ) . toUpperCase ( ) ) ) ; } ) ; } tiles . put ( tileDef . get ( "id" ) . asText ( ) , tileConfiguration ) ; } ) ; eventBus . post ( new TilesetLoadedEvent ( this ) ) ; } private void createTileImage ( String id , final int foreground , final int background ) { } }

Fix:
tileImagePath = ApplicationSettings . getInstance ( ) . getPath ( GAME_FOLDER ) . resolve ( Paths . get ( root . get ( "tiles-new" ) . get ( 0 ) . get ( "file" ) . asText ( ) ) ) ;