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

        if (args.length < 1) {
            player.sendMessage(messages.generalNoTagGiven);
            return;
        }

        if (!GuildUtils.tagExists(args[0])) {
            player.sendMessage(messages.generalNoGuildFound);
            return;
        }

        PluginConfig config = Settings.getConfig();
        Location location = player.getLocation();
        if (config.createCenterY != 0) {
            location.setY(config.createCenterY);
        }

        int d = config.regionSize + config.createDistance;
        if (config.enlargeItems != null) {
            d = config.enlargeItems.size() * config.enlargeSize + d;
        }

        if (d > player.getWorld().getSpawnLocation().distance(location)) {
            player.sendMessage(messages.createSpawn.replace("{DISTANCE}", Integer.toString(d)));
            return;
        }

        if (RegionUtils.isNear(location)) {
            player.sendMessage(messages.createIsNear);
            return;
        }

        Guild guild = GuildUtils.byTag(args[0]);
        Region region = RegionUtils.get(guild.getRegion());
        
        if (region == null) {
            region = new Region(guild, location, config.regionSize);
        } else {
            if (config.createStringMaterial.equalsIgnoreCase("ender crystal")) {
                EntityUtil.despawn(guild);
            } else {
                Block block = region.getCenter().getBlock().getRelative(BlockFace.DOWN);
                if (block.getLocation().getBlockY() > 1) {
                    block.setType(Material.AIR);
                }
            }
            
            region.setCenter(location);
        }
        
        if (config.createCenterSphere) {
            List<Location> sphere = SpaceUtils.sphere(location, 3, 3, false, true, 0);
            for (Location l : sphere) {
                if (l.getBlock().getType() != Material.BEDROCK) {
                    l.getBlock().setType(Material.AIR);
                }
            }
        }
        
        if (config.createMaterial != null && config.createMaterial != Material.AIR) {
            location.getBlock().getRelative(BlockFace.DOWN).setType(config.createMaterial);
        } else if (config.createStringMaterial.equalsIgnoreCase("ender crystal")) {
            EntityUtil.spawn(guild);
        }

        player.sendMessage(messages.adminGuildRelocated.replace("{GUILD}", guild.getName()));
    } 
                            #location 38 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Override
    public void execute(CommandSender sender, String[] args) {
        MessagesConfig messages = Messages.getInstance();
        PluginConfig config = Settings.getConfig();
        Player player = (Player) sender;

        if (args.length < 1) {
            player.sendMessage(messages.generalNoTagGiven);
            return;
        }

        Guild guild = GuildUtils.byTag(args[0]);

        if (guild == null) {
            player.sendMessage(messages.generalNoGuildFound);
            return;
        }

        Location location = player.getLocation();

        if (config.createCenterY != 0) {
            location.setY(config.createCenterY);
        }

        int d = config.regionSize + config.createDistance;

        if (config.enlargeItems != null) {
            d = config.enlargeItems.size() * config.enlargeSize + d;
        }

        if (d > player.getWorld().getSpawnLocation().distance(location)) {
            player.sendMessage(messages.createSpawn.replace("{DISTANCE}", Integer.toString(d)));
            return;
        }

        if (RegionUtils.isNear(location)) {
            player.sendMessage(messages.createIsNear);
            return;
        }

        Region region = RegionUtils.get(guild.getRegion());
        
        if (region == null) {
            region = new Region(guild, location, config.regionSize);
        } else {
            if (config.createStringMaterial.equalsIgnoreCase("ender crystal")) {
                EntityUtil.despawn(guild);
            } else {
                Block block = region.getCenter().getBlock().getRelative(BlockFace.DOWN);
                if (block.getLocation().getBlockY() > 1) {
                    block.setType(Material.AIR);
                }
            }
            
            region.setCenter(location);
        }
        
        if (config.createCenterSphere) {
            List<Location> sphere = SpaceUtils.sphere(location, 3, 3, false, true, 0);
            for (Location l : sphere) {
                if (l.getBlock().getType() != Material.BEDROCK) {
                    l.getBlock().setType(Material.AIR);
                }
            }
        }
        
        if (config.createMaterial != null && config.createMaterial != Material.AIR) {
            location.getBlock().getRelative(BlockFace.DOWN).setType(config.createMaterial);
        } else if (config.createStringMaterial.equalsIgnoreCase("ender crystal")) {
            EntityUtil.spawn(guild);
        }

        player.sendMessage(messages.adminGuildRelocated.replace("{GUILD}", guild.getName()).replace("{REGION}", region.getName()));
    }