#vulnerable code 
                             @EventHandler
	public void onFurnaceSmelt(FurnaceBurnEvent event) {
		Location location = event.getBlock().getLocation();
		GWorld world = gw.getTableManager().getWorldTable().getWorld(location.getWorld().getName());
		FurnaceTable furnaceTable = gw.getTableManager().getFurnaceTable();

		if (furnaceTable.getLocationMap().containsKey(location)) {
			Long uuid = furnaceTable.getLocationMap().get(location);
			Furnace furnace = furnaceTable.getFurnaceMap().get(uuid);
			// Note: We hold the owner of the furnace responsible for emissions
			// If the furnace isn't protected, the furnace owner is still charged
			GPlayer polluter = gw.getTableManager().getPlayerTable().getPlayers().get(furnace.getOwner().getUuid());
			Contribution emissions = ClimateEngine.getInstance().getClimateEngine(world.getWorldName()).furnaceBurn(polluter, event.getFuel());
			int carbonScore = polluter.getCarbonScore();
			polluter.setCarbonScore((int) (carbonScore + emissions.getContributionValue()));
			
			// TODO: Queue polluter score DB update
			// TODO: Queue new contribution DB insert
		} else {
			gw.getLogger().severe(event.getFuel().getType().name() + " burned as fuel in an untracked furnace!");
			gw.getLogger().severe("@ " + location.toString());
		}
	} 
                            #location 13 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @EventHandler
	public void onFurnaceSmelt(FurnaceBurnEvent event) {
		Location location = event.getBlock().getLocation();
		GWorld world = gw.getTableManager().getWorldTable().getWorld(location.getWorld().getName());
		FurnaceTable furnaceTable = gw.getTableManager().getFurnaceTable();
		GPlayer polluter;

		if (furnaceTable.getLocationMap().containsKey(location)) {
			Furnace furnace = furnaceTable.getFurnaceMap().get(furnaceTable.getLocationMap().get(location));
			polluter = furnace.getOwner(); // whoever placed the furnace is charged.
		} else {
			/*
			 * This might happen if a player has a redstone hopper setup that feeds untracked furnaces
			 * In this case, just consider it to be untracked emissions.
			 */
			PlayerTable playerTable = GlobalWarming.getInstance().getTableManager().getPlayerTable();
			polluter = playerTable.getOrCreatePlayer(untrackedUUID, true);

			// First create a new furnace object and store it
			Long uniqueId = GlobalWarming.getInstance().getRandom().nextLong();
			Furnace furnace = new Furnace(uniqueId, polluter, location, true);

			// Update all furnace collections
			furnaceTable.updateFurnace(furnace);

			// Create a new furnace insert query and queue it
			FurnaceInsertQuery insertQuery = new FurnaceInsertQuery(furnace);
			AsyncDBQueue.getInstance().queueInsertQuery(insertQuery);

			gw.getLogger().warning(event.getFuel().getType().name() + " burned as fuel in an untracked furnace!");
			gw.getLogger().warning("@ " + location.toString());
		}

		// Create a contribution object using this worlds climate engine
		Contribution contrib = ClimateEngine.getInstance().getClimateEngine(world.getWorldName()).furnaceBurn(polluter, event.getFuel());
		int carbonScore = polluter.getCarbonScore();
		polluter.setCarbonScore((int) (carbonScore + contrib.getContributionValue()));

		// Queue an update to the player table
		PlayerUpdateQuery updateQuery = new PlayerUpdateQuery(polluter);
		AsyncDBQueue.getInstance().queueUpdateQuery(updateQuery);

		// Queue an insert into the contributions table
		ContributionInsertQuery insertQuery = new ContributionInsertQuery(contrib);
		AsyncDBQueue.getInstance().queueInsertQuery(insertQuery);
	}