Input:
	public void execute() {
		Rule first = _firstRule;
		Rule second = _secondRule;
		_aggInfo = new TggAggInfo(_trafo);
		_aggInfo.extendDueToTGG(layoutSystem);
		List<CriticalPair> critPairList = _aggInfo.getConflictOverlappings(first, second);
		if (critPairList != null && !critPairList.isEmpty()) {
			for (CriticalPair critPair : critPairList) {
			List<Mapping> mappingsOverToR1 = critPair.getMappingsOverlappingToRule1();
			List<Mapping> mappingsOverToR2 = critPair.getMappingsOverlappingToRule2();
			List<Mapping> mappingsR1ToR2 = critPair.getMappingsRule1ToRule2();
			Graph over = critPair.getOverlapping();
			CritPair newCrit = TGGFactory.eINSTANCE.createCritPair();
				newCrit.setName("CP"+(critPairList.indexOf(critPair)+1));
			newCrit.setOverlapping(over);
			newCrit.setRule1(critPair.getRule1());
			newCrit.setRule2(critPair.getRule2());
			newCrit.getMappingsOverToRule1().addAll(mappingsOverToR1);
			newCrit.getMappingsOverToRule2().addAll(mappingsOverToR2);
			newCrit.getMappingsRule1ToRule2().addAll(mappingsR1ToR2);
			layoutSystem.getCritPairs().add(newCrit);
			_trafo.getInstances().add(over);
				changeToTGGGraph(over);
				markCriticalObjects(over, _aggInfo.getCriticalObjects().get(critPair));
				System.out.println("Adding CritPair "+newCrit.getName()+" for "+_firstRule.getName()+" with "+_secondRule.getName()+" finished.");
		}
		} else {
		}
		super.execute();
	}

Output:
	public void execute() {
		Rule first = RuleUtil.copyRule(_firstRule);
		Rule second = RuleUtil.copyRule(_secondRule);
		_aggInfo = new TggAggInfo(_trafo);
		_aggInfo.extendDueToTGG(layoutSystem);
		List<CriticalPair> critPairList = _aggInfo.getConflictOverlappings(first, second);
		if (critPairList != null && !critPairList.isEmpty()) {
			for (CriticalPair critPair : critPairList) {
			List<Mapping> mappingsOverToR1 = critPair.getMappingsOverlappingToRule1();
			List<Mapping> mappingsOverToR2 = critPair.getMappingsOverlappingToRule2();
			List<Mapping> mappingsR1ToR2 = critPair.getMappingsRule1ToRule2();
			Graph over = critPair.getOverlapping();
			CritPair newCrit = TGGFactory.eINSTANCE.createCritPair();
				newCrit.setName("CP"+(critPairList.indexOf(critPair)+1));
			newCrit.setOverlapping(over);
			newCrit.setRule1(critPair.getRule1());
			newCrit.setRule2(critPair.getRule2());
			newCrit.getMappingsOverToRule1().addAll(mappingsOverToR1);
			newCrit.getMappingsOverToRule2().addAll(mappingsOverToR2);
			newCrit.getMappingsRule1ToRule2().addAll(mappingsR1ToR2);
			layoutSystem.getCritPairs().add(newCrit);
			_trafo.getInstances().add(over);
				changeToTGGGraph(over);
				markCriticalObjects(over, _aggInfo.getCriticalObjects().get(critPair));
				System.out.println("Adding CritPair "+newCrit.getName()+" for "+_firstRule.getName()+" with "+_secondRule.getName()+" finished.");
		}
		} else {
			DeleteRuleCommand c1 = new DeleteRuleCommand(first);
			DeleteRuleCommand c2 = new DeleteRuleCommand(second);
			c1.execute();
			c2.execute();
		}
		super.execute();
	}


Input:
    public Raw(Server server) {
        this.server = server;
        frame = new ServerFrame();
        MainFrame.getMainFrame().addChild(frame);
        server.AddDataIn(new IRCParser.IDataIn() {
            public void onDataIn(IRCParser tParser, String sData) {
                Raw.this.frame.addLine("<<< "+sData);
            }
        });
        server.AddDataOut(new IRCParser.IDataOut() {
            public void onDataOut(IRCParser tparser, String sData) {
                Raw.this.frame.addLine(">>> "+sData);
            }
        });
    }

Output:
    public Raw(Server server) {
        this.server = server;
        frame = new ServerFrame();
        MainFrame.getMainFrame().addChild(frame);
        server.AddDataIn(new IRCParser.IDataIn() {
            public void onDataIn(IRCParser tParser, String sData) {
                Raw.this.frame.addLine("<<< "+sData);
            }
        });
        server.AddDataOut(new IRCParser.IDataOut() {
            public void onDataOut(IRCParser tparser, String sData, boolean fromParser) {
                Raw.this.frame.addLine(">>> "+sData);
            }
        });
    }


Input:
	private DSMicroarraySet parseFile(File file)
		throws InputFileFormatException, InterruptedIOException {
		if (!checkFormat(file)) {
			log
					.info("SOFTFileFormat::getMArraySet - "
							+ "Attempting to open a file that does not comply with the "
							+ "GEO SOFT file format.");
			throw new InputFileFormatException(errorMessage);
		}
		CSMicroarraySet maSet = new CSMicroarraySet();
		List<String> arrayNames = new ArrayList<String>();
		int possibleMarkers = 0;
		BufferedReader in = null;
		final int extSeperater = '.';
		String fileName = file.getName();
		int dotIndex = fileName.lastIndexOf(extSeperater);
		if (dotIndex != -1) {
			fileName = fileName.substring(0, dotIndex);
		}
		maSet.setLabel(fileName);
		List<String> markers = new ArrayList<String>();
		try {
			in = new BufferedReader(new FileReader(file));
			if(in != null){
				try {
					int m = 0;
					String header = in.readLine();
					while (header != null) {
						if (header.startsWith(commentSign1) || header.startsWith(commentSign2)) {
							if(!header.equalsIgnoreCase("!dataset_table_begin") && !header.equalsIgnoreCase("!dataset_table_end")) {
							}
						}
						String[] tokens = null;
						if(!header.startsWith(commentSign1) && !header.startsWith(commentSign2) && !header.startsWith(commentSign3)){
							if(header.subSequence(0, 6).equals("ID_REF")){
								tokens = header.split("\t");
								for(int n = 2; n<tokens.length; n++){
									if(tokens[n].contains("GSM")) {
										arrayNames.add(tokens[n]);
									}
								}
							}
							if(!header.subSequence(0, 6).equals("ID_REF")){
								String[] mark = header.split("\t");
								markers.add(mark[0]);
								String markerName = new String(mark[0].trim());
								CSExpressionMarker marker = new CSExpressionMarker(m);
								marker.setLabel(markerName);
								maSet.getMarkers().add(m, marker);
								m++;
							}
						}
						header = in.readLine();
					}
					in.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		String result = null;
		for (int i = 0; i < possibleMarkers; i++) {
			result = AffyAnnotationUtil.matchAffyAnnotationFile(maSet);
			if (result != null) {
				break;
			}
		}
		if (result == null) {
			AffyAnnotationUtil.matchAffyAnnotationFile(maSet);
		} else {
			maSet.setCompatibilityLabel(result);
		}
		for (DSGeneMarker marker : maSet.getMarkers()) {
			String token = marker.getLabel();
			String[] locusResult = AnnotationParser.getInfo(token,
					AnnotationParser.LOCUSLINK);
			String locus = "";
			if ((locusResult != null)
					&& (!locusResult[0].trim().equals(""))) {
				locus = locusResult[0].trim();
			}
			if (locus.compareTo("") != 0) {
				try {
					marker.setGeneId(Integer.parseInt(locus));
				} catch (NumberFormatException e) {
				}
			}
			String[] geneNames = AnnotationParser.getInfo(token,
					AnnotationParser.ABREV);
			if (geneNames != null) {
				marker.setGeneName(geneNames[0]);
			}
			marker.getUnigene().set(token);
		}
		possibleMarkers = markers.size();
		for (int i = 0; i < arrayNames.size(); i++) {
			String arrayName = arrayNames.get(i);
			CSMicroarray array = new CSMicroarray(i, possibleMarkers,
					arrayName,
					DSMicroarraySet.affyTxtType);
			maSet.add(array);
		}
        maSet.sortMarkers(possibleMarkers);
		BufferedReader out = null;
		int j = 0;
		try {
			out = new BufferedReader(new FileReader(file));
			try {
				String line = out.readLine();
				while (line != null) {
					if(!line.startsWith(commentSign1) && !line.startsWith(commentSign2) && !line.startsWith(commentSign3)){
						if(!line.subSequence(0, 6).equals("ID_REF")){
							String[] values = line.split("\t");
							String valString = null;
							for(int k = 0; k < arrayNames.size(); k++){
								valString = values[k+2].trim();
								if(valString == null){
									Float v = Float.NaN;
									CSExpressionMarkerValue markerValue = new CSExpressionMarkerValue(v);
									DSMicroarray microarray = (DSMicroarray)maSet.get(k);
									microarray.setMarkerValue(maSet.getNewMarkerOrder()[j], markerValue);
									if (v.isNaN()) {
										markerValue.setMissing(true);
									} else {
										markerValue.setPresent();
									}
								}else {
									float value = Float.NaN;
									try {
										value = Float.parseFloat(valString);
									} catch (NumberFormatException nfe) {
									}
									Float v = value;
									CSExpressionMarkerValue markerValue = new CSExpressionMarkerValue(
											v);
									DSMicroarray microarray = (DSMicroarray)maSet.get(k);
									microarray.setMarkerValue(maSet.getNewMarkerOrder()[j], markerValue);
									if (v.isNaN()) {
										markerValue.setMissing(true);
									} else {
										markerValue.setPresent();
									}
								}
							}
							j++;
						}
					}
					line = out.readLine();
				}
				out.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		labelDisp(file, maSet, arrayNames);
		return maSet;
	}

Output:
	private DSMicroarraySet parseFile(File file)
		throws InputFileFormatException, InterruptedIOException {
		if (!checkFormat(file)) {
			log
					.info("SOFTFileFormat::getMArraySet - "
							+ "Attempting to open a file that does not comply with the "
							+ "GEO SOFT file format.");
			throw new InputFileFormatException(errorMessage);
		}
		CSMicroarraySet maSet = new CSMicroarraySet();
		List<String> arrayNames = new ArrayList<String>();
		int possibleMarkers = 0;
		BufferedReader in = null;
		String fileName = file.getName();
		maSet.setLabel(fileName);
		List<String> markers = new ArrayList<String>();
		try {
			in = new BufferedReader(new FileReader(file));
			if(in != null){
				try {
					int m = 0;
					String header = in.readLine();
					while (header != null) {
						if (header.startsWith(commentSign1) || header.startsWith(commentSign2)) {
							if(!header.equalsIgnoreCase("!dataset_table_begin") && !header.equalsIgnoreCase("!dataset_table_end")) {
							}
						}
						String[] tokens = null;
						if(!header.startsWith(commentSign1) && !header.startsWith(commentSign2) && !header.startsWith(commentSign3)){
							if(header.subSequence(0, 6).equals("ID_REF")){
								tokens = header.split("\t");
								for(int n = 2; n<tokens.length; n++){
									if(tokens[n].contains("GSM")) {
										arrayNames.add(tokens[n]);
									}
								}
							}
							if(!header.subSequence(0, 6).equals("ID_REF")){
								String[] mark = header.split("\t");
								markers.add(mark[0]);
								String markerName = new String(mark[0].trim());
								CSExpressionMarker marker = new CSExpressionMarker(m);
								marker.setLabel(markerName);
								maSet.getMarkers().add(m, marker);
								m++;
							}
						}
						header = in.readLine();
					}
					in.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		String result = null;
		for (int i = 0; i < possibleMarkers; i++) {
			result = AffyAnnotationUtil.matchAffyAnnotationFile(maSet);
			if (result != null) {
				break;
			}
		}
		if (result == null) {
			AffyAnnotationUtil.matchAffyAnnotationFile(maSet);
		} else {
			maSet.setCompatibilityLabel(result);
		}
		for (DSGeneMarker marker : maSet.getMarkers()) {
			String token = marker.getLabel();
			String[] locusResult = AnnotationParser.getInfo(token,
					AnnotationParser.LOCUSLINK);
			String locus = "";
			if ((locusResult != null)
					&& (!locusResult[0].trim().equals(""))) {
				locus = locusResult[0].trim();
			}
			if (locus.compareTo("") != 0) {
				try {
					marker.setGeneId(Integer.parseInt(locus));
				} catch (NumberFormatException e) {
				}
			}
			String[] geneNames = AnnotationParser.getInfo(token,
					AnnotationParser.ABREV);
			if (geneNames != null) {
				marker.setGeneName(geneNames[0]);
			}
			marker.getUnigene().set(token);
		}
		possibleMarkers = markers.size();
		for (int i = 0; i < arrayNames.size(); i++) {
			String arrayName = arrayNames.get(i);
			CSMicroarray array = new CSMicroarray(i, possibleMarkers,
					arrayName,
					DSMicroarraySet.affyTxtType);
			maSet.add(array);
		}
        maSet.sortMarkers(possibleMarkers);
		BufferedReader out = null;
		int j = 0;
		try {
			out = new BufferedReader(new FileReader(file));
			try {
				String line = out.readLine();
				while (line != null) {
					if(!line.startsWith(commentSign1) && !line.startsWith(commentSign2) && !line.startsWith(commentSign3)){
						if(!line.subSequence(0, 6).equals("ID_REF")){
							String[] values = line.split("\t");
							String valString = null;
							for(int k = 0; k < arrayNames.size(); k++){
								valString = values[k+2].trim();
								if(valString == null){
									Float v = Float.NaN;
									CSExpressionMarkerValue markerValue = new CSExpressionMarkerValue(v);
									DSMicroarray microarray = (DSMicroarray)maSet.get(k);
									microarray.setMarkerValue(maSet.getNewMarkerOrder()[j], markerValue);
									if (v.isNaN()) {
										markerValue.setMissing(true);
									} else {
										markerValue.setPresent();
									}
								}else {
									float value = Float.NaN;
									try {
										value = Float.parseFloat(valString);
									} catch (NumberFormatException nfe) {
									}
									Float v = value;
									CSExpressionMarkerValue markerValue = new CSExpressionMarkerValue(
											v);
									DSMicroarray microarray = (DSMicroarray)maSet.get(k);
									microarray.setMarkerValue(maSet.getNewMarkerOrder()[j], markerValue);
									if (v.isNaN()) {
										markerValue.setMissing(true);
									} else {
										markerValue.setPresent();
									}
								}
							}
							j++;
						}
					}
					line = out.readLine();
				}
				out.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		labelDisp(file, maSet, arrayNames);
		return maSet;
	}


Input:
	private static Prototype initAliveBeing(Prototype aliveBeing){
				try {
					aliveBeing.addField("alive", 1 + "");
					aliveBeing.addField("age", 1 + "");
					aliveBeing.addField("neighbors", 0 + "");
				} catch (ElementAlreadyContainedException e) {
					e.printStackTrace();
				}
				Expression isAlive = new Expression("this.alive == 1");
				Expression neigh1 = new Expression(
						"getFieldOfAgentAt ( this.x - 1 , this.y - 1 , 'alive' ) == 1");
				Expression neigh2 = new Expression(
						"getFieldOfAgentAt(this.x, this.y-1, 'alive') == 1");
				Expression neigh3 = new Expression(
						"getFieldOfAgentAt(this.x+1, this.y-1, 'alive') == 1");
				Expression neigh4 = new Expression(
						"getFieldOfAgentAt(this.x-1, this.y, 'alive') == 1");
				Expression neigh5 = new Expression(
						"getFieldOfAgentAt(this.x+1, this.y, 'alive') == 1");
				Expression neigh6 = new Expression(
						"getFieldOfAgentAt(this.x-1, this.y+1, 'alive') == 1");
				Expression neigh7 = new Expression(
						"getFieldOfAgentAt(this.x, this.y+1, 'alive') == 1");
				Expression neigh8 = new Expression(
						"getFieldOfAgentAt(this.x+1, this.y+1, 'alive') == 1");
				Expression dieCond = new Expression(
						"(this.alive == 1) && (this.neighbors < 2 || this.neighbors > 3)");
				Expression incrementAge = new Expression(
						"setField('age', this.age+1)");
				Expression incrementNeighbors = new Expression(
						"setField('neighbors', this.neighbors+1)");
				Expression die = new Expression(
						"clonePrototype(this.x, this.y, 'deadBeing')");
				Expression resetNeighbors = new Expression(
						"setField('neighbors', 0)");
				aliveBeing.addTrigger(new Trigger("updateAge", 1, isAlive,
						incrementAge));
				aliveBeing.addTrigger(new Trigger("resetNeighbors", 2, new Expression(
						"true"), resetNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh1", 3, neigh1,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh2", 4, neigh2,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh3", 5, neigh3,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh4", 6, neigh4,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh5", 7, neigh5,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh6", 8, neigh6,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh7", 9, neigh7,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh8", 10, neigh8,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("die", 11, dieCond, die));
				Prototype.addPrototype(aliveBeing);
				return aliveBeing;
	}

Output:
	private static Prototype initAliveBeing(Prototype aliveBeing){
				try {
					aliveBeing.addField("alive", 1 + "");
					aliveBeing.addField("age", 1 + "");
					aliveBeing.addField("neighbors", 0 + "");
				} catch (ElementAlreadyContainedException e) {
					e.printStackTrace();
				}
				Expression isAlive = new Expression("this.alive == 1");
				Expression neigh1 = new Expression(
						"getFieldOfAgentAt( this.x - 1 , this.y - 1 , 'alive' ) == 1");
				Expression neigh2 = new Expression(
						"getFieldOfAgentAt(this.x, this.y-1, 'alive') == 1");
				Expression neigh3 = new Expression(
						"getFieldOfAgentAt(this.x+1, this.y-1, 'alive') == 1");
				Expression neigh4 = new Expression(
						"getFieldOfAgentAt(this.x-1, this.y, 'alive') == 1");
				Expression neigh5 = new Expression(
						"getFieldOfAgentAt(this.x+1, this.y, 'alive') == 1");
				Expression neigh6 = new Expression(
						"getFieldOfAgentAt(this.x-1, this.y+1, 'alive') == 1");
				Expression neigh7 = new Expression(
						"getFieldOfAgentAt(this.x, this.y+1, 'alive') == 1");
				Expression neigh8 = new Expression(
						"getFieldOfAgentAt(this.x+1, this.y+1, 'alive') == 1");
				Expression dieCond = new Expression(
						"(this.alive == 1) && (this.neighbors < 2 || this.neighbors > 3)");
				Expression incrementAge = new Expression(
						"setField('age', this.age+1)");
				Expression incrementNeighbors = new Expression(
						"setField('neighbors', this.neighbors+1)");
				Expression die = new Expression(
						"clonePrototype(this.x, this.y, 'deadBeing')");
				Expression resetNeighbors = new Expression(
						"setField('neighbors', 0)");
				aliveBeing.addTrigger(new Trigger("updateAge", 1, isAlive,
						incrementAge));
				aliveBeing.addTrigger(new Trigger("resetNeighbors", 2, new Expression(
						"true"), resetNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh1", 3, neigh1,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh2", 4, neigh2,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh3", 5, neigh3,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh4", 6, neigh4,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh5", 7, neigh5,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh6", 8, neigh6,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh7", 9, neigh7,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("checkNeigh8", 10, neigh8,
						incrementNeighbors));
				aliveBeing.addTrigger(new Trigger("die", 11, dieCond, die));
				Prototype.addPrototype(aliveBeing);
				return aliveBeing;
	}


Input:
	public boolean OpenDatabase() {
		try {
			Class.forName("org.sqlite.JDBC");
			Conn = DriverManager.getConnection("jdbc:sqlite:plugins/" + plugin.getName() + "/" + DBFilename);
			IsConnected = true;
			if (TableExists(Conn, "birthdaygift")) {
				if (!ColumnExists(Conn, "birthdaygift", "lastAnnouncedDate")) {
					plugin.Warn("Old table format detected!");
					plugin.Log("Creating backup of existing database...");
					Path src = Paths.get("plugins/" + plugin.getName() + "/" + DBFilename);
					Path dst = Paths.get("plugins/" + plugin.getName() + "/backup.db");
					try {
						Files.copy(src, dst, new CopyOption[] { REPLACE_EXISTING });
					} catch (IOException e) {
						plugin.Warn("Unable to create database backup! Refusing to continue!!");
						Conn.close();
						IsConnected = false;
						e.printStackTrace();
						return false;
					}
					plugin.Log("Updating database table...");
					int result = ExecuteUpdate("ALTER TABLE birthdaygift ADD COLUMN `lastAnnouncedDate` DATE");
					plugin.Debug("SQL Result: " + result);
				}
			} else {
				plugin.Log("Database table does not exist, creating one.");
				ExecuteUpdate("CREATE TABLE IF NOT EXISTS birthdaygift (" +
						"`player` varchar(250) NOT NULL PRIMARY KEY, " +
						"`birthdayDate` DATE," +
						"`lastGiftDate` DATE," +
						"`lastAnnouncedDate` DATE)");
			}
			IsConnected = true;
			return false;
		} catch (SQLException e) {
			plugin.Warn("Unable to open database!");
			e.printStackTrace();
		}
		return false;
	}

Output:
	public boolean OpenDatabase() {
		try {
			Class.forName("org.sqlite.JDBC");
			Conn = DriverManager.getConnection("jdbc:sqlite:plugins/" + plugin.getName() + "/" + DBFilename);
			IsConnected = true;
			if (TableExists(Conn, "birthdaygift")) {
				if (!ColumnExists(Conn, "birthdaygift", "lastAnnouncedDate")) {
					plugin.Warn("Old table format detected!");
					plugin.Log("Creating backup of existing database...");
					Path src = Paths.get("plugins/" + plugin.getName() + "/" + DBFilename);
					Path dst = Paths.get("plugins/" + plugin.getName() + "/backup.db");
					try {
						Files.copy(src, dst, new CopyOption[] { REPLACE_EXISTING });
					} catch (IOException e) {
						plugin.Warn("Unable to create database backup! Refusing to continue!!");
						Conn.close();
						IsConnected = false;
						e.printStackTrace();
						return false;
					}
					plugin.Log("Updating database table...");
					int result = ExecuteUpdate("ALTER TABLE birthdaygift ADD COLUMN `lastAnnouncedDate` DATE");
					plugin.Debug("SQL Result: " + result);
				}
			} else {
				plugin.Log("Database table does not exist, creating one.");
				ExecuteUpdate("CREATE TABLE IF NOT EXISTS birthdaygift (" +
						"`player` varchar(250) NOT NULL PRIMARY KEY, " +
						"`birthdayDate` DATE," +
						"`lastGiftDate` DATE," +
						"`lastAnnouncedDate` DATE)");
			}
			IsConnected = true;
			return false;
		} catch (SQLException e) {
			plugin.Warn("Unable to open database!");
			e.printStackTrace();
			return false;
		} catch (ClassNotFoundException e) {
			plugin.Warn("Unable to find a suitable SQLite driver!");
			e.printStackTrace();
			return false;
		}
		return false;
	}


Input:
	private Object docreate(Configuration config) throws Exception {
		ensureSecurityManager();
		Object proxy = null;
		HTTPDStatus.httpdWarning(getCodebase());
		String defaultDir = null;
		String fs = File.separator;
		String sorcerHome = SorcerEnv.getHomeDir().getPath();
		if (sorcerHome == null) {
			logger.info("'sorcer.home' not defined, no default platformDir");
		} else {
			defaultDir = sorcerHome+fs+"configs"+fs+"platform"+fs+"sorcer";
		}
		CommonClassLoader commonCL = CommonClassLoader.getInstance();
        if (!platformLoaded) {
            loadPlatform(config, defaultDir, commonCL);
            platformLoaded = true;
        }
        Thread currentThread = Thread.currentThread();
		ClassLoader currentClassLoader = currentThread.getContextClassLoader();
		ClassAnnotator annotator = null;
        if (getCodebase() != null) {
            annotator = new ClassAnnotator(ClassLoaderUtil
                    .getCodebaseURLs(getCodebase()), new Properties());
        }
		ServiceClassLoader jsbCL = new ServiceClassLoader(ServiceClassLoader
				.getURIs(ClassLoaderUtil.getClasspathURLs(getClasspath())),
				annotator, commonCL);
		if (logger.isLoggable(Level.FINE))
			ClassLoaderUtil.displayClassLoaderTree(jsbCL);
		new ClassPathVerifier().verifyClassPaths(jsbCL);
		currentThread.setContextClassLoader(jsbCL);
		ProxyPreparer servicePreparer = (ProxyPreparer) Config.getNonNullEntry(
				config, COMPONENT, "servicePreparer", ProxyPreparer.class,
				new BasicProxyPreparer());
		synchronized (SorcerServiceDescriptor.class) {
			if (globalPolicy == null) {
				initialGlobalPolicy = Policy.getPolicy();
				globalPolicy = new AggregatePolicyProvider(initialGlobalPolicy);
				Policy.setPolicy(globalPolicy);
				if (logger.isLoggable(Level.FINEST))
					logger.log(Level.FINEST, "Global policy set: {0}",
							globalPolicy);
			}
			DynamicPolicyProvider service_policy = new DynamicPolicyProvider(
					new PolicyFileProvider(getPolicy()));
			LoaderSplitPolicyProvider splitServicePolicy = new LoaderSplitPolicyProvider(
					jsbCL, service_policy, new DynamicPolicyProvider(
							initialGlobalPolicy));
			splitServicePolicy.grant(SorcerServiceDescriptor.class, null,
					new Permission[] { new AllPermission() });
			globalPolicy.setPolicy(jsbCL, splitServicePolicy);
		}
		Object impl;
		try {
			Class implClass;
			implClass = Class.forName(getImplClassName(), false, jsbCL);
			if (logger.isLoggable(Level.FINEST))
				logger.finest("Attempting to get implementation constructor");
			Constructor constructor = implClass
					.getDeclaredConstructor(actTypes);
			if (logger.isLoggable(Level.FINEST))
				logger
						.log(Level.FINEST,
								"Obtained implementation constructor: ",
								constructor);
			constructor.setAccessible(true);
			impl = constructor.newInstance(getServerConfigArgs(), lifeCycle);
			if (logger.isLoggable(Level.FINEST))
				logger.log(Level.FINEST,
						"Obtained implementation instance: {0}", impl);
			if (impl instanceof ServiceProxyAccessor) {
				proxy = ((ServiceProxyAccessor) impl).getServiceProxy();
			} else if (impl instanceof ProxyAccessor) {
				proxy = ((ProxyAccessor) impl).getProxy();
			} else {
				proxy = null;
			}
			if (proxy != null) {
				proxy = servicePreparer.prepareProxy(proxy);
			}
			if (logger.isLoggable(Level.FINEST))
				logger.log(Level.FINEST, "Proxy =  {0}", proxy);
            proxy = (new MarshalledObject(proxy)).get();
            currentThread.setContextClassLoader(currentClassLoader);
        } finally {
			currentThread.setContextClassLoader(currentClassLoader);
		}
		return (new Created(impl, proxy));
	}

Output:
	private Object docreate(Configuration config) throws Exception {
		ensureSecurityManager();
		Object proxy = null;
        {
            String codebase = getCodebase();
            if (codebase != null && codebase.startsWith("http"))
                HTTPDStatus.httpdWarning(codebase);
        }
		String defaultDir = null;
		String fs = File.separator;
		String sorcerHome = SorcerEnv.getHomeDir().getPath();
		if (sorcerHome == null) {
			logger.info("'sorcer.home' not defined, no default platformDir");
		} else {
			defaultDir = sorcerHome+fs+"configs"+fs+"platform"+fs+"sorcer";
		}
		CommonClassLoader commonCL = CommonClassLoader.getInstance();
        if (!platformLoaded) {
            loadPlatform(config, defaultDir, commonCL);
            platformLoaded = true;
        }
        Thread currentThread = Thread.currentThread();
		ClassLoader currentClassLoader = currentThread.getContextClassLoader();
		ClassAnnotator annotator = null;
        if (getCodebase() != null) {
            annotator = new ClassAnnotator(ClassLoaderUtil
                    .getCodebaseURLs(getCodebase()), new Properties());
        }
		ServiceClassLoader jsbCL = new ServiceClassLoader(ServiceClassLoader
				.getURIs(ClassLoaderUtil.getClasspathURLs(getClasspath())),
				annotator, commonCL);
		if (logger.isLoggable(Level.FINE))
			ClassLoaderUtil.displayClassLoaderTree(jsbCL);
		new ClassPathVerifier().verifyClassPaths(jsbCL);
		currentThread.setContextClassLoader(jsbCL);
		ProxyPreparer servicePreparer = (ProxyPreparer) Config.getNonNullEntry(
				config, COMPONENT, "servicePreparer", ProxyPreparer.class,
				new BasicProxyPreparer());
		synchronized (SorcerServiceDescriptor.class) {
			if (globalPolicy == null) {
				initialGlobalPolicy = Policy.getPolicy();
				globalPolicy = new AggregatePolicyProvider(initialGlobalPolicy);
				Policy.setPolicy(globalPolicy);
				if (logger.isLoggable(Level.FINEST))
					logger.log(Level.FINEST, "Global policy set: {0}",
							globalPolicy);
			}
			DynamicPolicyProvider service_policy = new DynamicPolicyProvider(
					new PolicyFileProvider(getPolicy()));
			LoaderSplitPolicyProvider splitServicePolicy = new LoaderSplitPolicyProvider(
					jsbCL, service_policy, new DynamicPolicyProvider(
							initialGlobalPolicy));
			splitServicePolicy.grant(SorcerServiceDescriptor.class, null,
					new Permission[] { new AllPermission() });
			globalPolicy.setPolicy(jsbCL, splitServicePolicy);
		}
		Object impl;
		try {
			Class implClass;
			implClass = Class.forName(getImplClassName(), false, jsbCL);
			if (logger.isLoggable(Level.FINEST))
				logger.finest("Attempting to get implementation constructor");
			Constructor constructor = implClass
					.getDeclaredConstructor(actTypes);
			if (logger.isLoggable(Level.FINEST))
				logger
						.log(Level.FINEST,
								"Obtained implementation constructor: ",
								constructor);
			constructor.setAccessible(true);
			impl = constructor.newInstance(getServerConfigArgs(), lifeCycle);
			if (logger.isLoggable(Level.FINEST))
				logger.log(Level.FINEST,
						"Obtained implementation instance: {0}", impl);
			if (impl instanceof ServiceProxyAccessor) {
				proxy = ((ServiceProxyAccessor) impl).getServiceProxy();
			} else if (impl instanceof ProxyAccessor) {
				proxy = ((ProxyAccessor) impl).getProxy();
			} else {
				proxy = null;
			}
			if (proxy != null) {
				proxy = servicePreparer.prepareProxy(proxy);
			}
			if (logger.isLoggable(Level.FINEST))
				logger.log(Level.FINEST, "Proxy =  {0}", proxy);
            proxy = (new MarshalledObject(proxy)).get();
            currentThread.setContextClassLoader(currentClassLoader);
        } finally {
			currentThread.setContextClassLoader(currentClassLoader);
		}
		return (new Created(impl, proxy));
	}


Input:
  public Command movePieces(Map map, Point p) {
    PieceIterator it = DragBuffer.getBuffer().getIterator();
    if (!it.hasMoreElements()) {
      return null;
    }
    Point offset = null;
    Command comm = new NullCommand();
    BoundsTracker tracker = new BoundsTracker();
    HashMap<Point,List<GamePiece>> mergeTargets =
      new HashMap<Point,List<GamePiece>>();
    while (it.hasMoreElements()) {
      dragging = it.nextPiece();
      tracker.addPiece(dragging);
      GamePiece[] draggedPieces;
      if (dragging instanceof Stack) {
        int size = ((Stack) dragging).getPieceCount();
        draggedPieces = new GamePiece[size];
        for (int i = 0; i < size; i++) {
          draggedPieces[i] = ((Stack) dragging).getPieceAt(i);
        }
      }
      else {
        draggedPieces = new GamePiece[]{dragging};
      }
      for (int i = 0; i < draggedPieces.length; i++) {
        KeyBuffer.getBuffer().add(draggedPieces[i]);
      }
      if (offset != null) {
        p = new Point(dragging.getPosition().x + offset.x, dragging.getPosition().y + offset.y);
      }
      List<GamePiece> mergeCandidates = mergeTargets.get(p);
      GamePiece mergeWith = null;
      if (mergeCandidates != null) {
        for (int i = 0, n = mergeCandidates.size(); i < n; ++i) {
          GamePiece candidate = mergeCandidates.get(i);
          if (map.getPieceCollection().canMerge(candidate, dragging)) {
            mergeWith = candidate;
            mergeCandidates.set(i, dragging);
            break;
          }
        }
      }
      if (mergeWith == null) {
        mergeWith = map.findAnyPiece(p, dropTargetSelector);
        if (mergeWith == null && !Boolean.TRUE.equals(dragging.getProperty(Properties.IGNORE_GRID))) {
          p = map.snapTo(p);
        }
        if (offset == null) {
          offset = new Point(p.x - dragging.getPosition().x,
                             p.y - dragging.getPosition().y);
        }
        if (mergeWith != null && map.getStackMetrics().isStackingEnabled()) {
          mergeCandidates = new ArrayList<GamePiece>();
          mergeCandidates.add(mergeWith);
          mergeTargets.put(p, mergeCandidates);
        }
      }
      if (mergeWith == null) {
        comm = comm.append(movedPiece(dragging, p));
        comm = comm.append(map.placeAt(dragging, p));
        if (!(dragging instanceof Stack) && !Boolean.TRUE.equals(dragging.getProperty(Properties.NO_STACK))) {
          Stack parent = map.getStackMetrics().createStack(dragging);
          if (parent != null) {
            comm = comm.append(map.placeAt(parent, p));
          }
        }
      }
      else {
        comm = comm.append(movedPiece(dragging, mergeWith.getPosition()));
        comm = comm.append(map.getStackMetrics().merge(mergeWith, dragging));
      }
      if (map.getMoveKey() != null) {
        applyKeyAfterMove(draggedPieces, comm, map.getMoveKey());
      }
      tracker.addPiece(dragging);
    }
    if (GlobalOptions.getInstance().autoReportEnabled()) {
      Command report = createMovementReporter(comm).getReportCommand();
      report.execute();
      comm = comm.append(report);
    }
    tracker.repaint();
    return comm;
  }

Output:
  public Command movePieces(Map map, Point p) {
    PieceIterator it = DragBuffer.getBuffer().getIterator();
    if (!it.hasMoreElements()) {
      return null;
    }
    Point offset = null;
    Command comm = new NullCommand();
    BoundsTracker tracker = new BoundsTracker();
    HashMap<Point,List<GamePiece>> mergeTargets =
      new HashMap<Point,List<GamePiece>>();
    while (it.hasMoreElements()) {
      dragging = it.nextPiece();
      tracker.addPiece(dragging);
      GamePiece[] draggedPieces;
      if (dragging instanceof Stack) {
        int size = ((Stack) dragging).getPieceCount();
        draggedPieces = new GamePiece[size];
        for (int i = 0; i < size; i++) {
          draggedPieces[i] = ((Stack) dragging).getPieceAt(i);
        }
      }
      else {
        draggedPieces = new GamePiece[]{dragging};
      }
      for (int i = 0; i < draggedPieces.length; i++) {
        KeyBuffer.getBuffer().add(draggedPieces[i]);
      }
      if (offset != null) {
        p = new Point(dragging.getPosition().x + offset.x, dragging.getPosition().y + offset.y);
      }
      List<GamePiece> mergeCandidates = mergeTargets.get(p);
      GamePiece mergeWith = null;
      if (mergeCandidates != null) {
        for (int i = 0, n = mergeCandidates.size(); i < n; ++i) {
          GamePiece candidate = mergeCandidates.get(i);
          if (map.getPieceCollection().canMerge(candidate, dragging)) {
            mergeWith = candidate;
            mergeCandidates.set(i, dragging);
            break;
          }
        }
      }
      if (mergeWith == null) {
        mergeWith = map.findAnyPiece(p, dropTargetSelector);
        if (mergeWith == null && !Boolean.TRUE.equals(dragging.getProperty(Properties.IGNORE_GRID))) {
          p = map.snapTo(p);
        }
        if (offset == null) {
          offset = new Point(p.x - dragging.getPosition().x,
                             p.y - dragging.getPosition().y);
        }
        if (mergeWith != null && map.getStackMetrics().isStackingEnabled()) {
          mergeCandidates = new ArrayList<GamePiece>();
          mergeCandidates.add(dragging);
          mergeCandidates.add(mergeWith);
          mergeTargets.put(p, mergeCandidates);
        }
      }
      if (mergeWith == null) {
        comm = comm.append(movedPiece(dragging, p));
        comm = comm.append(map.placeAt(dragging, p));
        if (!(dragging instanceof Stack) && !Boolean.TRUE.equals(dragging.getProperty(Properties.NO_STACK))) {
          Stack parent = map.getStackMetrics().createStack(dragging);
          if (parent != null) {
            comm = comm.append(map.placeAt(parent, p));
          }
        }
      }
      else {
        comm = comm.append(movedPiece(dragging, mergeWith.getPosition()));
        comm = comm.append(map.getStackMetrics().merge(mergeWith, dragging));
      }
      if (map.getMoveKey() != null) {
        applyKeyAfterMove(draggedPieces, comm, map.getMoveKey());
      }
      tracker.addPiece(dragging);
    }
    if (GlobalOptions.getInstance().autoReportEnabled()) {
      Command report = createMovementReporter(comm).getReportCommand();
      report.execute();
      comm = comm.append(report);
    }
    tracker.repaint();
    return comm;
  }


Input:
    LibraryProperties(Composite parent) {
        mMatchIcon = AdtPlugin.getImageDescriptor("/icons/match.png").createImage();
        mErrorIcon = AdtPlugin.getImageDescriptor("/icons/error.png").createImage();
        mTop = new Composite(parent, SWT.NONE);
        mTop.setLayout(new GridLayout(2, false));
        mTop.setLayoutData(new GridData(GridData.FILL_BOTH));
        mTop.setFont(parent.getFont());
        mTop.addDisposeListener(new DisposeListener() {
            public void widgetDisposed(DisposeEvent e) {
                mMatchIcon.dispose();
                mErrorIcon.dispose();
            }
        });
        mTable = new Table(mTop, SWT.BORDER | SWT.FULL_SELECTION | SWT.SINGLE);
        mTable.setLayoutData(new GridData(GridData.FILL_BOTH));
        mTable.setHeaderVisible(true);
        mTable.setLinesVisible(false);
        mTable.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                resetEnabled();
            }
        });
        final TableColumn column0 = new TableColumn(mTable, SWT.NONE);
        column0.setText("Reference");
        final TableColumn column1 = new TableColumn(mTable, SWT.NONE);
        column1.setText("Project");
        Composite buttons = new Composite(mTop, SWT.NONE);
        buttons.setLayout(new GridLayout());
        buttons.setLayoutData(new GridData(GridData.FILL_VERTICAL));
        mProjectChooser = new ProjectChooserHelper(parent.getShell(), mFilter);
        mAddButton = new Button(buttons, SWT.PUSH | SWT.FLAT);
        mAddButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        mAddButton.setText("Add...");
        mAddButton.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                IJavaProject javaProject = mProjectChooser.chooseJavaProject(null);
                if (javaProject != null) {
                    IProject iProject = javaProject.getProject();
                    IPath relativePath = Sdk.makeRelativeTo(
                            iProject.getLocation(), mState.getProject().getLocation());
                    addItem(relativePath.toString(), iProject, -1);
                    resetEnabled();
                    mMustSave = true;
                }
            }
        });
        mRemoveButton = new Button(buttons, SWT.PUSH | SWT.FLAT);
        mRemoveButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        mRemoveButton.setText("Remove");
        mRemoveButton.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                TableItem selection = mTable.getSelection()[0];
                ItemData data = (ItemData) selection.getData();
                mItemDataList.remove(data);
                mTable.remove(mTable.getSelectionIndex());
                resetEnabled();
            }
        });
        Label l = new Label(buttons, SWT.SEPARATOR | SWT.HORIZONTAL);
        l.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        mUpButton = new Button(buttons, SWT.PUSH | SWT.FLAT);
        mUpButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        mUpButton.setText("Up");
        mUpButton.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                int index = mTable.getSelectionIndex();
                ItemData data = mItemDataList.remove(index);
                mTable.remove(index);
                addItem(data.relativePath, data.project, index - 1);
                mTable.select(index - 1);
                resetEnabled();
            }
        });
        mDownButton = new Button(buttons, SWT.PUSH | SWT.FLAT);
        mDownButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        mDownButton.setText("Down");
        mDownButton.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                int index = mTable.getSelectionIndex();
                ItemData data = mItemDataList.remove(index);
                mTable.remove(index);
                addItem(data.relativePath, data.project, index + 1);
                mTable.select(index + 1);
                resetEnabled();
            }
        });
        adjustColumnsWidth(mTable, column0, column1);
    }

Output:
    LibraryProperties(Composite parent) {
        mMatchIcon = AdtPlugin.getImageDescriptor("/icons/match.png").createImage();
        mErrorIcon = AdtPlugin.getImageDescriptor("/icons/error.png").createImage();
        mTop = new Composite(parent, SWT.NONE);
        mTop.setLayout(new GridLayout(2, false));
        mTop.setLayoutData(new GridData(GridData.FILL_BOTH));
        mTop.setFont(parent.getFont());
        mTop.addDisposeListener(new DisposeListener() {
            public void widgetDisposed(DisposeEvent e) {
                mMatchIcon.dispose();
                mErrorIcon.dispose();
            }
        });
        mTable = new Table(mTop, SWT.BORDER | SWT.FULL_SELECTION | SWT.SINGLE);
        mTable.setLayoutData(new GridData(GridData.FILL_BOTH));
        mTable.setHeaderVisible(true);
        mTable.setLinesVisible(false);
        mTable.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                resetEnabled();
            }
        });
        final TableColumn column0 = new TableColumn(mTable, SWT.NONE);
        column0.setText("Reference");
        final TableColumn column1 = new TableColumn(mTable, SWT.NONE);
        column1.setText("Project");
        Composite buttons = new Composite(mTop, SWT.NONE);
        buttons.setLayout(new GridLayout());
        buttons.setLayoutData(new GridData(GridData.FILL_VERTICAL));
        mProjectChooser = new ProjectChooserHelper(parent.getShell(), mFilter);
        mAddButton = new Button(buttons, SWT.PUSH | SWT.FLAT);
        mAddButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        mAddButton.setText("Add...");
        mAddButton.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                IJavaProject javaProject = mProjectChooser.chooseJavaProject(null);
                if (javaProject != null) {
                    IProject iProject = javaProject.getProject();
                    IPath relativePath = Sdk.makeRelativeTo(
                            iProject.getLocation(), mState.getProject().getLocation());
                    addItem(relativePath.toString(), iProject, -1);
                    resetEnabled();
                    mMustSave = true;
                }
            }
        });
        mRemoveButton = new Button(buttons, SWT.PUSH | SWT.FLAT);
        mRemoveButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        mRemoveButton.setText("Remove");
        mRemoveButton.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                TableItem selection = mTable.getSelection()[0];
                ItemData data = (ItemData) selection.getData();
                mItemDataList.remove(data);
                mTable.remove(mTable.getSelectionIndex());
                resetEnabled();
                mMustSave = true;
            }
        });
        Label l = new Label(buttons, SWT.SEPARATOR | SWT.HORIZONTAL);
        l.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        mUpButton = new Button(buttons, SWT.PUSH | SWT.FLAT);
        mUpButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        mUpButton.setText("Up");
        mUpButton.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                int index = mTable.getSelectionIndex();
                ItemData data = mItemDataList.remove(index);
                mTable.remove(index);
                addItem(data.relativePath, data.project, index - 1);
                mTable.select(index - 1);
                resetEnabled();
                mMustSave = true;
            }
        });
        mDownButton = new Button(buttons, SWT.PUSH | SWT.FLAT);
        mDownButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        mDownButton.setText("Down");
        mDownButton.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                int index = mTable.getSelectionIndex();
                ItemData data = mItemDataList.remove(index);
                mTable.remove(index);
                addItem(data.relativePath, data.project, index + 1);
                mTable.select(index + 1);
                resetEnabled();
                mMustSave = true;
            }
        });
        adjustColumnsWidth(mTable, column0, column1);
    }


Input:
	public Collection<ContactGroup> getContactGroups(Context context,
			long directoryId) {
		final String starredContacts = context.getString(R.string.starredContacts);
		final String myContacts = context.getString(R.string.myContacts);
		Comparator<ContactGroup> comparator = new Comparator<ContactGroup>() {
			@Override
			public int compare(ContactGroup g1, ContactGroup g2) {
				if (myContacts.equalsIgnoreCase(g1.getTitle())) {
					return -1;
				} else if (myContacts.equalsIgnoreCase(g2.getTitle())) {
					return 1;
				} else if (starredContacts.equalsIgnoreCase(g1.getTitle())
						|| STARRED_CONTACTS_ENG.equalsIgnoreCase(g1.getTitle())) {
					return -1;
				} else if (starredContacts.equalsIgnoreCase(g2.getTitle())
						|| STARRED_CONTACTS_ENG.equalsIgnoreCase(g2.getTitle())) {
					return 1;
				}
				return g1.getTitle().compareTo(g2.getTitle());
			}
		};
		final Collection<ContactGroup> groups = new TreeSet<ContactGroup>(
				comparator);
		Uri uri = ContactsContract.Groups.CONTENT_URI;
		String[] projection = new String[] { ContactsContract.Groups._ID,
				ContactsContract.Groups.ACCOUNT_NAME,
				ContactsContract.Groups.ACCOUNT_TYPE,
				ContactsContract.Groups.TITLE, };
		String selection = null;
		String[] selectionArgs = null;
		String sortOrder = ContactsContract.Groups.TITLE
				+ " COLLATE LOCALIZED ASC";
		CursorLoader loader = new CursorLoader(context, uri, projection,
				selection, selectionArgs, sortOrder);
		Cursor cursor = null;
		boolean foundStarredGroup = false;
		boolean foundMyContacts = false;
		try {
			loader.startLoading();
			cursor = loader.loadInBackground();
			if (cursor == null) {
				return groups;
			}
			cursor.moveToFirst();
			while (cursor.isAfterLast() == false) {
				long groupId = cursor.getLong(0);
				String accountName = cursor.getString(1);
				String accountType = cursor.getString(2);
				String title = cursor.getString(3);
				if (title == null || title.equalsIgnoreCase(myContacts)) {
					if (foundMyContacts) {
						cursor.moveToNext();
						continue;
					}
					foundMyContacts = true;
					groupId = ContactsWidgetConfigurationActivity.CONTACT_MY_CONTACTS_GROUP_ID;
				} else if (title.equalsIgnoreCase(starredContacts)
						|| STARRED_CONTACTS_ENG.equalsIgnoreCase(title)) {
					foundStarredGroup = true;
					groupId = ContactsWidgetConfigurationActivity.CONTACT_STARRED_GROUP_ID;
				}
				ContactGroup group = new ContactGroup(groupId, accountName,
						accountType, title);
				groups.add(group);
				cursor.moveToNext();
			}
		} finally {
			loader.stopLoading();
			if (cursor != null) {
				cursor.close();
			}
		}
		if (!foundStarredGroup) {
			ContactGroup group = new ContactGroup(
					ContactsWidgetConfigurationActivity.CONTACT_STARRED_GROUP_ID, starredContacts,
					null, starredContacts);
			groups.add(group);
		}
		if (!foundMyContacts) {
			ContactGroup group = new ContactGroup(
					ContactsWidgetConfigurationActivity.CONTACT_MY_CONTACTS_GROUP_ID, myContacts,
					null, myContacts);
			groups.add(group);
		}
		return groups;
	}

Output:
	public Collection<ContactGroup> getContactGroups(Context context,
			long directoryId) {
		final String starredContacts = context.getString(R.string.starredContacts);
		final String myContacts = context.getString(R.string.myContacts);
		Comparator<ContactGroup> comparator = new Comparator<ContactGroup>() {
			@Override
			public int compare(ContactGroup g1, ContactGroup g2) {
				if (myContacts.equalsIgnoreCase(g1.getTitle())) {
					return -1;
				} else if (myContacts.equalsIgnoreCase(g2.getTitle())) {
					return 1;
				} else if (starredContacts.equalsIgnoreCase(g1.getTitle())
						|| STARRED_CONTACTS_ENG.equalsIgnoreCase(g1.getTitle())) {
					return -1;
				} else if (starredContacts.equalsIgnoreCase(g2.getTitle())
						|| STARRED_CONTACTS_ENG.equalsIgnoreCase(g2.getTitle())) {
					return 1;
				}
				return g1.getTitle().compareTo(g2.getTitle());
			}
		};
		final Collection<ContactGroup> groups = new TreeSet<ContactGroup>(
				comparator);
		Uri uri = ContactsContract.Groups.CONTENT_URI;
		String[] projection = new String[] { ContactsContract.Groups._ID,
				ContactsContract.Groups.ACCOUNT_NAME,
				ContactsContract.Groups.ACCOUNT_TYPE,
				ContactsContract.Groups.TITLE, };
		String selection = null;
		String[] selectionArgs = null;
		String sortOrder = ContactsContract.Groups.TITLE
				+ " COLLATE LOCALIZED ASC";
		CursorLoader loader = new CursorLoader(context, uri, projection,
				selection, selectionArgs, sortOrder);
		Cursor cursor = null;
		boolean foundStarredGroup = false;
		boolean foundMyContacts = false;
		try {
			loader.startLoading();
			cursor = loader.loadInBackground();
			if (cursor == null) {
				return groups;
			}
			cursor.moveToFirst();
			while (cursor.isAfterLast() == false) {
				long groupId = cursor.getLong(0);
				String accountName = cursor.getString(1);
				String accountType = cursor.getString(2);
				String title = cursor.getString(3);
				if (title == null || title.equalsIgnoreCase(myContacts)) {
					if (foundMyContacts) {
						cursor.moveToNext();
						continue;
					}
					foundMyContacts = true;
					groupId = ContactsWidgetConfigurationActivity.CONTACT_MY_CONTACTS_GROUP_ID;
					title = myContacts;
				} else if (title.equalsIgnoreCase(starredContacts)
						|| STARRED_CONTACTS_ENG.equalsIgnoreCase(title)) {
					foundStarredGroup = true;
					groupId = ContactsWidgetConfigurationActivity.CONTACT_STARRED_GROUP_ID;
				}
				ContactGroup group = new ContactGroup(groupId, accountName,
						accountType, title);
				groups.add(group);
				cursor.moveToNext();
			}
		} finally {
			loader.stopLoading();
			if (cursor != null) {
				cursor.close();
			}
		}
		if (!foundStarredGroup) {
			ContactGroup group = new ContactGroup(
					ContactsWidgetConfigurationActivity.CONTACT_STARRED_GROUP_ID, starredContacts,
					null, starredContacts);
			groups.add(group);
		}
		if (!foundMyContacts) {
			ContactGroup group = new ContactGroup(
					ContactsWidgetConfigurationActivity.CONTACT_MY_CONTACTS_GROUP_ID, myContacts,
					null, myContacts);
			groups.add(group);
		}
		return groups;
	}


Input:
  void display(final List<Patch> result) {
    all.clear();
    final FlexCellFormatter fmt = table.getFlexCellFormatter();
    table.setText(0, 0, PatchUtil.C.patchHeaderPatchSet());
    fmt.setStyleName(0, 0, Gerrit.RESOURCES.css().dataHeader());
    table.setText(1, 0, PatchUtil.C.patchHeaderOld());
    fmt.setStyleName(1, 0, Gerrit.RESOURCES.css().dataHeader());
    table.setText(2, 0, PatchUtil.C.patchHeaderNew());
    fmt.setStyleName(2, 0, Gerrit.RESOURCES.css().dataHeader());
    table.setText(3, 0, Util.C.patchTableColumnComments());
    fmt.setStyleName(3, 0, Gerrit.RESOURCES.css().dataHeader());
    table.setText(0, 1, PatchUtil.C.patchBase());
    fmt.setStyleName(0, 1, Gerrit.RESOURCES.css().dataCell());
    fmt.addStyleName(0, 1, Gerrit.RESOURCES.css().topMostCell());
    fmt.setStyleName(1, 1, Gerrit.RESOURCES.css().dataCell());
    fmt.setStyleName(2, 1, Gerrit.RESOURCES.css().dataCell());
    fmt.setStyleName(3, 1, Gerrit.RESOURCES.css().dataCell());
    installRadio(1, 1, null, screen.idSideA, 0);
    int col=2;
    for (final Patch k : result) {
      final PatchSet.Id psId = k.getKey().getParentKey();
      table.setText(0, col, String.valueOf(psId.get()));
      fmt.setStyleName(0, col, Gerrit.RESOURCES.css().patchHistoryTablePatchSetHeader());
      fmt.addStyleName(0, col, Gerrit.RESOURCES.css().dataCell());
      fmt.addStyleName(0, col, Gerrit.RESOURCES.css().topMostCell());
      installRadio(1, col, psId, screen.idSideA, 0);
      installRadio(2, col, psId, screen.idSideB, 1);
      fmt.setStyleName(3, col, Gerrit.RESOURCES.css().dataCell());
      if (k.getCommentCount() > 0) {
        table.setText(3, col, k.getCommentCount());
      }
      col++;
    }
  }

Output:
  void display(final List<Patch> result) {
    all.clear();
    final FlexCellFormatter fmt = table.getFlexCellFormatter();
    table.setText(0, 0, PatchUtil.C.patchHeaderPatchSet());
    fmt.setStyleName(0, 0, Gerrit.RESOURCES.css().dataHeader());
    table.setText(1, 0, PatchUtil.C.patchHeaderOld());
    fmt.setStyleName(1, 0, Gerrit.RESOURCES.css().dataHeader());
    table.setText(2, 0, PatchUtil.C.patchHeaderNew());
    fmt.setStyleName(2, 0, Gerrit.RESOURCES.css().dataHeader());
    table.setText(3, 0, Util.C.patchTableColumnComments());
    fmt.setStyleName(3, 0, Gerrit.RESOURCES.css().dataHeader());
    table.setText(0, 1, PatchUtil.C.patchBase());
    fmt.setStyleName(0, 1, Gerrit.RESOURCES.css().dataCell());
    fmt.addStyleName(0, 1, Gerrit.RESOURCES.css().topMostCell());
    fmt.setStyleName(1, 1, Gerrit.RESOURCES.css().dataCell());
    fmt.setStyleName(2, 1, Gerrit.RESOURCES.css().dataCell());
    fmt.setStyleName(3, 1, Gerrit.RESOURCES.css().dataCell());
    installRadio(1, 1, null, screen.idSideA, 0);
    int col=2;
    for (final Patch k : result) {
      final PatchSet.Id psId = k.getKey().getParentKey();
      table.setText(0, col, String.valueOf(psId.get()));
      fmt.setStyleName(0, col, Gerrit.RESOURCES.css().patchHistoryTablePatchSetHeader());
      fmt.addStyleName(0, col, Gerrit.RESOURCES.css().dataCell());
      fmt.addStyleName(0, col, Gerrit.RESOURCES.css().topMostCell());
      installRadio(1, col, psId, screen.idSideA, 0);
      installRadio(2, col, psId, screen.idSideB, 1);
      fmt.setStyleName(3, col, Gerrit.RESOURCES.css().dataCell());
      if (k.getCommentCount() > 0) {
        table.setText(3, col, Integer.toString(k.getCommentCount()));
      }
      col++;
    }
  }


Input:
	private Constructor getFirstMatchingConstructor(Object object) throws NoSuchMethodException {
		Constructor[] constructors = clazz.getDeclaredConstructors();
		Constructor constructor = null;
		for (int i = 0; i < constructors.length; i++) {
			Class[] parameterTypes = constructors[i].getParameterTypes();
			if (parameterTypes.length == 1 && (object == null || parameterTypes[i].isInstance(object))) {
				constructor = constructors[i];
				break;
			}
		}
		if (constructor == null) {
			if (object == null) {
				throw new NoSuchMethodException("No constructor found that can take a single argument");
			} else {
				throw new NoSuchMethodException("No constructor found that can take a single argument of type " + object.getClass());
			}
		}
		return constructor;
	}

Output:
	private Constructor getFirstMatchingConstructor(Object object) throws NoSuchMethodException {
		Constructor[] constructors = clazz.getDeclaredConstructors();
		Constructor constructor = null;
		for (int i = 0; i < constructors.length; i++) {
			Class[] parameterTypes = constructors[i].getParameterTypes();
			if (parameterTypes.length == 1 && (object == null || parameterTypes[0].isInstance(object))) {
				constructor = constructors[i];
				break;
			}
		}
		if (constructor == null) {
			if (object == null) {
				throw new NoSuchMethodException("No constructor found that can take a single argument");
			} else {
				throw new NoSuchMethodException("No constructor found that can take a single argument of type " + object.getClass());
			}
		}
		return constructor;
	}


Input:
    public static RuntimeDelegate getInstance() {
        if (delegate != null) {
            return delegate;
        }
        synchronized (RuntimeDelegate.class) {
            if (delegate != null) {
                return delegate;
            }
            ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
            try {
                Object service = ProviderLocator.getService(RuntimeDelegate.class.getName(), RuntimeDelegate.class, classLoader);
                if (service != null) {
                    delegate = (RuntimeDelegate)service;
                    return delegate;
                }
            } catch (Exception ex) {
            } catch (Error ex) {
            }
            String className = null;
            try {
                className =  ProviderLocator.lookupByJREPropertyFile("lib" + File.separator + "jaxrpc.properties", RuntimeDelegate.class.getName());
                if (className != null) {
                    Class<?> delegateClass = ProviderLocator.loadClass(className,
                        RuntimeDelegate.class, classLoader);
                    delegate = (RuntimeDelegate)delegateClass.newInstance();
                    return delegate;
                }
            } catch (IOException e) {
            } catch (ClassNotFoundException e) {
            } catch (InstantiationException e) {
            } catch (IllegalAccessException e) {
            }
            try {
                className = System.getProperty("javax.ws.rs.ext.RuntimeDelegate");
            } catch (SecurityException e) {
            }
            if (className == null || "".equals(className)) {
                className = "org.apache.wink.common.internal.runtime.RuntimeDelegateImpl";
            }
            try {
                Class<?> delegateClass = ProviderLocator.loadClass(className,
                    RuntimeDelegate.class, classLoader);
                delegate = (RuntimeDelegate)delegateClass.newInstance();
                return delegate;
            } catch (ClassNotFoundException e1) {
            } catch (SecurityException e) {
            } catch (InstantiationException e) {
            } catch (IllegalAccessException e) {
            }
            return delegate;
        }
    }

Output:
    public static RuntimeDelegate getInstance() {
        if (delegate != null) {
            return delegate;
        }
        synchronized (RuntimeDelegate.class) {
            if (delegate != null) {
                return delegate;
            }
            ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
            try {
                Object service = ProviderLocator.getService(RuntimeDelegate.class.getName(), RuntimeDelegate.class, classLoader);
                if (service != null) {
                    delegate = (RuntimeDelegate)service;
                    return delegate;
                }
            } catch (Exception ex) {
            } catch (Error ex) {
            }
            String className = null;
            try {
                className =  ProviderLocator.lookupByJREPropertyFile("lib" + File.separator + "jaxrpc.properties", RuntimeDelegate.class.getName());
                if (className != null) {
                    Class<?> delegateClass = ProviderLocator.loadClass(className,
                        RuntimeDelegate.class, classLoader);
                    delegate = (RuntimeDelegate)delegateClass.newInstance();
                    return delegate;
                }
            } catch (IOException e) {
            } catch (ClassNotFoundException e) {
            } catch (InstantiationException e) {
            } catch (IllegalAccessException e) {
            }
            try {
                className = System.getProperty("javax.ws.rs.ext.RuntimeDelegate");
            } catch (SecurityException e) {
            }
            if (className == null || "".equals(className)) {
                className = "org.apache.wink.common.internal.runtime.RuntimeDelegateImpl";
            }
            try {
                Class<?> delegateClass = ProviderLocator.loadClass(className,
                    RuntimeDelegate.class, classLoader);
                delegate = (RuntimeDelegate)delegateClass.newInstance();
                return delegate;
            } catch (ClassNotFoundException e1) {
            } catch (SecurityException e) {
            } catch (InstantiationException e) {
            } catch (IllegalAccessException e) {
            }
            throw new RuntimeException("Unable to create jax-rs RuntimeDelegate");
        }
    }


Input:
	public static boolean checkUsername(String username) {
		username = username.toLowerCase();
		boolean hasallowedchars = false;
		for (String e : evil)
			if (username.contains(e)) return false;
		for (String a : alpha)
			if (username.contains(a) && !hasallowedchars) hasallowedchars = true;
		Configuration.log("So, username " + username + " was " + Boolean.toString(hasallowedchars));
		return hasallowedchars;
	}

Output:
	public static boolean checkUsername(String username) {
		username = username.toLowerCase();
		boolean hasallowedchars = false;
		if (username.trim().length() == 0) {
			return false;
		}
		for (String e : evil)
			if (username.contains(e)) return false;
		for (String a : alpha)
			if (username.contains(a) && !hasallowedchars) hasallowedchars = true;
		Configuration.log("So, username " + username + " was " + Boolean.toString(hasallowedchars));
		return hasallowedchars;
	}


Input:
	public static String getServerLocation() {
		if (!initialized) {
			try {
				initialize();
				ensureBundleStarted(EQUINOX_HTTP_JETTY);
				ensureBundleStarted(EQUINOX_HTTP_REGISTRY);
				org.eclipse.orion.server.authentication.Activator.getDefault();
				Activator.getDefault();
				ConfiguratorActivator.getDefault();
				webapp = new WebApplication();
				webapp.start(null);
			} catch (Exception e) {
				e.printStackTrace();
				return null;
			}
		}
		return "http://" + serverHost + ':' + String.valueOf(serverPort);
	}

Output:
	public static String getServerLocation() {
		if (!initialized) {
			try {
				ensureBundleStarted(EQUINOX_HTTP_JETTY);
				ensureBundleStarted(EQUINOX_HTTP_REGISTRY);
				org.eclipse.orion.server.authentication.Activator.getDefault();
				Activator.getDefault();
				ConfiguratorActivator.getDefault();
				webapp = new WebApplication();
				webapp.start(null);
				initialize();
			} catch (Exception e) {
				e.printStackTrace();
				return null;
			}
		}
		return "http://" + serverHost + ':' + String.valueOf(serverPort);
	}


Input:
    public void subsetFile(String infile, String outfile, Set<Integer> columns,
        String delimiter) {
        try {
          Scanner scanner =  new Scanner(new File(infile));
          dbgLog.fine("outfile="+outfile);
          BufferedWriter out = new BufferedWriter(new FileWriter(outfile));
          scanner.useDelimiter("\\n");
          while (scanner.hasNext()) {
              String[] line = (scanner.next()).split(delimiter);
              if ((line.length <= 1) && (line[0].equals(""))) {
                  break;
              }
              List<String> ln = new ArrayList<String>();
              for (Integer i : columns) {
                  ln.add(line[i]);
              }
              dbgLog.fine(StringUtils.join(ln,"\t"));
              out.write(StringUtils.join(ln,"\t")+"\n");
              ln=null;
          }
          scanner.close();
          out.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

Output:
    public void subsetFile(String infile, String outfile, Set<Integer> columns,
        String delimiter) {
        try {
          Scanner scanner =  new Scanner(new File(infile));
          dbgLog.fine("outfile="+outfile);
          BufferedWriter out = new BufferedWriter(new FileWriter(outfile));
          scanner.useDelimiter("\\n");
          while (scanner.hasNext()) {
              String[] line = (scanner.next()).split(delimiter,-1);
              List<String> ln = new ArrayList<String>();
              for (Integer i : columns) {
                  ln.add(line[i]);
              }
              dbgLog.fine(StringUtils.join(ln,"\t"));
              out.write(StringUtils.join(ln,"\t")+"\n");
              ln=null;
          }
          scanner.close();
          out.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }


Input:
	public SensorData toSensorData(String jsonString)
	{
		JSONObject jsonData = super.parseData(jsonString);
		if (jsonData != null)
		{
			long senseStartTimestamp = super.parseTimeStamp(jsonData);
			SensorConfig sensorConfig = super.getGenericConfig(jsonData);
			try
			{
				JSONArray xs = (JSONArray) jsonData.get(X_AXIS);
				JSONArray ys = (JSONArray) jsonData.get(Y_AXIS);
				JSONArray zs = (JSONArray) jsonData.get(Z_AXIS);
				ArrayList<float[]> sensorReadings = new ArrayList<float[]>();
				for (int i=0; i<xs.size(); i++)
				{
					float[] sample = new float[3];
					sample[0] = (Float) xs.get(i);
					sample[1] = (Float) ys.get(i);
					sample[2] = (Float) zs.get(i);
					sensorReadings.add(sample);
				}
				JSONArray ts = (JSONArray) jsonData.get(READING_TIMESTAMPS);
				ArrayList<Long> sensorReadingTimestamps = new ArrayList<Long>();
				for (int i=0; i<ts.size(); i++)
				{
					sensorReadingTimestamps.add((Long) ts.get(i));
				}
				return new AccelerometerData(senseStartTimestamp, sensorReadings, sensorReadingTimestamps, sensorConfig);
			}
			catch (NullPointerException e)
			{
				e.printStackTrace();
				return null;
			}
		}
		else
			return null;
	}

Output:
	public SensorData toSensorData(String jsonString)
	{
		JSONObject jsonData = super.parseData(jsonString);
		if (jsonData != null)
		{
			long senseStartTimestamp = super.parseTimeStamp(jsonData);
			SensorConfig sensorConfig = super.getGenericConfig(jsonData);
			try
			{
				JSONArray xs = (JSONArray) jsonData.get(X_AXIS);
				JSONArray ys = (JSONArray) jsonData.get(Y_AXIS);
				JSONArray zs = (JSONArray) jsonData.get(Z_AXIS);
				ArrayList<float[]> sensorReadings = new ArrayList<float[]>();
				for (int i=0; i<xs.size(); i++)
				{
					float[] sample = new float[3];
					sample[0] = ((Double)xs.get(i)).floatValue();
					sample[1] = ((Double)ys.get(i)).floatValue();
					sample[2] = ((Double)zs.get(i)).floatValue();
					sensorReadings.add(sample);
				}
				JSONArray ts = (JSONArray) jsonData.get(READING_TIMESTAMPS);
				ArrayList<Long> sensorReadingTimestamps = new ArrayList<Long>();
				for (int i=0; i<ts.size(); i++)
				{
					sensorReadingTimestamps.add((Long) ts.get(i));
				}
				return new AccelerometerData(senseStartTimestamp, sensorReadings, sensorReadingTimestamps, sensorConfig);
			}
			catch (NullPointerException e)
			{
				e.printStackTrace();
				return null;
			}
		}
		else
			return null;
	}


Input:
	private Groundplan randomPlan() {
		Groundplan plan = new Groundplan(20);
		for (int i = 0; i < Groundplan.MINIMUM_COTTAGE_PERCENTAGE * 20 -2; i++) {
			plan.addResidence(new Cottage(random.nextDouble()
					* Groundplan.WIDTH, random.nextDouble() * Groundplan.HEIGHT));
		}
		for (int i = 0; i < Groundplan.MINIMUM_BUNGALOW_PERCENTAGE * 20; i++) {
			plan.addResidence(new Bungalow(random.nextDouble()
					* Groundplan.WIDTH, random.nextDouble() * Groundplan.HEIGHT));
		}
		for (int i = 0; i < Groundplan.MINIMUM_MANSION_PERCENTAGE * 20; i++) {
			plan.addResidence(new Mansion(random.nextDouble()
					* Groundplan.WIDTH, random.nextDouble() * Groundplan.HEIGHT));
		}
		double size = Groundplan.WIDTH * Groundplan.HEIGHT * Groundplan.MINIMUM_WATER_PERCENTAGE;
		double length = Math.sqrt(size);
		plan.addWaterBody(new WaterBody(random.nextDouble() * (Groundplan.WIDTH - length),
				random.nextDouble() * (Groundplan.HEIGHT - length), length, length));
		System.out.println("Value of the plan: "+plan.getPlanValue());
		return plan;
	}

Output:
	private Groundplan randomPlan() {
		Groundplan plan = new Groundplan(20);
		for (int i = 0; i < Groundplan.MINIMUM_COTTAGE_PERCENTAGE * 20; i++) {
			plan.addResidence(new Cottage(random.nextDouble()
					* Groundplan.WIDTH, random.nextDouble() * Groundplan.HEIGHT));
		}
		for (int i = 0; i < Groundplan.MINIMUM_BUNGALOW_PERCENTAGE * 20; i++) {
			plan.addResidence(new Bungalow(random.nextDouble()
					* Groundplan.WIDTH, random.nextDouble() * Groundplan.HEIGHT));
		}
		for (int i = 0; i < Groundplan.MINIMUM_MANSION_PERCENTAGE * 20; i++) {
			plan.addResidence(new Mansion(random.nextDouble()
					* Groundplan.WIDTH, random.nextDouble() * Groundplan.HEIGHT));
		}
		double size = Groundplan.WIDTH * Groundplan.HEIGHT * Groundplan.MINIMUM_WATER_PERCENTAGE;
		double length = Math.sqrt(size);
		plan.addWaterBody(new WaterBody(random.nextDouble() * (Groundplan.WIDTH - length),
				random.nextDouble() * (Groundplan.HEIGHT - length), length, length));
		System.out.println("Value of the plan: "+plan.getPlanValue());
		return plan;
	}


Input:
  public Enumeration<String> getInitParameterNames() {
    Vector<String> v = new Vector<String>();
    v.add("a String");
    return v.elements();
  }

Output:
  public Enumeration<String> getInitParameterNames() {
    Vector<String> v = new Vector<String>();
    v.add(ServletRequest.getInputString());
    return v.elements();
  }


Input:
public PageResponse process(Request request) {
		Twitter twitter = new TwitterFactory().getInstance();
		String q = "dartford";
		if (request.params().named("q") != null) {
			q = request.params().named("q").value;
		}
		Query query = new Query(q);
		query.setPage(1);
		QueryResult result = null;
		StringBuilder sb = new StringBuilder();
		try {
			result = twitter.search(query);
			sb.append("
Searching for ").append(q).append("
");
			sb.append("

results");
			sb.append(("page " + result.getPage()));
			for (Tweet tweet : result.getTweets()) {
				sb.append("\n");
				sb.append(tweet.getCreatedAt() + " - " + tweet.getFromUser() + ":" + tweet.getText() + ":"
						+ tweet.getLocation());
			}
			sb.append("

");
		} catch (TwitterException e) {
			sb.append(e.getMessage());
		}
		return PageResponseFactory.text(sb.toString());
	}

Output:
public PageResponse process(Request request) {
		Twitter twitter = new TwitterFactory().getInstance();
		String q = "dartford";
		if (request.params().named("q") != null) {
			q = request.params().named("q").value;
		}
		Query query = new Query(q);
		query.setPage(1);
		QueryResult result = null;
		StringBuilder sb = new StringBuilder();
		try {
			result = twitter.search(query);
			sb.append("
Searching for ").append(q).append("
");
			sb.append("

results");
			sb.append(("page " + result.getPage()));
			for (Object t : result.getTweets()) {
				Tweet tweet = (Tweet)t;
				sb.append("\n");
				sb.append(tweet.getCreatedAt() + " - " + tweet.getFromUser() + ":" + tweet.getText() + ":"
						+ tweet.getLocation());
			}
			sb.append("

");
		} catch (TwitterException e) {
			sb.append(e.getMessage());
		}
		return PageResponseFactory.text(sb.toString());
	}