Input:
	public synchronized void initComponentActivity(Body body) {
		if (!init) {
			this.logger = LoggerFactory.getLogger(this.getClass());
			logger.info("Initialising {} component.", this.getClass().getSimpleName());
			eleGenerator = new EleGeneratorForConstructQuery();
			try {
				String address = Constants.getProperties().getProperty("platfomservices.querydispatchapi.endpoint");
				soapServer = Endpoint.publish(address, this);
				logger.info("QueryDispatch SOAP service started at {}.", address);
			} catch (Exception e) {
				logger.error("Exception while publishing QueryDispatch SOAP Service", e);
			}
			try {
				restServer = new PlayPlatformservicesRest(this);
	        	logger.info(String.format("QueryDispatch REST service started at %s with WADL remotely available at "
	        			+ "%sapplication.wadl\n", PlayPlatformservicesRest.BASE_URI, Constants.getProperties().getProperty("platfomservices.querydispatchapi.rest")));
			} catch (Exception e) {
				logger.error("Exception while publishing QueryDispatch REST Service", e);
			}
			this.init = true;
		}
	}

Output:
	public synchronized void initComponentActivity(Body body) {
		if (!init) {
			this.logger = LoggerFactory.getLogger(this.getClass());
			logger.info("Initialising {} component.", this.getClass().getSimpleName());
			eleGenerator = new EleGeneratorForConstructQuery();
			try {
				String address = Constants.getProperties().getProperty("platfomservices.querydispatchapi.endpoint");
				soapServer = Endpoint.publish(address, this);
				logger.info("QueryDispatch SOAP service started at {}.", address);
			} catch (Exception e) {
				logger.error("Exception while publishing QueryDispatch SOAP Service", e);
			}
			try {
				restServer = new PlayPlatformservicesRest(this);
	        	logger.info(String.format("QueryDispatch REST service started at %s with WADL remotely available at "
	        			+ "%s/application.wadl\n", PlayPlatformservicesRest.BASE_URI, Constants.getProperties().getProperty("platfomservices.querydispatchapi.rest")));
			} catch (Exception e) {
				logger.error("Exception while publishing QueryDispatch REST Service", e);
			}
			this.init = true;
		}
	}


Input:
    public void testEncodeDecode() {
        byte[] bytes = new byte[256];
        new Random(1L).nextBytes(bytes);
        final String encodedBytes = HexDecoder.encode(bytes);
        assertEquals(
                "Bad encoded data",
                "73d51abbd89cb8196f0efb6892f94d68fccc2c35f0b84609e5f12c55dd85aba8d5d9bef76808f3b572e5900112b81927ba5bb5f67e1bda28b4049bf0e4aed78db15d7bf2fc0c34e9a99de4ef3bc2b17c8137ad659878f9e93df1f658367aca286452474b9ef3765e24e9a88173724dddfb04b01dcceb0c8aead641c58dad569581baeea87c10d40a47902028e61cfdc243d9d16008aabc9fb77cc723a56017e14f1ce8b1698341734a6823ce02043e016b544901214a2ddab82fec85c0b9fe0549c475be5b887bb4b8995b24fb5c6846f88b527b4f9d4c1391f1678b23ba4f9c9cd7bc93eb5776f4f03675344864294661c5949faf17b130fcf6482f971a5500",
                encodedBytes);
        final byte[] decodedBytes = HexDecoder.decode(encodedBytes);
        assertTrue("Bad decoded bytes", Arrays.equals(bytes, decodedBytes));
    }

Output:
    public void testEncodeDecode() {
        byte[] bytes = new byte[256];
        new Random(1L).nextBytes(bytes);
        final String encodedBytes = HexDecoder.encode(bytes);
        assertEquals(
                "Bad encoded data",
                "73D51ABBD89CB8196F0EFB6892F94D68FCCC2C35F0B84609E5F12C55DD85ABA8D5D9BEF76808F3B572E5900112B81927BA5BB5F67E1BDA28B4049BF0E4AED78DB15D7BF2FC0C34E9A99DE4EF3BC2B17C8137AD659878F9E93DF1F658367ACA286452474B9EF3765E24E9A88173724DDDFB04B01DCCEB0C8AEAD641C58DAD569581BAEEA87C10D40A47902028E61CFDC243D9D16008AABC9FB77CC723A56017E14F1CE8B1698341734A6823CE02043E016B544901214A2DDAB82FEC85C0B9FE0549C475BE5B887BB4B8995B24FB5C6846F88B527B4F9D4C1391F1678B23BA4F9C9CD7BC93EB5776F4F03675344864294661C5949FAF17B130FCF6482F971A5500",
                encodedBytes);
        final byte[] decodedBytes = HexDecoder.decode(encodedBytes);
        assertTrue("Bad decoded bytes", Arrays.equals(bytes, decodedBytes));
    }


Input:
    public String getGeoSearchSql(final Object domainKey) {
        final String sql = ""
                    + "SELECT DISTINCT i.class_id , "
                    + "                i.object_id, "
                    + "                s.stringrep "
                    + "FROM            geom g, "
                    + "                cs_attr_object_derived i "
                    + "                LEFT OUTER JOIN cs_stringrepcache s "
                    + "                ON              ( "
                    + "                                                s.class_id =i.class_id "
                    + "                                AND             s.object_id=i.object_id "
                    + "                                ) "
                    + "WHERE           i.attr_class_id = "
                    + "                ( SELECT cs_class.id "
                    + "                FROM    cs_class "
                    + "                WHERE   cs_class.table_name::text = 'GEOM'::text "
                    + "                ) "
                    + "AND             i.attr_object_id = g.id "
                    + "AND i.class_id IN <cidsClassesInStatement> "
                    + "AND geo_field && GeometryFromText('SRID=<cidsSearchGeometrySRID>;<cidsSearchGeometryWKT>') "
                    + "AND <intersectsStatement> "
                    + "ORDER BY        1,2,3";
        final String sqlAlt = ""
                    + "\nWITH recursive derived_index(ocid,oid,acid,aid,depth) AS "
                    + "\n( SELECT class_id, "
                    + "\n        object_id, "
                    + "\n        class_id , "
                    + "\n        object_id, "
                    + "\n        0 "
                    + "\nFROM    geosuche2 "
                    + "\nWHERE   class_id IN( WITH recursive derived_child(father,child,depth) AS "
                    + "\n                    ( SELECT father, "
                    + "\n                            father , "
                    + "\n                            0 "
                    + "\n                    FROM    cs_class_hierarchy "
                    + "\n                    WHERE   father IN <cidsClassesInStatement> "
                    + "\n                     "
                    + "\n                    UNION ALL "
                    + "\n                     "
                    + "\n                    SELECT ch.father, "
                    + "\n                           ch.child , "
                    + "\n                           dc.depth+1 "
                    + "\n                    FROM   derived_child dc, "
                    + "\n                           cs_class_hierarchy ch "
                    + "\n                    WHERE  ch.father=dc.child "
                    + "\n                    ) "
                    + "\n             SELECT DISTINCT child "
                    + "\n             FROM            derived_child LIMIT 100 ) "
                    + "\nAND             geo_field && GeometryFromText('SRID=<cidsSearchGeometrySRID>;<cidsSearchGeometryWKT>') "
                    + "\nAND             intersects(geo_field,GeometryFromText('SRID=<cidsSearchGeometrySRID>;<cidsSearchGeometryWKT>')) "
                    + "\n "
                    + "\nUNION ALL "
                    + "\n "
                    + "\nSELECT aam.class_id      , "
                    + "\n       aam.object_id     , "
                    + "\n       aam.attr_class_id , "
                    + "\n       aam.attr_object_id, "
                    + "\n       di.depth+1 "
                    + "\nFROM   cs_attr_object aam, "
                    + "\n       derived_index di "
                    + "\nWHERE  aam.attr_class_id =di.ocid "
                    + "\nAND    aam.attr_object_id=di.oid "
                    + "\n) "
                    + "\nSELECT DISTINCT ocid, "
                    + "\n                oid , "
                    + "\n                stringrep "
                    + "\nFROM            derived_index "
                    + "\n                LEFT OUTER JOIN cs_stringrepcache "
                    + "\n                ON              ( "
                    + "\n                                                ocid=class_id "
                    + "\n                                AND             oid =object_id "
                    + "\n                                ) "
                    + "\nWHERE           ocid IN <cidsClassesInStatement>  LIMIT 10000000 ";
        final String intersectsStatement;
        if (searchGeometry.getSRID() == 4326) {
            intersectsStatement =
                "intersects(geo_field,GeometryFromText('SRID=<cidsSearchGeometrySRID>;<cidsSearchGeometryWKT>'))";
        } else {
            if ((searchGeometry instanceof Polygon) || (searchGeometry instanceof MultiPolygon)) {
                intersectsStatement =
                    "intersects(st_buffer(geo_field, 0.000001),st_buffer(GeometryFromText('SRID=<cidsSearchGeometrySRID>;<cidsSearchGeometryWKT>'), 0.000001))";
            } else {
                intersectsStatement =
                    "intersects(st_buffer(geo_field, 0.000001),GeometryFromText('SRID=<cidsSearchGeometrySRID>;<cidsSearchGeometryWKT>'), 0.000001)";
            }
        }
        final String cidsSearchGeometryWKT = searchGeometry.toText();
        final String sridString = Integer.toString(searchGeometry.getSRID());
        final String classesInStatement = getClassesInSnippetsPerDomain().get((String)domainKey);
        if ((cidsSearchGeometryWKT == null) || (cidsSearchGeometryWKT.trim().length() == 0)
                    || (sridString == null)
                    || (sridString.trim().length() == 0)) {
            getLog().error(
                "Search geometry or srid is not given. Can't perform a search without those information.");
            return null;
        }
        if (getLog().isDebugEnabled()) {
            getLog().debug("cidsClassesInStatement=" + classesInStatement);
        }
        if (getLog().isDebugEnabled()) {
            getLog().debug("cidsSearchGeometryWKT=" + cidsSearchGeometryWKT);
        }
        if (getLog().isDebugEnabled()) {
            getLog().debug("cidsSearchGeometrySRID=" + sridString);
        }
        if (getLog().isDebugEnabled()) {
            getLog().debug("intersectsStatement=" + intersectsStatement);
        }
        if ((classesInStatement == null) || (classesInStatement.trim().length() == 0)) {
            getLog().warn("There are no search classes defined for domain '" + domainKey
                        + "'. This domain will be skipped.");
            return null;
        }
        return sql.replaceAll("<intersectsStatement>", intersectsStatement)
                    .replaceAll("<cidsClassesInStatement>", classesInStatement)
                    .replaceAll("<cidsSearchGeometryWKT>", cidsSearchGeometryWKT)
                    .replaceAll("<cidsSearchGeometrySRID>", sridString);
    }

Output:
    public String getGeoSearchSql(final Object domainKey) {
        final String sql = ""
                    + "SELECT DISTINCT i.class_id , "
                    + "                i.object_id, "
                    + "                s.stringrep "
                    + "FROM            geom g, "
                    + "                cs_attr_object_derived i "
                    + "                LEFT OUTER JOIN cs_stringrepcache s "
                    + "                ON              ( "
                    + "                                                s.class_id =i.class_id "
                    + "                                AND             s.object_id=i.object_id "
                    + "                                ) "
                    + "WHERE           i.attr_class_id = "
                    + "                ( SELECT cs_class.id "
                    + "                FROM    cs_class "
                    + "                WHERE   cs_class.table_name::text = 'GEOM'::text "
                    + "                ) "
                    + "AND             i.attr_object_id = g.id "
                    + "AND i.class_id IN <cidsClassesInStatement> "
                    + "AND geo_field && GeometryFromText('SRID=<cidsSearchGeometrySRID>;<cidsSearchGeometryWKT>') "
                    + "AND <intersectsStatement> "
                    + "ORDER BY        1,2,3";
        final String sqlAlt = ""
                    + "\nWITH recursive derived_index(ocid,oid,acid,aid,depth) AS "
                    + "\n( SELECT class_id, "
                    + "\n        object_id, "
                    + "\n        class_id , "
                    + "\n        object_id, "
                    + "\n        0 "
                    + "\nFROM    geosuche2 "
                    + "\nWHERE   class_id IN( WITH recursive derived_child(father,child,depth) AS "
                    + "\n                    ( SELECT father, "
                    + "\n                            father , "
                    + "\n                            0 "
                    + "\n                    FROM    cs_class_hierarchy "
                    + "\n                    WHERE   father IN <cidsClassesInStatement> "
                    + "\n                     "
                    + "\n                    UNION ALL "
                    + "\n                     "
                    + "\n                    SELECT ch.father, "
                    + "\n                           ch.child , "
                    + "\n                           dc.depth+1 "
                    + "\n                    FROM   derived_child dc, "
                    + "\n                           cs_class_hierarchy ch "
                    + "\n                    WHERE  ch.father=dc.child "
                    + "\n                    ) "
                    + "\n             SELECT DISTINCT child "
                    + "\n             FROM            derived_child LIMIT 100 ) "
                    + "\nAND             geo_field && GeometryFromText('SRID=<cidsSearchGeometrySRID>;<cidsSearchGeometryWKT>') "
                    + "\nAND             intersects(geo_field,GeometryFromText('SRID=<cidsSearchGeometrySRID>;<cidsSearchGeometryWKT>')) "
                    + "\n "
                    + "\nUNION ALL "
                    + "\n "
                    + "\nSELECT aam.class_id      , "
                    + "\n       aam.object_id     , "
                    + "\n       aam.attr_class_id , "
                    + "\n       aam.attr_object_id, "
                    + "\n       di.depth+1 "
                    + "\nFROM   cs_attr_object aam, "
                    + "\n       derived_index di "
                    + "\nWHERE  aam.attr_class_id =di.ocid "
                    + "\nAND    aam.attr_object_id=di.oid "
                    + "\n) "
                    + "\nSELECT DISTINCT ocid, "
                    + "\n                oid , "
                    + "\n                stringrep "
                    + "\nFROM            derived_index "
                    + "\n                LEFT OUTER JOIN cs_stringrepcache "
                    + "\n                ON              ( "
                    + "\n                                                ocid=class_id "
                    + "\n                                AND             oid =object_id "
                    + "\n                                ) "
                    + "\nWHERE           ocid IN <cidsClassesInStatement>  LIMIT 10000000 ";
        final String intersectsStatement;
        if (searchGeometry.getSRID() == 4326) {
            intersectsStatement =
                "intersects(geo_field,GeometryFromText('SRID=<cidsSearchGeometrySRID>;<cidsSearchGeometryWKT>'))";
        } else {
            if ((searchGeometry instanceof Polygon) || (searchGeometry instanceof MultiPolygon)) {
                intersectsStatement =
                    "intersects(st_buffer(geo_field, 0.000001),st_buffer(GeometryFromText('SRID=<cidsSearchGeometrySRID>;<cidsSearchGeometryWKT>'), 0.000001))";
            } else {
                intersectsStatement =
                    "intersects(st_buffer(geo_field, 0.000001),GeometryFromText('SRID=<cidsSearchGeometrySRID>;<cidsSearchGeometryWKT>'))";
            }
        }
        final String cidsSearchGeometryWKT = searchGeometry.toText();
        final String sridString = Integer.toString(searchGeometry.getSRID());
        final String classesInStatement = getClassesInSnippetsPerDomain().get((String)domainKey);
        if ((cidsSearchGeometryWKT == null) || (cidsSearchGeometryWKT.trim().length() == 0)
                    || (sridString == null)
                    || (sridString.trim().length() == 0)) {
            getLog().error(
                "Search geometry or srid is not given. Can't perform a search without those information.");
            return null;
        }
        if (getLog().isDebugEnabled()) {
            getLog().debug("cidsClassesInStatement=" + classesInStatement);
        }
        if (getLog().isDebugEnabled()) {
            getLog().debug("cidsSearchGeometryWKT=" + cidsSearchGeometryWKT);
        }
        if (getLog().isDebugEnabled()) {
            getLog().debug("cidsSearchGeometrySRID=" + sridString);
        }
        if (getLog().isDebugEnabled()) {
            getLog().debug("intersectsStatement=" + intersectsStatement);
        }
        if ((classesInStatement == null) || (classesInStatement.trim().length() == 0)) {
            getLog().warn("There are no search classes defined for domain '" + domainKey
                        + "'. This domain will be skipped.");
            return null;
        }
        return sql.replaceAll("<intersectsStatement>", intersectsStatement)
                    .replaceAll("<cidsClassesInStatement>", classesInStatement)
                    .replaceAll("<cidsSearchGeometryWKT>", cidsSearchGeometryWKT)
                    .replaceAll("<cidsSearchGeometrySRID>", sridString);
    }


Input:
    private Image labelImage(BufferedImage image, String label) {
        if (label != null) {
            Graphics2D g2 = image.createGraphics();
            String[] words = label.split(" ");
            String longest = "";
            for (int i = 0; i < words.length; i++) {
                if (words[i].length() > longest.length()) {
                    longest = words[i];
                }
            }
            int rowGap = 3;
            int x;
            int y = rowGap;
            int iw = image.getWidth();
            int ih = image.getHeight();
            int fontSize = 10;
            Font font = new Font("SansSerif", Font.BOLD, fontSize);
            FontMetrics metrics = g2.getFontMetrics(font);
            while (!(metrics.getStringBounds(longest, g2).getWidth() < iw - 2) &&
                    fontSize > 5) {
                fontSize--;
                font = new Font("SansSerif", Font.BOLD, fontSize);
                metrics = g2.getFontMetrics(font);
            }
            g2.setFont(font);
            g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
                           RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);
            g2.setColor(Color.DARK_GRAY);
            Rectangle2D maxBounds = metrics.getMaxCharBounds(g2);
            int wh = (int) maxBounds.getHeight();
            for (int i = 0; i < words.length; i++) {
                Rectangle2D stringBounds = metrics.getStringBounds(words[i], g2);
                x = (int) (iw / 2 - stringBounds.getWidth() / 2);
                g2.drawString(words[i], x, y + wh);
                y += wh + rowGap;
            }
            g2.dispose();
        }
        return image;
    }

Output:
    private Image labelImage(BufferedImage image, String label) {
        if (label != null) {
            Graphics2D g2 = image.createGraphics();
            String[] words = label.split(" ");
            String longest = "";
            for (int i = 0; i < words.length; i++) {
                if (words[i].length() > longest.length()) {
                    longest = words[i];
                }
            }
            int rowGap = 3;
            int x;
            int y = rowGap;
            int iw = image.getWidth();
            int ih = image.getHeight();
            int fontSize = 10;
            Font font = new Font("SansSerif", Font.BOLD, fontSize);
            FontMetrics metrics = g2.getFontMetrics(font);
            while (!(metrics.getStringBounds(longest, g2).getWidth() < iw - 2) &&
                    fontSize > 5) {
                fontSize--;
                font = new Font("SansSerif", Font.BOLD, fontSize);
                metrics = g2.getFontMetrics(font);
            }
            g2.setFont(font);
            g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
                           RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
            g2.setColor(Color.DARK_GRAY);
            Rectangle2D maxBounds = metrics.getMaxCharBounds(g2);
            int wh = (int) maxBounds.getHeight();
            for (int i = 0; i < words.length; i++) {
                Rectangle2D stringBounds = metrics.getStringBounds(words[i], g2);
                x = (int) (iw / 2 - stringBounds.getWidth() / 2);
                g2.drawString(words[i], x, y + wh);
                y += wh + rowGap;
            }
            g2.dispose();
        }
        return image;
    }


Input:
	public void everySecondCheck() {
		if (schedulerTaskID != -1) {
			Config.removeBorder(plugin.startPosition.getWorld().getName());
			schedulerTaskID = plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() {
				public void run() {
					switch (gameStatus) {
						case 1:
							if (plugin.debug) {
								plugin.log.info((preGameCountdown - currentLoop) + " seconds until game starts.");
							}
							if ((preGameCountdown - currentLoop % 3600 == 0 || preGameCountdown - currentLoop == 60 || preGameCountdown - currentLoop % 60 == 0 || (preGameCountdown - currentLoop <= 10 && preGameCountdown - currentLoop > 0) || preGameCountdown - currentLoop == 15 || preGameCountdown - currentLoop == 30) && preGameCountdown - currentLoop != 0) {
								plugin.serverwide.sendMessageToAllPlayers(String.format(plugin.strings.get("starttimeleft"), (((preGameCountdown - currentLoop) % 3600) == 0) ? ((preGameCountdown - currentLoop) / 60) + " hour" + ((((preGameCountdown - currentLoop) / 60) == 1) ? "s" : "") : ((preGameCountdown - currentLoop) % 60 == 0 ? (preGameCountdown - currentLoop) / 60 + " minute" + (((preGameCountdown - currentLoop) / 60) == 1 ? "" : "s") : (preGameCountdown - currentLoop) + " second" + ((preGameCountdown - currentLoop != 1) ? "s" : ""))));
							}
							if (currentLoop >= preGameCountdown) {
								if (plugin.debug) {
									plugin.log.info("Attempting to start...");
								}
								if (plugin.serverwide.livingPlayers.size() <= minPlayersToStart) {
									plugin.serverwide.sendMessageToAllPlayers(plugin.strings.get("startnotenoughplayers"));
								} else {
									ScheduledTasks.gameStatus = 2;
									plugin.scheduler.startGame();
								}
								currentLoop = -1;
							}
							currentLoop++;
							break;
						case 2:
							if (plugin.debug) {
								plugin.log.info((gameInvincibleCountdown - currentLoop) + " seconds until invincibility ends.");
							}
							if (currentLoop >= gameInvincibleCountdown) {
								if (plugin.debug) {
									plugin.log.info("Invincibility has ended.");
								}
								plugin.serverwide.sendMessageToAllPlayers(plugin.strings.get("invincibilityend"));
								gameStatus = 3;
								currentLoop = -1;
							}
							currentLoop++;
							break;
						case 3:
							if (plugin.debug) {
								plugin.log.info((gameOvertimeCountdown - currentLoop) + " seconds until overtime starts.");
							}
							if ((currentLoop - gameOvertimeCountdown) % 60 == 0 || (((currentLoop - gameOvertimeCountdown) / 60) <= 60 && ((((currentLoop - gameOvertimeCountdown) / 60) == 30 || ((currentLoop - gameOvertimeCountdown) / 60) == 15 || (((currentLoop - gameOvertimeCountdown) / 60) <= 10 && !(((currentLoop - gameOvertimeCountdown) / 60) == 0)))))) {
								if (!((currentLoop - gameOvertimeCountdown) == 0)) {
									plugin.serverwide.sendMessageToAllPlayers( (gameOvertimeCountdown-currentLoop ) % 60 == 0 ? (gameOvertimeCountdown-currentLoop) / 60 + " minutes until overtime starts" : (gameOvertimeCountdown-currentLoop) / 60 +" minutes and " + (gameOvertimeCountdown-currentLoop) % 60 + " seconds until overtime starts.");
								}
							}
							if (currentLoop >= gameOvertimeCountdown) {
								if (plugin.debug) {
									plugin.log.info("Overtime has started.");
								}
								plugin.serverwide.sendMessageToAllPlayers(plugin.strings.get("overtimestart"));
								for (Player p : plugin.getServer().getOnlinePlayers()) {
									if (plugin.serverwide.getArcher(p).isReady) {
										p.teleport(plugin.startPosition);
									}
								}
								Config.setBorder(plugin.startPosition.getWorld().getName(), overtimeWorldRadius, plugin.startPosition.getBlockX(), plugin.startPosition.getBlockZ(), true);
								gameStatus = 4;
								currentLoop = -1;
							}
							currentLoop++;
							break;
						case 4:
							int alivePlayers = 0;
							for (Player p : plugin.getServer().getOnlinePlayers()) {
								if (Archer.getByName(p.getName()).isAlive()) {
									alivePlayers++;
								}
							}
							if (alivePlayers <= 1) {
								if (plugin.debug) {
									plugin.log.info("Game has ended.");
								}
								plugin.scheduler.endGame();
								currentLoop = -1;
							}
							currentLoop++;
							break;
						case 5:
							if (plugin.debug) {
								plugin.log.info((shutdownTimer - currentLoop) + " seconds until server reboots.");
							}
							if (currentLoop % 5 == 0) {
								plugin.serverwide.sendMessageToAllPlayers(ChatColor.GREEN + "" + plugin.winner + " is the winner!");
							}
							if (currentLoop >= shutdownTimer) {
								if (plugin.debug) {
									plugin.log.info("Kicking all players, then shutting down.");
								}
								for (Player p : plugin.getServer().getOnlinePlayers()) {
									p.kickPlayer(plugin.strings.get("serverclosekick"));
								}
								plugin.getServer().shutdown();
							}
							currentLoop++;
							break;
					}
				}
			}, 20L, 20L);
			if (plugin.debug) {
				plugin.log.info("Task ID is " + schedulerTaskID);
			}
		} else {
			plugin.log.severe("Scheduler task start was attempted, but scheduler task already running!");
		}
	}

Output:
	public void everySecondCheck() {
		if (schedulerTaskID != -1) {
			Config.removeBorder(plugin.startPosition.getWorld().getName());
			schedulerTaskID = plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() {
				public void run() {
					switch (gameStatus) {
						case 1:
							if (plugin.debug) {
								plugin.log.info((preGameCountdown - currentLoop) + " seconds until game starts.");
							}
							if ((preGameCountdown - currentLoop % 3600 == 0 || preGameCountdown - currentLoop == 60 || preGameCountdown - currentLoop % 60 == 0 || (preGameCountdown - currentLoop <= 10 && preGameCountdown - currentLoop > 0) || preGameCountdown - currentLoop == 15 || preGameCountdown - currentLoop == 30) && preGameCountdown - currentLoop != 0) {
								plugin.serverwide.sendMessageToAllPlayers(String.format(plugin.strings.get("starttimeleft"), (((preGameCountdown - currentLoop) % 3600) == 0) ? ((preGameCountdown - currentLoop) / 60) + " hour" + ((((preGameCountdown - currentLoop) / 60) == 1) ? "s" : "") : ((preGameCountdown - currentLoop) % 60 == 0 ? (preGameCountdown - currentLoop) / 60 + " minute" + (((preGameCountdown - currentLoop) / 60) == 1 ? "" : "s") : (preGameCountdown - currentLoop) + " second" + ((preGameCountdown - currentLoop != 1) ? "s" : ""))));
							}
							if (currentLoop >= preGameCountdown) {
								if (plugin.debug) {
									plugin.log.info("Attempting to start...");
								}
								if (plugin.serverwide.livingPlayers.size() <= minPlayersToStart) {
									plugin.serverwide.sendMessageToAllPlayers(plugin.strings.get("startnotenoughplayers"));
								} else {
									ScheduledTasks.gameStatus = 2;
									plugin.scheduler.startGame();
								}
								currentLoop = -1;
							}
							currentLoop++;
							break;
						case 2:
							if (plugin.debug) {
								plugin.log.info((gameInvincibleCountdown - currentLoop) + " seconds until invincibility ends.");
							}
							if (currentLoop >= gameInvincibleCountdown) {
								if (plugin.debug) {
									plugin.log.info("Invincibility has ended.");
								}
								plugin.serverwide.sendMessageToAllPlayers(plugin.strings.get("invincibilityend"));
								gameStatus = 3;
								currentLoop = -1;
							}
							currentLoop++;
							break;
						case 3:
							if (plugin.debug) {
								plugin.log.info((gameOvertimeCountdown - currentLoop) + " seconds until overtime starts.");
							}
							if ((currentLoop - gameOvertimeCountdown) % 60 == 0 || (((currentLoop - gameOvertimeCountdown) / 60) <= 60 && ((((currentLoop - gameOvertimeCountdown) / 60) == 30 || ((currentLoop - gameOvertimeCountdown) / 60) == 15 || (((currentLoop - gameOvertimeCountdown) / 60) <= 10 && !(((currentLoop - gameOvertimeCountdown) / 60) == 0)))))) {
								if (!((currentLoop - gameOvertimeCountdown) == 0)) {
									plugin.serverwide.sendMessageToAllPlayers( (gameOvertimeCountdown-currentLoop ) % 60 == 0 ? (gameOvertimeCountdown-currentLoop) / 60 + " minutes until overtime starts" : (gameOvertimeCountdown-currentLoop) / 60 +" minutes and " + (gameOvertimeCountdown-currentLoop) % 60 + " seconds until overtime starts.");
								}
							}
							if (currentLoop >= gameOvertimeCountdown) {
								if (plugin.debug) {
									plugin.log.info("Overtime has started.");
								}
								plugin.serverwide.sendMessageToAllPlayers(plugin.strings.get("overtimestart"));
								for (Player p : plugin.getServer().getOnlinePlayers()) {
									if (plugin.serverwide.getArcher(p).isReady) {
										p.teleport(plugin.startPosition);
									}
								}
								Config.setBorder(plugin.startPosition.getWorld().getName(), overtimeWorldRadius, plugin.startPosition.getBlockX(), plugin.startPosition.getBlockZ(), true);
								gameStatus = 4;
								currentLoop = -1;
							}
							currentLoop++;
							break;
						case 4:
							int alivePlayers = 0;
							for (Player p : plugin.getServer().getOnlinePlayers()) {
								if (Archer.getByName(p.getName()).isAlive()) {
									alivePlayers++;
								}
							}
							if (alivePlayers <= 1) {
								if (plugin.debug) {
									plugin.log.info("Game has ended.");
								}
								plugin.scheduler.endGame();
								currentLoop = -1;
							}
							currentLoop++;
							break;
						case 5:
							if (plugin.debug) {
								plugin.log.info((shutdownTimer - currentLoop) + " seconds until server reboots.");
							}
							if (currentLoop % 5 == 0) {
								plugin.serverwide.sendMessageToAllPlayers(ChatColor.GREEN + "" + plugin.serverwide.winner + " is the winner!");
							}
							if (currentLoop >= shutdownTimer) {
								if (plugin.debug) {
									plugin.log.info("Kicking all players, then shutting down.");
								}
								for (Player p : plugin.getServer().getOnlinePlayers()) {
									p.kickPlayer(plugin.strings.get("serverclosekick"));
								}
								plugin.getServer().shutdown();
							}
							currentLoop++;
							break;
					}
				}
			}, 20L, 20L);
			if (plugin.debug) {
				plugin.log.info("Task ID is " + schedulerTaskID);
			}
		} else {
			plugin.log.severe("Scheduler task start was attempted, but scheduler task already running!");
		}
	}


Input:
    public static <T> T templateFor( Class<T> clazz )
    {
        NullArgumentException.validateNotNull( "Template class", clazz );
        if( clazz.isInterface() )
        {
            return clazz.cast( Proxy.newProxyInstance( clazz.getClassLoader(),
                                                       new Class<?>[] { clazz },
                                                       new TemplateHandler<T>( null, null, null ) ) );
        }
        else
        {
            try
            {
                T mixin = clazz.newInstance();
                for( Field field : clazz.getFields() )
                {
                    if( field.getAnnotation( State.class ) != null )
                    {
                        if( field.getType().equals( Property.class ) )
                        {
                            field.set( mixin,
                                       Proxy.newProxyInstance( field.getType().getClassLoader(),
                                                               new Class<?>[]{ field.getType() },
                                                               new PropertyReferenceHandler<>( new PropertyFunction<T>( null, null, null, field ) ) ) );
                        }
                        else if( field.getType().equals( Association.class ) )
                        {
                            field.set( mixin,
                                       Proxy.newProxyInstance( field.getType().getClassLoader(),
                                                               new Class<?>[]{ field.getType() },
                                                               new AssociationReferenceHandler<>( new AssociationFunction<T>( null, null, field ) ) ) );
                        }
                        else if( field.getType().equals( Property.class ) )
                        {
                            field.set( mixin,
                                       Proxy.newProxyInstance( field.getType().getClassLoader(),
                                                               new Class<?>[]{ field.getType() },
                                                               new ManyAssociationReferenceHandler<>( new ManyAssociationFunction<T>( null, null, field ) ) ) );
                        }
                    }
                }
                return mixin;
            }
            catch( IllegalAccessException | IllegalArgumentException | InstantiationException | SecurityException e )
            {
                throw new IllegalArgumentException( "Cannot use class as template", e );
            }
        }
    }

Output:
    public static <T> T templateFor( Class<T> clazz )
    {
        NullArgumentException.validateNotNull( "Template class", clazz );
        if( clazz.isInterface() )
        {
            return clazz.cast( Proxy.newProxyInstance( clazz.getClassLoader(),
                                                       new Class<?>[] { clazz },
                                                       new TemplateHandler<T>( null, null, null ) ) );
        }
        else
        {
            try
            {
                T mixin = clazz.newInstance();
                for( Field field : clazz.getFields() )
                {
                    if( field.getAnnotation( State.class ) != null )
                    {
                        if( field.getType().equals( Property.class ) )
                        {
                            field.set( mixin,
                                       Proxy.newProxyInstance( field.getType().getClassLoader(),
                                                               new Class<?>[]{ field.getType() },
                                                               new PropertyReferenceHandler<>( new PropertyFunction<T>( null, null, null, field ) ) ) );
                        }
                        else if( field.getType().equals( Association.class ) )
                        {
                            field.set( mixin,
                                       Proxy.newProxyInstance( field.getType().getClassLoader(),
                                                               new Class<?>[]{ field.getType() },
                                                               new AssociationReferenceHandler<>( new AssociationFunction<T>( null, null, field ) ) ) );
                        }
                        else if( field.getType().equals( ManyAssociation.class ) )
                        {
                            field.set( mixin,
                                       Proxy.newProxyInstance( field.getType().getClassLoader(),
                                                               new Class<?>[]{ field.getType() },
                                                               new ManyAssociationReferenceHandler<>( new ManyAssociationFunction<T>( null, null, field ) ) ) );
                        }
                    }
                }
                return mixin;
            }
            catch( IllegalAccessException | IllegalArgumentException | InstantiationException | SecurityException e )
            {
                throw new IllegalArgumentException( "Cannot use class as template", e );
            }
        }
    }


Input:
void sendHtmlMailReport(ITestContext testContext) {
        String buildNumber = System.getProperty("sgtest.buildNumber");
        String suiteName = System.getProperty("sgtest.suiteName");
        List<String> mailRecipients = null;
        if(buildNumber == null)
            return;
        Properties props = new Properties();
        InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream("framework/report/mailreporter.properties");
        try {
            props.load(in);
            in.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
        MailReporterProperties mailProperties = new MailReporterProperties(props);
        String link = null;
        if (suiteName.contains("webui")) {
        	link = ""+buildNumber+" ";
        }
        else {
        	link = ""+buildNumber+" ";
        }
        StringBuilder sb = new StringBuilder();
        sb.append("").append("\n");
        sb.append("
SGTtest Results

").append("\n");
        sb.append("
Suite Name:  " + testContext.getSuite().getName() + "

").append("\n");
        sb.append("
Start Date:  " + testContext.getStartDate() + "

").append("\n");
        sb.append("
End Date:  " + testContext.getEndDate() + "

").append("\n");
        sb.append("
Skipped Configurations:  " + testContext.getSkippedConfigurations().size() + "

").append("\n");
        sb.append("
Skipped Tests:  " + testContext.getSkippedTests().size() + "

").append("\n");
        sb.append("
Failed Tests:  " + testContext.getFailedTests().size() + "

").append("\n");
        sb.append("
Passed Tests:  " + testContext.getPassedTests().size() + "

").append("\n");
        sb.append("
Full Suite Report:  " + link + "

").append("\n");
        sb.append("");
        try {
        	mailRecipients = mailProperties.getRecipients();
        	if (suiteName.contains("webui")) mailRecipients = mailProperties.getWebUIRecipients();
        	if (suiteName.equals("ServiceGrid")) mailRecipients = mailProperties.getSGRecipients();
        	if (suiteName.equals("WAN")) mailRecipients = mailProperties.getWanRecipients();
        	if (suiteName.equals("SECURITY")) mailRecipients = mailProperties.getSecurityRecipients();
        	if (suiteName.equals("CLOUDIFY")) mailRecipients = mailProperties.getCloudifyRecipients();
        	if (suiteName.equals("ESM")) mailRecipients = mailProperties.getESMRecipients();
            SimpleMail.send(mailProperties.getMailHost(), mailProperties.getUsername(), mailProperties.getPassword(),
                    "SGTest Suite " + testContext.getSuite().getName() + " results", sb.toString(), mailRecipients);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

Output:
    void sendHtmlMailReport(ITestContext testContext) {
        String buildNumber = System.getProperty("sgtest.buildNumber");
        String suiteName = System.getProperty("sgtest.suiteName");
        List<String> mailRecipients = null;
        if(buildNumber == null)
            return;
        Properties props = new Properties();
        InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream("framework/report/mailreporter.properties");
        try {
            props.load(in);
            in.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
        MailReporterProperties mailProperties = new MailReporterProperties(props);
        String link = null;
        if (suiteName.contains("webui")) {
        	link = "<a href=http://192.168.9.121:8087/sgtest.webui.cloudify/" + buildNumber + "/" + suiteName + "/html>"+buildNumber+" </a>";
        }
        else {
        	link = "<a href=http://192.168.9.121:8087/sgtest-cloudify/" + buildNumber + "/" + suiteName + "/html>"+buildNumber+" </a>";
        }
        StringBuilder sb = new StringBuilder();
        sb.append("<html>").append("\n");
        sb.append("<h1>SGTtest Results </h1></br></br></br>").append("\n");
        sb.append("<h2>Suite Name:  " + testContext.getSuite().getName() + " </h2></br>").append("\n");
        sb.append("<h4>Start Date:  " + testContext.getStartDate() + " </h4></br>").append("\n");
        sb.append("<h4>End Date:  " + testContext.getEndDate() + " </h4></br>").append("\n");
        sb.append("<h4 style=\"color:blue\">Skipped Configurations:  " + testContext.getSkippedConfigurations().size() + " </h4></br>").append("\n");
        sb.append("<h4 style=\"color:orange\">Skipped Tests:  " + testContext.getSkippedTests().size() + " </h4></br>").append("\n");
        sb.append("<h4 style=\"color:red\">Failed Tests:  " + testContext.getFailedTests().size() + " </h4></br>").append("\n");
        sb.append("<h4 style=\"color:green\">Passed Tests:  " + testContext.getPassedTests().size() + " </h4></br>").append("\n");
        sb.append("<h4>Full Suite Report:  " + link + " </h4></br>").append("\n");
        sb.append("</html>");
        try {
        	mailRecipients = mailProperties.getRecipients();
        	if (suiteName.contains("webui")) mailRecipients = mailProperties.getWebUIRecipients();
        	if (suiteName.equals("ServiceGrid")) mailRecipients = mailProperties.getSGRecipients();
        	if (suiteName.equals("WAN")) mailRecipients = mailProperties.getWanRecipients();
        	if (suiteName.equals("SECURITY")) mailRecipients = mailProperties.getSecurityRecipients();
        	if (suiteName.equals("CLOUDIFY")) mailRecipients = mailProperties.getCloudifyRecipients();
        	if (suiteName.equals("ESM")) mailRecipients = mailProperties.getESMRecipients();
            SimpleMail.send(mailProperties.getMailHost(), mailProperties.getUsername(), mailProperties.getPassword(),
                    "SGTest Suite " + testContext.getSuite().getName() + " results", sb.toString(), mailRecipients);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


Input:
    protected void doCopyToCimi(final CimiContext context, final Credentials dataService, final CimiCredentials dataCimi) {
        this.fill(context, dataService, dataCimi);
        if (true == context.mustBeExpanded(dataCimi)) {
            dataCimi.setUserName(dataService.getUserName());
            if (true == context.isConvertedWriteOnly()) {
                dataCimi.setKey(dataService.getPublicKey());
                dataCimi.setPassword(dataService.getPassword());
            }
        }
    }

Output:
    protected void doCopyToCimi(final CimiContext context, final Credentials dataService, final CimiCredentials dataCimi) {
        this.fill(context, dataService, dataCimi);
        if (true == context.mustBeExpanded(dataCimi)) {
            dataCimi.setUserName(dataService.getUserName());
            dataCimi.setKey(dataService.getPublicKey());
            if (true == context.isConvertedWriteOnly()) {
                dataCimi.setPassword(dataService.getPassword());
            }
        }
    }


Input:
		protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		if( request.getSession().getAttribute("adherent") == null ) {
			response.sendRedirect(request.getContextPath() + "/Login");
			return;
		}
		ArticlePersistence service = PersistenceServiceProvider.getService(ArticlePersistence.class);
		if( articleAjoute(request) ) {
			int id = Integer.parseInt( request.getParameter("article") );
			Article article = service.load(id);
			if ( article == null ) {
				response.sendError(HttpServletResponse.SC_NOT_FOUND, "La page entr�e n'est pas valide ");
                return;
			}
            else {
                HttpSession session = request.getSession();
                ArrayList<Article> articles = (ArrayList<Article>) session.getAttribute("orderInProcess");
                if( articles == null ) {
                    articles = new ArrayList<>();
                }
                articles.add(article);
                request.setAttribute("added", id);
            }
		}
		List<Article> articles = service.loadAll();
		RequestDispatcher rd;
		request.setAttribute("articles", articles);
		rd = context.getRequestDispatcher("/jsp/Articles.jsp");
		rd.include(request, response);
	}

Output:
		protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		if( request.getSession().getAttribute("adherent") == null ) {
			response.sendRedirect(request.getContextPath() + "/Login");
			return;
		}
		ArticlePersistence service = PersistenceServiceProvider.getService(ArticlePersistence.class);
		if( articleAjoute(request) ) {
			int id = Integer.parseInt( request.getParameter("article") );
			Article article = service.load(id);
			if ( article == null ) {
				response.sendError(HttpServletResponse.SC_NOT_FOUND, "La page entrée n'est pas valide ");
                return;
			}
            else {
                HttpSession session = request.getSession();
                ArrayList<Article> articles = (ArrayList<Article>) session.getAttribute("orderInProcess");
                if( articles == null ) {
                    articles = new ArrayList<>();
                    session.setAttribute("orderInProcess",articles);
                }
                articles.add(article);
                request.setAttribute("added", id);
            }
		}
		List<Article> articles = service.loadAll();
		RequestDispatcher rd;
		request.setAttribute("articles", articles);
		rd = context.getRequestDispatcher("/jsp/Articles.jsp");
		rd.include(request, response);
	}


Input:
    private void initComponents() {
        userPasswordPanel = new javax.swing.JPanel();
        upServerLabel = new javax.swing.JLabel();
        upPasswordLabel = new javax.swing.JLabel();
        upUsernameLabel = new javax.swing.JLabel();
        upServerField = new javax.swing.JTextField();
        upPasswordField = new javax.swing.JPasswordField();
        upUsernameField = new javax.swing.JTextField();
        webPanel = new javax.swing.JPanel();
        webServerLabel = new javax.swing.JLabel();
        webServerField = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        gradientPanel1 = new org.jdesktop.wonderland.client.jme.login.GradientPanel();
        worldNameLabel = new javax.swing.JLabel();
        gradientPanel2 = new org.jdesktop.wonderland.client.jme.login.GradientPanel();
        loginSpecificPanel = new javax.swing.JPanel();
        tagLineLabel = new javax.swing.JLabel();
        buttonPanel = new javax.swing.JPanel();
        cancelButton = new javax.swing.JButton();
        loginButton = new javax.swing.JButton();
        getRootPane().setDefaultButton(loginButton);
        statusLabel = new javax.swing.JLabel();
        advancedButton = new javax.swing.JButton();
        userPasswordPanel.setOpaque(false);
        upServerLabel.setFont(new java.awt.Font("Dialog", 1, 13));
        java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("org/jdesktop/wonderland/client/jme/login/Bundle");
        upServerLabel.setText(bundle.getString("WonderlandLoginDialog.upServerLabel.text"));
        upPasswordLabel.setFont(new java.awt.Font("Dialog", 1, 13));
        upPasswordLabel.setText(bundle.getString("WonderlandLoginDialog.upPasswordLabel.text"));
        upUsernameLabel.setFont(new java.awt.Font("Dialog", 1, 13));
        upUsernameLabel.setText(bundle.getString("WonderlandLoginDialog.upUsernameLabel.text"));
        upServerField.setEditable(false);
        upPasswordField.setFont(new java.awt.Font("Dialog", 0, 13));
        upPasswordField.setMinimumSize(new java.awt.Dimension(98, 22));
        upUsernameField.setFont(new java.awt.Font("Dialog", 0, 13));
        upUsernameField.setMinimumSize(new java.awt.Dimension(98, 22));
        org.jdesktop.layout.GroupLayout userPasswordPanelLayout = new org.jdesktop.layout.GroupLayout(userPasswordPanel);
        userPasswordPanel.setLayout(userPasswordPanelLayout);
        userPasswordPanelLayout.setHorizontalGroup(
            userPasswordPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(userPasswordPanelLayout.createSequentialGroup()
                .add(26, 26, 26)
                .add(userPasswordPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(upPasswordLabel)
                    .add(upUsernameLabel)
                    .add(upServerLabel))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(userPasswordPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(upUsernameField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(upPasswordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(upServerField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 274, Short.MAX_VALUE))
                .addContainerGap())
        );
        userPasswordPanelLayout.setVerticalGroup(
            userPasswordPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, userPasswordPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(userPasswordPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(upUsernameLabel)
                    .add(upUsernameField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(userPasswordPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(upPasswordLabel)
                    .add(upPasswordField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(userPasswordPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(upServerField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(upServerLabel))
                .add(20, 20, 20))
        );
        webPanel.setOpaque(false);
        webPanel.setPreferredSize(new java.awt.Dimension(402, 140));
        webServerLabel.setFont(new java.awt.Font("Dialog", 1, 13));
        webServerLabel.setText(bundle.getString("WonderlandLoginDialog.webServerLabel.text"));
        webServerField.setEditable(false);
        webServerField.setFont(new java.awt.Font("Dialog", 0, 13));
        webServerField.setMinimumSize(new java.awt.Dimension(98, 22));
        jLabel1.setText(bundle.getString("WonderlandLoginDialog.jLabel1.text"));
        org.jdesktop.layout.GroupLayout webPanelLayout = new org.jdesktop.layout.GroupLayout(webPanel);
        webPanel.setLayout(webPanelLayout);
        webPanelLayout.setHorizontalGroup(
            webPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(webPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(webPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(webPanelLayout.createSequentialGroup()
                        .add(webServerLabel)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(webServerField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE))
                    .add(jLabel1))
                .addContainerGap())
        );
        webPanelLayout.setVerticalGroup(
            webPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, webPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 56, Short.MAX_VALUE)
                .add(webPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(webServerLabel)
                    .add(webServerField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setResizable(false);
        gradientPanel1.setGradientEndColor(new java.awt.Color(163, 183, 255));
        gradientPanel1.setGradientStartColor(new java.awt.Color(0, 51, 255));
        gradientPanel1.setMinimumSize(new java.awt.Dimension(0, 82));
        worldNameLabel.setFont(new java.awt.Font("Arial", 1, 36));
        worldNameLabel.setForeground(new java.awt.Color(255, 255, 255));
        worldNameLabel.setText(bundle.getString("WonderlandLoginDialog.worldNameLabel.text"));
        org.jdesktop.layout.GroupLayout gradientPanel1Layout = new org.jdesktop.layout.GroupLayout(gradientPanel1);
        gradientPanel1.setLayout(gradientPanel1Layout);
        gradientPanel1Layout.setHorizontalGroup(
            gradientPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(gradientPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(worldNameLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 372, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(66, Short.MAX_VALUE))
        );
        gradientPanel1Layout.setVerticalGroup(
            gradientPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(gradientPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(worldNameLabel)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        gradientPanel2.setGradientEndColor(new java.awt.Color(217, 225, 255));
        gradientPanel2.setGradientStartColor(new java.awt.Color(163, 183, 255));
        gradientPanel2.setLayout(new java.awt.BorderLayout());
        loginSpecificPanel.setOpaque(false);
        loginSpecificPanel.setLayout(new java.awt.BorderLayout());
        gradientPanel2.add(loginSpecificPanel, java.awt.BorderLayout.CENTER);
        tagLineLabel.setFont(new java.awt.Font("Arial", 1, 18));
        tagLineLabel.setForeground(new java.awt.Color(255, 255, 255));
        tagLineLabel.setText(bundle.getString("WonderlandLoginDialog.tagLineLabel.text"));
        tagLineLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        tagLineLabel.setAlignmentY(0.0F);
        tagLineLabel.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10));
        tagLineLabel.setFocusable(false);
        gradientPanel2.add(tagLineLabel, java.awt.BorderLayout.NORTH);
        buttonPanel.setOpaque(false);
        buttonPanel.setPreferredSize(new java.awt.Dimension(453, 65));
        cancelButton.setBackground(new java.awt.Color(255, 255, 255));
        cancelButton.setFont(new java.awt.Font("Dialog", 1, 13));
        cancelButton.setText(bundle.getString("WonderlandLoginDialog.cancelButton.text"));
        cancelButton.setAlignmentX(0.5F);
        cancelButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelButtonActionPerformed(evt);
            }
        });
        loginButton.setBackground(new java.awt.Color(255, 255, 255));
        loginButton.setFont(new java.awt.Font("Dialog", 1, 13));
        loginButton.setText(bundle.getString("WonderlandLoginDialog.loginButton.text"));
        loginButton.setAlignmentX(0.5F);
        loginButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                loginButtonActionPerformed(evt);
            }
        });
        statusLabel.setFont(new java.awt.Font("Arial", 1, 12));
        statusLabel.setForeground(new java.awt.Color(45, 45, 45));
        statusLabel.setText(bundle.getString("WonderlandLoginDialog.statusLabel.text"));
        advancedButton.setFont(new java.awt.Font("Dialog", 0, 13));
        advancedButton.setText(bundle.getString("WonderlandLoginDialog.advancedButton.text"));
        advancedButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                advancedButtonActionPerformed(evt);
            }
        });
        org.jdesktop.layout.GroupLayout buttonPanelLayout = new org.jdesktop.layout.GroupLayout(buttonPanel);
        buttonPanel.setLayout(buttonPanelLayout);
        buttonPanelLayout.setHorizontalGroup(
            buttonPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(buttonPanelLayout.createSequentialGroup()
                .add(buttonPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(buttonPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .add(statusLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 308, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(10, 10, 10))
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, buttonPanelLayout.createSequentialGroup()
                        .addContainerGap(110, Short.MAX_VALUE)
                        .add(cancelButton)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(loginButton)
                        .add(40, 40, 40)))
                .add(advancedButton)
                .addContainerGap())
        );
        buttonPanelLayout.linkSize(new java.awt.Component[] {cancelButton, loginButton}, org.jdesktop.layout.GroupLayout.HORIZONTAL);
        buttonPanelLayout.setVerticalGroup(
            buttonPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(buttonPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(buttonPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(statusLabel)
                    .add(advancedButton))
                .addContainerGap(24, Short.MAX_VALUE))
            .add(org.jdesktop.layout.GroupLayout.TRAILING, buttonPanelLayout.createSequentialGroup()
                .addContainerGap(24, Short.MAX_VALUE)
                .add(buttonPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(loginButton)
                    .add(cancelButton))
                .addContainerGap())
        );
        gradientPanel2.add(buttonPanel, java.awt.BorderLayout.PAGE_END);
        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(gradientPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE)
            .add(gradientPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(gradientPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(4, 4, 4)
                .add(gradientPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE))
        );
        pack();
    }

Output:
    private void initComponents() {
        userPasswordPanel = new javax.swing.JPanel();
        upServerLabel = new javax.swing.JLabel();
        upPasswordLabel = new javax.swing.JLabel();
        upUsernameLabel = new javax.swing.JLabel();
        upServerField = new javax.swing.JTextField();
        upPasswordField = new javax.swing.JPasswordField();
        upUsernameField = new javax.swing.JTextField();
        webPanel = new javax.swing.JPanel();
        webServerLabel = new javax.swing.JLabel();
        webServerField = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        gradientPanel1 = new org.jdesktop.wonderland.client.jme.login.GradientPanel();
        worldNameLabel = new javax.swing.JLabel();
        gradientPanel2 = new org.jdesktop.wonderland.client.jme.login.GradientPanel();
        loginSpecificPanel = new javax.swing.JPanel();
        tagLineLabel = new javax.swing.JLabel();
        buttonPanel = new javax.swing.JPanel();
        cancelButton = new javax.swing.JButton();
        loginButton = new javax.swing.JButton();
        getRootPane().setDefaultButton(loginButton);
        statusLabel = new javax.swing.JLabel();
        advancedButton = new javax.swing.JButton();
        userPasswordPanel.setOpaque(false);
        upServerLabel.setFont(new java.awt.Font("Dialog", 1, 13));
        java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("org/jdesktop/wonderland/client/jme/login/Bundle");
        upServerLabel.setText(bundle.getString("WonderlandLoginDialog.upServerLabel.text"));
        upPasswordLabel.setFont(new java.awt.Font("Dialog", 1, 13));
        upPasswordLabel.setText(bundle.getString("WonderlandLoginDialog.upPasswordLabel.text"));
        upUsernameLabel.setFont(new java.awt.Font("Dialog", 1, 13));
        upUsernameLabel.setText(bundle.getString("WonderlandLoginDialog.upUsernameLabel.text"));
        upServerField.setEditable(false);
        upPasswordField.setFont(new java.awt.Font("Dialog", 0, 13));
        upPasswordField.setMinimumSize(new java.awt.Dimension(98, 22));
        upUsernameField.setFont(new java.awt.Font("Dialog", 0, 13));
        upUsernameField.setMinimumSize(new java.awt.Dimension(98, 22));
        org.jdesktop.layout.GroupLayout userPasswordPanelLayout = new org.jdesktop.layout.GroupLayout(userPasswordPanel);
        userPasswordPanel.setLayout(userPasswordPanelLayout);
        userPasswordPanelLayout.setHorizontalGroup(
            userPasswordPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(userPasswordPanelLayout.createSequentialGroup()
                .add(26, 26, 26)
                .add(userPasswordPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(upPasswordLabel)
                    .add(upUsernameLabel)
                    .add(upServerLabel))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(userPasswordPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(upUsernameField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(upPasswordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(upServerField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 274, Short.MAX_VALUE))
                .addContainerGap())
        );
        userPasswordPanelLayout.setVerticalGroup(
            userPasswordPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, userPasswordPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(userPasswordPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(upUsernameLabel)
                    .add(upUsernameField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(userPasswordPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(upPasswordLabel)
                    .add(upPasswordField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(userPasswordPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(upServerField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(upServerLabel))
                .add(20, 20, 20))
        );
        webPanel.setOpaque(false);
        webPanel.setPreferredSize(new java.awt.Dimension(402, 140));
        webServerLabel.setFont(new java.awt.Font("Dialog", 1, 13));
        webServerLabel.setText(bundle.getString("WonderlandLoginDialog.webServerLabel.text"));
        webServerField.setEditable(false);
        webServerField.setFont(new java.awt.Font("Dialog", 0, 13));
        webServerField.setMinimumSize(new java.awt.Dimension(98, 22));
        jLabel1.setText(bundle.getString("WonderlandLoginDialog.jLabel1.text"));
        org.jdesktop.layout.GroupLayout webPanelLayout = new org.jdesktop.layout.GroupLayout(webPanel);
        webPanel.setLayout(webPanelLayout);
        webPanelLayout.setHorizontalGroup(
            webPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(webPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(webPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(webPanelLayout.createSequentialGroup()
                        .add(webServerLabel)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(webServerField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE))
                    .add(jLabel1))
                .addContainerGap())
        );
        webPanelLayout.setVerticalGroup(
            webPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, webPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 56, Short.MAX_VALUE)
                .add(webPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(webServerLabel)
                    .add(webServerField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setResizable(false);
        gradientPanel1.setGradientEndColor(new java.awt.Color(163, 183, 255));
        gradientPanel1.setGradientStartColor(new java.awt.Color(0, 51, 255));
        gradientPanel1.setMinimumSize(new java.awt.Dimension(0, 82));
        worldNameLabel.setFont(new java.awt.Font("Arial", 1, 36));
        worldNameLabel.setForeground(new java.awt.Color(255, 255, 255));
        worldNameLabel.setText(bundle.getString("WonderlandLoginDialog.worldNameLabel.text"));
        org.jdesktop.layout.GroupLayout gradientPanel1Layout = new org.jdesktop.layout.GroupLayout(gradientPanel1);
        gradientPanel1.setLayout(gradientPanel1Layout);
        gradientPanel1Layout.setHorizontalGroup(
            gradientPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(gradientPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(worldNameLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 372, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(72, Short.MAX_VALUE))
        );
        gradientPanel1Layout.setVerticalGroup(
            gradientPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(gradientPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(worldNameLabel)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        gradientPanel2.setGradientEndColor(new java.awt.Color(217, 225, 255));
        gradientPanel2.setGradientStartColor(new java.awt.Color(163, 183, 255));
        gradientPanel2.setLayout(new java.awt.BorderLayout());
        loginSpecificPanel.setOpaque(false);
        loginSpecificPanel.setLayout(new java.awt.BorderLayout());
        gradientPanel2.add(loginSpecificPanel, java.awt.BorderLayout.CENTER);
        tagLineLabel.setFont(new java.awt.Font("Arial", 1, 18));
        tagLineLabel.setForeground(new java.awt.Color(255, 255, 255));
        tagLineLabel.setText(bundle.getString("WonderlandLoginDialog.tagLineLabel.text"));
        tagLineLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        tagLineLabel.setAlignmentY(0.0F);
        tagLineLabel.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10));
        tagLineLabel.setFocusable(false);
        gradientPanel2.add(tagLineLabel, java.awt.BorderLayout.NORTH);
        buttonPanel.setOpaque(false);
        buttonPanel.setPreferredSize(new java.awt.Dimension(453, 65));
        cancelButton.setBackground(new java.awt.Color(255, 255, 255));
        cancelButton.setFont(new java.awt.Font("Dialog", 1, 13));
        cancelButton.setText(bundle.getString("WonderlandLoginDialog.cancelButton.text"));
        cancelButton.setAlignmentX(0.5F);
        cancelButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelButtonActionPerformed(evt);
            }
        });
        loginButton.setBackground(new java.awt.Color(255, 255, 255));
        loginButton.setFont(new java.awt.Font("Dialog", 1, 13));
        loginButton.setText(bundle.getString("WonderlandLoginDialog.loginButton.text"));
        loginButton.setAlignmentX(0.5F);
        loginButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                loginButtonActionPerformed(evt);
            }
        });
        statusLabel.setFont(new java.awt.Font("Arial", 1, 12));
        statusLabel.setForeground(new java.awt.Color(45, 45, 45));
        statusLabel.setText(bundle.getString("WonderlandLoginDialog.statusLabel.text"));
        advancedButton.setFont(new java.awt.Font("Dialog", 0, 13));
        advancedButton.setText(bundle.getString("WonderlandLoginDialog.advancedButton.text"));
        advancedButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                advancedButtonActionPerformed(evt);
            }
        });
        org.jdesktop.layout.GroupLayout buttonPanelLayout = new org.jdesktop.layout.GroupLayout(buttonPanel);
        buttonPanel.setLayout(buttonPanelLayout);
        buttonPanelLayout.setHorizontalGroup(
            buttonPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(buttonPanelLayout.createSequentialGroup()
                .add(buttonPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(buttonPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .add(statusLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 308, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(10, 10, 10))
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, buttonPanelLayout.createSequentialGroup()
                        .addContainerGap(103, Short.MAX_VALUE)
                        .add(cancelButton)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(loginButton)
                        .add(40, 40, 40)))
                .add(advancedButton)
                .addContainerGap())
        );
        buttonPanelLayout.linkSize(new java.awt.Component[] {cancelButton, loginButton}, org.jdesktop.layout.GroupLayout.HORIZONTAL);
        buttonPanelLayout.setVerticalGroup(
            buttonPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(buttonPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(buttonPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(statusLabel)
                    .add(advancedButton))
                .addContainerGap(30, Short.MAX_VALUE))
            .add(org.jdesktop.layout.GroupLayout.TRAILING, buttonPanelLayout.createSequentialGroup()
                .addContainerGap(30, Short.MAX_VALUE)
                .add(buttonPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(loginButton)
                    .add(cancelButton))
                .addContainerGap())
        );
        gradientPanel2.add(buttonPanel, java.awt.BorderLayout.PAGE_END);
        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(gradientPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE)
            .add(gradientPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(gradientPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(4, 4, 4)
                .add(gradientPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE))
        );
        pack();
    }


Input:
    public boolean execute(Menu menu, Player player, String[] args, String command, ItemStack menuItem, Iterator<String> commands, Player targetPlayer, Block targetBlock) {
        if (args.length != 5) {
            player.sendMessage("Error in menu script line (expected /TakeChest [x] [y] [z] [slot1,fromSlot-toSlot...] [amount]): " + command);
            return false;
        }
        int x, y, z;
        try {
            x = Integer.parseInt(args[0]);
        } catch (NumberFormatException ex) {
            player.sendMessage("Error in menu script line (expected whole number for x): " + args[0]);
            return false;
        }
        try {
            y = Integer.parseInt(args[1]);
            if (y < 0 || y > 255) {
                player.sendMessage("Error in menu script line (expected y between 0 and 255): " + args[2]);
                return false;
            }
        } catch (NumberFormatException ex) {
            player.sendMessage("Error in menu script line (expected whole number for y): " + args[1]);
            return false;
        }
        try {
            z = Integer.parseInt(args[2]);
        } catch (NumberFormatException ex) {
            player.sendMessage("Error in menu script line (expected whole number for z): " + args[2]);
            return false;
        }
        List<Integer> slots;
        try {
            slots = ValidationUtils.getSlotRange(args[3]);
        } catch (IllegalArgumentException ex) {
            player.sendMessage("Error in menu script line " + ex.getLocalizedMessage());
            return false;
        }
        int amount;
        try {
            amount = Integer.parseInt(args[4]);
            if (amount < 1) {
                player.sendMessage("Error in menu script line (expected amount of at least 1): " + args[4]);
                return false;
            }
        } catch (NumberFormatException ex) {
            player.sendMessage("Error in menu script line (expected whole number for amount): " + args[4]);
            return false;
        }
        Block block = player.getWorld().getBlockAt(x, y, z);
        if (block.getState() instanceof InventoryHolder) {
            InventoryHolder chest = (InventoryHolder) block.getState();
            Inventory inv = chest.getInventory();
            InventoryReport chestData;
            try {
                chestData = InventoryReport.getReport(inv, slots);
            } catch (IllegalArgumentException ex) {
                player.sendMessage(ex.getLocalizedMessage());
                return false;
            }
            if (chestData.getCount() <= amount) {
                player.sendMessage("There are not enough " + chestData.toString() + " in stock");
                return false;
            }
            int count = 0;
            PlayerInventory to = player.getInventory();
            List<ItemStack> toDrop = new ArrayList<>();
            for (Map.Entry<Integer, ItemStack> entry : chestData.getItems().entrySet()) {
                int slot = entry.getKey();
                ItemStack item = entry.getValue();
                count += item.getAmount();
                if (count < amount) {
                    inv.clear(slot);
                    toDrop.addAll(to.addItem(item).values());
                } else {
                    int remaining = count - amount;
                    if (remaining > 0) {
                        ItemStack split = item.clone();
                        split.setAmount(item.getAmount() - remaining);
                        item.setAmount(remaining);
                        toDrop.addAll(to.addItem(split).values());
                    } else {
                        inv.clear(slot);
                        toDrop.addAll(to.addItem(item).values());
                    }
                    break;
                }
            }
            if (!toDrop.isEmpty()) {
                World world = player.getWorld();
                Location loc = player.getLocation();
                for (ItemStack drop : toDrop) {
                    world.dropItem(loc, drop);
                }
            }
            player.updateInventory();
            for (HumanEntity viewer : chest.getInventory().getViewers()) {
                if (viewer instanceof Player) {
                    ((Player) viewer).updateInventory();
                }
            }
            return true;
        } else {
            player.sendMessage("Error in menu script line (expected chest at " + x + "," + y + "," + z + "): " + block.getType().name());
            return false;
        }
    }

Output:
    public boolean execute(Menu menu, Player player, String[] args, String command, ItemStack menuItem, Iterator<String> commands, Player targetPlayer, Block targetBlock) {
        if (args.length != 5) {
            player.sendMessage("Error in menu script line (expected /TakeChest [x] [y] [z] [slot1,fromSlot-toSlot...] [amount]): " + command);
            return false;
        }
        int x, y, z;
        try {
            x = Integer.parseInt(args[0]);
        } catch (NumberFormatException ex) {
            player.sendMessage("Error in menu script line (expected whole number for x): " + args[0]);
            return false;
        }
        try {
            y = Integer.parseInt(args[1]);
            if (y < 0 || y > 255) {
                player.sendMessage("Error in menu script line (expected y between 0 and 255): " + args[2]);
                return false;
            }
        } catch (NumberFormatException ex) {
            player.sendMessage("Error in menu script line (expected whole number for y): " + args[1]);
            return false;
        }
        try {
            z = Integer.parseInt(args[2]);
        } catch (NumberFormatException ex) {
            player.sendMessage("Error in menu script line (expected whole number for z): " + args[2]);
            return false;
        }
        List<Integer> slots;
        try {
            slots = ValidationUtils.getSlotRange(args[3]);
        } catch (IllegalArgumentException ex) {
            player.sendMessage("Error in menu script line " + ex.getLocalizedMessage());
            return false;
        }
        int amount;
        try {
            amount = Integer.parseInt(args[4]);
            if (amount < 1) {
                player.sendMessage("Error in menu script line (expected amount of at least 1): " + args[4]);
                return false;
            }
        } catch (NumberFormatException ex) {
            player.sendMessage("Error in menu script line (expected whole number for amount): " + args[4]);
            return false;
        }
        Block block = player.getWorld().getBlockAt(x, y, z);
        if (block.getState() instanceof InventoryHolder) {
            InventoryHolder chest = (InventoryHolder) block.getState();
            Inventory inv = chest.getInventory();
            InventoryReport chestData;
            try {
                chestData = InventoryReport.getReport(inv, slots);
            } catch (IllegalArgumentException ex) {
                player.sendMessage(ex.getLocalizedMessage());
                return false;
            }
            if (!chestData.hasType()) {
                player.sendMessage("This item is no longer being stocked");
                return false;
            }
            if (chestData.getCount() <= amount) {
                player.sendMessage("There are not enough " + chestData.toString() + " in stock");
                return false;
            }
            int count = 0;
            PlayerInventory to = player.getInventory();
            List<ItemStack> toDrop = new ArrayList<>();
            for (Map.Entry<Integer, ItemStack> entry : chestData.getItems().entrySet()) {
                int slot = entry.getKey();
                ItemStack item = entry.getValue();
                count += item.getAmount();
                if (count < amount) {
                    inv.clear(slot);
                    toDrop.addAll(to.addItem(item).values());
                } else {
                    int remaining = count - amount;
                    if (remaining > 0) {
                        ItemStack split = item.clone();
                        split.setAmount(item.getAmount() - remaining);
                        item.setAmount(remaining);
                        toDrop.addAll(to.addItem(split).values());
                    } else {
                        inv.clear(slot);
                        toDrop.addAll(to.addItem(item).values());
                    }
                    break;
                }
            }
            if (!toDrop.isEmpty()) {
                World world = player.getWorld();
                Location loc = player.getLocation();
                for (ItemStack drop : toDrop) {
                    world.dropItem(loc, drop);
                }
            }
            player.updateInventory();
            for (HumanEntity viewer : chest.getInventory().getViewers()) {
                if (viewer instanceof Player) {
                    ((Player) viewer).updateInventory();
                }
            }
            return true;
        } else {
            player.sendMessage("Error in menu script line (expected chest at " + x + "," + y + "," + z + "): " + block.getType().name());
            return false;
        }
    }


Input:
    public void testDescribeLayerVersion111() throws Exception {
        String layer = MockData.FORESTS.getPrefix() + ":" + MockData.FORESTS.getLocalPart();
        String request = "wms?service=wms&version=1.1.1&request=DescribeLayer&layers=" + layer;
        Document dom = getAsDOM(request);
        assertEquals("1.1.1", dom.getDocumentElement().getAttributes().getNamedItem("version").getNodeValue());
    }

Output:
    public void testDescribeLayerVersion111() throws Exception {
        String layer = MockData.FORESTS.getPrefix() + ":" + MockData.FORESTS.getLocalPart();
        String request = "wms?service=wms&version=1.1.1&request=DescribeLayer&layers=" + layer;
        Document dom = getAsDOM(request, true);
        assertEquals("1.1.1", dom.getDocumentElement().getAttributes().getNamedItem("version").getNodeValue());
    }


Input:
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		boolean ret = false;
		boolean res = true;
		HttpSession session = request.getSession(false);
		String actionUrl = "";
		List<String> errorMsgs = new ArrayList<String>();
		Member user = new Member();
		String imagePath = getServletContext().getRealPath("image");
		int size = 2 * 1024 * 1024;
		MultipartRequest multi = new MultipartRequest(request, imagePath, size, "utf-8", new DefaultFileRenamePolicy());
		request.setCharacterEncoding("utf-8");
		String userid = multi.getParameter("userid");
		String userpwd = multi.getParameter("pwd");
			System.out.println("userid:" + userid + " / userpwd : "+ userpwd);
		String pwd_confirm 	= multi.getParameter("pwd_confirm");
		String lastname 	= multi.getParameter("lastname");
		String firstname 	= multi.getParameter("firstname");
		String nickname 	= multi.getParameter("nickname");
		String email 		= multi.getParameter("email");
		String gender 		= multi.getParameter("gender");
		String website		= multi.getParameter("website");
		String introduce 	= multi.getParameter("introduce");
		String info 		= multi.getParameter("info");
		if(isRegisterMode(multi) == state.signup || isRegisterMode(multi) == state.update) {
			if (userpwd.length() < 6 || userpwd == null ) {
				errorMsgs.add("비밀번호는 6자 이상 입력해주세요.");
				res = false;
			}
			if (!userpwd.equals(pwd_confirm)) {
				errorMsgs.add("비밀번호가 일치하지 않습니다.");
				res = false;
			}
			if (userid == null || userid.trim().length() == 0) {
				errorMsgs.add("ID를 반드시 입력해주세요.");
				res = false;
			}
			if (lastname == null || lastname.trim().length() == 0) {
				errorMsgs.add("성을 반드시 입력해주세요.");
				res = false;
			}
			if (firstname == null || firstname.trim().length() == 0) {
				errorMsgs.add("이름을 반드시 입력해주세요.");
				res = false;
			}
			if (nickname == null || nickname.trim().length() == 0) {
				errorMsgs.add("별명을 반드시 입력해주세요.");
				res = false;
			}
			if (gender == null || !(gender.equals("M") || gender.equals("F") )) {
				errorMsgs.add("성별에 적합하지 않은 값이 입력되었습니다.");
				res = false;
			}
			if (info == null || !(info.equals("Y") || info.equals("N") )) {
				errorMsgs.add("정보 공개여부를 선택해주세요");
				res = false;
			}
		} else if(isRegisterMode(multi) == state.login) {
			if (userid == null || userid.trim().length() == 0) {
				errorMsgs.add("ID를 입력해주세요.");
				res = false;
			}
			if (userpwd == null || userpwd.trim().length() == 0) {
				errorMsgs.add("비밀번호를 입력해주세요.");
				res = false;
			}
		}
		try {
			if(res && (isRegisterMode(multi) == state.signup || isRegisterMode(multi) == state.update)) {
				user.setUserid(userid);
				user.setPwd(userpwd);
				user.setRegisterdate(new Timestamp(System.currentTimeMillis()));
				user.setLastname(lastname);
				user.setFirstname(firstname);
				user.setNickname(nickname);
				user.setEmail(email);
				user.setGender(gender);
				user.setIntroduce(introduce);
				user.setWebsite(website);
				user.setInfo(info);
				ret = SignUpManager.SignUp(multi, response, user, imagePath, isRegisterMode(multi).toString());
				if (user.getProfilephoto() == null) {
					errorMsgs.add("사진 업로드에 문제가 발생하여 사진이 업로드 되지 않았습니다");
				}
				if(ret) {
					System.out.println("회원가입이나 수정 잘됨");
					actionUrl = "main.jsp";
				} else {
					System.out.println("회원가입이나 수정 잘안됨");
					actionUrl = "signup.jsp";
				}
			} else if(res && (isRegisterMode(multi) == state.login)) {
				user = MemberDAO.findById(userid);
				if(user != null) {
					if( user.getUserid().equals(userid) && user.getPwd().equals(userpwd) ) {
						session.setAttribute("userid", user.getUserid());
					    session.setAttribute("usernickname", user.getNickname());
					    session.setAttribute("profilephoto", user.getProfilephoto());
					    System.out.println("로그인성공!" + user.getUserid() + "님이 로그인하셨습니다.");
						actionUrl = "main.jsp";
						ret = true;
					} else if(user.getPwd() != userpwd) {
						errorMsgs.add("비밀번호가 일치하지 않습니다. 다시 확인해주세요");
						actionUrl = "login.jsp";
					}
				} else {
					errorMsgs.add("없는 아이디입니다. 다시 확인해주세요");
					actionUrl = "login.jsp";
				}
			} else {
				actionUrl = "error.jsp";
			}
		} catch (SQLException | NamingException e) {
			System.out.println(e.getMessage());
			errorMsgs.add("알 수 없는 문제가 발생하였습니다. 다시 시도해주세요");
			session.invalidate();
			actionUrl = "error.jsp";
		}
		if(actionUrl.equals("main.jsp")) {
			response.sendRedirect("");
		} else {
			request.setAttribute("errorMsgs", errorMsgs);
			RequestDispatcher dispatcher = request.getRequestDispatcher(actionUrl);
			dispatcher.forward(request, response);
		}
	}

Output:
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		boolean ret = false;
		boolean res = true;
		HttpSession session = request.getSession(false);
		String actionUrl = "";
		List<String> errorMsgs = new ArrayList<String>();
		Member user = new Member();
		String imagePath = getServletContext().getRealPath("image");
		int size = 2 * 1024 * 1024;
		MultipartRequest multi = new MultipartRequest(request, imagePath, size, "utf-8", new DefaultFileRenamePolicy());
		request.setCharacterEncoding("utf-8");
		String userid = multi.getParameter("userid");
		String userpwd = multi.getParameter("pwd");
			System.out.println("userid:" + userid + " / userpwd : "+ userpwd);
		String pwd_confirm 	= multi.getParameter("pwd_confirm");
		String lastname 	= multi.getParameter("lastname");
		String firstname 	= multi.getParameter("firstname");
		String nickname 	= multi.getParameter("nickname");
		String email 		= multi.getParameter("email");
		String gender 		= multi.getParameter("gender");
		String website		= multi.getParameter("website");
		String introduce 	= multi.getParameter("introduce");
		String info 		= multi.getParameter("info");
		if(isRegisterMode(multi) == state.signup || isRegisterMode(multi) == state.update) {
			if (userpwd.length() < 6 || userpwd == null ) {
				errorMsgs.add("비밀번호는 6자 이상 입력해주세요.");
				res = false;
			}
			if (!userpwd.equals(pwd_confirm)) {
				errorMsgs.add("비밀번호가 일치하지 않습니다.");
				res = false;
			}
			if (userid == null || userid.trim().length() == 0) {
				errorMsgs.add("ID를 반드시 입력해주세요.");
				res = false;
			}
			if (lastname == null || lastname.trim().length() == 0) {
				errorMsgs.add("성을 반드시 입력해주세요.");
				res = false;
			}
			if (firstname == null || firstname.trim().length() == 0) {
				errorMsgs.add("이름을 반드시 입력해주세요.");
				res = false;
			}
			if (nickname == null || nickname.trim().length() == 0) {
				errorMsgs.add("별명을 반드시 입력해주세요.");
				res = false;
			}
			if (gender == null || !(gender.equals("M") || gender.equals("F") )) {
				errorMsgs.add("성별에 적합하지 않은 값이 입력되었습니다.");
				res = false;
			}
			if (info == null || !(info.equals("Y") || info.equals("N") )) {
				errorMsgs.add("정보 공개여부를 선택해주세요");
				res = false;
			}
		} else if(isRegisterMode(multi) == state.login) {
			if (userid == null || userid.trim().length() == 0) {
				errorMsgs.add("ID를 입력해주세요.");
				res = false;
			}
			if (userpwd == null || userpwd.trim().length() == 0) {
				errorMsgs.add("비밀번호를 입력해주세요.");
				res = false;
			}
		}
		try {
			if(res && (isRegisterMode(multi) == state.signup || isRegisterMode(multi) == state.update)) {
				user.setUserid(userid);
				user.setPwd(userpwd);
				user.setRegisterdate(new Timestamp(System.currentTimeMillis()));
				user.setLastname(lastname);
				user.setFirstname(firstname);
				user.setNickname(nickname);
				user.setEmail(email);
				user.setGender(gender);
				user.setIntroduce(introduce);
				user.setWebsite(website);
				user.setInfo(info);
				ret = SignUpManager.SignUp(multi, response, user, imagePath, isRegisterMode(multi).toString());
				if (user.getProfilephoto() == null) {
					errorMsgs.add("이 메세지는 사진 업로드를 하지 않았거나 사진 업로드시 문제가 발생했을때 보이는 메세지입니다");
					System.out.println("이 메세지는 사진 업로드를 하지 않았거나 사진 업로드시 문제가 발생했을때 보이는 메세지입니다" );
				}
				if(ret) {
					System.out.println("회원가입이나 수정 잘됨");
					actionUrl = "main.jsp";
				} else {
					System.out.println("회원가입이나 수정 잘안됨");
					actionUrl = "error.jsp";
				}
			} else if(res && (isRegisterMode(multi) == state.login)) {
				user = MemberDAO.findById(userid);
				if(user != null) {
					if( user.getUserid().equals(userid) && user.getPwd().equals(userpwd) ) {
						session.setAttribute("userid", user.getUserid());
					    session.setAttribute("usernickname", user.getNickname());
					    session.setAttribute("profilephoto", user.getProfilephoto());
					    System.out.println("로그인성공!" + user.getUserid() + "님이 로그인하셨습니다.");
						actionUrl = "main.jsp";
						ret = true;
					} else if(user.getPwd() != userpwd) {
						errorMsgs.add("비밀번호가 일치하지 않습니다. 다시 확인해주세요");
						actionUrl = "login.jsp";
					}
				} else {
					errorMsgs.add("없는 아이디입니다. 다시 확인해주세요");
					actionUrl = "login.jsp";
				}
			} else {
				actionUrl = "error.jsp";
			}
		} catch (SQLException | NamingException e) {
			System.out.println(e.getMessage());
			errorMsgs.add("알 수 없는 문제가 발생하였습니다. 다시 시도해주세요");
			session.invalidate();
			actionUrl = "error.jsp";
		}
		if(actionUrl.equals("main.jsp")) {
			response.sendRedirect("");
		} else {
			request.setAttribute("errorMsgs", errorMsgs);
			RequestDispatcher dispatcher = request.getRequestDispatcher(actionUrl);
			dispatcher.forward(request, response);
		}
	}


Input:
    private void initPopup() {
        mParent = LayoutInflater.from(getContext()).inflate(R.layout.switcher_popup,
                (ViewGroup) getParent());
        LinearLayout content = (LinearLayout) mParent.findViewById(R.id.content);
        mPopup = content;
        mPopup.setVisibility(View.INVISIBLE);
        mNeedsAnimationSetup = true;
        for (int i = mDrawIds.length - 1; i >= 0; i--) {
            RotateImageView item = new RotateImageView(getContext());
            item.setImageResource(mDrawIds[i]);
            item.setBackgroundResource(R.drawable.bg_pressed);
            final int index = i;
            item.setOnClickListener(new OnClickListener() {
                @Override
                public void onClick(View v) {
                    onCameraSelected(index);
                }
            });
            switch (mDrawIds[i]) {
                case R.drawable.ic_switch_camera:
                    item.setContentDescription(getContext().getResources().getString(
                            R.string.accessibility_switch_to_camera));
                    break;
                case R.drawable.ic_switch_video:
                    item.setContentDescription(getContext().getResources().getString(
                            R.string.accessibility_switch_to_video));
                    break;
                case R.drawable.ic_switch_pan:
                    item.setContentDescription(getContext().getResources().getString(
                            R.string.accessibility_switch_to_panorama));
                    break;
                case com.android.gallery3d.R.drawable.ic_menu_photosphere:
                    item.setContentDescription(getContext().getResources().getString(
                            R.string.accessibility_switch_to_lightcycle));
                    break;
                default:
                    break;
            }
            content.addView(item, new LinearLayout.LayoutParams(mItemSize, mItemSize));
        }
    }

Output:
    private void initPopup() {
        mParent = LayoutInflater.from(getContext()).inflate(R.layout.switcher_popup,
                (ViewGroup) getParent());
        LinearLayout content = (LinearLayout) mParent.findViewById(R.id.content);
        mPopup = content;
        mPopup.setVisibility(View.INVISIBLE);
        mNeedsAnimationSetup = true;
        for (int i = mDrawIds.length - 1; i >= 0; i--) {
            RotateImageView item = new RotateImageView(getContext());
            item.setImageResource(mDrawIds[i]);
            item.setBackgroundResource(R.drawable.bg_pressed);
            final int index = i;
            item.setOnClickListener(new OnClickListener() {
                @Override
                public void onClick(View v) {
                    onCameraSelected(index);
                }
            });
            switch (mDrawIds[i]) {
                case R.drawable.ic_switch_camera:
                    item.setContentDescription(getContext().getResources().getString(
                            R.string.accessibility_switch_to_camera));
                    break;
                case R.drawable.ic_switch_video:
                    item.setContentDescription(getContext().getResources().getString(
                            R.string.accessibility_switch_to_video));
                    break;
                case R.drawable.ic_switch_pan:
                    item.setContentDescription(getContext().getResources().getString(
                            R.string.accessibility_switch_to_panorama));
                    break;
                case com.android.gallery3d.R.drawable.ic_menu_photosphere:
                    item.setContentDescription(getContext().getResources().getString(
                            R.string.accessibility_switch_to_photosphere));
                    break;
                default:
                    break;
            }
            content.addView(item, new LinearLayout.LayoutParams(mItemSize, mItemSize));
        }
    }