#vulnerable code 
                                @Override
    public void execute(CommandSender sender, String[] args) {
        MessagesConfig msg = Messages.getInstance();
        String tag = null;

        if (args.length > 0) {
            tag = args[0];
        } else if (sender instanceof Player) {
            User user = User.get((Player) sender);
            if (user.hasGuild()) {
                tag = user.getGuild().getTag();
            }
        }

        if (tag == null || tag.isEmpty()) {
            sender.sendMessage(msg.infoTag);
            return;
        }

        if (!GuildUtils.tagExists(tag)) {
            sender.sendMessage(msg.infoExists);
            return;
        }

        Guild guild = GuildUtils.byTag(tag);
        if (guild == null) {
            sender.sendMessage(msg.infoExists);
            return;
        }

        String validity = Settings.getConfig().dateFormat.format(new Date(guild.getValidity()));
        for (String m : msg.infoList) {
            m = StringUtils.replace(m, "{GUILD}", guild.getName());
            m = StringUtils.replace(m, "{TAG}", guild.getTag());
            m = StringUtils.replace(m, "{OWNER}", guild.getOwner().getName());
            m = StringUtils.replace(m, "{MEMBERS}", StringUtils.toString(UserUtils.getOnlineNames(guild.getMembers()), true));
            m = StringUtils.replace(m, "{POINTS}", Integer.toString(guild.getRank().getPoints()));
            m = StringUtils.replace(m, "{KILLS}", Integer.toString(guild.getRank().getKills()));
            m = StringUtils.replace(m, "{DEATHS}", Integer.toString(guild.getRank().getDeaths()));
            m = StringUtils.replace(m, "{KDR}", String.format(Locale.US, "%.2f", guild.getRank().getKDR()));
            m = StringUtils.replace(m, "{RANK}", Integer.toString(RankManager.getInstance().getPosition(guild)));
            m = StringUtils.replace(m, "{VALIDITY}", validity);
            m = StringUtils.replace(m, "{LIVES}", Integer.toString(guild.getLives()));
            
            if (guild.getAllies().size() > 0) {
                m = StringUtils.replace(m, "{ALLIES}", StringUtils.toString(GuildUtils.getNames(guild.getAllies()), true));
            } else {
                m = StringUtils.replace(m, "{ALLIES}", "Brak");
            }
            
            if (m.contains("<online>")) {
                String color = ChatColor.getLastColors(m.split("<online>")[0]);
                m = StringUtils.replace(m, "<online>", ChatColor.GREEN + "");
                m = StringUtils.replace(m, "</online>", color);
            }
            
            sender.sendMessage(m);
        }
    } 
                            #location 32 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Override
    public void execute(CommandSender sender, String[] args) {
        MessagesConfig messages = Messages.getInstance();
        String tag = null;

        if (args.length > 0) {
            tag = args[0];
        }
        else if (sender instanceof Player) {
            User user = User.get((Player) sender);

            if (user.hasGuild()) {
                tag = user.getGuild().getTag();
            }
        }

        if (tag == null || tag.isEmpty()) {
            sender.sendMessage(messages.infoTag);
            return;
        }

        if (!GuildUtils.tagExists(tag)) {
            sender.sendMessage(messages.infoExists);
            return;
        }

        Guild guild = GuildUtils.byTag(tag);

        if (guild == null) {
            sender.sendMessage(messages.infoExists);
            return;
        }

        String validity = Settings.getConfig().dateFormat.format(new Date(guild.getValidity()));

        for (String messageLine : messages.infoList) {
            messageLine = StringUtils.replace(messageLine, "{GUILD}", guild.getName());
            messageLine = StringUtils.replace(messageLine, "{TAG}", guild.getTag());
            messageLine = StringUtils.replace(messageLine, "{OWNER}", guild.getOwner().getName());
            messageLine = StringUtils.replace(messageLine, "{MEMBERS}", StringUtils.toString(UserUtils.getOnlineNames(guild.getMembers()), true));
            messageLine = StringUtils.replace(messageLine, "{POINTS}", Integer.toString(guild.getRank().getPoints()));
            messageLine = StringUtils.replace(messageLine, "{KILLS}", Integer.toString(guild.getRank().getKills()));
            messageLine = StringUtils.replace(messageLine, "{DEATHS}", Integer.toString(guild.getRank().getDeaths()));
            messageLine = StringUtils.replace(messageLine, "{KDR}", String.format(Locale.US, "%.2f", guild.getRank().getKDR()));
            messageLine = StringUtils.replace(messageLine, "{RANK}", Integer.toString(RankManager.getInstance().getPosition(guild)));
            messageLine = StringUtils.replace(messageLine, "{VALIDITY}", validity);
            messageLine = StringUtils.replace(messageLine, "{LIVES}", Integer.toString(guild.getLives()));
            
            if (guild.getAllies().size() > 0) {
                messageLine = StringUtils.replace(messageLine, "{ALLIES}", StringUtils.toString(GuildUtils.getNames(guild.getAllies()), true));
            } else {
                messageLine = StringUtils.replace(messageLine, "{ALLIES}", "Brak");
            }
            
            if (messageLine.contains("<online>")) {
                String color = ChatColor.getLastColors(messageLine.split("<online>")[0]);
                messageLine = StringUtils.replace(messageLine, "<online>", ChatColor.GREEN + "");
                messageLine = StringUtils.replace(messageLine, "</online>", color);
            }
            
            sender.sendMessage(messageLine);
        }
    }