Input:
	private void handleKeyInput() {
		if(isKeyPressed(KeyConfig.openMenu, KeyConfig.IDX_OPENSETTINGS)) {
			if(Minecraft.getMinecraft().currentScreen == null) {
				Minecraft.getMinecraft().displayGuiScreen(new GuiSettings());
			}
		}
		if(isKeyPressed(KeyConfig.toggleRecording, KeyConfig.IDX_TOGGLERECORDING)) {
			EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
			EiraPlayerInfo playerInfo = EiraIRC.instance.getNetHandler().getPlayerInfo(player.username);
			playerInfo.isRecording = !playerInfo.isRecording;
			Packet packet = new PacketRecLiveState(player.username, playerInfo.isRecording, playerInfo.isLive).createPacket();
			if(packet != null) {
				player.sendQueue.addToSendQueue(packet);
			}
		}
		if(isKeyPressed(KeyConfig.toggleLive, KeyConfig.IDX_TOGGLELIVE)) {
			EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
			EiraPlayerInfo playerInfo = EiraIRC.instance.getNetHandler().getPlayerInfo(player.username);
			playerInfo.isLive = !playerInfo.isLive;
			Packet packet = new PacketRecLiveState(player.username, playerInfo.isRecording, playerInfo.isLive).createPacket();
			if(packet != null) {
				player.sendQueue.addToSendQueue(packet);
			}
		}
		if(isKeyPressed(KeyConfig.screenshotShare, KeyConfig.IDX_SCREENSHOTSHARE)) {
			if(Minecraft.getMinecraft().currentScreen instanceof GuiKeybinds) {
				Screenshot screenshot = ScreenshotManager.getInstance().takeScreenshot();
				ScreenshotManager.getInstance().uploadScreenshot(screenshot);
				ScreenshotManager.getInstance().shareScreenshot(screenshot);
			}
		}
	}

Output:
	private void handleKeyInput() {
		if(Minecraft.getMinecraft().currentScreen instanceof GuiKeybinds) {
			return;
		}
		if(isKeyPressed(KeyConfig.openMenu, KeyConfig.IDX_OPENSETTINGS)) {
			if(Minecraft.getMinecraft().currentScreen == null) {
				Minecraft.getMinecraft().displayGuiScreen(new GuiSettings());
			}
		}
		if(isKeyPressed(KeyConfig.toggleRecording, KeyConfig.IDX_TOGGLERECORDING)) {
			EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
			EiraPlayerInfo playerInfo = EiraIRC.instance.getNetHandler().getPlayerInfo(player.username);
			playerInfo.isRecording = !playerInfo.isRecording;
			Packet packet = new PacketRecLiveState(player.username, playerInfo.isRecording, playerInfo.isLive).createPacket();
			if(packet != null) {
				player.sendQueue.addToSendQueue(packet);
			}
		}
		if(isKeyPressed(KeyConfig.toggleLive, KeyConfig.IDX_TOGGLELIVE)) {
			EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
			EiraPlayerInfo playerInfo = EiraIRC.instance.getNetHandler().getPlayerInfo(player.username);
			playerInfo.isLive = !playerInfo.isLive;
			Packet packet = new PacketRecLiveState(player.username, playerInfo.isRecording, playerInfo.isLive).createPacket();
			if(packet != null) {
				player.sendQueue.addToSendQueue(packet);
			}
		}
		if(isKeyPressed(KeyConfig.screenshotShare, KeyConfig.IDX_SCREENSHOTSHARE)) {
			Screenshot screenshot = ScreenshotManager.getInstance().takeScreenshot();
			ScreenshotManager.getInstance().uploadScreenshot(screenshot);
			ScreenshotManager.getInstance().shareScreenshot(screenshot);
		}
	}


Input:
    public void visitMethodInsn(final int opcode, final String owner, final String name, final String desc) {
        final String opString = Printer.OPCODES[opcode];
        final String decompiledOwnerFullClassName = DeclarationWorker.decompileFullClassName(owner);
        final String ownerClassName = decompileClassNameWithOuterClasses(owner);
        List<Expression> arguments = getInvocationArguments(desc);
        String returnType = getInvocationReturnType(desc);
        final boolean hasVoidReturnType = hasVoidReturnType(desc);
        String invocationName = name;
        boolean isStaticInvocation = false;
        if (opString.contains("INVOKEVIRTUAL") || opString.contains("INVOKEINTERFACE")) {
            if (!name.equals("<init>")) {
                appendInstanceInvocation(name, hasVoidReturnType ? "" : returnType, arguments, myBodyStack.pop());
                return;
            }
        }
        if (opString.contains("INVOKESPECIAL")) {
            if (name.equals("<init>")) {
                final Expression lambdaFunction = tryVisitLambdaFunction(owner);
                if (lambdaFunction != null) {
                    myBodyStack.pop();
                    myBodyStack.pop();
                    myBodyStack.push(lambdaFunction);
                    return;
                }
                myDecompiledMethod.addImport(decompiledOwnerFullClassName);
                invocationName = ownerClassName;
                returnType = invocationName + " ";
            } else if (!myDecompiledOwnerFullClassName.equals(decompiledOwnerFullClassName)) {
                invocationName = "super<" + ownerClassName + ">."  + name;
            }
        }
        if (opString.contains("INVOKESTATIC")) {
            myDecompiledMethod.addImport(decompiledOwnerFullClassName);
            if (!ownerClassName.equals("KotlinPackage")) {
                if (!decompiledOwnerFullClassName.contains(".src.")) {
                    invocationName = ownerClassName + "." + name;
                } else {
                    invocationName = name;
                }
            } else {
                appendInstanceInvocation(name, hasVoidReturnType ? "" : returnType, arguments, arguments.remove(0));
                return;
            }
            isStaticInvocation = true;
            if (name.equals("checkParameterIsNotNull")) {
                ((KotlinVariable) arguments.get(0)).setIsNotNull(true);
                return;
            }
        }
        appendInvocationOrConstructor(isStaticInvocation, name, invocationName, hasVoidReturnType ? "" : returnType, arguments, decompiledOwnerFullClassName);
    }

Output:
    public void visitMethodInsn(final int opcode, final String owner, final String name, final String desc) {
        final String opString = Printer.OPCODES[opcode];
        final String decompiledOwnerFullClassName = DeclarationWorker.decompileFullClassName(owner);
        final String ownerClassName = decompileClassNameWithOuterClasses(owner);
        List<Expression> arguments = getInvocationArguments(desc);
        String returnType = getInvocationReturnType(desc);
        final boolean hasVoidReturnType = hasVoidReturnType(desc);
        String invocationName = name;
        boolean isStaticInvocation = false;
        if (opString.contains("INVOKEVIRTUAL") || opString.contains("INVOKEINTERFACE")) {
            if (!name.equals("<init>")) {
                appendInstanceInvocation(name, hasVoidReturnType ? "" : returnType, arguments, myBodyStack.pop());
                return;
            }
        }
        if (opString.contains("INVOKESPECIAL")) {
            if (name.equals("<init>")) {
                final Expression lambdaFunction = tryVisitLambdaFunction(owner);
                if (lambdaFunction != null) {
                    myBodyStack.pop();
                    myBodyStack.pop();
                    myBodyStack.push(lambdaFunction);
                    return;
                }
                myDecompiledMethod.addImport(decompiledOwnerFullClassName);
                invocationName = ownerClassName;
                returnType = invocationName + " ";
            } else if (!myDecompiledOwnerFullClassName.equals(decompiledOwnerFullClassName)) {
                invocationName = "super<" + ownerClassName + ">."  + name;
            }
        }
        if (opString.contains("INVOKESTATIC")) {
            myDecompiledMethod.addImport(decompiledOwnerFullClassName);
            if (!ownerClassName.equals("KotlinPackage") && !ownerClassName.equals(myDecompiledMethod.getDecompiledClass().getName())) {
                if (!decompiledOwnerFullClassName.contains(".src.")) {
                    if (ownerClassName.contains("..")) {
                        invocationName = "super<" + ownerClassName.substring(0, ownerClassName.indexOf("..")) + ">."  + name;
                        appendInstanceInvocation(invocationName, hasVoidReturnType ? "" : returnType, arguments, arguments.remove(0));
                        return;
                    } else {
                        invocationName = ownerClassName + "." + name;
                    }
                } else {
                    invocationName = name;
                }
            } else {
                appendInstanceInvocation(name, hasVoidReturnType ? "" : returnType, arguments, arguments.remove(0));
                return;
            }
            isStaticInvocation = true;
            if (name.equals("checkParameterIsNotNull")) {
                ((KotlinVariable) arguments.get(0)).setIsNotNull(true);
                return;
            }
        }
        appendInvocationOrConstructor(isStaticInvocation, name, invocationName, hasVoidReturnType ? "" : returnType, arguments, decompiledOwnerFullClassName);
    }


Input:
	public boolean isCategoryNameValidForCategory(Long categoryId,
			String categoryName) {
		Category category = repo.findByCategoryName(categoryName);
		if (category == null)
			return true;
		if (category.getCategoryId() != categoryId)
			return false;
		return true;
	}

Output:
	public boolean isCategoryNameValidForCategory(Long categoryId,
			String categoryName) {
		Category category = repo.findByCategoryName(categoryName);
		if (category == null)
			return true;
		if (category.getCategoryId().equals(categoryId))
			return true;
		return false;
	}


Input:
	public Pair<Integer[],Long[]> getMidiNumsWithTicks(int[] midiNums,int clipRate){
		long TICKS_PER_OCCURRENCE = bpm*ppq/(6*10*1000*clipRate);
		ArrayList<Integer> newMidiNums = new ArrayList<Integer>();
		ArrayList<Long> ticksPerMidiNum = new ArrayList<Long>();
		int lastNum = midiNums[0];
		int dur = 1;
		for(int m: midiNums){
			if(m != lastNum){
				newMidiNums.add(m);
				ticksPerMidiNum.add(dur*TICKS_PER_OCCURRENCE);
				lastNum = m;
				dur = 1;
			}else{
				dur++;
			}
		}
		Integer[] outMidiNums= new Integer[0];
		outMidiNums = newMidiNums.toArray(outMidiNums);
		Long[] outTicksPer = new Long[0];
		outTicksPer = ticksPerMidiNum.toArray(outTicksPer);
		return new Pair<Integer[],Long[]>(outMidiNums,outTicksPer);
	}

Output:
	public Pair<Integer[],Long[]> getMidiNumsWithTicks(int[] midiNums,int clipRate){
		long TICKS_PER_OCCURRENCE = bpm*ppq/(60*clipRate);
		ArrayList<Integer> newMidiNums = new ArrayList<Integer>();
		ArrayList<Long> ticksPerMidiNum = new ArrayList<Long>();
		int lastNum = midiNums[0];
		int dur = 1;
		for(int m: midiNums){
			if(m != lastNum){
				newMidiNums.add(m);
				ticksPerMidiNum.add(dur*TICKS_PER_OCCURRENCE);
				lastNum = m;
				dur = 1;
			}else{
				dur++;
			}
		}
		Integer[] outMidiNums= new Integer[0];
		outMidiNums = newMidiNums.toArray(outMidiNums);
		Long[] outTicksPer = new Long[0];
		outTicksPer = ticksPerMidiNum.toArray(outTicksPer);
		return new Pair<Integer[],Long[]>(outMidiNums,outTicksPer);
	}


Input:
    public String getPostHeadContribution(Map<String, Object> ctx) {
        String version = getVersionFromJarFile("/META-INF/maven/org.sonatype.nexus.plugins/nexus-rrb-plugin/pom.properties");
        return "<script src=\"js/repoServer/nexus-rrb-plugin-all.js\"" + (version == null ? "" : "?" + version)
                + " type=\"text/javascript\" charset=\"utf-8\"></script>";
    }

Output:
    public String getPostHeadContribution(Map<String, Object> ctx) {
        String version = getVersionFromJarFile("/META-INF/maven/org.sonatype.nexus.plugins/nexus-rrb-plugin/pom.properties");
        return "<script src=\"js/repoServer/nexus-rrb-plugin-all.js" + (version == null ? "" : "?" + version)
                + "\" type=\"text/javascript\" charset=\"utf-8\"></script>";
    }


Input:
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        Player player = null;
        if (sender instanceof Player) {
            player = (Player) sender;
        }
        if (cmd.getName().equalsIgnoreCase("tardistravel")) {
            if (player == null) {
                sender.sendMessage(plugin.pluginName + ChatColor.RED + " This command can only be run by a player");
                return true;
            }
            if (player.hasPermission("tardis.timetravel")) {
                if (args.length < 1) {
                    sender.sendMessage(plugin.pluginName + "Too few command arguments!");
                    return false;
                }
                QueryFactory qf = new QueryFactory(plugin);
                TARDISTimeTravel tt = new TARDISTimeTravel(plugin);
                HashMap<String, Object> where = new HashMap<String, Object>();
                where.put("owner", player.getName());
                ResultSetTardis rs = new ResultSetTardis(plugin, where, "", false);
                if (!rs.resultSet()) {
                    sender.sendMessage(plugin.pluginName + "You are not a Timelord. You need to create a TARDIS before using this command!");
                    return true;
                }
                int id = rs.getTardis_id();
                if (!rs.isHandbrake_on()) {
                    player.sendMessage(plugin.pluginName + ChatColor.RED + "You cannot set a destination while the TARDIS is travelling!");
                    return true;
                }
                HashMap<String, Object> wheret = new HashMap<String, Object>();
                wheret.put("player", player.getName());
                ResultSetTravellers rst = new ResultSetTravellers(plugin, wheret, false);
                if (!rst.resultSet()) {
                    sender.sendMessage(plugin.pluginName + "You are not inside the TARDIS. You need to be to run this command!");
                    return true;
                }
                int tardis_id = rst.getTardis_id();
                if (tardis_id != id) {
                    sender.sendMessage(plugin.pluginName + "You can only run this command if you are the Timelord of " + ChatColor.LIGHT_PURPLE + "this" + ChatColor.RESET + " TARDIS!");
                    return true;
                }
                int level = rs.getArtron_level();
                int travel = plugin.getArtronConfig().getInt("travel");
                if (level < travel) {
                    player.sendMessage(plugin.pluginName + ChatColor.RED + "The TARDIS does not have enough Artron Energy to make this trip!");
                    return true;
                }
                TARDISConstants.COMPASS d = rs.getDirection();
                String home = rs.getHome();
                String back = rs.getFast_return();
                String current = rs.getCurrent();
                HashMap<String, Object> tid = new HashMap<String, Object>();
                HashMap<String, Object> set = new HashMap<String, Object>();
                tid.put("tardis_id", id);
                if (player.hasPermission("tardis.exile") && plugin.getConfig().getBoolean("exile")) {
                    String permArea = plugin.ta.getExileArea(player);
                    player.sendMessage(plugin.pluginName + ChatColor.RED + " Notice:" + ChatColor.RESET + " Your travel has been restricted to the [" + permArea + "] area!");
                    Location l = plugin.ta.getNextSpot(permArea);
                    if (l == null) {
                        player.sendMessage(plugin.pluginName + "All available parking spots are taken in this area!");
                        return true;
                    }
                    String save_loc = l.getWorld().getName() + ":" + l.getBlockX() + ":" + l.getBlockY() + ":" + l.getBlockZ();
                    set.put("save", save_loc);
                    qf.doUpdate("tardis", set, tid);
                    player.sendMessage(plugin.pluginName + "Your TARDIS was approved for parking in [" + permArea + "]!");
                    plugin.tardisHasDestination.put(id, travel);
                    if (plugin.trackRescue.containsKey(Integer.valueOf(id))) {
                        plugin.trackRescue.remove(Integer.valueOf(id));
                    }
                    return true;
                } else {
                    if (args.length == 1) {
                        if (args[0].equalsIgnoreCase("home") || args[0].equalsIgnoreCase("back")) {
                            String which;
                            if (args[0].equalsIgnoreCase("home")) {
                                set.put("save", home);
                                which = "Home";
                            } else {
                                set.put("save", back);
                                which = "Fast Return";
                            }
                            qf.doUpdate("tardis", set, tid);
                            sender.sendMessage(plugin.pluginName + which + " location loaded succesfully. Please release the handbrake!");
                            plugin.tardisHasDestination.put(id, travel);
                            if (plugin.trackRescue.containsKey(Integer.valueOf(id))) {
                                plugin.trackRescue.remove(Integer.valueOf(id));
                            }
                            return true;
                        } else {
                            if (player.hasPermission("tardis.timetravel.player")) {
                                TARDISRescue to_player = new TARDISRescue(plugin);
                                return to_player.rescue(player, args[0], id, tt, d, false);
                            } else {
                                player.sendMessage(plugin.pluginName + "You do not have permission to time travel to a player!");
                                return true;
                            }
                        }
                    }
                    if (args.length == 2 && args[0].equalsIgnoreCase("biome")) {
                        if (!player.hasPermission("tardis.timetravel.biome")) {
                            player.sendMessage(plugin.pluginName + "You do not have permission to time travel to a biome!");
                            return true;
                        }
                        String upper = args[1].toUpperCase(Locale.ENGLISH);
                        if (upper.equals("LIST")) {
                            StringBuilder buf = new StringBuilder();
                            for (String bi : BIOME_SUBS) {
                                buf.append(bi).append(", ");
                            }
                            String b = buf.toString().substring(0, buf.length() - 2);
                            sender.sendMessage(plugin.pluginName + "Biomes: " + b);
                            return true;
                        } else {
                            try {
                                Biome biome = Biome.valueOf(upper);
                                sender.sendMessage(plugin.pluginName + "Searching for biome, this may take some time!");
                                String[] cw = current.split(":");
                                Location nsob = searchBiome(player, biome, cw[0]);
                                if (nsob == null) {
                                    sender.sendMessage(plugin.pluginName + "Could not find biome!");
                                    return true;
                                } else {
                                    respect = new TARDISPluginRespect(plugin);
                                    if (!respect.getRespect(player, nsob, true)) {
                                        return true;
                                    }
                                    World bw = nsob.getWorld();
                                    bw.getChunkAt(nsob).load();
                                    bw.getChunkAt(nsob).load(true);
                                    while (!bw.getChunkAt(nsob).isLoaded()) {
                                        bw.getChunkAt(nsob).load();
                                    }
                                    int[] start_loc = tt.getStartLocation(nsob, d);
                                    int tmp_y = nsob.getBlockY();
                                    for (int up = 0; up < 10; up++) {
                                        int count = tt.safeLocation(start_loc[0], tmp_y + up, start_loc[2], start_loc[1], start_loc[3], nsob.getWorld(), d);
                                        if (count == 0) {
                                            nsob.setY(tmp_y + up);
                                            break;
                                        }
                                    }
                                    String save_loc = nsob.getWorld().getName() + ":" + nsob.getBlockX() + ":" + nsob.getBlockY() + ":" + nsob.getBlockZ();
                                    set.put("save", save_loc);
                                    qf.doUpdate("tardis", set, tid);
                                    sender.sendMessage(plugin.pluginName + "The biome was set succesfully. Please release the handbrake!");
                                    plugin.tardisHasDestination.put(id, travel);
                                    if (plugin.trackRescue.containsKey(Integer.valueOf(id))) {
                                        plugin.trackRescue.remove(Integer.valueOf(id));
                                    }
                                }
                            } catch (IllegalArgumentException iae) {
                                sender.sendMessage(plugin.pluginName + "Biome type not valid!");
                                return true;
                            }
                            return true;
                        }
                    }
                    if (args.length == 2 && args[0].equalsIgnoreCase("dest")) {
                        HashMap<String, Object> whered = new HashMap<String, Object>();
                        whered.put("dest_name", args[1]);
                        whered.put("tardis_id", id);
                        ResultSetDestinations rsd = new ResultSetDestinations(plugin, whered, false);
                        if (!rsd.resultSet()) {
                            sender.sendMessage(plugin.pluginName + "Could not find a destination with that name! try using " + ChatColor.GREEN + "/TARDIS list saves" + ChatColor.RESET + " first.");
                            return true;
                        }
                        String save_loc = rsd.getWorld() + ":" + rsd.getX() + ":" + rsd.getY() + ":" + rsd.getZ();
                        World w = plugin.getServer().getWorld(rsd.getWorld());
                        if (w != null) {
                            Location save_dest = new Location(w, rsd.getX(), rsd.getY(), rsd.getZ());
                            respect = new TARDISPluginRespect(plugin);
                            if (!respect.getRespect(player, save_dest, true)) {
                                return true;
                            }
                            if (!plugin.ta.areaCheckInExisting(save_dest)) {
                                HashMap<String, Object> wheres = new HashMap<String, Object>();
                                wheres.put("save", save_loc);
                                ResultSetTardis rsz = new ResultSetTardis(plugin, wheres, "", true);
                                if (rsz.resultSet()) {
                                    ArrayList<HashMap<String, String>> data = rsz.getData();
                                    if (data.size() > 0) {
                                        sender.sendMessage(plugin.pluginName + "A TARDIS already occupies this parking spot! Try using the " + ChatColor.AQUA + "/tardistravel area [name]" + ChatColor.RESET + " command instead.");
                                        return true;
                                    }
                                }
                            }
                            set.put("save", save_loc);
                            qf.doUpdate("tardis", set, tid);
                            sender.sendMessage(plugin.pluginName + "The specified location was set succesfully. Please release the handbrake!");
                            plugin.tardisHasDestination.put(id, travel);
                            if (plugin.trackRescue.containsKey(Integer.valueOf(id))) {
                                plugin.trackRescue.remove(Integer.valueOf(id));
                            }
                            return true;
                        } else {
                            sender.sendMessage(plugin.pluginName + "Could not get the world for this save!");
                            return true;
                        }
                    }
                    if (args.length == 2 && args[0].equalsIgnoreCase("area")) {
                        HashMap<String, Object> wherea = new HashMap<String, Object>();
                        wherea.put("area_name", args[1]);
                        ResultSetAreas rsa = new ResultSetAreas(plugin, wherea, false);
                        if (!rsa.resultSet()) {
                            sender.sendMessage(plugin.pluginName + "Could not find an area with that name! try using " + ChatColor.GREEN + "/tardis list areas" + ChatColor.RESET + " first.");
                            return true;
                        }
                        if (!player.hasPermission("tardis.area." + args[1]) || !player.isPermissionSet("tardis.area." + args[1])) {
                            sender.sendMessage(plugin.pluginName + "You do not have permission [tardis.area." + args[1] + "] to send the TARDIS to this location!");
                            return true;
                        }
                        Location l = plugin.ta.getNextSpot(rsa.getArea_name());
                        if (l == null) {
                            sender.sendMessage(plugin.pluginName + "All available parking spots are taken in this area!");
                            return true;
                        }
                        String save_loc = l.getWorld().getName() + ":" + l.getBlockX() + ":" + l.getBlockY() + ":" + l.getBlockZ();
                        set.put("save", save_loc);
                        qf.doUpdate("tardis", set, tid);
                        sender.sendMessage(plugin.pluginName + "Your TARDIS was approved for parking in [" + args[1] + "]!");
                        plugin.tardisHasDestination.put(id, travel);
                        if (plugin.trackRescue.containsKey(Integer.valueOf(id))) {
                            plugin.trackRescue.remove(Integer.valueOf(id));
                        }
                        return true;
                    }
                    if (args.length > 2 && args.length < 4) {
                        sender.sendMessage(plugin.pluginName + "Too few command arguments for co-ordinates travel!");
                        return false;
                    }
                    if (args.length >= 4 && player.hasPermission("tardis.timetravel.location")) {
                        String w_str = args[0];
                        if (w_str.contains("'")) {
                            w_str = getQuotedString(args);
                        }
                        int x, y, z;
                        World w = plugin.getServer().getWorld(w_str);
                        if (w == null) {
                            sender.sendMessage(plugin.pluginName + "Cannot find the specified world! Make sure you typed it correctly.");
                            return true;
                        }
                        if (!plugin.getConfig().getBoolean("worlds." + w.getName())) {
                            sender.sendMessage(plugin.pluginName + "The server does not allow time travel to this world!");
                            return true;
                        }
                        if (!plugin.getConfig().getBoolean("include_default_world") && plugin.getConfig().getBoolean("default_world") && args[0].equals(plugin.getConfig().getString("default_world_name"))) {
                            sender.sendMessage(plugin.pluginName + "The server does not allow time travel to this world!");
                            return true;
                        }
                        x = plugin.utils.parseNum(args[args.length - 3]);
                        y = plugin.utils.parseNum(args[args.length - 2]);
                        z = plugin.utils.parseNum(args[args.length - 1]);
                        Block block = w.getBlockAt(x, y, z);
                        Location location = block.getLocation();
                        if (!plugin.ta.areaCheckInExisting(location)) {
                            sender.sendMessage(plugin.pluginName + "The location is in a TARDIS area! Please use " + ChatColor.AQUA + "/tardistravel area [area name]");
                            return true;
                        }
                        respect = new TARDISPluginRespect(plugin);
                        if (!respect.getRespect(player, location, true)) {
                            return true;
                        }
                        int[] start_loc = tt.getStartLocation(location, d);
                        int count = tt.safeLocation(start_loc[0], location.getBlockY(), start_loc[2], start_loc[1], start_loc[3], w, d);
                        if (count > 0) {
                            sender.sendMessage(plugin.pluginName + "The specified location would not be safe! Please try another.");
                            return true;
                        } else {
                            String save_loc = location.getWorld().getName() + ":" + location.getBlockX() + ":" + location.getBlockY() + ":" + location.getBlockZ();
                            set.put("save", save_loc);
                            qf.doUpdate("tardis", set, tid);
                            sender.sendMessage(plugin.pluginName + "The specified location was saved succesfully. Please release the handbrake!");
                            plugin.tardisHasDestination.put(id, travel);
                            if (plugin.trackRescue.containsKey(Integer.valueOf(id))) {
                                plugin.trackRescue.remove(Integer.valueOf(id));
                            }
                            return true;
                        }
                    } else {
                        sender.sendMessage(plugin.pluginName + "You do not have permission to use co-ordinates time travel!");
                        return true;
                    }
                }
            } else {
                sender.sendMessage(plugin.pluginName + TARDISConstants.NO_PERMS_MESSAGE);
                return false;
            }
        }
        return false;
    }

Output:
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        Player player = null;
        if (sender instanceof Player) {
            player = (Player) sender;
        }
        if (cmd.getName().equalsIgnoreCase("tardistravel")) {
            if (player == null) {
                sender.sendMessage(plugin.pluginName + ChatColor.RED + " This command can only be run by a player");
                return true;
            }
            if (player.hasPermission("tardis.timetravel")) {
                if (args.length < 1) {
                    sender.sendMessage(plugin.pluginName + "Too few command arguments!");
                    return false;
                }
                QueryFactory qf = new QueryFactory(plugin);
                TARDISTimeTravel tt = new TARDISTimeTravel(plugin);
                HashMap<String, Object> where = new HashMap<String, Object>();
                where.put("owner", player.getName());
                ResultSetTardis rs = new ResultSetTardis(plugin, where, "", false);
                if (!rs.resultSet()) {
                    sender.sendMessage(plugin.pluginName + "You are not a Timelord. You need to create a TARDIS before using this command!");
                    return true;
                }
                int id = rs.getTardis_id();
                if (!rs.isHandbrake_on()) {
                    player.sendMessage(plugin.pluginName + ChatColor.RED + "You cannot set a destination while the TARDIS is travelling!");
                    return true;
                }
                HashMap<String, Object> wheret = new HashMap<String, Object>();
                wheret.put("player", player.getName());
                ResultSetTravellers rst = new ResultSetTravellers(plugin, wheret, false);
                if (!rst.resultSet()) {
                    sender.sendMessage(plugin.pluginName + "You are not inside the TARDIS. You need to be to run this command!");
                    return true;
                }
                int tardis_id = rst.getTardis_id();
                if (tardis_id != id) {
                    sender.sendMessage(plugin.pluginName + "You can only run this command if you are the Timelord of " + ChatColor.LIGHT_PURPLE + "this" + ChatColor.RESET + " TARDIS!");
                    return true;
                }
                int level = rs.getArtron_level();
                int travel = plugin.getArtronConfig().getInt("travel");
                if (level < travel) {
                    player.sendMessage(plugin.pluginName + ChatColor.RED + "The TARDIS does not have enough Artron Energy to make this trip!");
                    return true;
                }
                TARDISConstants.COMPASS d = rs.getDirection();
                String home = rs.getHome();
                String back = rs.getFast_return();
                String current = rs.getCurrent();
                HashMap<String, Object> tid = new HashMap<String, Object>();
                HashMap<String, Object> set = new HashMap<String, Object>();
                tid.put("tardis_id", id);
                if (player.hasPermission("tardis.exile") && plugin.getConfig().getBoolean("exile")) {
                    String permArea = plugin.ta.getExileArea(player);
                    player.sendMessage(plugin.pluginName + ChatColor.RED + " Notice:" + ChatColor.RESET + " Your travel has been restricted to the [" + permArea + "] area!");
                    Location l = plugin.ta.getNextSpot(permArea);
                    if (l == null) {
                        player.sendMessage(plugin.pluginName + "All available parking spots are taken in this area!");
                        return true;
                    }
                    String save_loc = l.getWorld().getName() + ":" + l.getBlockX() + ":" + l.getBlockY() + ":" + l.getBlockZ();
                    set.put("save", save_loc);
                    qf.doUpdate("tardis", set, tid);
                    player.sendMessage(plugin.pluginName + "Your TARDIS was approved for parking in [" + permArea + "]!");
                    plugin.tardisHasDestination.put(id, travel);
                    if (plugin.trackRescue.containsKey(Integer.valueOf(id))) {
                        plugin.trackRescue.remove(Integer.valueOf(id));
                    }
                    return true;
                } else {
                    if (args.length == 1) {
                        if (args[0].equalsIgnoreCase("home") || args[0].equalsIgnoreCase("back")) {
                            String which;
                            if (args[0].equalsIgnoreCase("home")) {
                                set.put("save", home);
                                which = "Home";
                            } else {
                                set.put("save", back);
                                which = "Fast Return";
                            }
                            qf.doUpdate("tardis", set, tid);
                            sender.sendMessage(plugin.pluginName + which + " location loaded succesfully. Please release the handbrake!");
                            plugin.tardisHasDestination.put(id, travel);
                            if (plugin.trackRescue.containsKey(Integer.valueOf(id))) {
                                plugin.trackRescue.remove(Integer.valueOf(id));
                            }
                            return true;
                        } else {
                            if (player.hasPermission("tardis.timetravel.player")) {
                                if (player.getName().equalsIgnoreCase(args[0])) {
                                    player.sendMessage(plugin.pluginName + "You cannot travel to yourself!");
                                    return true;
                                }
                                TARDISRescue to_player = new TARDISRescue(plugin);
                                return to_player.rescue(player, args[0], id, tt, d, false);
                            } else {
                                player.sendMessage(plugin.pluginName + "You do not have permission to time travel to a player!");
                                return true;
                            }
                        }
                    }
                    if (args.length == 2 && args[0].equalsIgnoreCase("biome")) {
                        if (!player.hasPermission("tardis.timetravel.biome")) {
                            player.sendMessage(plugin.pluginName + "You do not have permission to time travel to a biome!");
                            return true;
                        }
                        String upper = args[1].toUpperCase(Locale.ENGLISH);
                        if (upper.equals("LIST")) {
                            StringBuilder buf = new StringBuilder();
                            for (String bi : BIOME_SUBS) {
                                buf.append(bi).append(", ");
                            }
                            String b = buf.toString().substring(0, buf.length() - 2);
                            sender.sendMessage(plugin.pluginName + "Biomes: " + b);
                            return true;
                        } else {
                            try {
                                Biome biome = Biome.valueOf(upper);
                                sender.sendMessage(plugin.pluginName + "Searching for biome, this may take some time!");
                                String[] cw = current.split(":");
                                Location nsob = searchBiome(player, biome, cw[0]);
                                if (nsob == null) {
                                    sender.sendMessage(plugin.pluginName + "Could not find biome!");
                                    return true;
                                } else {
                                    respect = new TARDISPluginRespect(plugin);
                                    if (!respect.getRespect(player, nsob, true)) {
                                        return true;
                                    }
                                    World bw = nsob.getWorld();
                                    bw.getChunkAt(nsob).load();
                                    bw.getChunkAt(nsob).load(true);
                                    while (!bw.getChunkAt(nsob).isLoaded()) {
                                        bw.getChunkAt(nsob).load();
                                    }
                                    int[] start_loc = tt.getStartLocation(nsob, d);
                                    int tmp_y = nsob.getBlockY();
                                    for (int up = 0; up < 10; up++) {
                                        int count = tt.safeLocation(start_loc[0], tmp_y + up, start_loc[2], start_loc[1], start_loc[3], nsob.getWorld(), d);
                                        if (count == 0) {
                                            nsob.setY(tmp_y + up);
                                            break;
                                        }
                                    }
                                    String save_loc = nsob.getWorld().getName() + ":" + nsob.getBlockX() + ":" + nsob.getBlockY() + ":" + nsob.getBlockZ();
                                    set.put("save", save_loc);
                                    qf.doUpdate("tardis", set, tid);
                                    sender.sendMessage(plugin.pluginName + "The biome was set succesfully. Please release the handbrake!");
                                    plugin.tardisHasDestination.put(id, travel);
                                    if (plugin.trackRescue.containsKey(Integer.valueOf(id))) {
                                        plugin.trackRescue.remove(Integer.valueOf(id));
                                    }
                                }
                            } catch (IllegalArgumentException iae) {
                                sender.sendMessage(plugin.pluginName + "Biome type not valid!");
                                return true;
                            }
                            return true;
                        }
                    }
                    if (args.length == 2 && args[0].equalsIgnoreCase("dest")) {
                        HashMap<String, Object> whered = new HashMap<String, Object>();
                        whered.put("dest_name", args[1]);
                        whered.put("tardis_id", id);
                        ResultSetDestinations rsd = new ResultSetDestinations(plugin, whered, false);
                        if (!rsd.resultSet()) {
                            sender.sendMessage(plugin.pluginName + "Could not find a destination with that name! try using " + ChatColor.GREEN + "/TARDIS list saves" + ChatColor.RESET + " first.");
                            return true;
                        }
                        String save_loc = rsd.getWorld() + ":" + rsd.getX() + ":" + rsd.getY() + ":" + rsd.getZ();
                        World w = plugin.getServer().getWorld(rsd.getWorld());
                        if (w != null) {
                            Location save_dest = new Location(w, rsd.getX(), rsd.getY(), rsd.getZ());
                            respect = new TARDISPluginRespect(plugin);
                            if (!respect.getRespect(player, save_dest, true)) {
                                return true;
                            }
                            if (!plugin.ta.areaCheckInExisting(save_dest)) {
                                HashMap<String, Object> wheres = new HashMap<String, Object>();
                                wheres.put("save", save_loc);
                                ResultSetTardis rsz = new ResultSetTardis(plugin, wheres, "", true);
                                if (rsz.resultSet()) {
                                    ArrayList<HashMap<String, String>> data = rsz.getData();
                                    if (data.size() > 0) {
                                        sender.sendMessage(plugin.pluginName + "A TARDIS already occupies this parking spot! Try using the " + ChatColor.AQUA + "/tardistravel area [name]" + ChatColor.RESET + " command instead.");
                                        return true;
                                    }
                                }
                            }
                            set.put("save", save_loc);
                            qf.doUpdate("tardis", set, tid);
                            sender.sendMessage(plugin.pluginName + "The specified location was set succesfully. Please release the handbrake!");
                            plugin.tardisHasDestination.put(id, travel);
                            if (plugin.trackRescue.containsKey(Integer.valueOf(id))) {
                                plugin.trackRescue.remove(Integer.valueOf(id));
                            }
                            return true;
                        } else {
                            sender.sendMessage(plugin.pluginName + "Could not get the world for this save!");
                            return true;
                        }
                    }
                    if (args.length == 2 && args[0].equalsIgnoreCase("area")) {
                        HashMap<String, Object> wherea = new HashMap<String, Object>();
                        wherea.put("area_name", args[1]);
                        ResultSetAreas rsa = new ResultSetAreas(plugin, wherea, false);
                        if (!rsa.resultSet()) {
                            sender.sendMessage(plugin.pluginName + "Could not find an area with that name! try using " + ChatColor.GREEN + "/tardis list areas" + ChatColor.RESET + " first.");
                            return true;
                        }
                        if (!player.hasPermission("tardis.area." + args[1]) || !player.isPermissionSet("tardis.area." + args[1])) {
                            sender.sendMessage(plugin.pluginName + "You do not have permission [tardis.area." + args[1] + "] to send the TARDIS to this location!");
                            return true;
                        }
                        Location l = plugin.ta.getNextSpot(rsa.getArea_name());
                        if (l == null) {
                            sender.sendMessage(plugin.pluginName + "All available parking spots are taken in this area!");
                            return true;
                        }
                        String save_loc = l.getWorld().getName() + ":" + l.getBlockX() + ":" + l.getBlockY() + ":" + l.getBlockZ();
                        set.put("save", save_loc);
                        qf.doUpdate("tardis", set, tid);
                        sender.sendMessage(plugin.pluginName + "Your TARDIS was approved for parking in [" + args[1] + "]!");
                        plugin.tardisHasDestination.put(id, travel);
                        if (plugin.trackRescue.containsKey(Integer.valueOf(id))) {
                            plugin.trackRescue.remove(Integer.valueOf(id));
                        }
                        return true;
                    }
                    if (args.length > 2 && args.length < 4) {
                        sender.sendMessage(plugin.pluginName + "Too few command arguments for co-ordinates travel!");
                        return false;
                    }
                    if (args.length >= 4 && player.hasPermission("tardis.timetravel.location")) {
                        String w_str = args[0];
                        if (w_str.contains("'")) {
                            w_str = getQuotedString(args);
                        }
                        int x, y, z;
                        World w = plugin.getServer().getWorld(w_str);
                        if (w == null) {
                            sender.sendMessage(plugin.pluginName + "Cannot find the specified world! Make sure you typed it correctly.");
                            return true;
                        }
                        if (!plugin.getConfig().getBoolean("worlds." + w.getName())) {
                            sender.sendMessage(plugin.pluginName + "The server does not allow time travel to this world!");
                            return true;
                        }
                        if (!plugin.getConfig().getBoolean("include_default_world") && plugin.getConfig().getBoolean("default_world") && args[0].equals(plugin.getConfig().getString("default_world_name"))) {
                            sender.sendMessage(plugin.pluginName + "The server does not allow time travel to this world!");
                            return true;
                        }
                        x = plugin.utils.parseNum(args[args.length - 3]);
                        y = plugin.utils.parseNum(args[args.length - 2]);
                        z = plugin.utils.parseNum(args[args.length - 1]);
                        Block block = w.getBlockAt(x, y, z);
                        Location location = block.getLocation();
                        if (!plugin.ta.areaCheckInExisting(location)) {
                            sender.sendMessage(plugin.pluginName + "The location is in a TARDIS area! Please use " + ChatColor.AQUA + "/tardistravel area [area name]");
                            return true;
                        }
                        respect = new TARDISPluginRespect(plugin);
                        if (!respect.getRespect(player, location, true)) {
                            return true;
                        }
                        int[] start_loc = tt.getStartLocation(location, d);
                        int count = tt.safeLocation(start_loc[0], location.getBlockY(), start_loc[2], start_loc[1], start_loc[3], w, d);
                        if (count > 0) {
                            sender.sendMessage(plugin.pluginName + "The specified location would not be safe! Please try another.");
                            return true;
                        } else {
                            String save_loc = location.getWorld().getName() + ":" + location.getBlockX() + ":" + location.getBlockY() + ":" + location.getBlockZ();
                            set.put("save", save_loc);
                            qf.doUpdate("tardis", set, tid);
                            sender.sendMessage(plugin.pluginName + "The specified location was saved succesfully. Please release the handbrake!");
                            plugin.tardisHasDestination.put(id, travel);
                            if (plugin.trackRescue.containsKey(Integer.valueOf(id))) {
                                plugin.trackRescue.remove(Integer.valueOf(id));
                            }
                            return true;
                        }
                    } else {
                        sender.sendMessage(plugin.pluginName + "You do not have permission to use co-ordinates time travel!");
                        return true;
                    }
                }
            } else {
                sender.sendMessage(plugin.pluginName + TARDISConstants.NO_PERMS_MESSAGE);
                return false;
            }
        }
        return false;
    }


Input:
    public String getLink(Resource resource, boolean absolute)
        throws FilesException
    {
        HttpContext httpContext = HttpContext.getHttpContext(context);
        if(!(resource instanceof FileResource))
        {
            throw new FilesException("Resource is not the instance of cms.files.file class");
        }
        FileResource file = (FileResource)resource;
        RootDirectoryResource rootDirectory = null;
        for(Resource parent = file.getParent(); parent != null; parent = parent.getParent())
        {
            if(parent instanceof RootDirectoryResource)
            {
                rootDirectory = ((RootDirectoryResource)parent);
                break;
            }
        }
        if(rootDirectory.getExternal())
        {
            String path = "";
            for(Resource parent = file; parent != null; parent = parent.getParent())
            {
                if(parent instanceof RootDirectoryResource)
                {
                    break;
                }
                else
                {
                    try
                    {
                        path = "/"+URLEncoder.encode(parent.getName(), "UTF-8")+path;
                    }
                    catch(UnsupportedEncodingException e)
                    {
                        throw new FilesException("really should not happen", e);
                    }
                }
            }
            StringBuilder sb = new StringBuilder();
            if(absolute)
            {
                if(!httpContext.getRequest().isSecure())
                {
                    sb.append("http://");
                    sb.append(httpContext.getRequest().getServerName());
                    if(httpContext.getRequest().getServerPort() != 80)
                    {
                        sb.append(":");
                        sb.append(httpContext.getRequest().getServerPort());
                    }
                }
                else
                {
                    sb.append("https://");
                    sb.append(httpContext.getRequest().getServerName());
                    if(httpContext.getRequest().getServerPort() != 443)
                    {
                        sb.append(":");
                        sb.append(httpContext.getRequest().getServerPort());
                    }
                }
            }
            sb.append(httpContext.getRequest().getContextPath());
            sb.append("/files/");
            sb.append(rootDirectory.getParent().getParent().getName());
            sb.append("/");
            sb.append(rootDirectory.getName());
            sb.append(path);
            return sb.toString();
        }
        else
        {
            TemplatingContext tContext = (TemplatingContext)
                context.getAttribute(TemplatingContext.class);
            LinkTool link = (LinkTool)tContext.get("link");
            if(absolute)
            {
                link = link.absolute();
            }
            link = link.view("files.Download").pathInfoSuffix(file.getName()).set(
                "file_id", file.getIdString());
            if(absolute)
            {
                link = link.absolute();
            }
            return link.toString();
        }
    }

Output:
    public String getLink(Resource resource, boolean absolute)
        throws FilesException
    {
        HttpContext httpContext = HttpContext.getHttpContext(context);
        if(!(resource instanceof FileResource))
        {
            throw new FilesException("Resource is not the instance of cms.files.file class");
        }
        FileResource file = (FileResource)resource;
        RootDirectoryResource rootDirectory = null;
        for(Resource parent = file.getParent(); parent != null; parent = parent.getParent())
        {
            if(parent instanceof RootDirectoryResource)
            {
                rootDirectory = ((RootDirectoryResource)parent);
                break;
            }
        }
        if(rootDirectory.getExternal())
        {
            String path = "";
            for(Resource parent = file; parent != null; parent = parent.getParent())
            {
                if(parent instanceof RootDirectoryResource)
                {
                    break;
                }
                else
                {
                    try
                    {
                        path = "/"+URLEncoder.encode(parent.getName(), "UTF-8")+path;
                        path = path.replace("+", "%20");
                    }
                    catch(UnsupportedEncodingException e)
                    {
                        throw new FilesException("really should not happen", e);
                    }
                }
            }
            StringBuilder sb = new StringBuilder();
            if(absolute)
            {
                if(!httpContext.getRequest().isSecure())
                {
                    sb.append("http://");
                    sb.append(httpContext.getRequest().getServerName());
                    if(httpContext.getRequest().getServerPort() != 80)
                    {
                        sb.append(":");
                        sb.append(httpContext.getRequest().getServerPort());
                    }
                }
                else
                {
                    sb.append("https://");
                    sb.append(httpContext.getRequest().getServerName());
                    if(httpContext.getRequest().getServerPort() != 443)
                    {
                        sb.append(":");
                        sb.append(httpContext.getRequest().getServerPort());
                    }
                }
            }
            sb.append(httpContext.getRequest().getContextPath());
            sb.append("/files/");
            sb.append(rootDirectory.getParent().getParent().getName());
            sb.append("/");
            sb.append(rootDirectory.getName());
            sb.append(path);
            return sb.toString();
        }
        else
        {
            TemplatingContext tContext = (TemplatingContext)
                context.getAttribute(TemplatingContext.class);
            LinkTool link = (LinkTool)tContext.get("link");
            if(absolute)
            {
                link = link.absolute();
            }
            link = link.view("files.Download").pathInfoSuffix(file.getName()).set(
                "file_id", file.getIdString());
            if(absolute)
            {
                link = link.absolute();
            }
            return link.toString();
        }
    }


Input:
    public void marshal( AssemblyInfo assemblyInfo, MavenProject mavenProject, OutputStream outputStream )
        throws AssemblyInfoException, IOException
    {
        String src = mavenProject.getBuild().getDirectory() + "/build-sources";
        StringBuffer sb = new StringBuffer();
        sb.append( "using System.Reflection;\r\n" )
            .append( "using System.Runtime.CompilerServices;\r\n" )
            .append( createEntry( "Description", assemblyInfo.getDescription() ) )
            .append( createEntry( "Title", assemblyInfo.getTitle() ) )
            .append( createEntry( "Company", assemblyInfo.getCompany() ) )
            .append( createEntry( "Product", assemblyInfo.getProduct() ) )
            .append( createEntry( "Copyright", assemblyInfo.getCopyright().replace( "\"", "\\" ) ) )
            .append( createEntry( "Trademark", assemblyInfo.getTrademark() ) )
            .append( createEntry( "Culture", assemblyInfo.getCulture() ) )
            .append( createEntry( "Version", assemblyInfo.getVersion() ) )
            .append( createEntry( "InformationalVersion", assemblyInfo.getInformationalVersion() ) )
            .append( createEntry( "Configuration", assemblyInfo.getConfiguration() ) );
        if ( assemblyInfo.getKeyName() != null )
        {
            sb.append( createEntry( "KeyName", assemblyInfo.getKeyName() ) );
        }
        if ( assemblyInfo.getKeyFile() != null )
        {
            sb.append( createEntry( "KeyFile", assemblyInfo.getKeyFile().getAbsolutePath().replace( "\\", "\\\\" ) ) );
        }
        boolean wroteCustomStringAttribute = false;
        for(Entry<String, String> e: assemblyInfo.getCustomStringAttributes().entrySet()) {
            if(StringUtils.isEmpty(e.getValue()))
                continue;
            sb.append(createCustomStringEntry(e.getKey(), e.getValue()));
            wroteCustomStringAttribute = true;
        }
        if(wroteCustomStringAttribute) {
            final String customClass = "\n" +
                "[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple = true)]\n" +
                "class CustomStringAttribute : System.Attribute {\n" +
                "  public CustomStringAttribute(string name, string value) {\n" +
                "  }\n" +
                "}\n";
            sb.append(customClass);
        }
        FileOutputStream man = null;
        try
        {
            String groupIdAsDir = mavenProject.getGroupId().replace( ".", File.separator );
            File file = new File( src + "/META-INF/" + groupIdAsDir );
            file.mkdirs();
            man = new FileOutputStream(
                src + "/META-INF/" + groupIdAsDir + File.separator + "AssemblyInfo." + plugin.getExtension() );
            man.write( sb.toString().getBytes() );
        }
        catch ( IOException e )
        {
            throw new AssemblyInfoException( "NPANDAY-022-000: Failed to generate AssemblyInfo" );
        }
        finally
        {
            if ( man != null )
            {
                man.close();
            }
        }
    }

Output:
    public void marshal( AssemblyInfo assemblyInfo, MavenProject mavenProject, OutputStream outputStream )
        throws AssemblyInfoException, IOException
    {
        String src = mavenProject.getBuild().getDirectory() + "/build-sources";
        StringBuffer sb = new StringBuffer();
        sb.append( "using System.Reflection;\r\n" )
            .append( "using System.Runtime.CompilerServices;\r\n" )
            .append( createEntry( "Description", assemblyInfo.getDescription() ) )
            .append( createEntry( "Title", assemblyInfo.getTitle() ) )
            .append( createEntry( "Company", assemblyInfo.getCompany() ) )
            .append( createEntry( "Product", assemblyInfo.getProduct() ) )
            .append( createEntry( "Copyright", assemblyInfo.getCopyright().replace( "\"", "\\" ) ) )
            .append( createEntry( "Trademark", assemblyInfo.getTrademark() ) )
            .append( createEntry( "Culture", assemblyInfo.getCulture() ) )
            .append( createEntry( "Version", assemblyInfo.getVersion() ) )
            .append( createEntry( "InformationalVersion", assemblyInfo.getInformationalVersion() ) )
            .append( createEntry( "Configuration", assemblyInfo.getConfiguration() ) );
        if ( assemblyInfo.getKeyName() != null )
        {
            sb.append( createEntry( "KeyName", assemblyInfo.getKeyName() ) );
        }
        if ( assemblyInfo.getKeyFile() != null )
        {
            sb.append( createEntry( "KeyFile", assemblyInfo.getKeyFile().getAbsolutePath().replace( "\\", "\\\\" ) ) );
        }
        boolean wroteCustomStringAttribute = false;
        for(Entry<String, String> e: assemblyInfo.getCustomStringAttributes().entrySet()) {
            if(StringUtils.isEmpty(e.getValue()))
                continue;
            sb.append(createCustomStringEntry(e.getKey(), e.getValue()));
            wroteCustomStringAttribute = true;
        }
        if(wroteCustomStringAttribute) {
            final String customClass = "\n" +
                "[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple = true)]\n" +
                "class CustomStringAttribute : System.Attribute {\n" +
                "  public CustomStringAttribute(string name, string value) {\n" +
                "  }\n" +
                "}\n";
            sb.append(customClass);
        }
        FileOutputStream man = null;
        try
        {
            String groupIdAsDir = mavenProject.getGroupId().replace( ".", File.separator );
            File file = new File( src + "/META-INF/" + groupIdAsDir );
            file.mkdirs();
            man = new FileOutputStream(
                src + "/META-INF/" + groupIdAsDir + File.separator + "AssemblyInfo." + plugin.getExtension() );
            man.write( sb.toString().getBytes() );
        }
        catch ( IOException e )
        {
            throw new AssemblyInfoException( "NPANDAY-022-000: Failed to generate AssemblyInfo", e );
        }
        finally
        {
            if ( man != null )
            {
                man.close();
            }
        }
    }


Input:
    public void run() {
        try {
            while (!Thread.interrupted()) {
                try {
                    if (serversocket == null || serversocket.isClosed()) {
                        if (LOG.isInfoEnabled()) {
                            LOG.info("Listening on port " + port);
                        }
                        serversocket = new ServerSocket(port);
                        serversocket.setReuseAddress(true);
                    }
                    LOG.debug("Waiting for incoming HTTP connection");
                    Socket socket = this.serversocket.accept();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Incoming HTTP connection from " +
                                socket.getRemoteSocketAddress());
                    }
                    AxisHttpConnection conn = new AxisHttpConnectionImpl(socket, this.params);
                    this.connmanager.process(conn);
                } catch (Throwable ex) {
                    if (Thread.interrupted()) {
                        break;
                    }
                    if (!failureHandler.failed(this, ex)) {
                        break;
                    }
                }
            }
        } finally {
            destroy();
        }
    }

Output:
    public void run() {
        try {
            while (!Thread.interrupted()) {
                try {
                    if (serversocket == null || serversocket.isClosed()) {
                        if (LOG.isInfoEnabled()) {
                            LOG.info("Listening on port " + port);
                        }
                        serversocket = new ServerSocket(port);
                        serversocket.setReuseAddress(true);
                    }
                    LOG.debug("Waiting for incoming HTTP connection");
                    Socket socket = this.serversocket.accept();
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Incoming HTTP connection from " +
                                socket.getRemoteSocketAddress());
                    }
                    AxisHttpConnection conn = new AxisHttpConnectionImpl(socket, this.params);
                    this.connmanager.process(conn);
                } catch(java.io.InterruptedIOException ie) {
                    break;
                } catch (Throwable ex) {
                    if (Thread.interrupted()) {
                        break;
                    }
                    if (!failureHandler.failed(this, ex)) {
                        break;
                    }
                }
            }
        } finally {
            destroy();
        }
    }


Input:
	public IntermediateDefinition(ListDefinition parentListDefinition,
			ListDefinition nestedListDefinition) {
		setParentEditorDefinition(parentListDefinition);
		this.nestedListDefinition = nestedListDefinition;
		nestedListDefinition.setParentEditorDefinition(this);
	}

Output:
	public IntermediateDefinition(ListDefinition parentListDefinition,
			ListDefinition nestedListDefinition) {
		setParentEditorDefinition(parentListDefinition);
		this.nestedListDefinition = nestedListDefinition;
		nestedListDefinition.setParentEditorDefinition(this);
		setEditorRepository(parentListDefinition.getEditorRepository());
	}


Input:
  public String extractTweet(String html) {
    Preconditions.checkNotNull(html);
    Matcher matcher = TWEET_PATTERN.matcher(html);
    if (!matcher.find()) {
      return null;
    }
    String tweet = matcher.group(1);
    matcher = URL_PATTERN.matcher(tweet);
    StringBuffer rawsb = new StringBuffer();
    while (matcher.find()) {
      HashMap<String,String> urls = new HashMap<String,String>();
      urls.put(matcher.group(1), matcher.group(2));
      urls.put(matcher.group(3), matcher.group(4));
      String deu = urls.containsKey("data-expanded-url") ? urls.get("data-expanded-url") : "";
      String href = urls.containsKey("href") ? urls.get("href") : "";
      if (!deu.equals(""))
        matcher.appendReplacement(rawsb, deu);
      else if (!href.equals(""))
        matcher.appendReplacement(rawsb, href);
      else
        matcher.appendReplacement(rawsb, "$0");
    }
    matcher.appendTail(rawsb);
    tweet = rawsb.toString();
    tweet = tweet.replaceAll("<(.|\n)*?>", "").replaceAll("[\n\r]", "").replaceAll("[\t]", " ").trim();
    tweet = StringEscapeUtils.unescapeHtml(tweet);
    return tweet;
  }

Output:
  public String extractTweet(String html) {
    Preconditions.checkNotNull(html);
    Matcher matcher = TWEET_PATTERN.matcher(html);
    if (!matcher.find()) {
      return null;
    }
    String tweet = matcher.group(1);
    matcher = URL_PATTERN.matcher(tweet);
    StringBuffer rawsb = new StringBuffer();
    while (matcher.find()) {
      HashMap<String,String> urls = new HashMap<String,String>();
      urls.put(matcher.group(1), matcher.group(2));
      urls.put(matcher.group(3), matcher.group(4));
      String deu = urls.containsKey("data-expanded-url") ? urls.get("data-expanded-url") : "";
      String href = urls.containsKey("href") ? urls.get("href") : "";
      if (!deu.equals(""))
        matcher.appendReplacement(rawsb, deu.replaceAll("\\$", "\\\\\\$"));
      else if (!href.equals(""))
        matcher.appendReplacement(rawsb, href.replaceAll("\\$", "\\\\\\$"));
      else
        matcher.appendReplacement(rawsb, "$0");
    }
    matcher.appendTail(rawsb);
    tweet = rawsb.toString();
    tweet = tweet.replaceAll("<(.|\n)*?>", "").replaceAll("[\n\r]", "").replaceAll("[\t]", " ").trim();
    tweet = StringEscapeUtils.unescapeHtml(tweet);
    return tweet;
  }


Input:
	protected void doGet(HttpServletRequest httpRequest, HttpServletResponse response) throws IOException {
		log.debug("Handling Get request: " + httpRequest.getRequestURI());
		try {
			Map<String, String> params = initSession(httpRequest);
			if (params.get("service") != null && params.get("service").equals("wps")) {
				String version = params.get("version");
				if (version != null && !version.equals("1.0.0")) {
					throw new WpsException(
							"Only WPS version 1.0.0 is supported.",
							WpsErrorCode.VersionNegotiationFailed, null, null);
				}
				String request = params.get("request");
				if (request == null) {
					throw new WpsException(
							"Parameter request is missing.",
							WpsErrorCode.MissingParameterValue, null, "request");
				}
				else if (request.toLowerCase().equals("getcapabilities")) {
					getCapabilities(httpRequest, response);
				}
				else if (request.toLowerCase().equals("describeprocess")) {
					describeProcess(response);
				}
				else if (httpRequest.getMethod().toLowerCase().equals("post") &&
							request.toLowerCase().contains("execute")) {
					execute(params, response, httpRequest);
				}
				else {
					throw new WpsException(
							"Parameter request is invalid: " + request,
							WpsErrorCode.InvalidParameterValue, null, "request");
				}
			} else {
				throw new WpsException(
						"Parameter service is missing.",
						WpsErrorCode.MissingParameterValue, null, "service");
			}
		} catch (WpsException e) {
			WpsUtil.printError(e, null, response);
		}
	}

Output:
	protected void doGet(HttpServletRequest httpRequest, HttpServletResponse response) throws IOException {
		log.debug("Handling Get request: " + httpRequest.getRequestURI());
		try {
			Map<String, String> params = initSession(httpRequest);
			if (params.get("service") != null && params.get("service").equals("wps")) {
				String version = params.get("version");
				if (version != null && !version.equals("1.0.0")) {
					throw new WpsException(
							"Only WPS version 1.0.0 is supported.",
							WpsErrorCode.VersionNegotiationFailed, null, null);
				}
				String request = params.get("request");
				if (request == null) {
					throw new WpsException(
							"Parameter request is missing.",
							WpsErrorCode.MissingParameterValue, null, "request");
				}
				else if (request.toLowerCase().equals("getcapabilities")) {
					getCapabilities(httpRequest, response);
				}
				else if (request.toLowerCase().equals("describeprocess")) {
					describeProcess(response);
				}
				else if (request.toLowerCase().contains("execute")) {
					throw new WpsException(
							"Execute operation only supported with POST method." + request,
							WpsErrorCode.InvalidParameterValue, null, "request");
				}
				else {
					throw new WpsException(
							"Parameter request is invalid: " + request,
							WpsErrorCode.InvalidParameterValue, null, "request");
				}
			} else {
				throw new WpsException(
						"Parameter service is missing.",
						WpsErrorCode.MissingParameterValue, null, "service");
			}
		} catch (WpsException e) {
			WpsUtil.printError(e, null, response);
		}
	}


Input:
  private void removeClientFromCache(ChannelPipeline pipeline) {
    final RegionClient client = pipeline.get(RegionClient.class);
    final SocketAddress remote = pipeline.getChannel().getRemoteAddress();
    if (remote == null) {
      if (client == rootregion) {
        rootregion = null;
        String hostport = null;
        synchronized(this) {
          final Iterator<Map.Entry<String, RegionClient>> it =
            ip2client.entrySet().iterator();
          while (it.hasNext()) {
            final Map.Entry<String, RegionClient> e = it.next();
            if (e.getValue() == client) {
              hostport = e.getKey();
              it.remove();
              break;
            }
          }
        }
        LOG.warn("Couldn't connect to the -ROOT- region @ " + hostport);
      }
      return;
    }
    pipeline = null;
    String hostport = null;
    if (remote instanceof InetSocketAddress) {
      final InetSocketAddress sock = (InetSocketAddress) remote;
      final InetAddress addr = sock.getAddress();
      if (addr == null) {
        LOG.error("Unresolved IP for " + remote
                  + ".  This shouldn't happen.");
        return;
      } else {
        hostport = addr.getHostAddress() + ':' + sock.getPort();
      }
    } else {
        LOG.error("Found a non-InetSocketAddress remote: " + remote
                  + ".  This shouldn't happen.");
        return;
    }
    RegionClient old;
    if (client != null) {
      final ArrayList<RegionInfo> regions = client2regions.remove(client);
      if (regions != null) {
        for (final RegionInfo region : regions) {
          final byte[] table = region.table();
          final byte[] stop_key = region.stopKey();
          final Map.Entry<byte[], RegionInfo> entry =
            (stop_key.length == 0
             ? regions_cache.floorEntry(createRegionSearchKey(table, stop_key))
             : regions_cache.lowerEntry(createRegionSearchKey(table, stop_key)));
          if (entry != null && entry.getValue() == region) {
            regions_cache.remove(entry.getKey());
            LOG.debug("Removed from regions cache: {}", region);
          }
          final RegionClient oldclient = region2client.remove(region);
          if (client == oldclient) {
            LOG.debug("Association removed: {} -> {}", region, client);
          } else if (oldclient != null) {
            LOG.warn("When handling disconnection of " + client
                     + " and removing " + region + " from region2client"
                     + ", it was found that " + oldclient + " was in fact"
                     + " serving this region");
          }
        }
      }
    }
    synchronized (ip2client) {
      old = ip2client.remove(hostport);
    }
    LOG.debug("Removed from IP cache: {} -> {}", hostport, client);
    if (old == null) {
      LOG.warn("When expiring " + client + " from the client cache (host:port="
               + hostport + "), it was found that there was no entry"
               + " corresponding to " + remote + ".  This shouldn't happen.");
    }
    if (client == rootregion) {
      LOG.info("Lost connection with the -ROOT- region");
      rootregion = null;
    }
  }

Output:
  private void removeClientFromCache(ChannelPipeline pipeline) {
    final RegionClient client = pipeline.get(RegionClient.class);
    final SocketAddress remote = pipeline.getChannel().getRemoteAddress();
    if (remote == null) {
      if (client == rootregion) {
        rootregion = null;
        String hostport = null;
        synchronized (ip2client) {
          final Iterator<Map.Entry<String, RegionClient>> it =
            ip2client.entrySet().iterator();
          while (it.hasNext()) {
            final Map.Entry<String, RegionClient> e = it.next();
            if (e.getValue() == client) {
              hostport = e.getKey();
              it.remove();
              break;
            }
          }
        }
        LOG.warn("Couldn't connect to the -ROOT- region @ " + hostport);
      }
      return;
    }
    pipeline = null;
    String hostport = null;
    if (remote instanceof InetSocketAddress) {
      final InetSocketAddress sock = (InetSocketAddress) remote;
      final InetAddress addr = sock.getAddress();
      if (addr == null) {
        LOG.error("Unresolved IP for " + remote
                  + ".  This shouldn't happen.");
        return;
      } else {
        hostport = addr.getHostAddress() + ':' + sock.getPort();
      }
    } else {
        LOG.error("Found a non-InetSocketAddress remote: " + remote
                  + ".  This shouldn't happen.");
        return;
    }
    RegionClient old;
    if (client != null) {
      final ArrayList<RegionInfo> regions = client2regions.remove(client);
      if (regions != null) {
        for (final RegionInfo region : regions) {
          final byte[] table = region.table();
          final byte[] stop_key = region.stopKey();
          final Map.Entry<byte[], RegionInfo> entry =
            (stop_key.length == 0
             ? regions_cache.floorEntry(createRegionSearchKey(table, stop_key))
             : regions_cache.lowerEntry(createRegionSearchKey(table, stop_key)));
          if (entry != null && entry.getValue() == region) {
            regions_cache.remove(entry.getKey());
            LOG.debug("Removed from regions cache: {}", region);
          }
          final RegionClient oldclient = region2client.remove(region);
          if (client == oldclient) {
            LOG.debug("Association removed: {} -> {}", region, client);
          } else if (oldclient != null) {
            LOG.warn("When handling disconnection of " + client
                     + " and removing " + region + " from region2client"
                     + ", it was found that " + oldclient + " was in fact"
                     + " serving this region");
          }
        }
      }
    }
    synchronized (ip2client) {
      old = ip2client.remove(hostport);
    }
    LOG.debug("Removed from IP cache: {} -> {}", hostport, client);
    if (old == null) {
      LOG.warn("When expiring " + client + " from the client cache (host:port="
               + hostport + "), it was found that there was no entry"
               + " corresponding to " + remote + ".  This shouldn't happen.");
    }
    if (client == rootregion) {
      LOG.info("Lost connection with the -ROOT- region");
      rootregion = null;
    }
  }


Input:
        public CopyOnWriteList unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
            List items = new ArrayList();
            while (reader.hasMoreChildren()) {
                reader.moveDown();
                try {
                    Object item = readItem(reader, context, items);
                    items.add(item);
                } catch (CannotResolveClassException e) {
                    LOGGER.log(WARNING,"Failed to resolve class",e);
                } catch (LinkageError e) {
                    LOGGER.log(WARNING,"Failed to resolve class",e);
                }
                reader.moveUp();
            }
            return new CopyOnWriteList(items,true);
        }

Output:
        public CopyOnWriteList unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
            List items = new ArrayList();
            while (reader.hasMoreChildren()) {
                reader.moveDown();
                try {
                    Object item = readItem(reader, context, items);
                    items.add(item);
                } catch (CannotResolveClassException e) {
                    LOGGER.log(WARNING,"Failed to resolve class",e);
                    RobustReflectionConverter.addErrorInContext(context, e);
                } catch (LinkageError e) {
                    LOGGER.log(WARNING,"Failed to resolve class",e);
                    RobustReflectionConverter.addErrorInContext(context, e);
                }
                reader.moveUp();
            }
            return new CopyOnWriteList(items,true);
        }


Input:
  private void calculateColumnEncodings() {
    assert (_bases != null);
    assert _scale != null;
    assert (_min != null);
    assert _ncolumns == _colTypes.length:"ncols=" + _ncolumns + ", colTypes.length=" + _colTypes.length;
    for(int i = 0; i < _ncolumns; ++i){
      if( (_colTypes[i]==ICOL || _colTypes[i]==DCOL || _colTypes[i]==FCOL ) &&
          (double)_invalidValues[i]/_numRows > 1 ) {
        _enums[i] = null;
        _max[i] = _min[i] = 0;
        _scale[i] = 0;
        _bases[i] = 0;
        _colTypes[i] = STRINGCOL;
        continue;
      }
      if(_colTypes[i] == UCOL && _enums[i].size() == 1)
        _colTypes[i] = ECOL;
      switch(_colTypes[i]){
      case UCOL:
        _colTypes[i] = BYTE;
        break;
      case ECOL:
        if(_enums[i] == null || _enums[i].isKilled()){
          _max[i] = 0;
          _min[i] = 0;
          _colTypes[i] = STRINGCOL;
        } else {
          _max[i] = _colDomains[i].length-1;
          _min[i] = 0;
          if(_max[i] < 256)_colTypes[i] = BYTE;
          else if(_max[i] < 65536)_colTypes[i] = SHORT;
          else _colTypes[i] = INT;
        }
        break;
      case ICOL:
        if (_max[i] - _min[i] < 255) {
          _colTypes[i] = BYTE;
          _bases[i] = (int)_min[i];
        } else if ((_max[i] - _min[i]) < 65535) {
          _colTypes[i] = SHORT;
          _bases[i] = (int)_min[i];
        } else if (_max[i] - _min[i] < (1L << 32) &&
                   _min[i] > Integer.MIN_VALUE && _max[i] < Integer.MAX_VALUE) {
          _colTypes[i] = INT;
          _bases[i] = (int)_min[i];
        } else
          _colTypes[i] = LONG;
        break;
      case FCOL:
      case DCOL:
        if(_scale[i] >= -4 && (_max[i] <= powers10i[powers10i.length-1]) && (_min[i] >= -powers10i[powers10i.length-1])){
          double s = pow10(-_scale[i]);
          double range = s*(_max[i]-_min[i]);
          double base = s*_min[i];
          if(range < 256){
            if(fitsIntoInt(base)) {
              _colTypes[i] = DBYTE;
              _bases[i] = (int)base;
              break;
            }
          } else if(range < 65535){
            if(fitsIntoInt(base)){
              _colTypes[i] = DSHORT;
              _bases[i] = (int)(base);
              break;
            }
          }
        }
        _scale[i] = 0;
        _bases[i] = 0;
        _colTypes[i] = (_colTypes[i] == FCOL)?FLOAT:DOUBLE;
        break;
      case TCOL:
        _scale[i] = -1;
        _bases[i] = 0;
        _colTypes[i] = LONG;
        break;
      default: throw H2O.unimpl();
      }
    }
    _invalidValues = null;
  }

Output:
  private void calculateColumnEncodings() {
    assert (_bases != null);
    assert _scale != null;
    assert (_min != null);
    assert _ncolumns == _colTypes.length:"ncols=" + _ncolumns + ", colTypes.length=" + _colTypes.length;
    for(int i = 0; i < _ncolumns; ++i){
      if( (_colTypes[i]==ICOL || _colTypes[i]==DCOL || _colTypes[i]==FCOL ) &&
          (double)_invalidValues[i]/_numRows > 1 ) {
        _enums[i] = null;
        _max[i] = _min[i] = 0;
        _scale[i] = 0;
        _bases[i] = 0;
        _colTypes[i] = STRINGCOL;
        continue;
      }
      if(_colTypes[i] == UCOL && _enums[i] != null && _enums[i].size() == 1)
        _colTypes[i] = ECOL;
      switch(_colTypes[i]){
      case UCOL:
        _colTypes[i] = BYTE;
        break;
      case ECOL:
        if(_enums[i] == null || _enums[i].isKilled()){
          _max[i] = 0;
          _min[i] = 0;
          _colTypes[i] = STRINGCOL;
        } else {
          _max[i] = _colDomains[i].length-1;
          _min[i] = 0;
          if(_max[i] < 256)_colTypes[i] = BYTE;
          else if(_max[i] < 65536)_colTypes[i] = SHORT;
          else _colTypes[i] = INT;
        }
        break;
      case ICOL:
        if (_max[i] - _min[i] < 255) {
          _colTypes[i] = BYTE;
          _bases[i] = (int)_min[i];
        } else if ((_max[i] - _min[i]) < 65535) {
          _colTypes[i] = SHORT;
          _bases[i] = (int)_min[i];
        } else if (_max[i] - _min[i] < (1L << 32) &&
                   _min[i] > Integer.MIN_VALUE && _max[i] < Integer.MAX_VALUE) {
          _colTypes[i] = INT;
          _bases[i] = (int)_min[i];
        } else
          _colTypes[i] = LONG;
        break;
      case FCOL:
      case DCOL:
        if(_scale[i] >= -4 && (_max[i] <= powers10i[powers10i.length-1]) && (_min[i] >= -powers10i[powers10i.length-1])){
          double s = pow10(-_scale[i]);
          double range = s*(_max[i]-_min[i]);
          double base = s*_min[i];
          if(range < 256){
            if(fitsIntoInt(base)) {
              _colTypes[i] = DBYTE;
              _bases[i] = (int)base;
              break;
            }
          } else if(range < 65535){
            if(fitsIntoInt(base)){
              _colTypes[i] = DSHORT;
              _bases[i] = (int)(base);
              break;
            }
          }
        }
        _scale[i] = 0;
        _bases[i] = 0;
        _colTypes[i] = (_colTypes[i] == FCOL)?FLOAT:DOUBLE;
        break;
      case TCOL:
        _scale[i] = -1;
        _bases[i] = 0;
        _colTypes[i] = LONG;
        break;
      default: throw H2O.unimpl();
      }
    }
    _invalidValues = null;
  }