Input:
  public void active() throws Exception {
    UIPopupWindow uiWindowE = getChildById("UIQuckAddEventPopupWindow") ;
    if(uiWindowE == null) uiWindowE = addChild(UIPopupWindowQuick.class, null, "UIQuckAddEventPopupWindow") ;
    UIQuickAddEvent quickAddForm = (UIQuickAddEvent)uiWindowE.getUIComponent();
    if(quickAddForm == null) quickAddForm = createUIComponent(UIQuickAddEvent.class, null, null) ;
    List<SelectItem> calendarOption = CalendarUtils.getCalendarOption();
    ((UIFormSelectBoxWithGroups)quickAddForm.getChildById(UIQuickAddEvent.FIELD_CALENDAR)).setOptions(calendarOption) ;
    quickAddForm.getUIFormSelectBox(UIQuickAddEvent.FIELD_CATEGORY).setOptions(CalendarUtils.getCategory()) ;
    quickAddForm.setEvent(true) ;
    quickAddForm.setId("UIQuickAddEvent") ;
    quickAddForm.init(CalendarUtils.getCalendarService().getCalendarSetting(CalendarUtils.getCurrentUser()), String.valueOf(new Date().getTime()), String.valueOf(new Date().getTime())) ;
    uiWindowE.setUIComponent(quickAddForm) ;
    uiWindowE.setWindowSize(540, 0);
    UIPopupWindow uiWindowT =  getChildById("UIQuckAddTaskPopupWindow") ;
    if(uiWindowT == null) uiWindowT = addChild(UIPopupWindowQuick.class, null, "UIQuckAddTaskPopupWindow") ;
    UIQuickAddEvent quickAddTask = (UIQuickAddEvent)uiWindowT.getUIComponent();
    if(quickAddTask == null) quickAddTask = createUIComponent(UIQuickAddEvent.class, null, null) ;
    quickAddTask.setEvent(false) ;
    quickAddTask.setId("UIQuickAddTask") ;
    quickAddTask.init(CalendarUtils.getCalendarService().getCalendarSetting(CalendarUtils.getCurrentUser()),String.valueOf(new Date().getTime()), String.valueOf(new Date().getTime())) ;
    ((UIFormSelectBoxWithGroups)quickAddTask.getChildById(UIQuickAddEvent.FIELD_CALENDAR)).setOptions(calendarOption) ;
    quickAddTask.getUIFormSelectBox(UIQuickAddEvent.FIELD_CATEGORY).setOptions(CalendarUtils.getCategory()) ;
    uiWindowT.setUIComponent(quickAddTask) ;
    uiWindowT.setWindowSize(540, 0);
  }

Output:
  public void active() throws Exception {
    UIPopupWindow uiWindowE = getChildById("UIQuickAddEventPopupWindow") ;
    if(uiWindowE == null) uiWindowE = addChild(UIPopupWindow.class, null, "UIQuickAddEventPopupWindow") ;
    UIQuickAddEvent quickAddForm = (UIQuickAddEvent)uiWindowE.getUIComponent();
    if(quickAddForm == null) quickAddForm = createUIComponent(UIQuickAddEvent.class, null, null) ;
    List<SelectItem> calendarOption = CalendarUtils.getCalendarOption();
    ((UIFormSelectBoxWithGroups)quickAddForm.getChildById(UIQuickAddEvent.FIELD_CALENDAR)).setOptions(calendarOption) ;
    quickAddForm.getUIFormSelectBox(UIQuickAddEvent.FIELD_CATEGORY).setOptions(CalendarUtils.getCategory()) ;
    quickAddForm.setEvent(true) ;
    quickAddForm.setId("UIQuickAddEvent") ;
    quickAddForm.init(CalendarUtils.getCalendarService().getCalendarSetting(CalendarUtils.getCurrentUser()), String.valueOf(new Date().getTime()), String.valueOf(new Date().getTime())) ;
    uiWindowE.setUIComponent(quickAddForm) ;
    uiWindowE.setWindowSize(540, 0);
    UIPopupWindow uiWindowT =  getChildById("UIQuickAddTaskPopupWindow") ;
    if(uiWindowT == null) uiWindowT = addChild(UIPopupWindow.class, null, "UIQuickAddTaskPopupWindow") ;
    UIQuickAddEvent quickAddTask = (UIQuickAddEvent)uiWindowT.getUIComponent();
    if(quickAddTask == null) quickAddTask = createUIComponent(UIQuickAddEvent.class, null, null) ;
    quickAddTask.setEvent(false) ;
    quickAddTask.setId("UIQuickAddTask") ;
    quickAddTask.init(CalendarUtils.getCalendarService().getCalendarSetting(CalendarUtils.getCurrentUser()),String.valueOf(new Date().getTime()), String.valueOf(new Date().getTime())) ;
    ((UIFormSelectBoxWithGroups)quickAddTask.getChildById(UIQuickAddEvent.FIELD_CALENDAR)).setOptions(calendarOption) ;
    quickAddTask.getUIFormSelectBox(UIQuickAddEvent.FIELD_CATEGORY).setOptions(CalendarUtils.getCategory()) ;
    uiWindowT.setUIComponent(quickAddTask) ;
    uiWindowT.setWindowSize(540, 0);
  }


Input:
	public ESChecksumErrorHandler getChecksumErrorHandler() {
		if (checksumErrorHandler == null) {
			ESExtensionPoint extensionPoint = new ESExtensionPoint(
				"org.eclipse.emf.emfstore.client.checksumErrorHandler");
			ESExtensionElement elementWithHighestPriority = extensionPoint.getElementWithHighestPriority();
			if (elementWithHighestPriority != null) {
				ESChecksumErrorHandler errorHandler = elementWithHighestPriority
					.getClass("errorHandler",
						ESChecksumErrorHandler.class);
				if (errorHandler != null) {
					checksumErrorHandler = errorHandler;
				}
			}
			if (checksumErrorHandler == null) {
				checksumErrorHandler = ChecksumErrorHandler.LOG;
			}
		}
		return checksumErrorHandler;
	}

Output:
	public ESChecksumErrorHandler getChecksumErrorHandler() {
		if (checksumErrorHandler == null) {
			ESExtensionPoint extensionPoint = new ESExtensionPoint(
				"org.eclipse.emf.emfstore.client.checksumErrorHandler");
			ESExtensionElement elementWithHighestPriority = extensionPoint.getElementWithHighestPriority();
			if (elementWithHighestPriority != null) {
				ESChecksumErrorHandler errorHandler = elementWithHighestPriority
					.getClass("errorHandler",
						ESChecksumErrorHandler.class);
				if (errorHandler != null) {
					checksumErrorHandler = errorHandler;
				}
			}
			if (checksumErrorHandler == null) {
				checksumErrorHandler = ChecksumErrorHandler.CANCEL;
			}
		}
		return checksumErrorHandler;
	}


Input:
	public static void main(String[] args) throws IOException {
		List<FieldData> commonData = Lists.newArrayList();
		Multimap<String, FieldData> specificData = HashMultimap.create();
		File metaData = new File("./AbilityMetaData.csv");
		CsvReader reader = new CsvReader(new FileReader(metaData));
		reader.readHeaders();
		while (reader.readRecord()) {
			String id = reader.get("s");
			String displayName = strings.get(reader.get("displayName"));
			if (displayName == null) {
				displayName = reader.get("field");
			}
			String type = reader.get("type");
			int data = Integer.parseInt(reader.get("data"));
			boolean useLevels = !reader.get("repeat").equals("0");
			String useSpecific = reader.get("useSpecific");
			FieldData fd = new FieldData(id, displayName, type, data, useLevels);
			if (useSpecific.isEmpty()) {
				commonData.add(fd);
			} else {
				for (String spell : useSpecific.split("[,\\.]")) {
					specificData.put(spell, fd);
				}
			}
		}
		println("package AbilityObjEditing");
		println("import public ObjEditingNatives");
		println("");
		println("public class AbilityDefinition");
		println("	protected ObjectDefinition def");
		println("	");
		println("	construct(int newAbilityId, int origAbilityId)");
		println("		def = createObjectDefinition(\"w3a\", newAbilityId, origAbilityId)");
		Set<String> usedNames = Sets.newHashSet();
		for (FieldData fd : commonData) {
			fd.printFunc(usedNames);
		}
		for (String spell : specificData.keySet()) {
			usedNames.clear();
			println("");
			println("");
			println("");
			String spellName = abilityNames.get(spell);
			println("public class AbilityDefinition"+spellName+" extends AbilityDefinition");
			println("	construct(int newAbilityId)");
			println("		super(newAbilityId, '"+spell+"')");
			for (FieldData fd : specificData.get(spell)) {
				fd.printFunc(usedNames);
			}
		}
		System.out.println(sb.toString());
		Files.write(sb, new File("./AbilityObjEditing.wurst"), Charsets.UTF_8);
	}

Output:
	public static void main(String[] args) throws IOException {
		List<FieldData> commonData = Lists.newArrayList();
		Multimap<String, FieldData> specificData = HashMultimap.create();
		File metaData = new File("./AbilityMetaData.csv");
		CsvReader reader = new CsvReader(new FileReader(metaData));
		reader.readHeaders();
		while (reader.readRecord()) {
			String id = reader.get("ID");
			String displayName = strings.get(reader.get("displayName"));
			if (displayName == null) {
				displayName = reader.get("field");
			}
			String type = reader.get("type");
			int data = Integer.parseInt(reader.get("data"));
			boolean useLevels = !reader.get("repeat").equals("0");
			String useSpecific = reader.get("useSpecific");
			FieldData fd = new FieldData(id, displayName, type, data, useLevels);
			if (useSpecific.isEmpty()) {
				commonData.add(fd);
			} else {
				for (String spell : useSpecific.split("[,\\.]")) {
					specificData.put(spell, fd);
				}
			}
		}
		println("package AbilityObjEditing");
		println("import public ObjEditingNatives");
		println("");
		println("public class AbilityDefinition");
		println("	protected ObjectDefinition def");
		println("	");
		println("	construct(int newAbilityId, int origAbilityId)");
		println("		def = createObjectDefinition(\"w3a\", newAbilityId, origAbilityId)");
		Set<String> usedNames = Sets.newHashSet();
		for (FieldData fd : commonData) {
			fd.printFunc(usedNames);
		}
		for (String spell : specificData.keySet()) {
			usedNames.clear();
			println("");
			println("");
			println("");
			String spellName = abilityNames.get(spell);
			println("public class AbilityDefinition"+spellName+" extends AbilityDefinition");
			println("	construct(int newAbilityId)");
			println("		super(newAbilityId, '"+spell+"')");
			for (FieldData fd : specificData.get(spell)) {
				fd.printFunc(usedNames);
			}
		}
		System.out.println(sb.toString());
		Files.write(sb, new File("./AbilityObjEditing.wurst"), Charsets.UTF_8);
	}


Input:
  public void gpuMethod() {
    for (int i = 0; i < iterations; i++) {
      double x = 1;
      double y = 1;
      Result result = new Result();
      if ((Math.sqrt(x * x + y * y) < 1.0)) {
        result.hit = 1;
      } else {
        result.hit = 0;
      }
      resultList.add(result);
    }
  }

Output:
  public void gpuMethod() {
    for (int i = 0; i < iterations; i++) {
      double x = 2.0 * Math.random() - 1.0;
      double y = 2.0 * Math.random() - 1.0;
      Result result = new Result();
      if ((Math.sqrt(x * x + y * y) < 1.0)) {
        result.hit = 1;
      } else {
        result.hit = 0;
      }
      resultList.add(result);
    }
  }


Input:
	public int onStartCommand(Intent intent, int flags, int startId) {
        if (Log.isLoggable(TAG, Log.DEBUG)) Log.d(TAG, "Received start id " + startId + ": " + intent);
        if (intent == null) return START_NOT_STICKY;
        String action = intent.getAction();
        if (action == null) return START_NOT_STICKY;
        if (Log.isLoggable(TAG, Log.DEBUG)) Log.d(TAG, "Action: " + action);
        final int stopId = startId;
        if (action.equals(ACTION_STARTUP))
        {
			Notification n = buildNotification(R.drawable.ic_notification, getResources().getString(R.string.service_running));
    		startForeground(1, n);
    		_executor.execute(new Runnable() {
    	        public void run() {
    	    		if (DaemonManager.getInstance().start(DaemonService.this) )
    	    		{
        	    		invoke_state_changed_intent();
        	    		updateNeighborNotification();
    	    		}
    	    		else
    	    		{
        	    		invoke_state_changed_intent();
        	    		updateNeighborNotification();
        	    		stopSelfResult(stopId);
    	    		}
    	        }
    		});
            return START_STICKY;
        }
        else if (action.equals(ACTION_SHUTDOWN))
        {
        	_executor.execute(new Runnable() {
    	        public void run() {
    	    		DaemonManager.getInstance().stop();
    	    		invoke_state_changed_intent();
    	        	stopForeground(true);
    	    		NotificationManager nm = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
    	    		nm.cancel(1);
    	    		stopSelfResult(stopId);
    	        }
    		});
            return START_STICKY;
        }
		else if (intent.getAction().equals(de.tubs.ibr.dtn.Intent.REGISTER))
		{
			final Registration reg = (Registration)intent.getParcelableExtra("registration");
			final PendingIntent pi = (PendingIntent)intent.getParcelableExtra("app");
        	_executor.execute(new Runnable() {
    	        public void run() {
    	        	DaemonManager.getInstance().getSessionManager().register(DaemonService.this, pi.getTargetPackage(), reg);
    	        	if (!DaemonManager.getInstance().isRunning()) {
	    	    		stopSelfResult(stopId);
    	        	}
    	        }
    		});
            return START_STICKY;
		}
		else if (intent.getAction().equals(de.tubs.ibr.dtn.Intent.UNREGISTER))
		{
			final PendingIntent pi = (PendingIntent)intent.getParcelableExtra("app");
        	_executor.execute(new Runnable() {
    	        public void run() {
    	        	DaemonManager.getInstance().getSessionManager().unregister(DaemonService.this, pi.getTargetPackage());
    	        	if (!DaemonManager.getInstance().isRunning()) {
	    	    		stopSelfResult(stopId);
    	        	}
    	        }
    		});
            return START_STICKY;
		}
		return START_NOT_STICKY;
	}

Output:
	public int onStartCommand(Intent intent, int flags, int startId) {
        if (Log.isLoggable(TAG, Log.DEBUG)) Log.d(TAG, "Received start id " + startId + ": " + intent);
        if (intent == null) return START_NOT_STICKY;
        String action = intent.getAction();
        if (action == null) return START_NOT_STICKY;
        if (Log.isLoggable(TAG, Log.DEBUG)) Log.d(TAG, "Action: " + action);
        final int stopId = startId;
        if (action.equals(ACTION_STARTUP))
        {
			Notification n = buildNotification(R.drawable.ic_notification, getResources().getString(R.string.notify_no_neighbors));
    		startForeground(1, n);
    		_executor.execute(new Runnable() {
    	        public void run() {
    	    		if (DaemonManager.getInstance().start(DaemonService.this) )
    	    		{
        	    		invoke_state_changed_intent();
        	    		updateNeighborNotification();
    	    		}
    	    		else
    	    		{
        	    		invoke_state_changed_intent();
        	    		updateNeighborNotification();
        	    		stopSelfResult(stopId);
    	    		}
    	        }
    		});
            return START_STICKY;
        }
        else if (action.equals(ACTION_SHUTDOWN))
        {
        	_executor.execute(new Runnable() {
    	        public void run() {
    	    		DaemonManager.getInstance().stop();
    	    		invoke_state_changed_intent();
    	        	stopForeground(true);
    	    		NotificationManager nm = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
    	    		nm.cancel(1);
    	    		stopSelfResult(stopId);
    	        }
    		});
            return START_STICKY;
        }
		else if (intent.getAction().equals(de.tubs.ibr.dtn.Intent.REGISTER))
		{
			final Registration reg = (Registration)intent.getParcelableExtra("registration");
			final PendingIntent pi = (PendingIntent)intent.getParcelableExtra("app");
        	_executor.execute(new Runnable() {
    	        public void run() {
    	        	DaemonManager.getInstance().getSessionManager().register(DaemonService.this, pi.getTargetPackage(), reg);
    	        	if (!DaemonManager.getInstance().isRunning()) {
	    	    		stopSelfResult(stopId);
    	        	}
    	        }
    		});
            return START_STICKY;
		}
		else if (intent.getAction().equals(de.tubs.ibr.dtn.Intent.UNREGISTER))
		{
			final PendingIntent pi = (PendingIntent)intent.getParcelableExtra("app");
        	_executor.execute(new Runnable() {
    	        public void run() {
    	        	DaemonManager.getInstance().getSessionManager().unregister(DaemonService.this, pi.getTargetPackage());
    	        	if (!DaemonManager.getInstance().isRunning()) {
	    	    		stopSelfResult(stopId);
    	        	}
    	        }
    		});
            return START_STICKY;
		}
		return START_NOT_STICKY;
	}


Input:
	private void doProperty(Tag tag) {
		String name = null;
		try {
			name = tag.getAttribute(ATTR_NAME);
			if (name == null) {
				IllegalArgumentException e = new IllegalArgumentException("The 'property' tag must have 'name' attribute set at line " + tag.getLine());
				Activator.log.error("[SCR] " + e.getMessage(), e);
				throw e;
			}
			String type = tag.getAttribute(ATTR_TYPE);
			int mtType;
			if (type == null || "String".equals(type)) {
				mtType = AttributeDefinition.STRING;
			} else if ("Boolean".equals(type)) {
				mtType = AttributeDefinition.BOOLEAN;
			} else if ("Integer".equals(type)) {
				mtType = AttributeDefinition.INTEGER;
			} else if ("Long".equals(type)) {
				mtType = AttributeDefinition.LONG;
			} else if ("Char".equals(type)) {
				mtType = AttributeDefinition.CHARACTER;
			} else if ("Double".equals(type)) {
				mtType = AttributeDefinition.DOUBLE;
			} else if ("Float".equals(type)) {
				mtType = AttributeDefinition.FLOAT;
			} else if ("Byte".equals(type)) {
				mtType = AttributeDefinition.BYTE;
			} else if ("Short".equals(type)) {
				mtType = AttributeDefinition.SHORT;
			} else {
				IllegalArgumentException e = new IllegalArgumentException("Illegal property type '" + type + "' on line " + tag.getLine());
				Activator.log.error("[SCR] " + e.getMessage(), e);
				throw e;
			}
			String value = tag.getAttribute(ATTR_VALUE);
			Object _value;
			if (value != null) {
				_value = makeObject(value, mtType);
			} else {
				value = tag.getContent();
				if (value == null) {
					IllegalArgumentException e = new IllegalArgumentException("The 'property' tag must have body content if 'value' attribute is not specified!");
					Activator.log.error("[SCR] " + e.getMessage(), e);
					throw e;
				}
				StringTokenizer tok = new StringTokenizer(value, "\n\r");
				Vector el = new Vector(10);
				while (tok.hasMoreTokens()) {
					String next = tok.nextToken().trim();
					if (next.length() > 0) {
						el.addElement(next);
					}
				}
				if (el.size() == 0) {
					IllegalArgumentException e = new IllegalArgumentException("The 'property' tag must have body content if 'value' attribute is not specified!");
					Activator.log.error("[SCR] " + e.getMessage(), e);
					throw e;
				}
				String[] values = new String[el.size()];
				el.copyInto(values);
				_value = makeArr(values, mtType);
			}
			if (currentComponent.properties == null) {
				currentComponent.properties = new Properties();
			}
			currentComponent.properties.put(name, _value);
		} catch (Throwable e) {
			Activator.log.error("[SCR - DeclarationParser.doProperty()] Error while processing property " + name, e);
		}
	}

Output:
	private void doProperty(Tag tag) {
		String name = null;
		try {
			name = tag.getAttribute(ATTR_NAME);
			if (name == null) {
				IllegalArgumentException e = new IllegalArgumentException("The 'property' tag must have 'name' attribute set at line " + tag.getLine());
				Activator.log.error("[SCR] " + e.getMessage(), e);
				throw e;
			}
			String type = tag.getAttribute(ATTR_TYPE);
			int mtType;
			if (type == null || "String".equals(type)) {
				mtType = AttributeDefinition.STRING;
			} else if ("Boolean".equals(type)) {
				mtType = AttributeDefinition.BOOLEAN;
			} else if ("Integer".equals(type)) {
				mtType = AttributeDefinition.INTEGER;
			} else if ("Long".equals(type)) {
				mtType = AttributeDefinition.LONG;
			} else if ("Char".equals(type) || "Character".equals(type)) {
				mtType = AttributeDefinition.CHARACTER;
			} else if ("Double".equals(type)) {
				mtType = AttributeDefinition.DOUBLE;
			} else if ("Float".equals(type)) {
				mtType = AttributeDefinition.FLOAT;
			} else if ("Byte".equals(type)) {
				mtType = AttributeDefinition.BYTE;
			} else if ("Short".equals(type)) {
				mtType = AttributeDefinition.SHORT;
			} else {
				IllegalArgumentException e = new IllegalArgumentException("Illegal property type '" + type + "' on line " + tag.getLine());
				Activator.log.error("[SCR] " + e.getMessage(), e);
				throw e;
			}
			String value = tag.getAttribute(ATTR_VALUE);
			Object _value;
			if (value != null) {
				_value = makeObject(value, mtType);
			} else {
				value = tag.getContent();
				if (value == null) {
					IllegalArgumentException e = new IllegalArgumentException("The 'property' tag must have body content if 'value' attribute is not specified!");
					Activator.log.error("[SCR] " + e.getMessage(), e);
					throw e;
				}
				StringTokenizer tok = new StringTokenizer(value, "\n\r");
				Vector el = new Vector(10);
				while (tok.hasMoreTokens()) {
					String next = tok.nextToken().trim();
					if (next.length() > 0) {
						el.addElement(next);
					}
				}
				if (el.size() == 0) {
					IllegalArgumentException e = new IllegalArgumentException("The 'property' tag must have body content if 'value' attribute is not specified!");
					Activator.log.error("[SCR] " + e.getMessage(), e);
					throw e;
				}
				String[] values = new String[el.size()];
				el.copyInto(values);
				_value = makeArr(values, mtType);
			}
			if (currentComponent.properties == null) {
				currentComponent.properties = new Properties();
			}
			currentComponent.properties.put(name, _value);
		} catch (Throwable e) {
			Activator.log.error("[SCR - DeclarationParser.doProperty()] Error while processing property " + name, e);
		}
	}


Input:
    public void afterPropertiesSet() throws Exception {
        if (recreateDb) {
            if("create_oracle.sql".equals(createSql)) {
                LOG.warning("Not recomended to use db.recreate=true parameter for Oracle database");
            }
            ScriptRunner sr = new ScriptRunner(dataSource.getConnection(), true, false);
            sr.setLogWriter(null);
            sr.setErrorLogWriter(null);
            sr.runScript(new InputStreamReader(this.getClass().getResourceAsStream("/" + createSql)));
        }
    }

Output:
    public void afterPropertiesSet() throws Exception {
        if (recreateDb) {
            if("create_oracle.sql".equals(createSql)) {
                LOG.warning("Not recomended to use db.recreate=true parameter for Oracle database");
            }
            ScriptRunner sr = new ScriptRunner(dataSource.getConnection(), false, false);
            sr.setLogWriter(null);
            sr.setErrorLogWriter(null);
            sr.runScript(new InputStreamReader(this.getClass().getResourceAsStream("/" + createSql)));
        }
    }


Input:
	public static Result UpdateSubscriptionStatus(){
		JsonNode json = request().body().asJson();
		String entityType = json.get("entityType").asText();
		String entityId = json.get("entityId").asText();
		String username = json.get("username").asText();
		ObjectNode result = Json.newObject();
		result.put("newState", "true");

Output:
	public static Result UpdateSubscriptionStatus(){
		JsonNode json = request().body().asJson();
		String entityType = json.get("entityType").asText();
		String entityId = json.get("entityId").asText();
		String username = json.get("username").asText();
		User user = User.findByName(username);
		ObjectNode result = Json.newObject();
		result.put("newState", "true");


Input:
	public boolean startElementHandler(String tag, ZLStringMap xmlattributes) {
		tag = tag.toLowerCase();
		if (myOPFSchemePrefix != null && tag.startsWith(myOPFSchemePrefix)) {
			tag = tag.substring(myOPFSchemePrefix.length());
		}
		tag = tag.intern();
		if (MANIFEST == tag) {
			myState = READ_MANIFEST;
		} else if (SPINE == tag) {
			myNCXTOCFileName = myIdToHref.get(xmlattributes.getValue("toc"));
			myState = READ_SPINE;
		} else if (GUIDE == tag) {
			myState = READ_GUIDE;
		} else if (TOUR == tag) {
			myState = READ_TOUR;
		} else if (myState == READ_MANIFEST && ITEM == tag) {
			final String id = xmlattributes.getValue("id");
			String href = xmlattributes.getValue("href");
			if ((id != null) && (href != null)) {
				href = MiscUtil.decodeHtmlReference(href);
				myIdToHref.put(id, href);
			}
		} else if (myState == READ_SPINE && ITEMREF == tag) {
			final String id = xmlattributes.getValue("idref");
			if (id != null) {
				final String fileName = myIdToHref.get(id);
				if (fileName != null) {
					myHtmlFileNames.add(fileName);
				}
			}
		} else if (myState == READ_GUIDE && REFERENCE == tag) {
			final String type = xmlattributes.getValue("type");
			final String title = xmlattributes.getValue("title");
			String href = xmlattributes.getValue("href");
			if (href != null) {
				href = MiscUtil.decodeHtmlReference(href);
				if (title != null) {
					myGuideTOC.add(new Reference(title, href));
				}
				if (COVER.equals(type)) {
					final ZLFile imageFile = ZLFile.createFileByPath(myFilePrefix + href);
					myCoverFileName = imageFile.getPath();
					final String imageName = imageFile.getLongName();
					final ZLFileImage image = XHTMLImageFinder.getCoverImage(imageFile);
					if (image != null) {
						myModelReader.setMainTextModel();
						myModelReader.addImageReference(imageName, (short)0, true);
						myModelReader.addImage(imageName, image);
						myModelReader.insertEndOfSectionParagraph();
					}
				} else if (COVER_IMAGE.equals(type)) {
					final ZLFile imageFile = ZLFile.createFileByPath(myFilePrefix + href);
					myCoverFileName = imageFile.getPath();
					final String imageName = imageFile.getLongName();
					myModelReader.setMainTextModel();
					myModelReader.addImageReference(imageName, (short)0, true);
					myModelReader.addImage(imageName, new ZLFileImage(MimeType.IMAGE_AUTO, imageFile));
					myModelReader.insertEndOfSectionParagraph();
				}
			}
		} else if (myState == READ_TOUR && SITE == tag) {
			final String title = xmlattributes.getValue("title");
			String href = xmlattributes.getValue("href");
			if ((title != null) && (href != null)) {
				href = MiscUtil.decodeHtmlReference(href);
				myTourTOC.add(new Reference(title, href));
			}
		}
		return false;
	}

Output:
	public boolean startElementHandler(String tag, ZLStringMap xmlattributes) {
		tag = tag.toLowerCase();
		if (myOPFSchemePrefix != null && tag.startsWith(myOPFSchemePrefix)) {
			tag = tag.substring(myOPFSchemePrefix.length());
		}
		tag = tag.intern();
		if (MANIFEST == tag) {
			myState = READ_MANIFEST;
		} else if (SPINE == tag) {
			myNCXTOCFileName = myIdToHref.get(xmlattributes.getValue("toc"));
			myState = READ_SPINE;
		} else if (GUIDE == tag) {
			myState = READ_GUIDE;
		} else if (TOUR == tag) {
			myState = READ_TOUR;
		} else if (myState == READ_MANIFEST && ITEM == tag) {
			final String id = xmlattributes.getValue("id");
			String href = xmlattributes.getValue("href");
			if ((id != null) && (href != null)) {
				href = MiscUtil.decodeHtmlReference(href);
				myIdToHref.put(id, href);
			}
		} else if (myState == READ_SPINE && ITEMREF == tag) {
			final String id = xmlattributes.getValue("idref");
			if (id != null) {
				final String fileName = myIdToHref.get(id);
				if (fileName != null) {
					myHtmlFileNames.add(fileName);
				}
			}
		} else if (myState == READ_GUIDE && REFERENCE == tag) {
			final String type = xmlattributes.getValue("type");
			final String title = xmlattributes.getValue("title");
			String href = xmlattributes.getValue("href");
			if (href != null) {
				href = MiscUtil.decodeHtmlReference(href);
				if (title != null) {
					myGuideTOC.add(new Reference(title, href));
				}
				if (COVER.equals(type)) {
					final ZLFile imageFile = ZLFile.createFileByPath(myFilePrefix + href);
					myCoverFileName = imageFile.getPath();
					final String imageName = imageFile.getLongName();
					final ZLFileImage image = XHTMLImageFinder.getCoverImage(imageFile);
					if (image != null) {
						myModelReader.setMainTextModel();
						myModelReader.addImageReference(imageName, (short)0, true);
						myModelReader.addImage(imageName, image);
						myModelReader.insertEndOfSectionParagraph();
					} else {
						myCoverFileName = null;
					}
				} else if (COVER_IMAGE.equals(type)) {
					final ZLFile imageFile = ZLFile.createFileByPath(myFilePrefix + href);
					myCoverFileName = imageFile.getPath();
					final String imageName = imageFile.getLongName();
					myModelReader.setMainTextModel();
					myModelReader.addImageReference(imageName, (short)0, true);
					myModelReader.addImage(imageName, new ZLFileImage(MimeType.IMAGE_AUTO, imageFile));
					myModelReader.insertEndOfSectionParagraph();
				}
			}
		} else if (myState == READ_TOUR && SITE == tag) {
			final String title = xmlattributes.getValue("title");
			String href = xmlattributes.getValue("href");
			if ((title != null) && (href != null)) {
				href = MiscUtil.decodeHtmlReference(href);
				myTourTOC.add(new Reference(title, href));
			}
		}
		return false;
	}


Input:
	public JComponent build() {
		FormLayout layout = new FormLayout(
                "left:pref, 50dlu, pref, 150dlu, pref, 25dlu, pref,  0:grow",
                "p, 3dlu,  p, 3dlu, p, 3dlu,  p, 3dlu, p, 15dlu, p, 3dlu, p, 3dlu,  p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 15dlu, fill:default:grow");
         PanelBuilder builder = new PanelBuilder(layout);
        builder.setBorder(Borders.DLU4_BORDER);
        builder.setOpaque(true);
        CellConstraints cc = new CellConstraints();
       df = new DefaultListModel();
       if (PMS.getConfiguration().getFolders() != null && PMS.getConfiguration().getFolders().length() > 0) {
    	 try {
			File f [] =  PMS.get().loadFoldersConf(PMS.getConfiguration().getFolders());
			for(File file:f) {
				df.addElement(file.getAbsolutePath());
			}
			if (f == null || f.length == 0) {
				df.addElement(ALL_DRIVES);
			}
		} catch (IOException e1) {
			PMS.error(null, e1);
		}
       } else
		df.addElement(ALL_DRIVES);
		FList = new JList();
		FList.setModel(df);
        JScrollPane pane = new JScrollPane(FList);
        JComponent cmp = builder.addSeparator(Messages.getString("FoldTab.13"),  cc.xyw(1, 1, 8));
        cmp = (JComponent) cmp.getComponent(0);
        cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));
        tncheckBox = new JCheckBox(Messages.getString("NetworkTab.2"));
        tncheckBox.setContentAreaFilled(false);
        tncheckBox.addItemListener(new ItemListener() {
  			public void itemStateChanged(ItemEvent e) {
  				PMS.getConfiguration().setThumbnailsEnabled((e.getStateChange() == ItemEvent.SELECTED));
  			}
        });
        if (PMS.getConfiguration().getThumbnailsEnabled())
        	tncheckBox.setSelected(true);
        builder.add(tncheckBox,          cc.xyw(1,  3, 3));
        seekpos = new JTextField("" + configuration.getThumbnailSeekPos());
        seekpos.addKeyListener(new KeyListener() {
    		@Override
    		public void keyPressed(KeyEvent e) {}
    		@Override
    		public void keyTyped(KeyEvent e) {}
    		@Override
    		public void keyReleased(KeyEvent e) {
    			try {
    				int ab = Integer.parseInt(seekpos.getText());
    				configuration.setThumbnailSeekPos(ab);
    			} catch (NumberFormatException nfe) {
    			}
    		}
           });
        builder.addLabel(Messages.getString("NetworkTab.16"),  cc.xyw(4,  3, 3));
        builder.add(seekpos,          cc.xyw(6,  3, 2));
        mplayer_thumb = new JCheckBox(Messages.getString("FoldTab.14"));
        mplayer_thumb.setContentAreaFilled(false);
        mplayer_thumb.addItemListener(new ItemListener() {
  			public void itemStateChanged(ItemEvent e) {
  				PMS.getConfiguration().setUseMplayerForVideoThumbs((e.getStateChange() == ItemEvent.SELECTED));
  			}
        });
        if (PMS.getConfiguration().isUseMplayerForVideoThumbs())
        	mplayer_thumb.setSelected(true);
        builder.add(mplayer_thumb,          cc.xyw(1,  5, 5));
        final KeyedComboBoxModel thumbKCBM = new KeyedComboBoxModel(new Object[] { "0", "1", "2" }, new Object[] { Messages.getString("FoldTab.15"), Messages.getString("FoldTab.23"), Messages.getString("FoldTab.24") });
        audiothumbnail = new JComboBox(thumbKCBM);
        audiothumbnail.setEditable(false);
        thumbKCBM.setSelectedKey("" + configuration.getAudioThumbnailMethod());
      audiothumbnail.addItemListener(new ItemListener() {
 			public void itemStateChanged(ItemEvent e) {
 				if (e.getStateChange() == ItemEvent.SELECTED) {
 					try {
 						configuration.setAudioThumbnailMethod(Integer.parseInt((String) thumbKCBM.getSelectedKey()));
 						PMS.get().getFrame().setReloadable(true);
 					} catch (NumberFormatException nfe) {}
 				}
 			}
      });
      builder.addLabel(Messages.getString("FoldTab.26"), cc.xyw(1,7,3));
        builder.add(audiothumbnail, cc.xyw(4, 7,4));
        builder.addLabel(Messages.getString("FoldTab.27"), cc.xyw(1, 9, 3));
        defaultThumbFolder = new JTextField(configuration.getAlternateThumbFolder());
        defaultThumbFolder.addKeyListener(new KeyListener() {
    		@Override
    		public void keyPressed(KeyEvent e) {}
    		@Override
    		public void keyTyped(KeyEvent e) {}
    		@Override
    		public void keyReleased(KeyEvent e) {
    			configuration.setAlternateThumbFolder(defaultThumbFolder.getText());
    		}
           });
        builder.add(defaultThumbFolder, cc.xyw(4, 9, 3));
        JButton select = new JButton("...");
        select.addActionListener(new ActionListener() {
 			@Override
 			public void actionPerformed(ActionEvent e) {
 				JFileChooser chooser = null;
				try {
					 chooser = new JFileChooser();
				} catch (Exception ee) {
					 chooser = new JFileChooser(new RestrictedFileSystemView());
				}
				chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
				int returnVal = chooser.showDialog((Component) e.getSource(), Messages.getString("FoldTab.28"));
 			    if(returnVal == JFileChooser.APPROVE_OPTION) {
 			    	defaultThumbFolder.setText(chooser.getSelectedFile().getAbsolutePath());
 			    	PMS.get().getFrame().setReloadable(true);
 			    	configuration.setAlternateThumbFolder(chooser.getSelectedFile().getAbsolutePath());
 			    }
 			}
  	  });
  	  builder.add(select,          cc.xyw(7,  9, 1));
        cmp = builder.addSeparator(Messages.getString("NetworkTab.15"),  cc.xyw(1, 11, 8));
        cmp = (JComponent) cmp.getComponent(0);
        cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));
        hidevideosettings = new JCheckBox(Messages.getString("FoldTab.6"));
        hidevideosettings.setContentAreaFilled(false);
        if (PMS.getConfiguration().getHideVideoSettings())
        	hidevideosettings.setSelected(true);
        hidevideosettings.addItemListener(new ItemListener() {
 			public void itemStateChanged(ItemEvent e) {
 				PMS.getConfiguration().setHideVideoSettings((e.getStateChange() == ItemEvent.SELECTED));
 				PMS.get().getFrame().setReloadable(true);
 			}
        });
        archive = new JCheckBox(Messages.getString("NetworkTab.1"));
        archive.setContentAreaFilled(false);
        archive.addItemListener(new ItemListener() {
 			public void itemStateChanged(ItemEvent e) {
 				PMS.getConfiguration().setArchiveBrowsing(e.getStateChange() == ItemEvent.SELECTED);
 				if (PMS.get().getFrame() != null)
 					PMS.get().getFrame().setReloadable(true);
 			}
        });
        if (PMS.getConfiguration().isArchiveBrowsing())
     	   archive.setSelected(true);
        builder.add(archive,          cc.xyw(1,  13, 3));
        final JButton cachereset = new JButton(Messages.getString("NetworkTab.18"));
        cacheenable = new JCheckBox(Messages.getString("NetworkTab.17"));
        cacheenable.setContentAreaFilled(false);
        cacheenable.setSelected(PMS.getConfiguration().getUseCache());
        cacheenable.addItemListener(new ItemListener() {
 			public void itemStateChanged(ItemEvent e) {
 				PMS.getConfiguration().setUseCache((e.getStateChange() == ItemEvent.SELECTED));
 				cachereset.setEnabled(PMS.getConfiguration().getUseCache());
 				PMS.get().getFrame().setReloadable(true);
 				if ((LooksFrame) PMS.get().getFrame() != null)
 					((LooksFrame) PMS.get().getFrame()).getFt().setScanLibraryEnabled(PMS.getConfiguration().getUseCache());
 			}
       });
     	  builder.add(cacheenable,          cc.xy(1,  19));
     	  cachereset.addActionListener(new ActionListener() {
 			@Override
 			public void actionPerformed(ActionEvent e) {
 				int option = JOptionPane.showConfirmDialog(
    	                    (Component) PMS.get().getFrame(),
    	                    Messages.getString("NetworkTab.13") +
    	                    Messages.getString("NetworkTab.19"),
    	                    "Question",
    	                    JOptionPane.YES_NO_OPTION
    	                    );
    				if (option == JOptionPane.YES_OPTION) {
    					PMS.get().getDatabase().init(true);
    				}
 			}
     	  });
     	  builder.add(cachereset,          cc.xyw(4,  19, 4));
     	  cachereset.setEnabled(PMS.getConfiguration().getUseCache());
        builder.add(hidevideosettings,          cc.xyw(4,  13, 3));
        hideextensions = new JCheckBox(Messages.getString("FoldTab.5"));
        hideextensions.setContentAreaFilled(false);
        if (PMS.getConfiguration().isHideExtensions())
        	hideextensions.setSelected(true);
        hideextensions.addItemListener(new ItemListener() {
 			public void itemStateChanged(ItemEvent e) {
 				PMS.getConfiguration().setHideExtensions((e.getStateChange() == ItemEvent.SELECTED));
 				PMS.get().getFrame().setReloadable(true);
 			}
        });
        builder.add(hideextensions,          cc.xyw(1,  15, 3));
        hideengines = new JCheckBox(Messages.getString("FoldTab.8"));
        hideengines.setContentAreaFilled(false);
        if (PMS.getConfiguration().isHideEngineNames())
        	hideengines.setSelected(true);
        hideengines.addItemListener(new ItemListener() {
 			public void itemStateChanged(ItemEvent e) {
 				PMS.getConfiguration().setHideEngineNames((e.getStateChange() == ItemEvent.SELECTED));
 				PMS.get().getFrame().setReloadable(true);
 			}
        });
        builder.add(hideengines,          cc.xyw(4,  15, 3));
 	itunes = new JCheckBox(Messages.getString("FoldTab.30"));
        itunes.setContentAreaFilled(false);
        if (PMS.getConfiguration().getItunesEnabled())
        	itunes.setSelected(true);
        if (!Platform.isMac())
	        iphoto.setEnabled(false);
        itunes.addItemListener(new ItemListener() {
  		public void itemStateChanged(ItemEvent e) {
  			PMS.getConfiguration().setItunesEnabled((e.getStateChange() == ItemEvent.SELECTED));
  			PMS.get().getFrame().setReloadable(true);
  		}
        });
        builder.add(itunes,          cc.xyw(1,  17, 3));
 	iphoto = new JCheckBox(Messages.getString("FoldTab.29"));
        iphoto.setContentAreaFilled(false);
        if (PMS.getConfiguration().getIphotoEnabled())
        	iphoto.setSelected(true);
        if (!Platform.isMac())
	        iphoto.setEnabled(false);
	iphoto.addItemListener(new ItemListener() {
  		public void itemStateChanged(ItemEvent e) {
  			PMS.getConfiguration().setIphotoEnabled((e.getStateChange() == ItemEvent.SELECTED));
  			PMS.get().getFrame().setReloadable(true);
  		}
        });
        builder.add(iphoto,          cc.xyw(4,  17, 3));
        final KeyedComboBoxModel kcbm = new KeyedComboBoxModel(new Object[] { "0", "1" }, new Object[] { Messages.getString("FoldTab.15"), Messages.getString("FoldTab.16") });
        sortmethod = new JComboBox(kcbm);
        sortmethod.setEditable(false);
      kcbm.setSelectedKey("" + configuration.getSortMethod());
      sortmethod.addItemListener(new ItemListener() {
 			public void itemStateChanged(ItemEvent e) {
 				if (e.getStateChange() == ItemEvent.SELECTED) {
 					try {
 						configuration.setSortMethod(Integer.parseInt((String) kcbm.getSelectedKey()));
 						PMS.get().getFrame().setReloadable(true);
 					} catch (NumberFormatException nfe) {}
 				}
 			}
      });
      builder.addLabel(Messages.getString("FoldTab.18"), cc.xyw(1,21,3));
        builder.add(sortmethod, cc.xyw(4, 21,4));
        FormLayout layoutFolders = new FormLayout(
                "left:pref, left:pref, pref, pref, pref, 0:grow",
                "p, 3dlu, p, 3dlu, fill:default:grow");
         PanelBuilder builderFolder = new PanelBuilder(layoutFolders);
          builderFolder.setOpaque(true);
       cmp =  builderFolder.addSeparator(Messages.getString("FoldTab.7"),  cc.xyw(1, 1,6));
        cmp = (JComponent) cmp.getComponent(0);
        cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));
       JButton but = new JButton(LooksFrame.readImageIcon("folder_new-32.png"));
       but.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent e) {
				JFileChooser chooser = null;
				try {
					 chooser = new JFileChooser();
				} catch (Exception ee) {
					 chooser = new JFileChooser(new RestrictedFileSystemView());
				}
				chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
				int returnVal = chooser.showOpenDialog((Component) e.getSource());
			    if(returnVal == JFileChooser.APPROVE_OPTION) {
			    	((DefaultListModel) FList.getModel()).add(FList.getModel().getSize(),chooser.getSelectedFile().getAbsolutePath());
			    	if (FList.getModel().getElementAt(0).equals(ALL_DRIVES))
			    		((DefaultListModel) FList.getModel()).remove(0);
			    	updateModel();
			    }
			}
		});
       builderFolder.add(but,          cc.xy(1,  3));
       JButton but2 = new JButton(LooksFrame.readImageIcon("button_cancel-32.png"));
       but2.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent e) {
				if (FList.getSelectedIndex() > -1) {
					((DefaultListModel) FList.getModel()).remove(FList.getSelectedIndex());
					if (FList.getModel().getSize() == 0)
			    		((DefaultListModel) FList.getModel()).add(0, ALL_DRIVES);
					updateModel();
				}
			}
		});
       builderFolder.add(but2,          cc.xy(2,  3));
       JButton but3 = new JButton(LooksFrame.readImageIcon("kdevelop_down-32.png"));
       but3.setToolTipText(Messages.getString("FoldTab.12"));
       but3.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
			DefaultListModel model = ((DefaultListModel) FList.getModel());
			for(int i=0;i<model.size()-1;i++) {
				if (FList.isSelectedIndex(i)) {
					String value = model.get(i).toString();
					model.set(i, model.get(i+1));
					model.set(i+1, value);
					FList.setSelectedIndex(i+1);
					updateModel();
					break;
				}
			}
		}
       });
       builderFolder.add(but3,          cc.xy(3,  3));
       JButton but4 = new JButton(LooksFrame.readImageIcon("up-32.png"));
       but4.setToolTipText(Messages.getString("FoldTab.12"));
       but4.addActionListener(new ActionListener() {
   		public void actionPerformed(ActionEvent e) {
   			DefaultListModel model = ((DefaultListModel) FList.getModel());
   			for(int i=1;i<model.size();i++) {
   				if (FList.isSelectedIndex(i)) {
   					String value = model.get(i).toString();
   					model.set(i, model.get(i-1));
   					model.set(i-1, value);
   					FList.setSelectedIndex(i-1);
   					updateModel();
   					break;
   				}
   			}
   		}
          });
       builderFolder.add(but4,          cc.xy(4,  3));
      but5 = new JButton(LooksFrame.readImageIcon("search-32.png"));
       but5.setToolTipText(Messages.getString("FoldTab.2"));
       but5.addActionListener(new ActionListener() {
   		public void actionPerformed(ActionEvent e) {
   			if (PMS.getConfiguration().getUseCache()) {
   				if (!PMS.get().getDatabase().isScanLibraryRunning()) {
	   				int option = JOptionPane.showConfirmDialog(
	   	                    (Component) PMS.get().getFrame(),
	   	                    Messages.getString("FoldTab.3") +
	   	                    Messages.getString("FoldTab.4"),
	   	                    "Question",
	   	                    JOptionPane.YES_NO_OPTION
	   	                    );
	   				if (option == JOptionPane.YES_OPTION) {
	   					PMS.get().getDatabase().scanLibrary();
	   					but5.setIcon(LooksFrame.readImageIcon("viewmagfit-32.png"));
	   				}
   				} else {
   					int option = JOptionPane.showConfirmDialog(
	   	                    (Component) PMS.get().getFrame(),
	   	                    Messages.getString("FoldTab.10"),
	   	                    "Question",
	   	                    JOptionPane.YES_NO_OPTION
	   	                    );
	   				if (option == JOptionPane.YES_OPTION) {
	   					PMS.get().getDatabase().stopScanLibrary();
	   					PMS.get().getFrame().setStatusLine(null);
	   					but5.setIcon(LooksFrame.readImageIcon("search-32.png"));
	   				}
   				}
   			}
   		}
          });
       builderFolder.add(but5,          cc.xy(5,  3));
       but5.setEnabled(PMS.getConfiguration().getUseCache());
       builderFolder.add(pane,          cc.xyw(1,  5,6));
       builder.add(builderFolder.getPanel(), cc.xyw(1, 25, 8));
        return builder.getPanel();
	}

Output:
	public JComponent build() {
		FormLayout layout = new FormLayout(
                "left:pref, 50dlu, pref, 150dlu, pref, 25dlu, pref,  0:grow",
                "p, 3dlu,  p, 3dlu, p, 3dlu,  p, 3dlu, p, 15dlu, p, 3dlu, p, 3dlu,  p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 15dlu, fill:default:grow");
         PanelBuilder builder = new PanelBuilder(layout);
        builder.setBorder(Borders.DLU4_BORDER);
        builder.setOpaque(true);
        CellConstraints cc = new CellConstraints();
       df = new DefaultListModel();
       if (PMS.getConfiguration().getFolders() != null && PMS.getConfiguration().getFolders().length() > 0) {
    	 try {
			File f [] =  PMS.get().loadFoldersConf(PMS.getConfiguration().getFolders());
			for(File file:f) {
				df.addElement(file.getAbsolutePath());
			}
			if (f == null || f.length == 0) {
				df.addElement(ALL_DRIVES);
			}
		} catch (IOException e1) {
			PMS.error(null, e1);
		}
       } else
		df.addElement(ALL_DRIVES);
		FList = new JList();
		FList.setModel(df);
        JScrollPane pane = new JScrollPane(FList);
        JComponent cmp = builder.addSeparator(Messages.getString("FoldTab.13"),  cc.xyw(1, 1, 8));
        cmp = (JComponent) cmp.getComponent(0);
        cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));
        tncheckBox = new JCheckBox(Messages.getString("NetworkTab.2"));
        tncheckBox.setContentAreaFilled(false);
        tncheckBox.addItemListener(new ItemListener() {
  			public void itemStateChanged(ItemEvent e) {
  				PMS.getConfiguration().setThumbnailsEnabled((e.getStateChange() == ItemEvent.SELECTED));
  			}
        });
        if (PMS.getConfiguration().getThumbnailsEnabled())
        	tncheckBox.setSelected(true);
        builder.add(tncheckBox,          cc.xyw(1,  3, 3));
        seekpos = new JTextField("" + configuration.getThumbnailSeekPos());
        seekpos.addKeyListener(new KeyListener() {
    		@Override
    		public void keyPressed(KeyEvent e) {}
    		@Override
    		public void keyTyped(KeyEvent e) {}
    		@Override
    		public void keyReleased(KeyEvent e) {
    			try {
    				int ab = Integer.parseInt(seekpos.getText());
    				configuration.setThumbnailSeekPos(ab);
    			} catch (NumberFormatException nfe) {
    			}
    		}
           });
        builder.addLabel(Messages.getString("NetworkTab.16"),  cc.xyw(4,  3, 3));
        builder.add(seekpos,          cc.xyw(6,  3, 2));
        mplayer_thumb = new JCheckBox(Messages.getString("FoldTab.14"));
        mplayer_thumb.setContentAreaFilled(false);
        mplayer_thumb.addItemListener(new ItemListener() {
  			public void itemStateChanged(ItemEvent e) {
  				PMS.getConfiguration().setUseMplayerForVideoThumbs((e.getStateChange() == ItemEvent.SELECTED));
  			}
        });
        if (PMS.getConfiguration().isUseMplayerForVideoThumbs())
        	mplayer_thumb.setSelected(true);
        builder.add(mplayer_thumb,          cc.xyw(1,  5, 5));
        final KeyedComboBoxModel thumbKCBM = new KeyedComboBoxModel(new Object[] { "0", "1", "2" }, new Object[] { Messages.getString("FoldTab.15"), Messages.getString("FoldTab.23"), Messages.getString("FoldTab.24") });
        audiothumbnail = new JComboBox(thumbKCBM);
        audiothumbnail.setEditable(false);
        thumbKCBM.setSelectedKey("" + configuration.getAudioThumbnailMethod());
      audiothumbnail.addItemListener(new ItemListener() {
 			public void itemStateChanged(ItemEvent e) {
 				if (e.getStateChange() == ItemEvent.SELECTED) {
 					try {
 						configuration.setAudioThumbnailMethod(Integer.parseInt((String) thumbKCBM.getSelectedKey()));
 						PMS.get().getFrame().setReloadable(true);
 					} catch (NumberFormatException nfe) {}
 				}
 			}
      });
      builder.addLabel(Messages.getString("FoldTab.26"), cc.xyw(1,7,3));
        builder.add(audiothumbnail, cc.xyw(4, 7,4));
        builder.addLabel(Messages.getString("FoldTab.27"), cc.xyw(1, 9, 3));
        defaultThumbFolder = new JTextField(configuration.getAlternateThumbFolder());
        defaultThumbFolder.addKeyListener(new KeyListener() {
    		@Override
    		public void keyPressed(KeyEvent e) {}
    		@Override
    		public void keyTyped(KeyEvent e) {}
    		@Override
    		public void keyReleased(KeyEvent e) {
    			configuration.setAlternateThumbFolder(defaultThumbFolder.getText());
    		}
           });
        builder.add(defaultThumbFolder, cc.xyw(4, 9, 3));
        JButton select = new JButton("...");
        select.addActionListener(new ActionListener() {
 			@Override
 			public void actionPerformed(ActionEvent e) {
 				JFileChooser chooser = null;
				try {
					 chooser = new JFileChooser();
				} catch (Exception ee) {
					 chooser = new JFileChooser(new RestrictedFileSystemView());
				}
				chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
				int returnVal = chooser.showDialog((Component) e.getSource(), Messages.getString("FoldTab.28"));
 			    if(returnVal == JFileChooser.APPROVE_OPTION) {
 			    	defaultThumbFolder.setText(chooser.getSelectedFile().getAbsolutePath());
 			    	PMS.get().getFrame().setReloadable(true);
 			    	configuration.setAlternateThumbFolder(chooser.getSelectedFile().getAbsolutePath());
 			    }
 			}
  	  });
  	  builder.add(select,          cc.xyw(7,  9, 1));
        cmp = builder.addSeparator(Messages.getString("NetworkTab.15"),  cc.xyw(1, 11, 8));
        cmp = (JComponent) cmp.getComponent(0);
        cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));
        hidevideosettings = new JCheckBox(Messages.getString("FoldTab.6"));
        hidevideosettings.setContentAreaFilled(false);
        if (PMS.getConfiguration().getHideVideoSettings())
        	hidevideosettings.setSelected(true);
        hidevideosettings.addItemListener(new ItemListener() {
 			public void itemStateChanged(ItemEvent e) {
 				PMS.getConfiguration().setHideVideoSettings((e.getStateChange() == ItemEvent.SELECTED));
 				PMS.get().getFrame().setReloadable(true);
 			}
        });
        archive = new JCheckBox(Messages.getString("NetworkTab.1"));
        archive.setContentAreaFilled(false);
        archive.addItemListener(new ItemListener() {
 			public void itemStateChanged(ItemEvent e) {
 				PMS.getConfiguration().setArchiveBrowsing(e.getStateChange() == ItemEvent.SELECTED);
 				if (PMS.get().getFrame() != null)
 					PMS.get().getFrame().setReloadable(true);
 			}
        });
        if (PMS.getConfiguration().isArchiveBrowsing())
     	   archive.setSelected(true);
        builder.add(archive,          cc.xyw(1,  13, 3));
        final JButton cachereset = new JButton(Messages.getString("NetworkTab.18"));
        cacheenable = new JCheckBox(Messages.getString("NetworkTab.17"));
        cacheenable.setContentAreaFilled(false);
        cacheenable.setSelected(PMS.getConfiguration().getUseCache());
        cacheenable.addItemListener(new ItemListener() {
 			public void itemStateChanged(ItemEvent e) {
 				PMS.getConfiguration().setUseCache((e.getStateChange() == ItemEvent.SELECTED));
 				cachereset.setEnabled(PMS.getConfiguration().getUseCache());
 				PMS.get().getFrame().setReloadable(true);
 				if ((LooksFrame) PMS.get().getFrame() != null)
 					((LooksFrame) PMS.get().getFrame()).getFt().setScanLibraryEnabled(PMS.getConfiguration().getUseCache());
 			}
       });
     	  builder.add(cacheenable,          cc.xy(1,  19));
     	  cachereset.addActionListener(new ActionListener() {
 			@Override
 			public void actionPerformed(ActionEvent e) {
 				int option = JOptionPane.showConfirmDialog(
    	                    (Component) PMS.get().getFrame(),
    	                    Messages.getString("NetworkTab.13") +
    	                    Messages.getString("NetworkTab.19"),
    	                    "Question",
    	                    JOptionPane.YES_NO_OPTION
    	                    );
    				if (option == JOptionPane.YES_OPTION) {
    					PMS.get().getDatabase().init(true);
    				}
 			}
     	  });
     	  builder.add(cachereset,          cc.xyw(4,  19, 4));
     	  cachereset.setEnabled(PMS.getConfiguration().getUseCache());
        builder.add(hidevideosettings,          cc.xyw(4,  13, 3));
        hideextensions = new JCheckBox(Messages.getString("FoldTab.5"));
        hideextensions.setContentAreaFilled(false);
        if (PMS.getConfiguration().isHideExtensions())
        	hideextensions.setSelected(true);
        hideextensions.addItemListener(new ItemListener() {
 			public void itemStateChanged(ItemEvent e) {
 				PMS.getConfiguration().setHideExtensions((e.getStateChange() == ItemEvent.SELECTED));
 				PMS.get().getFrame().setReloadable(true);
 			}
        });
        builder.add(hideextensions,          cc.xyw(1,  15, 3));
        hideengines = new JCheckBox(Messages.getString("FoldTab.8"));
        hideengines.setContentAreaFilled(false);
        if (PMS.getConfiguration().isHideEngineNames())
        	hideengines.setSelected(true);
        hideengines.addItemListener(new ItemListener() {
 			public void itemStateChanged(ItemEvent e) {
 				PMS.getConfiguration().setHideEngineNames((e.getStateChange() == ItemEvent.SELECTED));
 				PMS.get().getFrame().setReloadable(true);
 			}
        });
        builder.add(hideengines,          cc.xyw(4,  15, 3));
 	itunes = new JCheckBox(Messages.getString("FoldTab.30"));
        itunes.setContentAreaFilled(false);
        if (PMS.getConfiguration().getItunesEnabled())
        	itunes.setSelected(true);
        if (!Platform.isMac())
	        itunes.setEnabled(false);
        itunes.addItemListener(new ItemListener() {
  		public void itemStateChanged(ItemEvent e) {
  			PMS.getConfiguration().setItunesEnabled((e.getStateChange() == ItemEvent.SELECTED));
  			PMS.get().getFrame().setReloadable(true);
  		}
        });
        builder.add(itunes,          cc.xyw(1,  17, 3));
 	iphoto = new JCheckBox(Messages.getString("FoldTab.29"));
        iphoto.setContentAreaFilled(false);
        if (PMS.getConfiguration().getIphotoEnabled())
        	iphoto.setSelected(true);
        if (!Platform.isMac())
	        iphoto.setEnabled(false);
	iphoto.addItemListener(new ItemListener() {
  		public void itemStateChanged(ItemEvent e) {
  			PMS.getConfiguration().setIphotoEnabled((e.getStateChange() == ItemEvent.SELECTED));
  			PMS.get().getFrame().setReloadable(true);
  		}
        });
        builder.add(iphoto,          cc.xyw(4,  17, 3));
        final KeyedComboBoxModel kcbm = new KeyedComboBoxModel(new Object[] { "0", "1" }, new Object[] { Messages.getString("FoldTab.15"), Messages.getString("FoldTab.16") });
        sortmethod = new JComboBox(kcbm);
        sortmethod.setEditable(false);
      kcbm.setSelectedKey("" + configuration.getSortMethod());
      sortmethod.addItemListener(new ItemListener() {
 			public void itemStateChanged(ItemEvent e) {
 				if (e.getStateChange() == ItemEvent.SELECTED) {
 					try {
 						configuration.setSortMethod(Integer.parseInt((String) kcbm.getSelectedKey()));
 						PMS.get().getFrame().setReloadable(true);
 					} catch (NumberFormatException nfe) {}
 				}
 			}
      });
      builder.addLabel(Messages.getString("FoldTab.18"), cc.xyw(1,21,3));
        builder.add(sortmethod, cc.xyw(4, 21,4));
        FormLayout layoutFolders = new FormLayout(
                "left:pref, left:pref, pref, pref, pref, 0:grow",
                "p, 3dlu, p, 3dlu, fill:default:grow");
         PanelBuilder builderFolder = new PanelBuilder(layoutFolders);
          builderFolder.setOpaque(true);
       cmp =  builderFolder.addSeparator(Messages.getString("FoldTab.7"),  cc.xyw(1, 1,6));
        cmp = (JComponent) cmp.getComponent(0);
        cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));
       JButton but = new JButton(LooksFrame.readImageIcon("folder_new-32.png"));
       but.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent e) {
				JFileChooser chooser = null;
				try {
					 chooser = new JFileChooser();
				} catch (Exception ee) {
					 chooser = new JFileChooser(new RestrictedFileSystemView());
				}
				chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
				int returnVal = chooser.showOpenDialog((Component) e.getSource());
			    if(returnVal == JFileChooser.APPROVE_OPTION) {
			    	((DefaultListModel) FList.getModel()).add(FList.getModel().getSize(),chooser.getSelectedFile().getAbsolutePath());
			    	if (FList.getModel().getElementAt(0).equals(ALL_DRIVES))
			    		((DefaultListModel) FList.getModel()).remove(0);
			    	updateModel();
			    }
			}
		});
       builderFolder.add(but,          cc.xy(1,  3));
       JButton but2 = new JButton(LooksFrame.readImageIcon("button_cancel-32.png"));
       but2.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent e) {
				if (FList.getSelectedIndex() > -1) {
					((DefaultListModel) FList.getModel()).remove(FList.getSelectedIndex());
					if (FList.getModel().getSize() == 0)
			    		((DefaultListModel) FList.getModel()).add(0, ALL_DRIVES);
					updateModel();
				}
			}
		});
       builderFolder.add(but2,          cc.xy(2,  3));
       JButton but3 = new JButton(LooksFrame.readImageIcon("kdevelop_down-32.png"));
       but3.setToolTipText(Messages.getString("FoldTab.12"));
       but3.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
			DefaultListModel model = ((DefaultListModel) FList.getModel());
			for(int i=0;i<model.size()-1;i++) {
				if (FList.isSelectedIndex(i)) {
					String value = model.get(i).toString();
					model.set(i, model.get(i+1));
					model.set(i+1, value);
					FList.setSelectedIndex(i+1);
					updateModel();
					break;
				}
			}
		}
       });
       builderFolder.add(but3,          cc.xy(3,  3));
       JButton but4 = new JButton(LooksFrame.readImageIcon("up-32.png"));
       but4.setToolTipText(Messages.getString("FoldTab.12"));
       but4.addActionListener(new ActionListener() {
   		public void actionPerformed(ActionEvent e) {
   			DefaultListModel model = ((DefaultListModel) FList.getModel());
   			for(int i=1;i<model.size();i++) {
   				if (FList.isSelectedIndex(i)) {
   					String value = model.get(i).toString();
   					model.set(i, model.get(i-1));
   					model.set(i-1, value);
   					FList.setSelectedIndex(i-1);
   					updateModel();
   					break;
   				}
   			}
   		}
          });
       builderFolder.add(but4,          cc.xy(4,  3));
      but5 = new JButton(LooksFrame.readImageIcon("search-32.png"));
       but5.setToolTipText(Messages.getString("FoldTab.2"));
       but5.addActionListener(new ActionListener() {
   		public void actionPerformed(ActionEvent e) {
   			if (PMS.getConfiguration().getUseCache()) {
   				if (!PMS.get().getDatabase().isScanLibraryRunning()) {
	   				int option = JOptionPane.showConfirmDialog(
	   	                    (Component) PMS.get().getFrame(),
	   	                    Messages.getString("FoldTab.3") +
	   	                    Messages.getString("FoldTab.4"),
	   	                    "Question",
	   	                    JOptionPane.YES_NO_OPTION
	   	                    );
	   				if (option == JOptionPane.YES_OPTION) {
	   					PMS.get().getDatabase().scanLibrary();
	   					but5.setIcon(LooksFrame.readImageIcon("viewmagfit-32.png"));
	   				}
   				} else {
   					int option = JOptionPane.showConfirmDialog(
	   	                    (Component) PMS.get().getFrame(),
	   	                    Messages.getString("FoldTab.10"),
	   	                    "Question",
	   	                    JOptionPane.YES_NO_OPTION
	   	                    );
	   				if (option == JOptionPane.YES_OPTION) {
	   					PMS.get().getDatabase().stopScanLibrary();
	   					PMS.get().getFrame().setStatusLine(null);
	   					but5.setIcon(LooksFrame.readImageIcon("search-32.png"));
	   				}
   				}
   			}
   		}
          });
       builderFolder.add(but5,          cc.xy(5,  3));
       but5.setEnabled(PMS.getConfiguration().getUseCache());
       builderFolder.add(pane,          cc.xyw(1,  5,6));
       builder.add(builderFolder.getPanel(), cc.xyw(1, 25, 8));
        return builder.getPanel();
	}


Input:
	public View getView(int position, View convertView, ViewGroup parent) {
		View row = convertView;
		RestaurantHolder resturant = getItem(position);
		if (row == null) {
			LayoutInflater inflater = ((Activity) getContext()).getLayoutInflater();
			row = inflater.inflate(R.layout.row, null);
			holder = new RestaurantHolder(row);
			row.setTag(holder);
		} else {
			holder = (RestaurantHolder) row.getTag();
		}
		holder.populateFrom((Restaurant) getItem(position), row, mContext);
		return row;
	}

Output:
	public View getView(int position, View convertView, ViewGroup parent) {
		View row = convertView;
		RestaurantHolder holder;
		if (row == null) {
			LayoutInflater inflater = ((Activity) getContext()).getLayoutInflater();
			row = inflater.inflate(R.layout.row, null);
			holder = new RestaurantHolder(row);
			row.setTag(holder);
		} else {
			holder = (RestaurantHolder) row.getTag();
		}
		holder.populateFrom((Restaurant) getItem(position), row, mContext);
		return row;
	}


Input:
    public List<Teacher> findAvailables(TU tu, Date date, Integer duration) {
        Query q = entityManager.createNativeQuery("SELECT teacher_busy(?, ?, ?) FROM dual");
        q.setParameter(2, date);
        q.setParameter(3, duration);
        List<Teacher> availableTeachers = new ArrayList<Teacher>();
        for (Teacher t : tu.getCompetentTeachers()) {
            if (((BigDecimal)q.setParameter(1, t.getId()).getSingleResult()).intValue() == 0) {
                availableTeachers.add(t);
            }
        }
        return availableTeachers;
    }

Output:
    public List<Teacher> findAvailables(TU tu, Date date, Integer duration) {
        Query q = entityManager.createNativeQuery("SELECT teacher_busy(?1, ?2, ?3) FROM dual");
        q.setParameter(2, date);
        q.setParameter(3, duration);
        List<Teacher> availableTeachers = new ArrayList<Teacher>();
        for (Teacher t : tu.getCompetentTeachers()) {
            if (((BigDecimal)q.setParameter(1, t.getId()).getSingleResult()).intValue() == 0) {
                availableTeachers.add(t);
            }
        }
        return availableTeachers;
    }


Input:
public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String id = null;
		String dsPhysicalLocation = null;
		String dsControlGroupType = null;
		String user = null;
		String pass = null;
		MIMETypedStream mimeTypedStream = null;
		DisseminationService ds = null;
		Timestamp keyTimestamp = null;
		Timestamp currentTimestamp = null;
		PrintWriter out = null;
		ServletOutputStream outStream = null;
		String requestURI = request.getRequestURL().toString() + "?"
				+ request.getQueryString();
		id = request.getParameter("id").replaceAll("T", " ");
        LOG.debug("Datastream tempID=" + id);
        LOG.debug("DRS doGet()");
		try {
			if (id == null || id.equalsIgnoreCase("")) {
				String message = "[DatastreamResolverServlet] No datastream ID "
						+ "specified in servlet request: "
						+ request.getRequestURI();
                LOG.error(message);
				response
						.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
				response.sendError(
						HttpServletResponse.SC_INTERNAL_SERVER_ERROR, message);
				return;
			}
			id = id.replaceAll("T", " ").replaceAll("/", "").trim();
			ds = new DisseminationService();
			dsRegistry = DisseminationService.dsRegistry;
			DatastreamMediation dm = (DatastreamMediation) dsRegistry.get(id);
			if (dm == null) {
				StringBuffer entries = new StringBuffer();
				Iterator eIter = dsRegistry.keySet().iterator();
				while (eIter.hasNext()) {
					entries.append("'" + (String) eIter.next() + "' ");
				}
				throw new IOException(
						"Cannot find datastream in temp registry by key: " + id
								+ "\n" + "Reg entries: " + entries.toString());
			}
			dsPhysicalLocation = dm.dsLocation;
			dsControlGroupType = dm.dsControlGroupType;
			user = dm.callUsername;
			pass = dm.callPassword;
			if (LOG.isDebugEnabled()) {
				LOG.debug("**************************** DatastreamResolverServlet dm.dsLocation: "
								+ dm.dsLocation);
				LOG.debug("**************************** DatastreamResolverServlet dm.dsControlGroupType: "
								+ dm.dsControlGroupType);
				LOG.debug("**************************** DatastreamResolverServlet dm.callUsername: "
								+ dm.callUsername);
				LOG.debug("**************************** DatastreamResolverServlet dm.Password: "
								+ dm.callPassword);
				LOG.debug("**************************** DatastreamResolverServlet dm.callbackRole: "
								+ dm.callbackRole);
				LOG.debug("**************************** DatastreamResolverServlet dm.callbackBasicAuth: "
								+ dm.callbackBasicAuth);
				LOG.debug("**************************** DatastreamResolverServlet dm.callBasicAuth: "
								+ dm.callBasicAuth);
				LOG.debug("**************************** DatastreamResolverServlet dm.callbackSSl: "
								+ dm.callbackSSL);
				LOG.debug("**************************** DatastreamResolverServlet dm.callSSl: "
								+ dm.callSSL);
				LOG.debug("**************************** DatastreamResolverServlet non ssl port: "
								+ fedoraServerPort);
				LOG.debug("**************************** DatastreamResolverServlet ssl port: "
								+ fedoraServerRedirectPort);
			}
			if (request.getRequestURI().endsWith("getDS")
					&& (ServerUtility.isURLFedoraServer(dsPhysicalLocation)
							|| dsControlGroupType.equals("M") || dsControlGroupType
							.equals("X"))) {
				if (LOG.isDebugEnabled())
					LOG.debug("*********************** Changed role from: "
									+ dm.callbackRole
									+ "  to: "
									+ BackendPolicies.BACKEND_SERVICE_CALL_UNSECURE);
				dm.callbackRole = BackendPolicies.BACKEND_SERVICE_CALL_UNSECURE;
			}
			if (dm.callbackRole.equals(BackendPolicies.FEDORA_INTERNAL_CALL)) {
				if (dm.callbackSSL) {
					dsPhysicalLocation = dsPhysicalLocation.replaceFirst(
							"http:", "https:");
					dsPhysicalLocation = dsPhysicalLocation.replaceFirst(
							fedoraServerPort, fedoraServerRedirectPort);
					if (LOG.isDebugEnabled())
						LOG.debug("*********************** DatastreamResolverServlet -- Was Fedora-to-Fedora call -- modified dsPhysicalLocation: "
										+ dsPhysicalLocation);
				}
			}
			keyTimestamp = Timestamp.valueOf(ds.extractTimestamp(id));
			currentTimestamp = new Timestamp(new Date().getTime());
            LOG.debug("dsPhysicalLocation=" + dsPhysicalLocation
                    + "dsControlGroupType=" + dsControlGroupType);
            long diff = currentTimestamp.getTime() - keyTimestamp.getTime();
            LOG.debug("Timestamp diff for mechanism's reponse: "
                        + diff + " ms.");
			if (diff > (long) datastreamMediationLimit) {
				out = response.getWriter();
				response.setContentType(HTML_CONTENT_TYPE);
				out
						.println("
[DatastreamResolverServlet] Error:"
								+ " Mechanism has failed to respond "
								+ "to the DatastreamResolverServlet within the specified "
								+ "time limit of \""
								+ datastreamMediationLimit
								+ "\""
								+ "milliseconds. Datastream access denied.");
                LOG.error("Mechanism failed to respond to "
                        + "DatastreamResolverServlet within time limit of "
                        + datastreamMediationLimit);
				out.close();
				return;
			}
			if (dm.callbackRole == null) {
				throw new AuthzOperationalException(
						"no callbackRole for this ticket");
			}
			String targetRole =
					dm.callbackRole;
			String[] targetRoles = { targetRole };
			Context context = ReadOnlyContext.getContext(
					Constants.HTTP_REQUEST.REST.uri, request);
			if (request.getRemoteUser() == null) {
    			LOG.debug("DatastreamResolverServlet: unAuthenticated request");
			} else {
				if (((ExtendedHttpServletRequest)request).isUserInRole(targetRole)) {
					LOG.debug("DatastreamResolverServlet: user has required role");
				} else {
					LOG.debug("DatastreamResolverServlet: authZ exception in validating user");
					throw new AuthzDeniedException("wrong user for this ticket");
				}
			}
			if (LOG.isDebugEnabled()) {
				LOG.debug("debugging backendService role");
				LOG.debug("targetRole=" + targetRole);
				int targetRolesLength = targetRoles.length;
				LOG.debug("targetRolesLength=" + targetRolesLength);
				if (targetRolesLength > 0) {
					LOG.debug("targetRoles[0]=" + targetRoles[0]);
				}
				int nSubjectValues = context.nSubjectValues(targetRole);
				LOG.debug("nSubjectValues=" + nSubjectValues);
				if (nSubjectValues > 0) {
					LOG.debug("context.getSubjectValue(targetRole)="
							+ context.getSubjectValue(targetRole));
				}
				Iterator it = context.subjectAttributes();
				while (it.hasNext()) {
					String name = (String) it.next();
					String value = context.getSubjectValue(name);
					LOG.debug("another subject attribute from context "
									+ name + "=" + value);
				}
				it = context.environmentAttributes();
				while (it.hasNext()) {
					String name = (String) it.next();
					String value = context.getEnvironmentValue(name);
					LOG.debug("another environment attribute from context "
									+ name + "=" + value);
				}
			}
            LOG.debug("DatastreamResolverServlet: about to do final authZ check");
			Authorization authorization = (Authorization) s_server
					.getModule("fedora.server.security.Authorization");
			authorization.enforceResolveDatastream(context, keyTimestamp);
			LOG.debug("DatastreamResolverServlet: final authZ check suceeded.....");
			if (dsControlGroupType.equalsIgnoreCase("E")) {
				if (LOG.isDebugEnabled()) {
					for (Enumeration e = request.getHeaderNames(); e
							.hasMoreElements();) {
						String name = (String) e.nextElement();
						Enumeration headerValues = request.getHeaders(name);
						StringBuffer sb = new StringBuffer();
						while (headerValues.hasMoreElements()) {
							sb.append((String) headerValues.nextElement());
						}
						String value = sb.toString();
						LOG.debug("DATASTREAMRESOLVERSERVLET REQUEST HEADER CONTAINED: "
										+ name + " : " + value);
					}
				}
				ExternalContentManager externalContentManager = (ExternalContentManager) s_server
						.getModule("fedora.server.storage.ExternalContentManager");
				mimeTypedStream = externalContentManager.getExternalContent(
						dsPhysicalLocation, context);
				outStream = response.getOutputStream();
				response.setContentType(mimeTypedStream.MIMEType);
				Property[] headerArray = mimeTypedStream.header;
				if (headerArray != null) {
					for (int i = 0; i < headerArray.length; i++) {
						if (headerArray[i].name != null
								&& !(headerArray[i].name
										.equalsIgnoreCase("content-type"))) {
							response.addHeader(headerArray[i].name,
									headerArray[i].value);
							LOG.debug("THIS WAS ADDED TO DATASTREAMRESOLVERSERVLET RESPONSE HEADER FROM ORIGINATING PROVIDER "
										+ headerArray[i].name
										+ " : " + headerArray[i].value);
						}
					}
				}
				int byteStream = 0;
				byte[] buffer = new byte[255];
				while ((byteStream = mimeTypedStream.getStream().read(buffer)) != -1) {
					outStream.write(buffer, 0, byteStream);
				}
				buffer = null;
				outStream.flush();
			} else if (dsControlGroupType.equalsIgnoreCase("M")
					|| dsControlGroupType.equalsIgnoreCase("X")) {
				String PID = null;
				String dsVersionID = null;
				String dsID = null;
				String[] s = dsPhysicalLocation.split("\\+");
				if (s.length != 3) {
					String message = "[DatastreamResolverServlet]  The "
							+ "internal Fedora datastream id:  \""
							+ dsPhysicalLocation + "\"  is invalid.";
					LOG.error(message);
					throw new ServletException(message);
				}
				PID = s[0];
				dsID = s[1];
				dsVersionID = s[2];
                LOG.debug("PID=" + PID + ", dsID=" + dsID + ", dsVersionID="
                        + dsVersionID);
				DOReader doReader = m_manager.getReader(
						Server.USE_DEFINITIVE_STORE, context, PID);
				Datastream d = (Datastream) doReader.getDatastream(dsID,
						dsVersionID);
                LOG.debug("Got datastream: " + d.DatastreamID);
				InputStream is = d.getContentStream();
				int bytestream = 0;
				response.setContentType(d.DSMIME);
				outStream = response.getOutputStream();
				byte[] buffer = new byte[255];
				while ((bytestream = is.read(buffer)) != -1) {
					outStream.write(buffer, 0, bytestream);
				}
				buffer = null;
				is.close();
			} else {
				out = response.getWriter();
				response.setContentType(HTML_CONTENT_TYPE);
				out.println("
[DatastreamResolverServlet] Unknown "
								+ "dsControlGroupType: " + dsControlGroupType
								+ "
");
                LOG.error("Unknown dsControlGroupType: " + dsControlGroupType);
			}
		} catch (AuthzException ae) {
            LOG.error("Authorization failure resolving datastream"
                    + " (actionLabel=" + ACTION_LABEL + ")", ae);
			throw RootException.getServletException(ae, request, ACTION_LABEL,
					new String[0]);
		} catch (Throwable th) {
            LOG.error("Error resolving datastream", th);
			String message = "[DatastreamResolverServlet] returned an error. The "
					+ "underlying error was a  \""
					+ th.getClass().getName()
					+ "  The message was  \"" + th.getMessage() + "\".  ";
			throw new ServletException(message);
		} finally {
			if (out != null)
				out.close();
			if (outStream != null)
				outStream.close();
			dsRegistry.remove(id);
		}
	}

Output:
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String id = null;
		String dsPhysicalLocation = null;
		String dsControlGroupType = null;
		String user = null;
		String pass = null;
		MIMETypedStream mimeTypedStream = null;
		DisseminationService ds = null;
		Timestamp keyTimestamp = null;
		Timestamp currentTimestamp = null;
		PrintWriter out = null;
		ServletOutputStream outStream = null;
		String requestURI = request.getRequestURL().toString() + "?"
				+ request.getQueryString();
		id = request.getParameter("id").replaceAll("T", " ");
        LOG.debug("Datastream tempID=" + id);
        LOG.debug("DRS doGet()");
		try {
			if (id == null || id.equalsIgnoreCase("")) {
				String message = "[DatastreamResolverServlet] No datastream ID "
						+ "specified in servlet request: "
						+ request.getRequestURI();
                LOG.error(message);
				response
						.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
				response.sendError(
						HttpServletResponse.SC_INTERNAL_SERVER_ERROR, message);
				return;
			}
			id = id.replaceAll("T", " ").replaceAll("/", "").trim();
			ds = new DisseminationService();
			dsRegistry = DisseminationService.dsRegistry;
			DatastreamMediation dm = (DatastreamMediation) dsRegistry.get(id);
			if (dm == null) {
				StringBuffer entries = new StringBuffer();
				Iterator eIter = dsRegistry.keySet().iterator();
				while (eIter.hasNext()) {
					entries.append("'" + (String) eIter.next() + "' ");
				}
				throw new IOException(
						"Cannot find datastream in temp registry by key: " + id
								+ "\n" + "Reg entries: " + entries.toString());
			}
			dsPhysicalLocation = dm.dsLocation;
			dsControlGroupType = dm.dsControlGroupType;
			user = dm.callUsername;
			pass = dm.callPassword;
			if (LOG.isDebugEnabled()) {
				LOG.debug("**************************** DatastreamResolverServlet dm.dsLocation: "
								+ dm.dsLocation);
				LOG.debug("**************************** DatastreamResolverServlet dm.dsControlGroupType: "
								+ dm.dsControlGroupType);
				LOG.debug("**************************** DatastreamResolverServlet dm.callUsername: "
								+ dm.callUsername);
				LOG.debug("**************************** DatastreamResolverServlet dm.Password: "
								+ dm.callPassword);
				LOG.debug("**************************** DatastreamResolverServlet dm.callbackRole: "
								+ dm.callbackRole);
				LOG.debug("**************************** DatastreamResolverServlet dm.callbackBasicAuth: "
								+ dm.callbackBasicAuth);
				LOG.debug("**************************** DatastreamResolverServlet dm.callBasicAuth: "
								+ dm.callBasicAuth);
				LOG.debug("**************************** DatastreamResolverServlet dm.callbackSSl: "
								+ dm.callbackSSL);
				LOG.debug("**************************** DatastreamResolverServlet dm.callSSl: "
								+ dm.callSSL);
				LOG.debug("**************************** DatastreamResolverServlet non ssl port: "
								+ fedoraServerPort);
				LOG.debug("**************************** DatastreamResolverServlet ssl port: "
								+ fedoraServerRedirectPort);
			}
			if (request.getRequestURI().endsWith("getDS")
					&& (ServerUtility.isURLFedoraServer(dsPhysicalLocation)
							|| dsControlGroupType.equals("M") || dsControlGroupType
							.equals("X"))) {
				if (LOG.isDebugEnabled())
					LOG.debug("*********************** Changed role from: "
									+ dm.callbackRole
									+ "  to: "
									+ BackendPolicies.BACKEND_SERVICE_CALL_UNSECURE);
				dm.callbackRole = BackendPolicies.BACKEND_SERVICE_CALL_UNSECURE;
			}
			if (dm.callbackRole.equals(BackendPolicies.FEDORA_INTERNAL_CALL)) {
				if (dm.callbackSSL) {
					dsPhysicalLocation = dsPhysicalLocation.replaceFirst(
							"http:", "https:");
					dsPhysicalLocation = dsPhysicalLocation.replaceFirst(
							fedoraServerPort, fedoraServerRedirectPort);
					if (LOG.isDebugEnabled())
						LOG.debug("*********************** DatastreamResolverServlet -- Was Fedora-to-Fedora call -- modified dsPhysicalLocation: "
										+ dsPhysicalLocation);
				}
			}
			keyTimestamp = Timestamp.valueOf(ds.extractTimestamp(id));
			currentTimestamp = new Timestamp(new Date().getTime());
            LOG.debug("dsPhysicalLocation=" + dsPhysicalLocation
                    + "dsControlGroupType=" + dsControlGroupType);
            long diff = currentTimestamp.getTime() - keyTimestamp.getTime();
            LOG.debug("Timestamp diff for mechanism's reponse: "
                        + diff + " ms.");
			if (diff > (long) datastreamMediationLimit) {
				out = response.getWriter();
				response.setContentType(HTML_CONTENT_TYPE);
				out
						.println("<br><b>[DatastreamResolverServlet] Error:</b>"
								+ "<font color=\"red\"> Mechanism has failed to respond "
								+ "to the DatastreamResolverServlet within the specified "
								+ "time limit of \""
								+ datastreamMediationLimit
								+ "\""
								+ "milliseconds. Datastream access denied.");
                LOG.error("Mechanism failed to respond to "
                        + "DatastreamResolverServlet within time limit of "
                        + datastreamMediationLimit);
				out.close();
				return;
			}
			if (dm.callbackRole == null) {
				throw new AuthzOperationalException(
						"no callbackRole for this ticket");
			}
			String targetRole =
					dm.callbackRole;
			String[] targetRoles = { targetRole };
			Context context = ReadOnlyContext.getContext(
					Constants.HTTP_REQUEST.REST.uri, request);
			if (request.getRemoteUser() == null) {
    			LOG.debug("DatastreamResolverServlet: unAuthenticated request");
			} else {
				LOG.debug("DatastreamResolverServlet: user==" + request.getRemoteUser());
			}
			if (LOG.isDebugEnabled()) {
				LOG.debug("debugging backendService role");
				LOG.debug("targetRole=" + targetRole);
				int targetRolesLength = targetRoles.length;
				LOG.debug("targetRolesLength=" + targetRolesLength);
				if (targetRolesLength > 0) {
					LOG.debug("targetRoles[0]=" + targetRoles[0]);
				}
				int nSubjectValues = context.nSubjectValues(targetRole);
				LOG.debug("nSubjectValues=" + nSubjectValues);
				if (nSubjectValues > 0) {
					LOG.debug("context.getSubjectValue(targetRole)="
							+ context.getSubjectValue(targetRole));
				}
				Iterator it = context.subjectAttributes();
				while (it.hasNext()) {
					String name = (String) it.next();
					String value = context.getSubjectValue(name);
					LOG.debug("another subject attribute from context "
									+ name + "=" + value);
				}
				it = context.environmentAttributes();
				while (it.hasNext()) {
					String name = (String) it.next();
					String value = context.getEnvironmentValue(name);
					LOG.debug("another environment attribute from context "
									+ name + "=" + value);
				}
			}
            LOG.debug("DatastreamResolverServlet: about to do final authZ check");
			Authorization authorization = (Authorization) s_server
					.getModule("fedora.server.security.Authorization");
			authorization.enforceResolveDatastream(context, keyTimestamp);
			LOG.debug("DatastreamResolverServlet: final authZ check suceeded.....");
			if (dsControlGroupType.equalsIgnoreCase("E")) {
				if (LOG.isDebugEnabled()) {
					for (Enumeration e = request.getHeaderNames(); e
							.hasMoreElements();) {
						String name = (String) e.nextElement();
						Enumeration headerValues = request.getHeaders(name);
						StringBuffer sb = new StringBuffer();
						while (headerValues.hasMoreElements()) {
							sb.append((String) headerValues.nextElement());
						}
						String value = sb.toString();
						LOG.debug("DATASTREAMRESOLVERSERVLET REQUEST HEADER CONTAINED: "
										+ name + " : " + value);
					}
				}
				ExternalContentManager externalContentManager = (ExternalContentManager) s_server
						.getModule("fedora.server.storage.ExternalContentManager");
				mimeTypedStream = externalContentManager.getExternalContent(
						dsPhysicalLocation, context);
				outStream = response.getOutputStream();
				response.setContentType(mimeTypedStream.MIMEType);
				Property[] headerArray = mimeTypedStream.header;
				if (headerArray != null) {
					for (int i = 0; i < headerArray.length; i++) {
						if (headerArray[i].name != null
								&& !(headerArray[i].name
										.equalsIgnoreCase("content-type"))) {
							response.addHeader(headerArray[i].name,
									headerArray[i].value);
							LOG.debug("THIS WAS ADDED TO DATASTREAMRESOLVERSERVLET RESPONSE HEADER FROM ORIGINATING PROVIDER "
										+ headerArray[i].name
										+ " : " + headerArray[i].value);
						}
					}
				}
				int byteStream = 0;
				byte[] buffer = new byte[255];
				while ((byteStream = mimeTypedStream.getStream().read(buffer)) != -1) {
					outStream.write(buffer, 0, byteStream);
				}
				buffer = null;
				outStream.flush();
			} else if (dsControlGroupType.equalsIgnoreCase("M")
					|| dsControlGroupType.equalsIgnoreCase("X")) {
				String PID = null;
				String dsVersionID = null;
				String dsID = null;
				String[] s = dsPhysicalLocation.split("\\+");
				if (s.length != 3) {
					String message = "[DatastreamResolverServlet]  The "
							+ "internal Fedora datastream id:  \""
							+ dsPhysicalLocation + "\"  is invalid.";
					LOG.error(message);
					throw new ServletException(message);
				}
				PID = s[0];
				dsID = s[1];
				dsVersionID = s[2];
                LOG.debug("PID=" + PID + ", dsID=" + dsID + ", dsVersionID="
                        + dsVersionID);
				DOReader doReader = m_manager.getReader(
						Server.USE_DEFINITIVE_STORE, context, PID);
				Datastream d = (Datastream) doReader.getDatastream(dsID,
						dsVersionID);
                LOG.debug("Got datastream: " + d.DatastreamID);
				InputStream is = d.getContentStream();
				int bytestream = 0;
				response.setContentType(d.DSMIME);
				outStream = response.getOutputStream();
				byte[] buffer = new byte[255];
				while ((bytestream = is.read(buffer)) != -1) {
					outStream.write(buffer, 0, bytestream);
				}
				buffer = null;
				is.close();
			} else {
				out = response.getWriter();
				response.setContentType(HTML_CONTENT_TYPE);
				out.println("<br>[DatastreamResolverServlet] Unknown "
								+ "dsControlGroupType: " + dsControlGroupType
								+ "</br>");
                LOG.error("Unknown dsControlGroupType: " + dsControlGroupType);
			}
		} catch (AuthzException ae) {
            LOG.error("Authorization failure resolving datastream"
                    + " (actionLabel=" + ACTION_LABEL + ")", ae);
			throw RootException.getServletException(ae, request, ACTION_LABEL,
					new String[0]);
		} catch (Throwable th) {
            LOG.error("Error resolving datastream", th);
			String message = "[DatastreamResolverServlet] returned an error. The "
					+ "underlying error was a  \""
					+ th.getClass().getName()
					+ "  The message was  \"" + th.getMessage() + "\".  ";
			throw new ServletException(message);
		} finally {
			if (out != null)
				out.close();
			if (outStream != null)
				outStream.close();
			dsRegistry.remove(id);
		}
	}


Input:
    List<String> generatePositionalArguments(Tree.ArgumentList that, List<Tree.PositionalArgument> args,
            final boolean forceSequenced, final boolean generateVars) {
        if (!args.isEmpty()) {
            final List<String> argvars = new ArrayList<String>(args.size());
            boolean first=true;
            boolean opened=false;
            ProducedType sequencedType=null;
            for (Tree.PositionalArgument arg: args) {
                Tree.Expression expr;
                if (arg instanceof Tree.ListedArgument) {
                    if (!first) gen.out(",");
                    expr = ((Tree.ListedArgument) arg).getExpression();
                    ProducedType exprType = expr.getTypeModel();
                    boolean dyncheck = gen.isInDynamicBlock() && !TypeUtils.isUnknown(arg.getParameter()) && exprType.isUnknown();
                    if (forceSequenced || (arg.getParameter() != null && arg.getParameter().isSequenced())) {
                        if (dyncheck) {
                            exprType = arg.getParameter().getType();
                        }
                        if (sequencedType == null) {
                            sequencedType=exprType;
                        } else {
                            ArrayList<ProducedType> cases = new ArrayList<ProducedType>(2);
                            Util.addToUnion(cases, sequencedType);
                            Util.addToUnion(cases, exprType);
                            if (cases.size() > 1) {
                                UnionType ut = new UnionType(that.getUnit());
                                ut.setCaseTypes(cases);
                                sequencedType = ut.getType();
                            } else {
                                sequencedType = cases.get(0);
                            }
                        }
                        if (!opened) {
                            if (generateVars) {
                                final String argvar = names.createTempVariable();
                                argvars.add(argvar);
                                gen.out(argvar, "=");
                            }
                            gen.out("[");
                        }
                        opened=true;
                    } else if (generateVars) {
                        final String argvar = names.createTempVariable();
                        argvars.add(argvar);
                        gen.out(argvar, "=");
                    }
                    int boxType = gen.boxUnboxStart(expr.getTerm(), arg.getParameter());
                    if (dyncheck) {
                        TypeUtils.generateDynamicCheck(((Tree.ListedArgument) arg).getExpression(),
                                arg.getParameter().getType(), gen);
                    } else {
                        arg.visit(gen);
                    }
                    if (boxType == 4) {
                        gen.out(",");
                        describeMethodParameters(expr.getTerm());
                        gen.out(",");
                        TypeUtils.printTypeArguments(arg, arg.getTypeModel().getTypeArguments(), gen);
                    }
                    gen.boxUnboxEnd(boxType);
                } else if (arg instanceof Tree.SpreadArgument || arg instanceof Tree.Comprehension) {
                    if (arg instanceof Tree.SpreadArgument) {
                        expr = ((Tree.SpreadArgument) arg).getExpression();
                    } else {
                        expr = null;
                    }
                    if (!first) {
                        gen.closeSequenceWithReifiedType(that,
                                gen.getTypeUtils().wrapAsIterableArguments(sequencedType));
                        gen.out(".chain(");
                        sequencedType=null;
                    }
                    if (arg instanceof Tree.SpreadArgument) {
                        int boxType = gen.boxUnboxStart(expr.getTerm(), arg.getParameter());
                        arg.visit(gen);
                        if (boxType == 4) {
                            gen.out(",");
                            describeMethodParameters(expr.getTerm());
                            gen.out(",");
                            TypeUtils.printTypeArguments(arg, arg.getTypeModel().getTypeArguments(), gen);
                        }
                        gen.boxUnboxEnd(boxType);
                    } else {
                        ((Tree.Comprehension)arg).visit(gen);
                    }
                    if (!first) {
                        gen.out(",");
                        if (expr == null) {
                            TypeUtils.printTypeArguments(that,
                                    gen.getTypeUtils().wrapAsIterableArguments(arg.getTypeModel()), gen);
                        } else {
                            ProducedType spreadType = TypeUtils.findSupertype(gen.getTypeUtils().sequential, expr.getTypeModel());
                            TypeUtils.printTypeArguments(that, spreadType.getTypeArguments(), gen);
                        }
                        gen.out(")");
                    }
                    if (arg instanceof Tree.Comprehension) {
                        break;
                    }
                }
                first = false;
            }
            if (sequencedType != null) {
                gen.closeSequenceWithReifiedType(that,
                        gen.getTypeUtils().wrapAsIterableArguments(sequencedType));
            }
            return argvars;
        }
        return Collections.emptyList();
    }

Output:
    List<String> generatePositionalArguments(Tree.ArgumentList that, List<Tree.PositionalArgument> args,
            final boolean forceSequenced, final boolean generateVars) {
        if (!args.isEmpty()) {
            final List<String> argvars = new ArrayList<String>(args.size());
            boolean first=true;
            boolean opened=false;
            ProducedType sequencedType=null;
            for (Tree.PositionalArgument arg: args) {
                Tree.Expression expr;
                if (arg instanceof Tree.ListedArgument) {
                    if (!first) gen.out(",");
                    expr = ((Tree.ListedArgument) arg).getExpression();
                    ProducedType exprType = expr.getTypeModel();
                    boolean dyncheck = gen.isInDynamicBlock() && !TypeUtils.isUnknown(arg.getParameter()) && exprType.isUnknown();
                    if (forceSequenced || (arg.getParameter() != null && arg.getParameter().isSequenced())) {
                        if (dyncheck) {
                            exprType = arg.getParameter().getType();
                        }
                        if (sequencedType == null) {
                            sequencedType=exprType;
                        } else {
                            ArrayList<ProducedType> cases = new ArrayList<ProducedType>(2);
                            Util.addToUnion(cases, sequencedType);
                            Util.addToUnion(cases, exprType);
                            if (cases.size() > 1) {
                                UnionType ut = new UnionType(that.getUnit());
                                ut.setCaseTypes(cases);
                                sequencedType = ut.getType();
                            } else {
                                sequencedType = cases.get(0);
                            }
                        }
                        if (!opened) {
                            if (generateVars) {
                                final String argvar = names.createTempVariable();
                                argvars.add(argvar);
                                gen.out(argvar, "=");
                            }
                            gen.out("[");
                        }
                        opened=true;
                    } else if (generateVars) {
                        final String argvar = names.createTempVariable();
                        argvars.add(argvar);
                        gen.out(argvar, "=");
                    }
                    int boxType = gen.boxUnboxStart(expr.getTerm(), arg.getParameter());
                    if (dyncheck) {
                        TypeUtils.generateDynamicCheck(((Tree.ListedArgument) arg).getExpression(),
                                arg.getParameter().getType(), gen);
                    } else {
                        arg.visit(gen);
                    }
                    if (boxType == 4) {
                        gen.out(",");
                        describeMethodParameters(expr.getTerm());
                        gen.out(",");
                        TypeUtils.printTypeArguments(arg, arg.getTypeModel().getTypeArguments(), gen);
                    }
                    gen.boxUnboxEnd(boxType);
                } else if (arg instanceof Tree.SpreadArgument || arg instanceof Tree.Comprehension) {
                    if (arg instanceof Tree.SpreadArgument) {
                        expr = ((Tree.SpreadArgument) arg).getExpression();
                    } else {
                        expr = null;
                    }
                    if (opened) {
                        gen.closeSequenceWithReifiedType(that,
                                gen.getTypeUtils().wrapAsIterableArguments(sequencedType));
                        gen.out(".chain(");
                        sequencedType=null;
                    } else if (!first) {
                        gen.out(",");
                    }
                    if (arg instanceof Tree.SpreadArgument) {
                        int boxType = gen.boxUnboxStart(expr.getTerm(), arg.getParameter());
                        arg.visit(gen);
                        if (boxType == 4) {
                            gen.out(",");
                            describeMethodParameters(expr.getTerm());
                            gen.out(",");
                            TypeUtils.printTypeArguments(arg, arg.getTypeModel().getTypeArguments(), gen);
                        }
                        gen.boxUnboxEnd(boxType);
                    } else {
                        ((Tree.Comprehension)arg).visit(gen);
                    }
                    if (opened) {
                        gen.out(",");
                        if (expr == null) {
                            TypeUtils.printTypeArguments(that,
                                    gen.getTypeUtils().wrapAsIterableArguments(arg.getTypeModel()), gen);
                        } else {
                            ProducedType spreadType = TypeUtils.findSupertype(gen.getTypeUtils().sequential, expr.getTypeModel());
                            TypeUtils.printTypeArguments(that, spreadType.getTypeArguments(), gen);
                        }
                        gen.out(")");
                    }
                    if (arg instanceof Tree.Comprehension) {
                        break;
                    }
                }
                first = false;
            }
            if (sequencedType != null) {
                gen.closeSequenceWithReifiedType(that,
                        gen.getTypeUtils().wrapAsIterableArguments(sequencedType));
            }
            return argvars;
        }
        return Collections.emptyList();
    }