#vulnerable code 
                                public void load() {
        Database db = Database.getInstance();
        PluginConfig config = Settings.getConfig();

        usersTable(db);
        regionsTable(db);
        guildsTable(db);

        Database.getInstance().executeQuery("SELECT * FROM `" + config.mysql.usersTableName + "`", usersResult -> {
            try {
                while (usersResult.next()) {
                    User user = DatabaseUser.deserialize(usersResult);
                    if (user != null) {
                        user.changed();
                    }
                }

                FunnyLogger.info("Loaded users: " + UserUtils.getUsers().size());
            } catch (Exception e) {
                if (FunnyLogger.exception(e.getCause())) {
                    e.printStackTrace();
                }
            }
        });


        if (Settings.getConfig().regionsEnabled) {
            Database.getInstance().executeQuery("SELECT * FROM `" + config.mysql.regionsTableName + "`", regionsResult -> {
                try {
                    while (regionsResult.next()) {
                        Region region = DatabaseRegion.deserialize(regionsResult);
                        if (region != null) {
                            region.changed();
                        }
                    }

                    FunnyLogger.info("Loaded regions: " + RegionUtils.getRegions().size());
                } catch (Exception e) {
                    if (FunnyLogger.exception(e.getCause())) {
                        e.printStackTrace();
                    }
                }
            });

        } else {
            FunnyLogger.info("Regions are disabled and thus - not loaded");
        }

        Database.getInstance().executeQuery("SELECT * FROM `" + config.mysql.guildsTableName + "`", guildsResult -> {
            try {
                while (guildsResult.next()) {
                    Guild guild = DatabaseGuild.deserialize(guildsResult);
                    if (guild != null) {
                        guild.changed();
                    }
                }

                FunnyLogger.info("Loaded guilds: " + GuildUtils.getGuilds().size());
            } catch (Exception e) {
                if (FunnyLogger.exception(e.getCause())) {
                    e.printStackTrace();
                }
            }
        });

        // TODO
        for (Guild guild : GuildUtils.getGuilds()) {
            if (guild.getOwner() != null) {
                continue;
            }

            GuildUtils.deleteGuild(guild);
        }

        ConcurrencyManager concurrencyManager = FunnyGuilds.getInstance().getConcurrencyManager();
        concurrencyManager.postRequests(new PrefixGlobalUpdateRequest());
    } 
                            #location 76 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                public void load() {
        Database db = Database.getInstance();
        PluginConfig config = Settings.getConfig();

        usersTable(db);
        regionsTable(db);
        guildsTable(db);

        Database.getInstance().executeQuery("SELECT * FROM `" + config.mysql.usersTableName + "`", usersResult -> {
            try {
                while (usersResult.next()) {
                    User user = DatabaseUser.deserialize(usersResult);
                    if (user != null) {
                        user.changed();
                    }
                }

                FunnyLogger.info("Loaded users: " + UserUtils.getUsers().size());
            } catch (Exception e) {
                if (FunnyLogger.exception(e.getCause())) {
                    e.printStackTrace();
                }
            }
        });


        if (Settings.getConfig().regionsEnabled) {
            Database.getInstance().executeQuery("SELECT * FROM `" + config.mysql.regionsTableName + "`", regionsResult -> {
                try {
                    while (regionsResult.next()) {
                        Region region = DatabaseRegion.deserialize(regionsResult);
                        if (region != null) {
                            region.changed();
                        }
                    }

                    FunnyLogger.info("Loaded regions: " + RegionUtils.getRegions().size());
                } catch (Exception e) {
                    if (FunnyLogger.exception(e.getCause())) {
                        e.printStackTrace();
                    }
                }
            });

        } else {
            FunnyLogger.info("Regions are disabled and thus - not loaded");
        }

        Database.getInstance().executeQuery("SELECT * FROM `" + config.mysql.guildsTableName + "`", guildsResult -> {
            try {
                while (guildsResult.next()) {
                    Guild guild = DatabaseGuild.deserialize(guildsResult);
                    if (guild != null) {
                        guild.changed();
                    }
                }

                FunnyLogger.info("Loaded guilds: " + GuildUtils.getGuilds().size());
            } catch (Exception e) {
                if (FunnyLogger.exception(e.getCause())) {
                    e.printStackTrace();
                }
            }
        });

        Database.getInstance().executeQuery("SELECT `tag`, `allies`, `enemies` FROM `" + config.mysql.guildsTableName + "`", result -> {
            try {
                while (result.next()) {
                    Guild guild = GuildUtils.getByTag(result.getString("tag"));

                    if (guild == null) {
                        continue;
                    }

                    String alliesList = result.getString("allies");
                    String enemiesList = result.getString("enemies");

                    List<Guild> allies = new ArrayList<>();

                    if (alliesList != null && !alliesList.equals("")) {
                        allies = GuildUtils.getGuilds(ChatUtils.fromString(alliesList));
                    }

                    List<Guild> enemies = new ArrayList<>();

                    if (enemiesList != null && !enemiesList.equals("")) {
                        enemies = GuildUtils.getGuilds(ChatUtils.fromString(enemiesList));
                    }

                    guild.setAllies(allies);
                    guild.setEnemies(enemies);
                }
            }
            catch (Exception ex) {
                if (FunnyLogger.exception(ex.getCause())) {
                    ex.printStackTrace();
                }
            }
        });

        // TODO
        for (Guild guild : GuildUtils.getGuilds()) {
            if (guild.getOwner() != null) {
                continue;
            }

            GuildUtils.deleteGuild(guild);
        }

        ConcurrencyManager concurrencyManager = FunnyGuilds.getInstance().getConcurrencyManager();
        concurrencyManager.postRequests(new PrefixGlobalUpdateRequest());
    }