Input:
  public void encodeBegin(FacesContext context, UIComponent component)
    throws IOException
  {
    ResponseWriter out = context.getResponseWriter();
    String id = component.getId();
    String accesskey;
    String charset;
    String coords;
    String dir;
    boolean disabled;
    String hreflang;
    String lang;
    String onblur;
    String onclick;
    String ondblclick;
    String onfocus;
    String onkeydown;
    String onkeypress;
    String onkeyup;
    String onmousedown;
    String onmousemove;
    String onmouseout;
    String onmouseover;
    String onmouseup;
    String rel;
    String rev;
    String shape;
    String style;
    String styleClass;
    String tabindex;
    String target;
    String title;
    String type;
    Object value;
    if (component instanceof HtmlCommandLink) {
      HtmlCommandLink htmlCommandLink = (HtmlCommandLink) component;
      accesskey = htmlCommandLink.getAccesskey();
      charset = htmlCommandLink.getCharset();
      coords = htmlCommandLink.getCoords();
      dir = htmlCommandLink.getDir();
      disabled = htmlCommandLink.isDisabled();
      hreflang = htmlCommandLink.getHreflang();
      lang = htmlCommandLink.getLang();
      onblur = htmlCommandLink.getOnblur();
      onclick = htmlCommandLink.getOnclick();
      ondblclick = htmlCommandLink.getOndblclick();
      onfocus = htmlCommandLink.getOnfocus();
      onkeydown = htmlCommandLink.getOnkeydown();
      onkeypress = htmlCommandLink.getOnkeypress();
      onkeyup = htmlCommandLink.getOnkeyup();
      onmousedown = htmlCommandLink.getOnmousedown();
      onmousemove = htmlCommandLink.getOnmousemove();
      onmouseout = htmlCommandLink.getOnmouseout();
      onmouseover = htmlCommandLink.getOnmouseover();
      onmouseup = htmlCommandLink.getOnmouseup();
      rel = htmlCommandLink.getRel();
      rev = htmlCommandLink.getRev();
      shape = htmlCommandLink.getShape();
      style = htmlCommandLink.getStyle();
      styleClass = htmlCommandLink.getStyleClass();
      tabindex = htmlCommandLink.getTabindex();
      title = htmlCommandLink.getTitle();
      type = htmlCommandLink.getType();
      target = htmlCommandLink.getTarget();
      value = htmlCommandLink.getValue();
    }
    else {
      Map<String,Object> attrMap = component.getAttributes();
      accesskey = (String) attrMap.get("accesskey");
      charset = (String) attrMap.get("charset");
      coords = (String) attrMap.get("coords");
      dir = (String) attrMap.get("dir");
      disabled = (Boolean) attrMap.get("disabled");
      hreflang = (String) attrMap.get("hreflang");
      lang = (String) attrMap.get("lang");
      onblur = (String) attrMap.get("onblur");
      onclick = (String) attrMap.get("onclick");
      ondblclick = (String) attrMap.get("ondblclick");
      onfocus = (String) attrMap.get("onfocus");
      onkeydown = (String) attrMap.get("onkeydown");
      onkeypress = (String) attrMap.get("onkeypress");
      onkeyup = (String) attrMap.get("onkeyup");
      onmousedown = (String) attrMap.get("onmousedown");
      onmousemove = (String) attrMap.get("onmousemove");
      onmouseout = (String) attrMap.get("onmouseout");
      onmouseover = (String) attrMap.get("onmouseover");
      onmouseup = (String) attrMap.get("onmouseup");
      rel = (String) attrMap.get("rel");
      rev = (String) attrMap.get("rev");
      shape = (String) attrMap.get("shape");
      style = (String) attrMap.get("style");
      styleClass = (String) attrMap.get("styleClass");
      tabindex = (String) attrMap.get("tabindex");
      title = (String) attrMap.get("title");
      type = (String) attrMap.get("type");
      target = (String)attrMap.get("target");
      value = attrMap.get("value");
    }
    String clientId = component.getClientId(context);
    String formClientId = getFormId(context, component);
    String hiddenFieldName = clientId + ":link";
    if (disabled) {
      out.startElement("span", component);
      if (target != null)
	out.writeAttribute("target", target, "target");
    }
    else {
      out.startElement("a", component);
      out.writeAttribute("href", "#", "href");
    }
    if (id != null && ! id.startsWith(UIViewRoot.UNIQUE_ID_PREFIX))
      out.writeAttribute("id", component.getClientId(context), "id");
    if (accesskey != null)
      out.writeAttribute("accesskey", accesskey, "accesskey");
    if (charset != null)
      out.writeAttribute("charset", charset, "charset");
    if (coords != null)
      out.writeAttribute("coords", coords, "coords");
    if (dir != null)
      out.writeAttribute("dir", dir, "dir");
    if (hreflang != null)
      out.writeAttribute("hreflang", hreflang, "hreflang");
    if (lang != null)
      out.writeAttribute("lang", lang, "lang");
    if (onblur != null)
      out.writeAttribute("onblur", onblur, "onblur");
    if (disabled) {
    }
    else {
      HtmlFormRenderer.addCommandLinkHiddenField(context,
                                                 formClientId,
                                                 hiddenFieldName);
      StringBuilder clickJs = new StringBuilder();
      clickJs.append("document.forms['");
      clickJs.append(formClientId);
      clickJs.append("']['");
      clickJs.append(hiddenFieldName);
      clickJs.append("'].value='");
      clickJs.append(clientId);
      clickJs.append("';");
      final int childCount = component.getChildCount();
      if (childCount > 0 && !disabled) {
	List<UIComponent> children = component.getChildren();
	for (int i = 0; i < childCount; i++) {
	  UIComponent child = children.get(i);
	  if (child instanceof UIParameter) {
	    UIParameter param = (UIParameter) child;
	    String enc = out.getCharacterEncoding();
	    clickJs.append("document.forms['");
	    clickJs.append(formClientId);
	    clickJs.append("']['");
	    String name = param.getName();
	    String encodedName = URLEncoder.encode(name, enc);
	    HtmlFormRenderer.addCommandLinkParam(context, formClientId, name);
	    clickJs.append(encodedName);
	    clickJs.append("'].value='");
	    String val = toString(context, param, param.getValue());
	    String encodedVal = URLEncoder.encode(val, enc);
	    clickJs.append(encodedVal);
	    clickJs.append("';");
	  }
	}
      }
      if (target != null) {
	clickJs.append("document.forms['");
	clickJs.append(formClientId);
	clickJs.append("'].target='");
	clickJs.append(target);
	clickJs.append("';");
      }
      clickJs.append("document.forms['");
      clickJs.append(formClientId);
      clickJs.append("'].submit();");
      clickJs.append("return false;");
      if (onclick != null) {
	String code = ("var a = function(){" + onclick + "};"
		       + "var b = function() {" + clickJs + "};"
		       + "return a() && b();");
	out.writeAttribute("onclick", code, "onclick");
      }
      else
	out.writeAttribute("onclick", clickJs.toString(), "onclick");
    }
    if (ondblclick != null)
      out.writeAttribute("ondblclick", ondblclick, "ondblclick");
    if (onfocus != null)
      out.writeAttribute("onfocus", onfocus, "onfocus");
    if (onkeydown != null)
      out.writeAttribute("onkeydown", onkeydown, "onkeydown");
    if (onkeypress != null)
      out.writeAttribute("onkeypress", onkeypress, "onkeypress");
    if (onkeyup != null)
      out.writeAttribute("onkeyup", onkeyup, "onkeyup");
    if (onmousedown != null)
      out.writeAttribute("onmousedown", onmousedown, "onmousedown");
    if (onmousemove != null)
      out.writeAttribute("onmousemove", onmousemove, "onmousemove");
    if (onmouseout != null)
      out.writeAttribute("onmouseout", onmouseout, "onmouseout");
    if (onmouseover != null)
      out.writeAttribute("onmouseover", onmouseover, "onmouseover");
    if (onmouseup != null)
      out.writeAttribute("onmouseup", onmouseup, "onmouseup");
    if (rel != null)
      out.writeAttribute("rel", rel, "rel");
    if (rev != null)
      out.writeAttribute("rev", rev, "rev");
    if (shape != null)
      out.writeAttribute("shape", shape, "shape");
    if (style != null)
      out.writeAttribute("style", style, "style");
    if (styleClass != null)
      out.writeAttribute("class", styleClass, "class");
    if (tabindex != null)
      out.writeAttribute("tabindex", tabindex, "tabindex");
    if (title != null)
      out.writeAttribute("title", title, "title");
    if (type != null)
      out.writeAttribute("type", type, "type");
    if (value != null)
      out.writeText(toString(context, component, value), "value");
    final int childCount = component.getChildCount();
    if (childCount > 0) {
      List<UIComponent> children = component.getChildren();
      for (int i = 0; i < childCount; i++) {
	UIComponent child = children.get(i);
	if (child instanceof UIParameter) {
	}
	else if (child.isRendered()) {
	  child.encodeBegin(context);
	  child.encodeChildren(context);
	  child.encodeEnd(context);
	}
      }
    }
    if (disabled)
      out.endElement("span");
    else
      out.endElement("a");
  }

Output:
  public void encodeBegin(FacesContext context, UIComponent component)
    throws IOException
  {
    ResponseWriter out = context.getResponseWriter();
    String id = component.getId();
    String accesskey;
    String charset;
    String coords;
    String dir;
    boolean disabled;
    String hreflang;
    String lang;
    String onblur;
    String onclick;
    String ondblclick;
    String onfocus;
    String onkeydown;
    String onkeypress;
    String onkeyup;
    String onmousedown;
    String onmousemove;
    String onmouseout;
    String onmouseover;
    String onmouseup;
    String rel;
    String rev;
    String shape;
    String style;
    String styleClass;
    String tabindex;
    String target;
    String title;
    String type;
    Object value;
    if (component instanceof HtmlCommandLink) {
      HtmlCommandLink htmlCommandLink = (HtmlCommandLink) component;
      accesskey = htmlCommandLink.getAccesskey();
      charset = htmlCommandLink.getCharset();
      coords = htmlCommandLink.getCoords();
      dir = htmlCommandLink.getDir();
      disabled = htmlCommandLink.isDisabled();
      hreflang = htmlCommandLink.getHreflang();
      lang = htmlCommandLink.getLang();
      onblur = htmlCommandLink.getOnblur();
      onclick = htmlCommandLink.getOnclick();
      ondblclick = htmlCommandLink.getOndblclick();
      onfocus = htmlCommandLink.getOnfocus();
      onkeydown = htmlCommandLink.getOnkeydown();
      onkeypress = htmlCommandLink.getOnkeypress();
      onkeyup = htmlCommandLink.getOnkeyup();
      onmousedown = htmlCommandLink.getOnmousedown();
      onmousemove = htmlCommandLink.getOnmousemove();
      onmouseout = htmlCommandLink.getOnmouseout();
      onmouseover = htmlCommandLink.getOnmouseover();
      onmouseup = htmlCommandLink.getOnmouseup();
      rel = htmlCommandLink.getRel();
      rev = htmlCommandLink.getRev();
      shape = htmlCommandLink.getShape();
      style = htmlCommandLink.getStyle();
      styleClass = htmlCommandLink.getStyleClass();
      tabindex = htmlCommandLink.getTabindex();
      title = htmlCommandLink.getTitle();
      type = htmlCommandLink.getType();
      target = htmlCommandLink.getTarget();
      value = htmlCommandLink.getValue();
    }
    else {
      Map<String,Object> attrMap = component.getAttributes();
      accesskey = (String) attrMap.get("accesskey");
      charset = (String) attrMap.get("charset");
      coords = (String) attrMap.get("coords");
      dir = (String) attrMap.get("dir");
      disabled = (Boolean) attrMap.get("disabled");
      hreflang = (String) attrMap.get("hreflang");
      lang = (String) attrMap.get("lang");
      onblur = (String) attrMap.get("onblur");
      onclick = (String) attrMap.get("onclick");
      ondblclick = (String) attrMap.get("ondblclick");
      onfocus = (String) attrMap.get("onfocus");
      onkeydown = (String) attrMap.get("onkeydown");
      onkeypress = (String) attrMap.get("onkeypress");
      onkeyup = (String) attrMap.get("onkeyup");
      onmousedown = (String) attrMap.get("onmousedown");
      onmousemove = (String) attrMap.get("onmousemove");
      onmouseout = (String) attrMap.get("onmouseout");
      onmouseover = (String) attrMap.get("onmouseover");
      onmouseup = (String) attrMap.get("onmouseup");
      rel = (String) attrMap.get("rel");
      rev = (String) attrMap.get("rev");
      shape = (String) attrMap.get("shape");
      style = (String) attrMap.get("style");
      styleClass = (String) attrMap.get("styleClass");
      tabindex = (String) attrMap.get("tabindex");
      title = (String) attrMap.get("title");
      type = (String) attrMap.get("type");
      target = (String)attrMap.get("target");
      value = attrMap.get("value");
    }
    String clientId = component.getClientId(context);
    String formClientId = getFormId(context, component);
    String hiddenFieldName = clientId + ":link";
    if (disabled) {
      out.startElement("span", component);
      if (target != null)
	out.writeAttribute("target", target, "target");
    }
    else {
      out.startElement("a", component);
      out.writeAttribute("href", "#", "href");
    }
    if (id != null && ! id.startsWith(UIViewRoot.UNIQUE_ID_PREFIX))
      out.writeAttribute("id", component.getClientId(context), "id");
    if (accesskey != null)
      out.writeAttribute("accesskey", accesskey, "accesskey");
    if (charset != null)
      out.writeAttribute("charset", charset, "charset");
    if (coords != null)
      out.writeAttribute("coords", coords, "coords");
    if (dir != null)
      out.writeAttribute("dir", dir, "dir");
    if (hreflang != null)
      out.writeAttribute("hreflang", hreflang, "hreflang");
    if (lang != null)
      out.writeAttribute("lang", lang, "lang");
    if (onblur != null)
      out.writeAttribute("onblur", onblur, "onblur");
    if (disabled) {
    }
    else {
      HtmlFormRenderer.addCommandLinkHiddenField(context,
                                                 formClientId,
                                                 hiddenFieldName);
      StringBuilder clickJs = new StringBuilder();
      clickJs.append("document.forms['");
      clickJs.append(formClientId);
      clickJs.append("']['");
      clickJs.append(hiddenFieldName);
      clickJs.append("'].value='");
      clickJs.append(clientId);
      clickJs.append("';");
      final int childCount = component.getChildCount();
      if (childCount > 0 && !disabled) {
	List<UIComponent> children = component.getChildren();
	for (int i = 0; i < childCount; i++) {
	  UIComponent child = children.get(i);
	  if (child instanceof UIParameter) {
	    UIParameter param = (UIParameter) child;
	    String enc = out.getCharacterEncoding();
	    clickJs.append("document.forms['");
	    clickJs.append(formClientId);
	    clickJs.append("']['");
	    String name = param.getName();
	    String encodedName = URLEncoder.encode(name, enc);
	    HtmlFormRenderer.addCommandLinkParam(context, formClientId, encodedName);
	    clickJs.append(encodedName);
	    clickJs.append("'].value='");
	    String val = toString(context, param, param.getValue());
	    String encodedVal = URLEncoder.encode(val, enc);
	    clickJs.append(encodedVal);
	    clickJs.append("';");
	  }
	}
      }
      if (target != null) {
	clickJs.append("document.forms['");
	clickJs.append(formClientId);
	clickJs.append("'].target='");
	clickJs.append(target);
	clickJs.append("';");
      }
      clickJs.append("document.forms['");
      clickJs.append(formClientId);
      clickJs.append("'].submit();");
      clickJs.append("return false;");
      if (onclick != null) {
	String code = ("var a = function(){" + onclick + "};"
		       + "var b = function() {" + clickJs + "};"
		       + "return a() && b();");
	out.writeAttribute("onclick", code, "onclick");
      }
      else
	out.writeAttribute("onclick", clickJs.toString(), "onclick");
    }
    if (ondblclick != null)
      out.writeAttribute("ondblclick", ondblclick, "ondblclick");
    if (onfocus != null)
      out.writeAttribute("onfocus", onfocus, "onfocus");
    if (onkeydown != null)
      out.writeAttribute("onkeydown", onkeydown, "onkeydown");
    if (onkeypress != null)
      out.writeAttribute("onkeypress", onkeypress, "onkeypress");
    if (onkeyup != null)
      out.writeAttribute("onkeyup", onkeyup, "onkeyup");
    if (onmousedown != null)
      out.writeAttribute("onmousedown", onmousedown, "onmousedown");
    if (onmousemove != null)
      out.writeAttribute("onmousemove", onmousemove, "onmousemove");
    if (onmouseout != null)
      out.writeAttribute("onmouseout", onmouseout, "onmouseout");
    if (onmouseover != null)
      out.writeAttribute("onmouseover", onmouseover, "onmouseover");
    if (onmouseup != null)
      out.writeAttribute("onmouseup", onmouseup, "onmouseup");
    if (rel != null)
      out.writeAttribute("rel", rel, "rel");
    if (rev != null)
      out.writeAttribute("rev", rev, "rev");
    if (shape != null)
      out.writeAttribute("shape", shape, "shape");
    if (style != null)
      out.writeAttribute("style", style, "style");
    if (styleClass != null)
      out.writeAttribute("class", styleClass, "class");
    if (tabindex != null)
      out.writeAttribute("tabindex", tabindex, "tabindex");
    if (title != null)
      out.writeAttribute("title", title, "title");
    if (type != null)
      out.writeAttribute("type", type, "type");
    if (value != null)
      out.writeText(toString(context, component, value), "value");
    final int childCount = component.getChildCount();
    if (childCount > 0) {
      List<UIComponent> children = component.getChildren();
      for (int i = 0; i < childCount; i++) {
	UIComponent child = children.get(i);
	if (child instanceof UIParameter) {
	}
	else if (child.isRendered()) {
	  child.encodeBegin(context);
	  child.encodeChildren(context);
	  child.encodeEnd(context);
	}
      }
    }
    if (disabled)
      out.endElement("span");
    else
      out.endElement("a");
  }


Input:
	public void start() throws Exception {
		logger = LoggerFactory.getLogger(Main.class);
		final String PROACTIVE_PNP_PORT = DcepConstants.getProperties().getProperty("dcep.proactive.pnp.port");
		final String PROACTIVE_HTTP_PORT = DcepConstants.getProperties().getProperty("dcep.proactive.http.port");
		final String PROACTIVE_RMI_PORT = DcepConstants.getProperties().getProperty("dcep.proactive.rmi.port");
		logger.debug("Setting system property 'proactive.pnp.port' to: " + PROACTIVE_PNP_PORT);
		System.getProperties().setProperty("proactive.pnp.port", PROACTIVE_PNP_PORT);
		logger.debug("Setting system property 'proactive.http.port' to: " + PROACTIVE_HTTP_PORT);
		System.getProperties().setProperty("proactive.http.port", PROACTIVE_HTTP_PORT);
		logger.debug("Setting system property 'proactive.rmi.port' to: " + PROACTIVE_RMI_PORT);
		System.getProperties().setProperty("proactive.rmi.port", PROACTIVE_RMI_PORT);
		CentralPAPropertyRepository.JAVA_SECURITY_POLICY
				.setValue(propertiesFile);
		CentralPAPropertyRepository.GCM_PROVIDER
				.setValue("org.objectweb.proactive.core.component.Fractive");
		Factory factory = FactoryFactory.getFactory();
		HashMap<String, Object> context = new HashMap<String, Object>();
		root = (Component) factory.newComponent("PlayPlatform", context);
		GCM.getGCMLifeCycleController(root).startFc();
		boolean init = false;
		while (!init) {
			boolean overallInitStatus = true;
			for (Component subcomponent : GCM.getContentController(root)
					.getFcSubComponents()) {
				overallInitStatus = overallInitStatus
						&& GCM.getGCMLifeCycleController(subcomponent)
								.getFcState()
								.equals(LifeCycleController.STARTED);
			}
			if (overallInitStatus == true) {
				init = true;
			} else {
				logger.info("Wait for all subcomponents to be started...");
			}
			Thread.sleep(500);
		}
		QueryDispatchApi queryDispatchApi = ((eu.play_project.play_platformservices.api.QueryDispatchApi) root
				.getFcInterface("QueryDispatchApi"));
		for (String queryFileName : DcepConstants.getProperties()
				.getProperty("dcep.startup.registerqueries").split(",")) {
			queryFileName = queryFileName.trim();
			try {
				String queryString = IOUtils.toString(Main.class
						.getClassLoader().getResourceAsStream(queryFileName));
				logger.info(queryString);
				queryDispatchApi.registerQuery(queryFileName, queryString);
			} catch (QueryDispatchException e) {
				logger.warn("Error registering query {} on startup: {}",
						queryFileName, e.getMessage());
			}
		}
	}

Output:
	public void start() throws Exception {
		logger = LoggerFactory.getLogger(Main.class);
		final String PROACTIVE_PNP_PORT = DcepConstants.getProperties().getProperty("dcep.proactive.pnp.port");
		final String PROACTIVE_HTTP_PORT = DcepConstants.getProperties().getProperty("dcep.proactive.http.port");
		final String PROACTIVE_RMI_PORT = DcepConstants.getProperties().getProperty("dcep.proactive.rmi.port");
		logger.debug("Setting system property 'proactive.pnp.port' to: " + PROACTIVE_PNP_PORT);
		System.getProperties().setProperty("proactive.pnp.port", PROACTIVE_PNP_PORT);
		logger.debug("Setting system property 'proactive.http.port' to: " + PROACTIVE_HTTP_PORT);
		System.getProperties().setProperty("proactive.http.port", PROACTIVE_HTTP_PORT);
		logger.debug("Setting system property 'proactive.rmi.port' to: " + PROACTIVE_RMI_PORT);
		System.getProperties().setProperty("proactive.rmi.port", PROACTIVE_RMI_PORT);
		CentralPAPropertyRepository.JAVA_SECURITY_POLICY
				.setValue(propertiesFile);
		CentralPAPropertyRepository.GCM_PROVIDER
				.setValue("org.objectweb.proactive.core.component.Fractive");
		Factory factory = FactoryFactory.getFactory();
		HashMap<String, Object> context = new HashMap<String, Object>();
		root = (Component) factory.newComponent("PlayPlatform", context);
		GCM.getGCMLifeCycleController(root).startFc();
		boolean init = false;
		while (!init) {
			boolean overallInitStatus = true;
			for (Component subcomponent : GCM.getContentController(root)
					.getFcSubComponents()) {
				overallInitStatus = overallInitStatus
						&& GCM.getGCMLifeCycleController(subcomponent)
								.getFcState()
								.equals(LifeCycleController.STARTED);
			}
			if (overallInitStatus == true) {
				init = true;
			} else {
				logger.info("Wait for all subcomponents to be started...");
			}
			Thread.sleep(500);
		}
		QueryDispatchApi queryDispatchApi = ((eu.play_project.play_platformservices.api.QueryDispatchApi) root
				.getFcInterface("QueryDispatchApi"));
		for (String queryFileName : DcepConstants.getProperties()
				.getProperty("dcep.startup.registerqueries").split(",")) {
			queryFileName = queryFileName.trim();
			if (!queryFileName.isEmpty()) {
				try {
					String queryString = IOUtils.toString(Main.class
							.getClassLoader().getResourceAsStream(queryFileName));
					logger.info(queryString);
					queryDispatchApi.registerQuery(queryFileName, queryString);
				} catch (QueryDispatchException e) {
					logger.warn("Error registering query {} on startup: {}",
							queryFileName, e.getMessage());
				}
			}
		}
	}


Input:
  public TaskStatus run(final TaskToolbox toolbox) throws Exception
  {
    if (this.plumber != null) {
      throw new IllegalStateException("WTF?!? run with non-null plumber??!");
    }
    for (final TaskLock taskLock : toolbox.getTaskActionClient().submit(new LockListAction())) {
      toolbox.getTaskActionClient().submit(new LockReleaseAction(taskLock.getInterval()));
    }
    boolean normalExit = true;
    final Period intermediatePersistPeriod = fireDepartmentConfig.getIntermediatePersistPeriod();
    final Firehose firehose = firehoseFactory.connect();
    final RealtimePlumberSchool realtimePlumberSchool = new RealtimePlumberSchool(
        windowPeriod,
        new File(toolbox.getTaskWorkDir(), "persist"),
        segmentGranularity
    );
    final SegmentPublisher segmentPublisher = new TaskActionSegmentPublisher(this, toolbox);
    final DataSegmentAnnouncer lockingSegmentAnnouncer = new DataSegmentAnnouncer()
    {
      @Override
      public void announceSegment(final DataSegment segment) throws IOException
      {
        toolbox.getTaskActionClient().submit(new LockAcquireAction(segment.getInterval()));
        toolbox.getSegmentAnnouncer().announceSegment(segment);
      }
      @Override
      public void unannounceSegment(final DataSegment segment) throws IOException
      {
        try {
          toolbox.getSegmentAnnouncer().unannounceSegment(segment);
        }
        finally {
          toolbox.getTaskActionClient().submit(new LockReleaseAction(segment.getInterval()));
        }
      }
      @Override
      public void announceSegments(Iterable<DataSegment> segments) throws IOException
      {
        for (DataSegment segment : segments) {
          toolbox.getTaskActionClient().submit(new LockAcquireAction(segment.getInterval()));
        }
        toolbox.getSegmentAnnouncer().announceSegments(segments);
      }
      @Override
      public void unannounceSegments(Iterable<DataSegment> segments) throws IOException
      {
        try {
          toolbox.getSegmentAnnouncer().unannounceSegments(segments);
        }
        finally {
          for (DataSegment segment : segments) {
            toolbox.getTaskActionClient().submit(new LockReleaseAction(segment.getInterval()));
          }
        }
      }
    };
    final VersioningPolicy versioningPolicy = new VersioningPolicy()
    {
      @Override
      public String getVersion(final Interval interval)
      {
        try {
          final TaskLock myLock = toolbox.getTaskActionClient()
                                         .submit(new LockAcquireAction(interval));
          return myLock.getVersion();
        }
        catch (IOException e) {
          throw Throwables.propagate(e);
        }
      }
    };
    realtimePlumberSchool.setDataSegmentPusher(toolbox.getSegmentPusher());
    realtimePlumberSchool.setConglomerate(toolbox.getQueryRunnerFactoryConglomerate());
    realtimePlumberSchool.setVersioningPolicy(versioningPolicy);
    realtimePlumberSchool.setSegmentAnnouncer(lockingSegmentAnnouncer);
    realtimePlumberSchool.setSegmentPublisher(segmentPublisher);
    realtimePlumberSchool.setServerView(toolbox.getNewSegmentServerView());
    realtimePlumberSchool.setServiceEmitter(toolbox.getEmitter());
    if (this.rejectionPolicyFactory != null) {
      realtimePlumberSchool.setRejectionPolicyFactory(new NoopRejectionPolicyFactory());
    }
    final FireDepartment fireDepartment = new FireDepartment(schema, fireDepartmentConfig, null, null);
    final RealtimeMetricsMonitor metricsMonitor = new RealtimeMetricsMonitor(ImmutableList.of(fireDepartment));
    this.queryRunnerFactoryConglomerate = toolbox.getQueryRunnerFactoryConglomerate();
    this.plumber = realtimePlumberSchool.findPlumber(schema, fireDepartment.getMetrics());
    try {
      plumber.startJob();
      toolbox.getMonitorScheduler().addMonitor(metricsMonitor);
      long nextFlush = new DateTime().plus(intermediatePersistPeriod).getMillis();
      while (firehose.hasMore()) {
        final InputRow inputRow;
        try {
          inputRow = firehose.nextRow();
          if (inputRow == null) {
            continue;
          }
          final Sink sink = plumber.getSink(inputRow.getTimestampFromEpoch());
          if (sink == null) {
            fireDepartment.getMetrics().incrementThrownAway();
            log.debug("Throwing away event[%s]", inputRow);
            if (System.currentTimeMillis() > nextFlush) {
              plumber.persist(firehose.commit());
              nextFlush = new DateTime().plus(intermediatePersistPeriod).getMillis();
            }
            continue;
          }
          if (sink.isEmpty()) {
            log.info("Task %s: New sink: %s", getId(), sink);
          }
          int currCount = sink.add(inputRow);
          fireDepartment.getMetrics().incrementProcessed();
          if (currCount >= fireDepartmentConfig.getMaxRowsInMemory() || System.currentTimeMillis() > nextFlush) {
            plumber.persist(firehose.commit());
            nextFlush = new DateTime().plus(intermediatePersistPeriod).getMillis();
          }
        }
        catch (FormattedException e) {
          log.warn(e, "unparseable line");
          fireDepartment.getMetrics().incrementUnparseable();
        }
      }
    }
    catch (Exception e) {
      log.makeAlert(e, "Exception aborted realtime processing[%s]", schema.getDataSource())
         .emit();
      normalExit = false;
      throw Throwables.propagate(e);
    }
    finally {
      if (normalExit) {
        try {
          plumber.persist(firehose.commit());
          plumber.finishJob();
        }
        catch (Exception e) {
          log.makeAlert(e, "Failed to finish realtime task").emit();
        }
        finally {
          Closeables.closeQuietly(firehose);
          toolbox.getMonitorScheduler().removeMonitor(metricsMonitor);
        }
      }
    }
    return TaskStatus.success(getId());
  }

Output:
  public TaskStatus run(final TaskToolbox toolbox) throws Exception
  {
    if (this.plumber != null) {
      throw new IllegalStateException("WTF?!? run with non-null plumber??!");
    }
    for (final TaskLock taskLock : toolbox.getTaskActionClient().submit(new LockListAction())) {
      toolbox.getTaskActionClient().submit(new LockReleaseAction(taskLock.getInterval()));
    }
    boolean normalExit = true;
    final Period intermediatePersistPeriod = fireDepartmentConfig.getIntermediatePersistPeriod();
    final Firehose firehose = firehoseFactory.connect();
    final RealtimePlumberSchool realtimePlumberSchool = new RealtimePlumberSchool(
        windowPeriod,
        new File(toolbox.getTaskWorkDir(), "persist"),
        segmentGranularity
    );
    final SegmentPublisher segmentPublisher = new TaskActionSegmentPublisher(this, toolbox);
    final DataSegmentAnnouncer lockingSegmentAnnouncer = new DataSegmentAnnouncer()
    {
      @Override
      public void announceSegment(final DataSegment segment) throws IOException
      {
        toolbox.getTaskActionClient().submit(new LockAcquireAction(segment.getInterval()));
        toolbox.getSegmentAnnouncer().announceSegment(segment);
      }
      @Override
      public void unannounceSegment(final DataSegment segment) throws IOException
      {
        try {
          toolbox.getSegmentAnnouncer().unannounceSegment(segment);
        }
        finally {
          toolbox.getTaskActionClient().submit(new LockReleaseAction(segment.getInterval()));
        }
      }
      @Override
      public void announceSegments(Iterable<DataSegment> segments) throws IOException
      {
        for (DataSegment segment : segments) {
          toolbox.getTaskActionClient().submit(new LockAcquireAction(segment.getInterval()));
        }
        toolbox.getSegmentAnnouncer().announceSegments(segments);
      }
      @Override
      public void unannounceSegments(Iterable<DataSegment> segments) throws IOException
      {
        try {
          toolbox.getSegmentAnnouncer().unannounceSegments(segments);
        }
        finally {
          for (DataSegment segment : segments) {
            toolbox.getTaskActionClient().submit(new LockReleaseAction(segment.getInterval()));
          }
        }
      }
    };
    final VersioningPolicy versioningPolicy = new VersioningPolicy()
    {
      @Override
      public String getVersion(final Interval interval)
      {
        try {
          final TaskLock myLock = toolbox.getTaskActionClient()
                                         .submit(new LockAcquireAction(interval));
          return myLock.getVersion();
        }
        catch (IOException e) {
          throw Throwables.propagate(e);
        }
      }
    };
    realtimePlumberSchool.setDataSegmentPusher(toolbox.getSegmentPusher());
    realtimePlumberSchool.setConglomerate(toolbox.getQueryRunnerFactoryConglomerate());
    realtimePlumberSchool.setVersioningPolicy(versioningPolicy);
    realtimePlumberSchool.setSegmentAnnouncer(lockingSegmentAnnouncer);
    realtimePlumberSchool.setSegmentPublisher(segmentPublisher);
    realtimePlumberSchool.setServerView(toolbox.getNewSegmentServerView());
    realtimePlumberSchool.setServiceEmitter(toolbox.getEmitter());
    if (this.rejectionPolicyFactory != null) {
      realtimePlumberSchool.setRejectionPolicyFactory(rejectionPolicyFactory);
    }
    final FireDepartment fireDepartment = new FireDepartment(schema, fireDepartmentConfig, null, null);
    final RealtimeMetricsMonitor metricsMonitor = new RealtimeMetricsMonitor(ImmutableList.of(fireDepartment));
    this.queryRunnerFactoryConglomerate = toolbox.getQueryRunnerFactoryConglomerate();
    this.plumber = realtimePlumberSchool.findPlumber(schema, fireDepartment.getMetrics());
    try {
      plumber.startJob();
      toolbox.getMonitorScheduler().addMonitor(metricsMonitor);
      long nextFlush = new DateTime().plus(intermediatePersistPeriod).getMillis();
      while (firehose.hasMore()) {
        final InputRow inputRow;
        try {
          inputRow = firehose.nextRow();
          if (inputRow == null) {
            continue;
          }
          final Sink sink = plumber.getSink(inputRow.getTimestampFromEpoch());
          if (sink == null) {
            fireDepartment.getMetrics().incrementThrownAway();
            log.debug("Throwing away event[%s]", inputRow);
            if (System.currentTimeMillis() > nextFlush) {
              plumber.persist(firehose.commit());
              nextFlush = new DateTime().plus(intermediatePersistPeriod).getMillis();
            }
            continue;
          }
          if (sink.isEmpty()) {
            log.info("Task %s: New sink: %s", getId(), sink);
          }
          int currCount = sink.add(inputRow);
          fireDepartment.getMetrics().incrementProcessed();
          if (currCount >= fireDepartmentConfig.getMaxRowsInMemory() || System.currentTimeMillis() > nextFlush) {
            plumber.persist(firehose.commit());
            nextFlush = new DateTime().plus(intermediatePersistPeriod).getMillis();
          }
        }
        catch (FormattedException e) {
          log.warn(e, "unparseable line");
          fireDepartment.getMetrics().incrementUnparseable();
        }
      }
    }
    catch (Exception e) {
      log.makeAlert(e, "Exception aborted realtime processing[%s]", schema.getDataSource())
         .emit();
      normalExit = false;
      throw Throwables.propagate(e);
    }
    finally {
      if (normalExit) {
        try {
          plumber.persist(firehose.commit());
          plumber.finishJob();
        }
        catch (Exception e) {
          log.makeAlert(e, "Failed to finish realtime task").emit();
        }
        finally {
          Closeables.closeQuietly(firehose);
          toolbox.getMonitorScheduler().removeMonitor(metricsMonitor);
        }
      }
    }
    return TaskStatus.success(getId());
  }


Input:
    public int doStartTag() throws JspException {
        boolean beanNotPresent = getPageContext().findAttribute(binding) == null;
        try {
            final Configuration config = StripesFilter.getConfiguration();
            final ActionResolver resolver = StripesFilter.getConfiguration().getActionResolver();
            final HttpServletRequest request = (HttpServletRequest) getPageContext().getRequest();
            final HttpServletResponse response = (HttpServletResponse) getPageContext().getResponse();
            Resolution resolution = null;
            ExecutionContext ctx = new ExecutionContext();
            if (beanNotPresent) {
                ActionBeanContext tempContext =
                        config.getActionBeanContextFactory().getContextInstance(request, response);
                tempContext.setServletContext(getPageContext().getServletContext());
                ctx.setLifecycleStage(LifecycleStage.ActionBeanResolution);
                ctx.setActionBeanContext(tempContext);
                ctx.setInterceptors(config.getInterceptors(LifecycleStage.ActionBeanResolution));
                resolution = ctx.wrap( new Interceptor() {
                    public Resolution intercept(ExecutionContext ec) throws Exception {
                        ActionBean bean = resolver.getActionBean(ec.getActionBeanContext(), binding);
                        ec.setActionBean(bean);
                        return null;
                    }
                });
            }
            if (resolution == null && event != null && (beanNotPresent || this.alwaysExecuteEvent)) {
                ctx.setLifecycleStage(LifecycleStage.HandlerResolution);
                ctx.setInterceptors(config.getInterceptors(LifecycleStage.HandlerResolution));
                resolution = ctx.wrap( new Interceptor() {
                    public Resolution intercept(ExecutionContext ec) throws Exception {
                        ec.setHandler(resolver.getHandler(ec.getActionBean().getClass(), event));
                        ec.getActionBeanContext().setEventName(event);
                        return null;
                    }
                });
            }
            try {
                DispatcherHelper.setPageContext(getPageContext());
                if (resolution == null && (beanNotPresent || this.validate == true)) {
                    resolution = DispatcherHelper.doBindingAndValidation(ctx, this.validate);
                }
                if (resolution == null && this.validate == true) {
                    String temp =  config.getBootstrapPropertyResolver().getProperty(
                                        DispatcherServlet.RUN_CUSTOM_VALIDATION_WHEN_ERRORS);
                    boolean validateWhenErrors = temp != null && Boolean.valueOf(temp);
                    resolution = DispatcherHelper.doCustomValidation(ctx, validateWhenErrors);
                }
            }
            finally {
                DispatcherHelper.setPageContext(null);
            }
            if (resolution == null && this.validate == true) {
                resolution = DispatcherHelper.handleValidationErrors(ctx);
            }
            if (resolution == null && event != null && (beanNotPresent || this.alwaysExecuteEvent)) {
                resolution = DispatcherHelper.invokeEventHandler(ctx);
            }
            DispatcherHelper.fillInValidationErrors(ctx);
            if (resolution != null && this.executeResolution) {
                DispatcherHelper.executeResolution(ctx, resolution);
            }
            if (getVar() != null) {
                pageContext.setAttribute(getVar(), ctx.getActionBean());
            }
            return SKIP_BODY;
        }
        catch(Exception e) {
            throw new StripesJspException("Unabled to prepare ActionBean for JSP Usage",e);
        }
    }

Output:
    public int doStartTag() throws JspException {
        ActionBean actionBean = (ActionBean) getPageContext().findAttribute(binding);
        boolean beanNotPresent = actionBean == null;
        try {
            final Configuration config = StripesFilter.getConfiguration();
            final ActionResolver resolver = StripesFilter.getConfiguration().getActionResolver();
            final HttpServletRequest request = (HttpServletRequest) getPageContext().getRequest();
            final HttpServletResponse response = (HttpServletResponse) getPageContext().getResponse();
            Resolution resolution = null;
            ExecutionContext ctx = new ExecutionContext();
            if (beanNotPresent) {
                ActionBeanContext tempContext =
                        config.getActionBeanContextFactory().getContextInstance(request, response);
                tempContext.setServletContext(getPageContext().getServletContext());
                ctx.setLifecycleStage(LifecycleStage.ActionBeanResolution);
                ctx.setActionBeanContext(tempContext);
                ctx.setInterceptors(config.getInterceptors(LifecycleStage.ActionBeanResolution));
                resolution = ctx.wrap( new Interceptor() {
                    public Resolution intercept(ExecutionContext ec) throws Exception {
                        ActionBean bean = resolver.getActionBean(ec.getActionBeanContext(), binding);
                        ec.setActionBean(bean);
                        return null;
                    }
                });
            }
            else {
                ctx.setActionBean(actionBean);
                ctx.setActionBeanContext(actionBean.getContext());
            }
            if (resolution == null && event != null && (beanNotPresent || this.alwaysExecuteEvent)) {
                ctx.setLifecycleStage(LifecycleStage.HandlerResolution);
                ctx.setInterceptors(config.getInterceptors(LifecycleStage.HandlerResolution));
                resolution = ctx.wrap( new Interceptor() {
                    public Resolution intercept(ExecutionContext ec) throws Exception {
                        ec.setHandler(resolver.getHandler(ec.getActionBean().getClass(), event));
                        ec.getActionBeanContext().setEventName(event);
                        return null;
                    }
                });
            }
            try {
                DispatcherHelper.setPageContext(getPageContext());
                if (resolution == null && (beanNotPresent || this.validate == true)) {
                    resolution = DispatcherHelper.doBindingAndValidation(ctx, this.validate);
                }
                if (resolution == null && this.validate == true) {
                    String temp =  config.getBootstrapPropertyResolver().getProperty(
                                        DispatcherServlet.RUN_CUSTOM_VALIDATION_WHEN_ERRORS);
                    boolean validateWhenErrors = temp != null && Boolean.valueOf(temp);
                    resolution = DispatcherHelper.doCustomValidation(ctx, validateWhenErrors);
                }
            }
            finally {
                DispatcherHelper.setPageContext(null);
            }
            if (resolution == null && this.validate == true) {
                resolution = DispatcherHelper.handleValidationErrors(ctx);
            }
            if (resolution == null && event != null && (beanNotPresent || this.alwaysExecuteEvent)) {
                resolution = DispatcherHelper.invokeEventHandler(ctx);
            }
            DispatcherHelper.fillInValidationErrors(ctx);
            if (resolution != null && this.executeResolution) {
                DispatcherHelper.executeResolution(ctx, resolution);
            }
            if (getVar() != null) {
                pageContext.setAttribute(getVar(), ctx.getActionBean());
            }
            return SKIP_BODY;
        }
        catch(Exception e) {
            throw new StripesJspException("Unabled to prepare ActionBean for JSP Usage",e);
        }
    }


Input:
	private void parseClassification(BufferedReader buffer) throws IOException {
		String line = null;
		int counter = 0;
		while ((line = buffer.readLine ()) != null) {
			if ( line.startsWith("#"))
				continue;
			String[] spl  = line.split("\t");
			if ( spl.length != 6){
				System.err.println("Can't parse line " + line);
				continue;
			}
			counter++;
			String scopId = spl[0];
			String pdbId = spl[1];
			String range = spl[2];
			String classificationId = spl[3];
			Integer sunid = Integer.parseInt(spl[4]);
			String tree = spl[5];
			ScopDomain d = new ScopDomain();
			d.setScopId(scopId);
			d.setPdbId(pdbId);
			d.setRanges(extractRanges(range));
			d.setClassificationId(classificationId);
			d.setSunid(sunid);
			String[] treeSplit = tree.split(",");
			if (  treeSplit.length != 7 ) {
				System.err.println("can't process: " + tree );
			}
			int classId =Integer.parseInt(treeSplit[0].substring(3));
			int foldId = Integer.parseInt(treeSplit[1].substring(3));
			int superfamilyId = Integer.parseInt(treeSplit[2].substring(3));
			int familyId = Integer.parseInt(treeSplit[3].substring(3));
			int domainId = Integer.parseInt(treeSplit[4].substring(3));
			int speciesId = Integer.parseInt(treeSplit[5].substring(3));
			int px = Integer.parseInt(treeSplit[6].substring(3));
			d.setClassId(classId);
			d.setFoldId(foldId);
			d.setSuperfamilyId(superfamilyId);
			d.setFamilyId(familyId);
			d.setDomainId(domainId);
			d.setSpeciesId(speciesId);
			d.setPx(px);
			List<ScopDomain> domainList;
			if ( domainMap.containsKey(pdbId)){
				domainList = domainMap.get(pdbId);
			} else {
				domainList = new ArrayList<ScopDomain>();
				domainMap.put(pdbId,domainList);
			}
			domainList.add(d);
			if ( sunid == 47763)
				System.out.println("FOUND DOMAIN!!!! " + sunid + " " + d);
		}
		System.out.println("parsed "+ counter + " scop sunid domains.");
	}

Output:
	private void parseClassification(BufferedReader buffer) throws IOException {
		String line = null;
		int counter = 0;
		while ((line = buffer.readLine ()) != null) {
			if ( line.startsWith("#"))
				continue;
			String[] spl  = line.split("\t");
			if ( spl.length != 6){
				System.err.println("Can't parse line " + line);
				continue;
			}
			counter++;
			String scopId = spl[0];
			String pdbId = spl[1];
			String range = spl[2];
			String classificationId = spl[3];
			Integer sunid = Integer.parseInt(spl[4]);
			String tree = spl[5];
			ScopDomain d = new ScopDomain();
			d.setScopId(scopId);
			d.setPdbId(pdbId);
			d.setRanges(extractRanges(range));
			d.setClassificationId(classificationId);
			d.setSunid(sunid);
			String[] treeSplit = tree.split(",");
			if (  treeSplit.length != 7 ) {
				System.err.println("can't process: " + line );
			}
			int classId =Integer.parseInt(treeSplit[0].substring(3));
			int foldId = Integer.parseInt(treeSplit[1].substring(3));
			int superfamilyId = Integer.parseInt(treeSplit[2].substring(3));
			int familyId = Integer.parseInt(treeSplit[3].substring(3));
			int domainId = Integer.parseInt(treeSplit[4].substring(3));
			int speciesId = Integer.parseInt(treeSplit[5].substring(3));
			int px = Integer.parseInt(treeSplit[6].substring(3));
			d.setClassId(classId);
			d.setFoldId(foldId);
			d.setSuperfamilyId(superfamilyId);
			d.setFamilyId(familyId);
			d.setDomainId(domainId);
			d.setSpeciesId(speciesId);
			d.setPx(px);
			List<ScopDomain> domainList;
			if ( domainMap.containsKey(pdbId)){
				domainList = domainMap.get(pdbId);
			} else {
				domainList = new ArrayList<ScopDomain>();
				domainMap.put(pdbId,domainList);
			}
			domainList.add(d);
			if ( sunid == 47763)
				System.out.println("FOUND DOMAIN!!!! " + sunid + " " + d);
		}
		System.out.println("parsed "+ counter + " scop sunid domains.");
	}


Input:
	public void generateMail(List<Person> list, String lableTemplateName, String mailingTemplateName) {
		setTemplateName(mailingTemplateName);
		setLabelTemplateName(lableTemplateName);
		Person p = list.get(0);
		Site s = p.getSite();
		setSite(s);
		ArrayList<Long> ids = new ArrayList<Long>();
		for (Person person : list) {
			ids.add(person.getId());
			CommunicationHistory ch = new CommunicationHistory();
			ch.setPerson(person);
			ch.setSystemGenerated(true);
			ch.setComments("Generated mailing using template named " + getTemplateName());
			ch.setEntryType("Email");
			ch.setRecordDate(new Date());
			ch.setCustomFieldValue("template", getTemplateName());
			communicationHistoryService.maintainCommunicationHistory(ch);
		}
		Map params = getReportParameters();
		params.clear();
		params.put("Ids", ids);
		this.labelMap.clear();
		this.labelMap.put("Ids", ids);
		File tempLabelFile = runLabels();
		File tempFile = runReport();
		ResourceDescriptor labelRD = new ResourceDescriptor();
		ResourceDescriptor reportRD = new ResourceDescriptor();
		Date date = new Date();
		DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
		try {
			labelRD.setName(getLabelTemplateName() + dateFormat.format(date));
			labelRD.setLabel(labelRD.getName());
			labelRD.setDescription(labelRD.getName());
			labelRD.setParentFolder("/Reports/" + getSite().getName() + "/Content_files");
			labelRD.setUriString(labelRD.getParentFolder() + "/" + labelRD.getName());
			labelRD.setWsType(labelRD.TYPE_CONTENT_RESOURCE);
			labelRD.setResourceProperty(ResourceDescriptor.PROP_CONTENT_RESOURCE_TYPE,ResourceDescriptor.CONTENT_TYPE_PDF);
			labelRD.setIsNew(true);
			labelRD.setHasData(true);
			{
				RequestAttachment[] attachments;
				FileDataSource fileDataSource = new FileDataSource(tempLabelFile);
				RequestAttachment attachment = new RequestAttachment(fileDataSource);
				attachment.setContentID(labelRD.getName());
				attachments = new RequestAttachment[]{attachment};
			jserver.getWSClient().putResource(labelRD, attachments);
			}
			reportRD.setName(getTemplateName() + dateFormat.format(date));
			reportRD.setLabel(reportRD.getName());
			reportRD.setDescription(reportRD.getName());
			reportRD.setParentFolder("/Reports/" + getSite().getName() + "/Content_files");
			reportRD.setUriString(reportRD.getParentFolder() + "/" + reportRD.getName());
			reportRD.setWsType(reportRD.TYPE_CONTENT_RESOURCE);
			reportRD.setResourceProperty(ResourceDescriptor.PROP_CONTENT_RESOURCE_TYPE,ResourceDescriptor.CONTENT_TYPE_PDF);
			reportRD.setIsNew(true);
			reportRD.setHasData(true);
			{
				RequestAttachment[] attachments;
				FileDataSource fileDataSource = new FileDataSource(tempFile);
				RequestAttachment attachment = new RequestAttachment(fileDataSource);
				attachment.setContentID(reportRD.getName());
				attachments = new RequestAttachment[]{attachment};
				jserver.getWSClient().putResource(reportRD, attachments);
			}
			tempLabelFile.delete();
			tempFile.delete();
		} catch (Exception ex) {
			logger.error(ex.getMessage());
		}
	}

Output:
	public void generateMail(List<Person> list, String lableTemplateName, String mailingTemplateName) {
		setTemplateName(mailingTemplateName);
		setLabelTemplateName(lableTemplateName);
		Person p = list.get(0);
		Site s = p.getSite();
		setSite(s);
		ArrayList<Long> ids = new ArrayList<Long>();
		for (Person person : list) {
			ids.add(person.getId());
			CommunicationHistory ch = new CommunicationHistory();
			ch.setPerson(person);
			ch.setSystemGenerated(true);
			ch.setComments("Generated mailing using template named " + getTemplateName());
			ch.setEntryType("Mail");
			ch.setRecordDate(new Date());
			ch.setCustomFieldValue("template", getTemplateName());
			communicationHistoryService.maintainCommunicationHistory(ch);
		}
		Map params = getReportParameters();
		params.clear();
		params.put("Ids", ids);
		this.labelMap.clear();
		this.labelMap.put("Ids", ids);
		File tempLabelFile = runLabels();
		File tempFile = runReport();
		ResourceDescriptor labelRD = new ResourceDescriptor();
		ResourceDescriptor reportRD = new ResourceDescriptor();
		Date date = new Date();
		DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
		try {
			labelRD.setName(getLabelTemplateName() + dateFormat.format(date));
			labelRD.setLabel(labelRD.getName());
			labelRD.setDescription(labelRD.getName());
			labelRD.setParentFolder("/Reports/" + getSite().getName() + "/Content_files");
			labelRD.setUriString(labelRD.getParentFolder() + "/" + labelRD.getName());
			labelRD.setWsType(labelRD.TYPE_CONTENT_RESOURCE);
			labelRD.setResourceProperty(ResourceDescriptor.PROP_CONTENT_RESOURCE_TYPE,ResourceDescriptor.CONTENT_TYPE_PDF);
			labelRD.setIsNew(true);
			labelRD.setHasData(true);
			{
				RequestAttachment[] attachments;
				FileDataSource fileDataSource = new FileDataSource(tempLabelFile);
				RequestAttachment attachment = new RequestAttachment(fileDataSource);
				attachment.setContentID(labelRD.getName());
				attachments = new RequestAttachment[]{attachment};
			jserver.getWSClient().putResource(labelRD, attachments);
			}
			reportRD.setName(getTemplateName() + dateFormat.format(date));
			reportRD.setLabel(reportRD.getName());
			reportRD.setDescription(reportRD.getName());
			reportRD.setParentFolder("/Reports/" + getSite().getName() + "/Content_files");
			reportRD.setUriString(reportRD.getParentFolder() + "/" + reportRD.getName());
			reportRD.setWsType(reportRD.TYPE_CONTENT_RESOURCE);
			reportRD.setResourceProperty(ResourceDescriptor.PROP_CONTENT_RESOURCE_TYPE,ResourceDescriptor.CONTENT_TYPE_PDF);
			reportRD.setIsNew(true);
			reportRD.setHasData(true);
			{
				RequestAttachment[] attachments;
				FileDataSource fileDataSource = new FileDataSource(tempFile);
				RequestAttachment attachment = new RequestAttachment(fileDataSource);
				attachment.setContentID(reportRD.getName());
				attachments = new RequestAttachment[]{attachment};
				jserver.getWSClient().putResource(reportRD, attachments);
			}
			tempLabelFile.delete();
			tempFile.delete();
		} catch (Exception ex) {
			logger.error(ex.getMessage());
		}
	}


Input:
    public boolean isValidMention(String[] text, int startIndex, int endIndex) {
        int noBrands = 0;
        for(int i=startIndex; i<=endIndex; i++) {
            if(brandnames.contains(text[i]))
                noBrands++;
        }
        if(noBrands>1)
            return false;
        if(startIndex==endIndex && noBrands==1)
            return false;
        return false;
    }

Output:
    public boolean isValidMention(String[] text, int startIndex, int endIndex) {
        int noBrands = 0;
        for(int i=startIndex; i<=endIndex; i++) {
            if(brandnames.contains(text[i]))
                noBrands++;
        }
        if(noBrands>1)
            return false;
        if(startIndex==endIndex && noBrands==1)
            return false;
        return true;
    }


Input:
	public AppControllerImpl(@CotrixBus EventBus cotrixBus, CotrixWebPresenter cotrixWebPresenter) {
		this.cotrixBus = cotrixBus;
		this.cotrixWebPresenter = cotrixWebPresenter;
		bind();
		initMenu();
		initUserBar();
		Home home = new Home();
		addModule(home);
		CotrixImportAppGinInjector importInjector = CotrixImportAppGinInjector.INSTANCE;
		addModule(importInjector.getController());
		CotrixManagerAppGinInjector managerInjector = CotrixManagerAppGinInjector.INSTANCE;
		addModule(managerInjector.getController());
		showModule(CotrixModule.HOME);
	}

Output:
	public AppControllerImpl(@CotrixBus EventBus cotrixBus, CotrixWebPresenter cotrixWebPresenter) {
		this.cotrixBus = cotrixBus;
		this.cotrixWebPresenter = cotrixWebPresenter;
		bind();
		initMenu();
		initUserBar();
		Home home = new Home();
		addModule(home);
		CotrixImportAppGinInjector importInjector = CotrixImportAppGinInjector.INSTANCE;
		addModule(importInjector.getController());
		CotrixManagerAppGinInjector managerInjector = CotrixManagerAppGinInjector.INSTANCE;
		addModule(managerInjector.getController());
		showModule(CotrixModule.MANAGE);
	}


Input:
	public String[] getCoverUrl(String artist, String album, String path, String filename) throws Exception {
		String musicPath = settings.getString("musicPath", "music/");
		FILENAMES[0] = settings.getString("coverFileName", null);
		if (musicPath != null) {
			final String serverName = app.oMPDAsyncHelper.getConnectionSettings().sServer;
			String url;
			final List<String> urls = new ArrayList<String>();
			boolean secondFilenamePlaceholder = false;
			for (String lfilename : FILENAMES) {
				if (lfilename == null || (lfilename.startsWith("%") && !lfilename.equals(PLACEHOLDER_FILENAME)))
					continue;
				if (lfilename.equals(PLACEHOLDER_FILENAME)) {
					final int dotIndex = filename.lastIndexOf('.');
					if (dotIndex == -1)
						continue;
					lfilename = filename.substring(0, dotIndex) + (secondFilenamePlaceholder ? ".png" : ".jpg");
					secondFilenamePlaceholder = true;
				}
				url = String.format(URL, new Object[] { musicPath, path.replaceAll(" ", "%20"), lfilename });
				url = musicPath.toLowerCase().startsWith(URL_PREFIX) ? url : (URL_PREFIX + serverName + "/" + url);
				if (!urls.contains(url))
					urls.add(url);
			}
			return (String[]) urls.toArray();
		} else {
			return null;
		}
	}

Output:
	public String[] getCoverUrl(String artist, String album, String path, String filename) throws Exception {
		String musicPath = settings.getString("musicPath", "music/");
		FILENAMES[0] = settings.getString("coverFileName", null);
		if (musicPath != null) {
			final String serverName = app.oMPDAsyncHelper.getConnectionSettings().sServer;
			String url;
			final List<String> urls = new ArrayList<String>();
			boolean secondFilenamePlaceholder = false;
			for (String lfilename : FILENAMES) {
				if (lfilename == null || (lfilename.startsWith("%") && !lfilename.equals(PLACEHOLDER_FILENAME)))
					continue;
				if (lfilename.equals(PLACEHOLDER_FILENAME)) {
					final int dotIndex = filename.lastIndexOf('.');
					if (dotIndex == -1)
						continue;
					lfilename = filename.substring(0, dotIndex) + (secondFilenamePlaceholder ? ".png" : ".jpg");
					secondFilenamePlaceholder = true;
				}
				url = String.format(URL, new Object[] { musicPath, path.replaceAll(" ", "%20"), lfilename });
				url = musicPath.toLowerCase().startsWith(URL_PREFIX) ? url : (URL_PREFIX + serverName + "/" + url);
				if (!urls.contains(url))
					urls.add(url);
			}
			return urls.toArray(new String[urls.size()]);
		} else {
			return null;
		}
	}


Input:
    public DataTypeDeclNode(ParameterListNode pl) {
    	this.pl=pl;
    }

Output:
	public DataTypeDeclNode(ParameterListNode pl) {
		this.pl=pl;
	}


Input:
    private RomDetail( ConfigSection section, String computedMd5 )
    {
        if( sConfigFile == null )
            throw new IllegalStateException(
                    "RomDetail#initializeDatabase must be called before any other RomDetail method" );
        String _md5 = null;
        String _crc = null;
        String _goodName = null;
        String _baseName = null;
        String _artUrl = null;
        String _saveType = null;
        int _status = 0;
        int _players = 0;
        boolean _rumble = false;
        if( section != null )
        {
            _md5 = section.name.equals( computedMd5 ) ? computedMd5 : null;
            _crc = section.get( "CRC" );
            if( "00000000 00000000".equals( _crc ) )
                _goodName = "";
            else
                _goodName = section.get( "GoodName" );
            _baseName = _goodName == null ? null : _goodName.split( " \\(" )[0].trim();
            _artUrl = _baseName == null ? null : String.format( URL_TEMPLATE,
                    _baseName.replace( ' ', '_' ).replace( "'", "" ) );
            String refMd5 = section.get( "RefMD5" );
            if( !TextUtils.isEmpty( refMd5 ) )
                section = sConfigFile.get( refMd5 );
            if( section != null )
            {
                _saveType = section.get( "SaveType" );
                String statusString = section.get( "Status" );
                String playersString = section.get( "Players" );
                _status = TextUtils.isEmpty( statusString ) ? 0 : Integer.parseInt( statusString );
                _players = TextUtils.isEmpty( playersString ) ? 0 : Integer.parseInt( playersString );
                _rumble = "Yes".equals( section.get( "Rumble" ) );
            }
        }
        md5 = _md5;
        goodName = _md5 == null ? null : _goodName;
        baseName = _baseName;
        artUrl = _artUrl;
        crc = _crc;
        saveType = _saveType;
        status = _status;
        players = _players;
        rumble = _rumble;
    }

Output:
    private RomDetail( ConfigSection section, String computedMd5 )
    {
        if( sConfigFile == null )
            throw new IllegalStateException(
                    "RomDetail#initializeDatabase must be called before any other RomDetail method" );
        String _md5 = null;
        String _crc = null;
        String _goodName = null;
        String _baseName = null;
        String _artUrl = null;
        String _saveType = null;
        int _status = 0;
        int _players = 0;
        boolean _rumble = false;
        if( section != null )
        {
            _md5 = section.name.equals( computedMd5 ) ? computedMd5 : null;
            _crc = section.get( "CRC" );
            if( "00000000 00000000".equals( _crc ) )
                _goodName = "";
            else
                _goodName = section.get( "GoodName" );
            _baseName = _goodName == null ? null : _goodName.split( " \\(" )[0].trim();
            _artUrl = _baseName == null ? null : String.format( URL_TEMPLATE,
                    _baseName.replace( ' ', '_' ).replace( "'", "" ).replace( '-', '_' ) );
            String refMd5 = section.get( "RefMD5" );
            if( !TextUtils.isEmpty( refMd5 ) )
                section = sConfigFile.get( refMd5 );
            if( section != null )
            {
                _saveType = section.get( "SaveType" );
                String statusString = section.get( "Status" );
                String playersString = section.get( "Players" );
                _status = TextUtils.isEmpty( statusString ) ? 0 : Integer.parseInt( statusString );
                _players = TextUtils.isEmpty( playersString ) ? 0 : Integer.parseInt( playersString );
                _rumble = "Yes".equals( section.get( "Rumble" ) );
            }
        }
        md5 = _md5;
        goodName = _md5 == null ? null : _goodName;
        baseName = _baseName;
        artUrl = _artUrl;
        crc = _crc;
        saveType = _saveType;
        status = _status;
        players = _players;
        rumble = _rumble;
    }


Input:
    public void onEnable() {
        this.core = (MultiverseCore) getServer().getPluginManager().getPlugin("Multiverse-Core");
        if (this.core == null) {
            log.info(logPrefix + "Multiverse-Core not found, will keep looking.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        if (this.core.getProtocolVersion() < requiresProtocol) {
            log.severe(logPrefix + "Your Multiverse-Core is OUT OF DATE");
            log.severe(logPrefix + "This version of SignPortals requires Protocol Level: " + requiresProtocol);
            log.severe(logPrefix + "Your of Core Protocol Level is: " + this.core.getProtocolVersion());
            log.severe(logPrefix + "Grab an updated copy at: ");
            log.severe(logPrefix + "http://bukkit.onarandombox.com/?dir=multiverse-core");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        debugLog = new DebugLog("Multiverse-NetherPortals", getDataFolder() + File.separator + "debug.log");
        this.core.incrementPluginCount();
        this.pluginListener = new MVNPPluginListener(this);
        this.playerListener = new MVNPPlayerListener(this);
        this.entityListener = new MVNPEntityListener(this);
        this.customListener = new MVNPConfigReloadListener(this);
        this.getServer().getPluginManager().registerEvent(Type.PLUGIN_ENABLE, this.pluginListener, Priority.Normal, this);
        this.getServer().getPluginManager().registerEvent(Type.PLAYER_PORTAL, this.playerListener, Priority.Normal, this);
        this.getServer().getPluginManager().registerEvent(Type.CUSTOM_EVENT, this.customListener, Priority.Normal, this);
        this.getServer().getPluginManager().registerEvent(Type.ENTITY_PORTAL_ENTER, this.entityListener, Priority.Monitor, this);
        log.info(logPrefix + "- Version " + this.getDescription().getVersion() + " Enabled - By " + getAuthors());
        loadConfig();
        this.registerCommands();
    }

Output:
    public void onEnable() {
        this.core = (MultiverseCore) getServer().getPluginManager().getPlugin("Multiverse-Core");
        if (this.core == null) {
            log.info(logPrefix + "Multiverse-Core not found, will keep looking.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        if (this.core.getProtocolVersion() < requiresProtocol) {
            log.severe(logPrefix + "Your Multiverse-Core is OUT OF DATE");
            log.severe(logPrefix + "This version of NetherPortals requires Protocol Level: " + requiresProtocol);
            log.severe(logPrefix + "Your of Core Protocol Level is: " + this.core.getProtocolVersion());
            log.severe(logPrefix + "Grab an updated copy at: ");
            log.severe(logPrefix + "http://bukkit.onarandombox.com/?dir=multiverse-core");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        debugLog = new DebugLog("Multiverse-NetherPortals", getDataFolder() + File.separator + "debug.log");
        this.core.incrementPluginCount();
        this.pluginListener = new MVNPPluginListener(this);
        this.playerListener = new MVNPPlayerListener(this);
        this.entityListener = new MVNPEntityListener(this);
        this.customListener = new MVNPConfigReloadListener(this);
        this.getServer().getPluginManager().registerEvent(Type.PLUGIN_ENABLE, this.pluginListener, Priority.Normal, this);
        this.getServer().getPluginManager().registerEvent(Type.PLAYER_PORTAL, this.playerListener, Priority.Normal, this);
        this.getServer().getPluginManager().registerEvent(Type.CUSTOM_EVENT, this.customListener, Priority.Normal, this);
        this.getServer().getPluginManager().registerEvent(Type.ENTITY_PORTAL_ENTER, this.entityListener, Priority.Monitor, this);
        log.info(logPrefix + "- Version " + this.getDescription().getVersion() + " Enabled - By " + getAuthors());
        loadConfig();
        this.registerCommands();
    }


Input:
  private static boolean checkControlFlow(Statement statement, Set<Variable> initializedVariables) throws ConceptualException
  {
    if (statement instanceof AssignStatement)
    {
      AssignStatement assign = (AssignStatement) statement;
      checkUninitializedVariables(assign.getExpression(), initializedVariables);
      initializedVariables.add(assign.getResolvedVariable());
      return false;
    }
    else if (statement instanceof Block)
    {
      boolean returned = false;
      for (Statement s : ((Block) statement).getStatements())
      {
        if (returned)
        {
          throw new ConceptualException("Unreachable code", s.getLexicalPhrase());
        }
        returned = checkControlFlow(s, initializedVariables);
      }
      return returned;
    }
    else if (statement instanceof IfStatement)
    {
      IfStatement ifStatement = (IfStatement) statement;
      checkUninitializedVariables(ifStatement.getExpression(), initializedVariables);
      Statement thenClause = ifStatement.getThenClause();
      Statement elseClause = ifStatement.getElseClause();
      if (elseClause == null)
      {
        Set<Variable> thenClauseVariables = new HashSet<Variable>(initializedVariables);
        checkControlFlow(thenClause, thenClauseVariables);
        return false;
      }
      Set<Variable> thenClauseVariables = new HashSet<Variable>(initializedVariables);
      Set<Variable> elseClauseVariables = new HashSet<Variable>(initializedVariables);
      boolean returned = checkControlFlow(thenClause, thenClauseVariables) & checkControlFlow(elseClause, elseClauseVariables);
      for (Variable var : thenClauseVariables)
      {
        if (elseClauseVariables.contains(var))
        {
          initializedVariables.add(var);
        }
      }
      return returned;
    }
    else if (statement instanceof ReturnStatement)
    {
      checkUninitializedVariables(((ReturnStatement) statement).getExpression(), initializedVariables);
      return true;
    }
    else if (statement instanceof VariableDefinition)
    {
      VariableDefinition definition = (VariableDefinition) statement;
      if (definition.getExpression() != null)
      {
        checkUninitializedVariables(definition.getExpression(), initializedVariables);
        initializedVariables.add(definition.getVariable());
      }
      return false;
    }
    else if (statement instanceof WhileStatement)
    {
      WhileStatement whileStatement = (WhileStatement) statement;
      checkUninitializedVariables(whileStatement.getExpression(), initializedVariables);
      Set<Variable> loopVariables = new HashSet<Variable>(initializedVariables);
      return checkControlFlow(whileStatement.getStatement(), loopVariables);
    }
    throw new ConceptualException("Internal control flow checking error: Unknown statement type", statement.getLexicalPhrase());
  }

Output:
  private static boolean checkControlFlow(Statement statement, Set<Variable> initializedVariables) throws ConceptualException
  {
    if (statement instanceof AssignStatement)
    {
      AssignStatement assign = (AssignStatement) statement;
      checkUninitializedVariables(assign.getExpression(), initializedVariables);
      initializedVariables.add(assign.getResolvedVariable());
      return false;
    }
    else if (statement instanceof Block)
    {
      boolean returned = false;
      for (Statement s : ((Block) statement).getStatements())
      {
        if (returned)
        {
          throw new ConceptualException("Unreachable code", s.getLexicalPhrase());
        }
        returned = checkControlFlow(s, initializedVariables);
      }
      return returned;
    }
    else if (statement instanceof IfStatement)
    {
      IfStatement ifStatement = (IfStatement) statement;
      checkUninitializedVariables(ifStatement.getExpression(), initializedVariables);
      Statement thenClause = ifStatement.getThenClause();
      Statement elseClause = ifStatement.getElseClause();
      if (elseClause == null)
      {
        Set<Variable> thenClauseVariables = new HashSet<Variable>(initializedVariables);
        checkControlFlow(thenClause, thenClauseVariables);
        return false;
      }
      Set<Variable> thenClauseVariables = new HashSet<Variable>(initializedVariables);
      Set<Variable> elseClauseVariables = new HashSet<Variable>(initializedVariables);
      boolean thenReturned = checkControlFlow(thenClause, thenClauseVariables);
      boolean elseReturned = checkControlFlow(elseClause, elseClauseVariables);
      if (!thenReturned && !elseReturned)
      {
        for (Variable var : thenClauseVariables)
        {
          if (elseClauseVariables.contains(var))
          {
            initializedVariables.add(var);
          }
        }
      }
      else if (!thenReturned && elseReturned)
      {
        initializedVariables.addAll(thenClauseVariables);
      }
      else if (thenReturned && !elseReturned)
      {
        initializedVariables.addAll(elseClauseVariables);
      }
      return thenReturned && elseReturned;
    }
    else if (statement instanceof ReturnStatement)
    {
      checkUninitializedVariables(((ReturnStatement) statement).getExpression(), initializedVariables);
      return true;
    }
    else if (statement instanceof VariableDefinition)
    {
      VariableDefinition definition = (VariableDefinition) statement;
      if (definition.getExpression() != null)
      {
        checkUninitializedVariables(definition.getExpression(), initializedVariables);
        initializedVariables.add(definition.getVariable());
      }
      return false;
    }
    else if (statement instanceof WhileStatement)
    {
      WhileStatement whileStatement = (WhileStatement) statement;
      checkUninitializedVariables(whileStatement.getExpression(), initializedVariables);
      Set<Variable> loopVariables = new HashSet<Variable>(initializedVariables);
      return checkControlFlow(whileStatement.getStatement(), loopVariables);
    }
    throw new ConceptualException("Internal control flow checking error: Unknown statement type", statement.getLexicalPhrase());
  }


Input:
	public Object executeProgram(String main, IValue[] args) {
		for (Function f : functionStore) {
			f.finalize(functionMap, constructorMap, listing);
		}
		Function init_function = functionStore.get(functionMap.get("#module_init"));
		if (init_function == null) {
			throw new RuntimeException("PANIC: Code for #module_init not found");
		}
		if (init_function.nformals != 0) {
			throw new RuntimeException("PANIC: " + "function \"#module_init\" should have one argument");
		}
		Function main_function = functionStore.get(functionMap.get("main"));
		if (main_function == null) {
			throw new RuntimeException("PANIC: No function \"main\" found");
		}
		if (main_function.nformals != 1) {
					throw new RuntimeException("PANIC: function \"main\" should have one argument");
		}
		Frame cf = new Frame(0, null, init_function.maxstack, init_function);
		Frame root = cf;
		Object[] stack = cf.stack;
		stack[0] = args;
		int[] instructions = init_function.codeblock.getInstructions();
		int pc = 0;
		int sp = init_function.nlocals;
		Stack<Coroutine> activeCoroutines = new Stack<>();
		Frame ccf = null;
		try {
			NEXT_INSTRUCTION: while (true) {
				if(pc < 0 || pc >= instructions.length){
					throw new RuntimeException("PANIC: " + main + " illegal pc: " + pc);
				}
				int op = instructions[pc++];
				if (debug) {
					int startpc = pc - 1;
					for (int i = 0; i < sp; i++) {
						stdout.println("\t" + i + ": " + stack[i]);
					}
					stdout.println(cf.function.name + "[" + startpc + "] " + cf.function.codeblock.toString(startpc));
				}
				switch (op) {
				case Opcode.OP_LOADCON:
					stack[sp++] = cf.function.constantStore[instructions[pc++]];
					continue;
				case Opcode.OP_LOADTTYPE:
					stack[sp++] = cf.function.typeConstantStore[instructions[pc++]];
				case Opcode.OP_LOADFUN:
					stack[sp++] = new FunctionInstance(functionStore.get(instructions[pc++]), root);
					continue;
				case Opcode.OP_LOAD_NESTED_FUN: {
					Function fun = functionStore.get(instructions[pc++]);
					int scope = instructions[pc++];
					for (Frame env = cf; env != null; env = env.previousCallFrame) {
						if (env.scopeId == scope) {
							stack[sp++] = new FunctionInstance(fun, env);
							continue NEXT_INSTRUCTION;
						}
					}
					throw new RuntimeException("PANIC: LOAD_NESTED_FUNCTION cannot find matching scope: " + scope);
				}
				case Opcode.OP_LOADCONSTR:
					Type constructor = constructorStore.get(instructions[pc++]);
				case Opcode.OP_LOADLOC:
				case Opcode.OP_LOADLOC_AS_REF:
					stack[sp++] = (op == Opcode.OP_LOADLOC) ? stack[instructions[pc++]]
															: new Reference(stack, instructions[pc++]);
					continue;
				case Opcode.OP_LOADLOCREF: {
					Reference ref = (Reference) stack[instructions[pc++]];
					stack[sp++] = ref.stack[ref.pos];
					continue;
				}
				case Opcode.OP_LOADVAR:
				case Opcode.OP_LOADVAR_AS_REF: {
					int s = instructions[pc++];
					int pos = instructions[pc++];
					for (Frame fr = cf; fr != null; fr = fr.previousScope) {
						if (fr.scopeId == s) {
							stack[sp++] = (op == Opcode.OP_LOADVAR) ? fr.stack[pos]
																	: new Reference(fr.stack, pos);
							continue NEXT_INSTRUCTION;
						}
					}
					throw new RuntimeException("PANIC: load var cannot find matching scope: " + s);
				}
				case Opcode.OP_LOADVARREF: {
					int s = instructions[pc++];
					int pos = instructions[pc++];
					for (Frame fr = cf; fr != null; fr = fr.previousScope) {
						if (fr.scopeId == s) {
							Reference ref = (Reference) fr.stack[pos];
							stack[sp++] = ref.stack[ref.pos];
							continue NEXT_INSTRUCTION;
						}
					}
					throw new RuntimeException("PANIC: load var cannot find matching scope: " + s);
				}
				case Opcode.OP_STORELOC: {
					stack[instructions[pc++]] = stack[sp - 1];
					continue;
				}
				case Opcode.OP_STORELOCREF:
					Reference ref = (Reference) stack[instructions[pc++]];
					ref.stack[ref.pos] = stack[sp - 1];
					continue;
				case Opcode.OP_STOREVAR:
					int s = instructions[pc++];
					int pos = instructions[pc++];
					for (Frame fr = cf; fr != null; fr = fr.previousScope) {
						if (fr.scopeId == s) {
							fr.stack[pos] = stack[sp - 1];
							continue NEXT_INSTRUCTION;
						}
					}
					throw new RuntimeException("PANIC: load var cannot find matching scope: " + s);
				case Opcode.OP_STOREVARREF:
					s = instructions[pc++];
					pos = instructions[pc++];
					for (Frame fr = cf; fr != null; fr = fr.previousScope) {
						if (fr.scopeId == s) {
							ref = (Reference) fr.stack[pos];
							ref.stack[ref.pos] = stack[sp - 1];
							continue NEXT_INSTRUCTION;
						}
					}
					throw new RuntimeException("PANIC: load var cannot find matching scope: " + s);
				case Opcode.OP_JMP:
					pc = instructions[pc];
					continue;
				case Opcode.OP_JMPTRUE:
					if (stack[sp - 1].equals(TRUE)) {
						pc = instructions[pc];
					} else
						pc++;
					sp--;
					continue;
				case Opcode.OP_JMPFALSE:
					if (stack[sp - 1].equals(FALSE)) {
						pc = instructions[pc];
					} else
						pc++;
					sp--;
					continue;
				case Opcode.OP_POP:
					sp--;
					continue;
				case Opcode.OP_LABEL:
					throw new RuntimeException("PANIC: label instruction at runtime");
				case Opcode.OP_CALLCONSTR:
					constructor = constructorStore.get(instructions[pc++]);
					int arity = constructor.getArity();
					args = new IValue[arity];
					for(int i = 0; i < arity; i++) {
						args[arity - 1 - i] = (IValue) stack[--sp];
					}
					stack[sp++] = vf.constructor(constructor, args);
					continue;
				case Opcode.OP_CALLDYN:
				case Opcode.OP_CALL:
					if(op == Opcode.OP_CALLDYN && stack[sp - 1] instanceof Type) {
						Type constr = (Type) stack[--sp];
						arity = constr.getArity();
						args = new IValue[arity];
						for(int i = arity - 1; i >=0; i--) {
							args[i] = (IValue) stack[sp - arity + i];
						}
						sp = sp - arity;
						stack[sp++] = vf.constructor(constr, args);
						continue NEXT_INSTRUCTION;
					}
					Function fun = null;
					Frame previousScope = null;
					if(op == Opcode.OP_CALLDYN && stack[sp - 1] instanceof FunctionInstance){
						FunctionInstance fun_instance = (FunctionInstance) stack[--sp];
						fun = fun_instance.function;
						previousScope = fun_instance.env;
					} else if(op == Opcode.OP_CALL) {
						fun = functionStore.get(instructions[pc++]);
						previousScope = cf;
					} else {
						throw new RuntimeException("PANIC: unexpected argument type when CALLDYN is executed");
					}
					instructions = fun.codeblock.getInstructions();
					Frame nextFrame = new Frame(fun.scope, cf, previousScope, fun.maxstack, fun);
					for (int i = fun.nformals - 1; i >= 0; i--) {
						nextFrame.stack[i] = stack[sp - fun.nformals + i];
					}
					cf.pc = pc;
					cf.sp = sp - fun.nformals;
					cf = nextFrame;
					stack = cf.stack;
					sp = fun.nlocals;
					pc = 0;
					continue;
				case Opcode.OP_RETURN0:
				case Opcode.OP_RETURN1:
					Object rval = null;
					boolean returns = op == Opcode.OP_RETURN1;
					if(returns)
						rval = stack[sp - 1];
					if(cf == ccf) {
						activeCoroutines.pop();
						ccf = activeCoroutines.isEmpty() ? null : activeCoroutines.peek().start;
					}
					cf = cf.previousCallFrame;
					if(cf == null) {
						if(returns)
							return rval;
						else
							return vf.string("None");
					}
					instructions = cf.function.codeblock.getInstructions();
					stack = cf.stack;
					sp = cf.sp;
					pc = cf.pc;
					if(returns)
						stack[sp++] = rval;
					continue;
				case Opcode.OP_HALT:
					if (debug) {
						stdout.println("Program halted:");
						for (int i = 0; i < sp; i++) {
							stdout.println(i + ": " + stack[i]);
						}
					}
					return stack[sp - 1];
				case Opcode.OP_PRINTLN:
					stdout.println(((IString) stack[sp - 1]).getValue());
					continue;
				case Opcode.OP_CALLPRIM:
					Primitive prim = Primitive.fromInteger(instructions[pc++]);
					sp = prim.invoke(stack, sp);
					continue;
				case Opcode.OP_INIT:
					Object src = stack[--sp];
					Coroutine coroutine;
					if(src instanceof Coroutine){
						coroutine = (Coroutine) src;
						fun = coroutine.frame.function;
					} else if(src instanceof FunctionInstance) {
						FunctionInstance fun_instance = (FunctionInstance) src;
						fun = fun_instance.function;
						Frame frame = new Frame(fun.scope, null, fun_instance.env, fun.maxstack, fun);
						coroutine = new Coroutine(frame);
					} else {
						throw new RuntimeException("PANIC: unexpected argument type when INIT is executed.");
					}
					for (int i = fun.nformals - 1; i >= 0; i--) {
						coroutine.frame.stack[i] = stack[sp - fun.nformals + i];
					}
					coroutine.frame.sp = fun.nlocals;
					coroutine.suspend(coroutine.frame);
					sp = sp - fun.nformals;
					stack[sp++] = coroutine;
					continue;
				case Opcode.OP_CREATE:
				case Opcode.OP_CREATEDYN:
					if(op == Opcode.OP_CREATE){
						fun = functionStore.get(instructions[pc++]);
						previousScope = null;
					} else {
						src = stack[--sp];
						if(src instanceof FunctionInstance) {
							FunctionInstance fun_instance = (FunctionInstance) src;
							fun = fun_instance.function;
							previousScope = fun_instance.env;
						} else {
							throw new RuntimeException("PANIC: unexpected argument type when CREATEDYN is executed.");
						}
					}
					Frame frame = new Frame(fun.scope, null, previousScope, fun.maxstack, fun);
					coroutine = new Coroutine(frame);
					stack[sp++] = coroutine;
					continue;
				case Opcode.OP_NEXT0:
				case Opcode.OP_NEXT1:
					coroutine = (Coroutine) stack[--sp];
					activeCoroutines.push(coroutine);
					ccf = coroutine.start;
					coroutine.next(cf);
					fun = coroutine.frame.function;
					instructions = coroutine.frame.function.codeblock.getInstructions();
					coroutine.frame.stack[coroutine.frame.sp++] =
							(op == Opcode.OP_NEXT1) ? stack[--sp] : null;
					cf.pc = pc;
					cf.sp = sp;
					cf = coroutine.frame;
					stack = cf.stack;
					sp = cf.sp;
					pc = cf.pc;
					continue;
				case Opcode.OP_YIELD0:
				case Opcode.OP_YIELD1:
					coroutine = activeCoroutines.pop();
					ccf = activeCoroutines.isEmpty() ? null : activeCoroutines.peek().start;
					Frame prev = coroutine.start.previousCallFrame;
					rval = (op == Opcode.OP_YIELD1) ? stack[--sp] : null;
					cf.pc = pc;
					cf.sp = sp;
					coroutine.suspend(cf);
					cf = prev;
					if(op == Opcode.OP_YIELD1 && cf == null)
						return rval;
					instructions = cf.function.codeblock.getInstructions();
					stack = cf.stack;
					sp = cf.sp;
					pc = cf.pc;
					stack[sp++] = rval;
					continue;
				case Opcode.OP_HASNEXT:
					coroutine = (Coroutine) stack[--sp];
					stack[sp++] = coroutine.hasNext() ? TRUE : FALSE;
					continue;
				default:
					throw new RuntimeException("PANIC: RVM main loop -- cannot decode instruction");
				}
			}
		} catch (Exception e) {
			stdout.println("PANIC: exception caused by invoking a primitive or illegal instruction sequence");
			e.printStackTrace();
		}
		return FALSE;
	}

Output:
	public Object executeProgram(String main, IValue[] args) {
		for (Function f : functionStore) {
			f.finalize(functionMap, constructorMap, listing);
		}
		Function init_function = functionStore.get(functionMap.get("#module_init"));
		if (init_function == null) {
			throw new RuntimeException("PANIC: Code for #module_init not found");
		}
		if (init_function.nformals != 0) {
			throw new RuntimeException("PANIC: " + "function \"#module_init\" should have one argument");
		}
		Function main_function = functionStore.get(functionMap.get("main"));
		if (main_function == null) {
			throw new RuntimeException("PANIC: No function \"main\" found");
		}
		if (main_function.nformals != 1) {
					throw new RuntimeException("PANIC: function \"main\" should have one argument");
		}
		Frame cf = new Frame(0, null, init_function.maxstack, init_function);
		Frame root = cf;
		Object[] stack = cf.stack;
		stack[0] = args;
		int[] instructions = init_function.codeblock.getInstructions();
		int pc = 0;
		int sp = init_function.nlocals;
		Stack<Coroutine> activeCoroutines = new Stack<>();
		Frame ccf = null;
		try {
			NEXT_INSTRUCTION: while (true) {
				if(pc < 0 || pc >= instructions.length){
					throw new RuntimeException("PANIC: " + main + " illegal pc: " + pc);
				}
				int op = instructions[pc++];
				if (debug) {
					int startpc = pc - 1;
					for (int i = 0; i < sp; i++) {
						stdout.println("\t" + i + ": " + stack[i]);
					}
					stdout.println(cf.function.name + "[" + startpc + "] " + cf.function.codeblock.toString(startpc));
				}
				switch (op) {
				case Opcode.OP_LOADCON:
					stack[sp++] = cf.function.constantStore[instructions[pc++]];
					continue;
				case Opcode.OP_LOADTTYPE:
					stack[sp++] = cf.function.typeConstantStore[instructions[pc++]];
					continue;
				case Opcode.OP_LOADFUN:
					stack[sp++] = new FunctionInstance(functionStore.get(instructions[pc++]), root);
					continue;
				case Opcode.OP_LOAD_NESTED_FUN: {
					Function fun = functionStore.get(instructions[pc++]);
					int scope = instructions[pc++];
					for (Frame env = cf; env != null; env = env.previousCallFrame) {
						if (env.scopeId == scope) {
							stack[sp++] = new FunctionInstance(fun, env);
							continue NEXT_INSTRUCTION;
						}
					}
					throw new RuntimeException("PANIC: LOAD_NESTED_FUNCTION cannot find matching scope: " + scope);
				}
				case Opcode.OP_LOADCONSTR:
					Type constructor = constructorStore.get(instructions[pc++]);
				case Opcode.OP_LOADLOC:
				case Opcode.OP_LOADLOC_AS_REF:
					stack[sp++] = (op == Opcode.OP_LOADLOC) ? stack[instructions[pc++]]
															: new Reference(stack, instructions[pc++]);
					continue;
				case Opcode.OP_LOADLOCREF: {
					Reference ref = (Reference) stack[instructions[pc++]];
					stack[sp++] = ref.stack[ref.pos];
					continue;
				}
				case Opcode.OP_LOADVAR:
				case Opcode.OP_LOADVAR_AS_REF: {
					int s = instructions[pc++];
					int pos = instructions[pc++];
					for (Frame fr = cf; fr != null; fr = fr.previousScope) {
						if (fr.scopeId == s) {
							stack[sp++] = (op == Opcode.OP_LOADVAR) ? fr.stack[pos]
																	: new Reference(fr.stack, pos);
							continue NEXT_INSTRUCTION;
						}
					}
					throw new RuntimeException("PANIC: LOADVAR cannot find matching scope: " + s);
				}
				case Opcode.OP_LOADVARREF: {
					int s = instructions[pc++];
					int pos = instructions[pc++];
					for (Frame fr = cf; fr != null; fr = fr.previousScope) {
						if (fr.scopeId == s) {
							Reference ref = (Reference) fr.stack[pos];
							stack[sp++] = ref.stack[ref.pos];
							continue NEXT_INSTRUCTION;
						}
					}
					throw new RuntimeException("PANIC: LOADVARREF cannot find matching scope: " + s);
				}
				case Opcode.OP_STORELOC: {
					stack[instructions[pc++]] = stack[sp - 1];
					continue;
				}
				case Opcode.OP_STORELOCREF:
					Reference ref = (Reference) stack[instructions[pc++]];
					ref.stack[ref.pos] = stack[sp - 1];
					continue;
				case Opcode.OP_STOREVAR:
					int s = instructions[pc++];
					int pos = instructions[pc++];
					for (Frame fr = cf; fr != null; fr = fr.previousScope) {
						if (fr.scopeId == s) {
							fr.stack[pos] = stack[sp - 1];
							continue NEXT_INSTRUCTION;
						}
					}
					throw new RuntimeException("PANIC: STOREVAR cannot find matching scope: " + s);
				case Opcode.OP_STOREVARREF:
					s = instructions[pc++];
					pos = instructions[pc++];
					for (Frame fr = cf; fr != null; fr = fr.previousScope) {
						if (fr.scopeId == s) {
							ref = (Reference) fr.stack[pos];
							ref.stack[ref.pos] = stack[sp - 1];
							continue NEXT_INSTRUCTION;
						}
					}
					throw new RuntimeException("PANIC: STOREVARREF cannot find matching scope: " + s);
				case Opcode.OP_JMP:
					pc = instructions[pc];
					continue;
				case Opcode.OP_JMPTRUE:
					if (stack[sp - 1].equals(TRUE)) {
						pc = instructions[pc];
					} else
						pc++;
					sp--;
					continue;
				case Opcode.OP_JMPFALSE:
					if (stack[sp - 1].equals(FALSE)) {
						pc = instructions[pc];
					} else
						pc++;
					sp--;
					continue;
				case Opcode.OP_POP:
					sp--;
					continue;
				case Opcode.OP_LABEL:
					throw new RuntimeException("PANIC: label instruction at runtime");
				case Opcode.OP_CALLCONSTR:
					constructor = constructorStore.get(instructions[pc++]);
					int arity = constructor.getArity();
					args = new IValue[arity];
					for(int i = 0; i < arity; i++) {
						args[arity - 1 - i] = (IValue) stack[--sp];
					}
					stack[sp++] = vf.constructor(constructor, args);
					continue;
				case Opcode.OP_CALLDYN:
				case Opcode.OP_CALL:
					if(op == Opcode.OP_CALLDYN && stack[sp - 1] instanceof Type) {
						Type constr = (Type) stack[--sp];
						arity = constr.getArity();
						args = new IValue[arity];
						for(int i = arity - 1; i >=0; i--) {
							args[i] = (IValue) stack[sp - arity + i];
						}
						sp = sp - arity;
						stack[sp++] = vf.constructor(constr, args);
						continue NEXT_INSTRUCTION;
					}
					Function fun = null;
					Frame previousScope = null;
					if(op == Opcode.OP_CALLDYN && stack[sp - 1] instanceof FunctionInstance){
						FunctionInstance fun_instance = (FunctionInstance) stack[--sp];
						fun = fun_instance.function;
						previousScope = fun_instance.env;
					} else if(op == Opcode.OP_CALL) {
						fun = functionStore.get(instructions[pc++]);
						previousScope = cf;
					} else {
						throw new RuntimeException("PANIC: unexpected argument type when CALLDYN is executed");
					}
					instructions = fun.codeblock.getInstructions();
					Frame nextFrame = new Frame(fun.scope, cf, previousScope, fun.maxstack, fun);
					for (int i = fun.nformals - 1; i >= 0; i--) {
						nextFrame.stack[i] = stack[sp - fun.nformals + i];
					}
					cf.pc = pc;
					cf.sp = sp - fun.nformals;
					cf = nextFrame;
					stack = cf.stack;
					sp = fun.nlocals;
					pc = 0;
					continue;
				case Opcode.OP_RETURN0:
				case Opcode.OP_RETURN1:
					Object rval = null;
					boolean returns = op == Opcode.OP_RETURN1;
					if(returns)
						rval = stack[sp - 1];
					if(cf == ccf) {
						activeCoroutines.pop();
						ccf = activeCoroutines.isEmpty() ? null : activeCoroutines.peek().start;
					}
					cf = cf.previousCallFrame;
					if(cf == null) {
						if(returns)
							return rval;
						else
							return vf.string("None");
					}
					instructions = cf.function.codeblock.getInstructions();
					stack = cf.stack;
					sp = cf.sp;
					pc = cf.pc;
					if(returns)
						stack[sp++] = rval;
					continue;
				case Opcode.OP_HALT:
					if (debug) {
						stdout.println("Program halted:");
						for (int i = 0; i < sp; i++) {
							stdout.println(i + ": " + stack[i]);
						}
					}
					return stack[sp - 1];
				case Opcode.OP_PRINTLN:
					stdout.println(((IString) stack[sp - 1]).getValue());
					continue;
				case Opcode.OP_CALLPRIM:
					Primitive prim = Primitive.fromInteger(instructions[pc++]);
					sp = prim.invoke(stack, sp);
					continue;
				case Opcode.OP_INIT:
					Object src = stack[--sp];
					Coroutine coroutine;
					if(src instanceof Coroutine){
						coroutine = (Coroutine) src;
						fun = coroutine.frame.function;
					} else if(src instanceof FunctionInstance) {
						FunctionInstance fun_instance = (FunctionInstance) src;
						fun = fun_instance.function;
						Frame frame = new Frame(fun.scope, null, fun_instance.env, fun.maxstack, fun);
						coroutine = new Coroutine(frame);
					} else {
						throw new RuntimeException("PANIC: unexpected argument type when INIT is executed.");
					}
					for (int i = fun.nformals - 1; i >= 0; i--) {
						coroutine.frame.stack[i] = stack[sp - fun.nformals + i];
					}
					coroutine.frame.sp = fun.nlocals;
					coroutine.suspend(coroutine.frame);
					sp = sp - fun.nformals;
					stack[sp++] = coroutine;
					continue;
				case Opcode.OP_CREATE:
				case Opcode.OP_CREATEDYN:
					if(op == Opcode.OP_CREATE){
						fun = functionStore.get(instructions[pc++]);
						previousScope = null;
					} else {
						src = stack[--sp];
						if(src instanceof FunctionInstance) {
							FunctionInstance fun_instance = (FunctionInstance) src;
							fun = fun_instance.function;
							previousScope = fun_instance.env;
						} else {
							throw new RuntimeException("PANIC: unexpected argument type when CREATEDYN is executed.");
						}
					}
					Frame frame = new Frame(fun.scope, null, previousScope, fun.maxstack, fun);
					coroutine = new Coroutine(frame);
					stack[sp++] = coroutine;
					continue;
				case Opcode.OP_NEXT0:
				case Opcode.OP_NEXT1:
					coroutine = (Coroutine) stack[--sp];
					activeCoroutines.push(coroutine);
					ccf = coroutine.start;
					coroutine.next(cf);
					fun = coroutine.frame.function;
					instructions = coroutine.frame.function.codeblock.getInstructions();
					coroutine.frame.stack[coroutine.frame.sp++] =
							(op == Opcode.OP_NEXT1) ? stack[--sp] : null;
					cf.pc = pc;
					cf.sp = sp;
					cf = coroutine.frame;
					stack = cf.stack;
					sp = cf.sp;
					pc = cf.pc;
					continue;
				case Opcode.OP_YIELD0:
				case Opcode.OP_YIELD1:
					coroutine = activeCoroutines.pop();
					ccf = activeCoroutines.isEmpty() ? null : activeCoroutines.peek().start;
					Frame prev = coroutine.start.previousCallFrame;
					rval = (op == Opcode.OP_YIELD1) ? stack[--sp] : null;
					cf.pc = pc;
					cf.sp = sp;
					coroutine.suspend(cf);
					cf = prev;
					if(op == Opcode.OP_YIELD1 && cf == null)
						return rval;
					instructions = cf.function.codeblock.getInstructions();
					stack = cf.stack;
					sp = cf.sp;
					pc = cf.pc;
					stack[sp++] = rval;
					continue;
				case Opcode.OP_HASNEXT:
					coroutine = (Coroutine) stack[--sp];
					stack[sp++] = coroutine.hasNext() ? TRUE : FALSE;
					continue;
				default:
					throw new RuntimeException("PANIC: RVM main loop -- cannot decode instruction");
				}
			}
		} catch (Exception e) {
			stdout.println("PANIC: exception caused by invoking a primitive or illegal instruction sequence: " + e);
			e.printStackTrace();
		}
		return FALSE;
	}


Input:
    public void run() {
        while (running_.get()) {
            MotionEvent[] motionEvents = inputBroker_.takeBundle();
            long now = System.currentTimeMillis();
            float elapsed = (float) ((now - lastTime_) / 1000.0);
            gameState_ = physicsSimulator_.run(elapsed, gameState_, motionEvents);
            renderer_.render(gameState_);
        }
    }

Output:
    public void run() {
        while (running_.get()) {
            MotionEvent[] motionEvents = inputBroker_.takeBundle();
            long now = System.currentTimeMillis();
            float elapsed = (float) ((now - lastTime_) / 1000.0);
            lastTime_ = now;
            gameState_ = physicsSimulator_.run(elapsed, gameState_, motionEvents);
            renderer_.render(gameState_);
        }
    }


Input:
	private DefaultProperties() {
		try {
			prop.load(new FileInputStream("resources/default.properties"));
		} catch (FileNotFoundException e1) {
			Assert.fail("Unable to load file due to error :" + e1.toString());
		} catch (IOException e1) {
			Assert.fail("Unable to load file due to error :" + e1.toString());
		}
	}

Output:
	private DefaultProperties() {
		try {
			prop.load(new FileInputStream("../default.properties"));
		} catch (FileNotFoundException e1) {
			Assert.fail("Unable to load file due to error :" + e1.toString());
		} catch (IOException e1) {
			Assert.fail("Unable to load file due to error :" + e1.toString());
		}
	}


Input:
	public void onMessage(Message inMessage) throws Exception {
		if (!inMessage.isPrivMsg()) {
			String channel = inMessage.getChannel();
			String message = inMessage.getMessage();
			if (message.charAt(message.length() - 1) == ' ')
				message = message.substring(0, message.length() - 1);
			IRC irc = IRC.getInstance();
			Matcher r = Pattern.compile(
					"^([\\w\\d]*)(?:[\\s])?([+|-])(?:[+|-|=])?(?:[\\s]([\\d]*))?",
					Pattern.CASE_INSENSITIVE | Pattern.DOTALL).matcher(
					message);
			if (r.find()) {
				String item = r.group(1);
				String type = r.group(2);
				String ammount = r.group(3);
				if (!inMessage.getUser().equalsIgnoreCase(item))
				{
					int iAmmount = 0;
					if (type.equals("+") && r.group(3) == null) {
						iAmmount = 1;
					} else if (type.equals("-") && r.group(3) == null) {
						iAmmount = -1;
					} else {
						type = type.trim();
						ammount = ammount.trim();
						if (type.equals("+"))
							iAmmount = Integer.valueOf(ammount);
						else
							iAmmount = Integer.valueOf(type + ammount);
					}
					if (iAmmount > 100 || iAmmount < -100) {
						irc.sendPrivmsg(channel,
								"You cant do that its to much rep...");
					} else {
						Reputation tempRep = repList_.getRep(item);
						tempRep.modRep(iAmmount);
						irc.sendPrivmsg(channel, item + ": Rep = "
								+ tempRep.getRep() + "!");
					}
				}
			} else if (message.matches(RegexFormatter.format("rep",RegexFormatter.REG_NICK))) {
				String[] t = message.split(" ");
				if (t.length > 0 || t[1] != null)
					irc.sendPrivmsg(channel, t[1] + ": Rep = "
							+ repList_.getRep(t[1]).getRep() + "!");
			}
			JSON.save(cfgFile_, repList_);
		}
	}

Output:
	public void onMessage(Message inMessage) throws Exception {
		if (!inMessage.isPrivMsg()) {
			String channel = inMessage.getChannel();
			String message = inMessage.getMessage();
			if (message.charAt(message.length() - 1) == ' ')
				message = message.substring(0, message.length() - 1);
			IRC irc = IRC.getInstance();
			Matcher r = Pattern.compile(
					"^([\\w\\d]*)(?:[\\s])?([+|-])(?:[+|-|=])?(?:[\\s]([\\d]*))?\\r",
					Pattern.CASE_INSENSITIVE | Pattern.DOTALL).matcher(
					message);
			if (r.find()) {
				String item = r.group(1);
				String type = r.group(2);
				String ammount = r.group(3);
				if (!inMessage.getUser().equalsIgnoreCase(item))
				{
					int iAmmount = 0;
					if (type.equals("+") && r.group(3) == null) {
						iAmmount = 1;
					} else if (type.equals("-") && r.group(3) == null) {
						iAmmount = -1;
					} else {
						type = type.trim();
						ammount = ammount.trim();
						if (type.equals("+"))
							iAmmount = Integer.valueOf(ammount);
						else
							iAmmount = Integer.valueOf(type + ammount);
					}
					if (iAmmount > 100 || iAmmount < -100) {
						irc.sendPrivmsg(channel,
								"You cant do that its to much rep...");
					} else {
						Reputation tempRep = repList_.getRep(item);
						tempRep.modRep(iAmmount);
						irc.sendPrivmsg(channel, item + ": Rep = "
								+ tempRep.getRep() + "!");
					}
				}
			} else if (message.matches(RegexFormatter.format("rep",RegexFormatter.REG_NICK))) {
				String[] t = message.split(" ");
				if (t.length > 0 || t[1] != null)
					irc.sendPrivmsg(channel, t[1] + ": Rep = "
							+ repList_.getRep(t[1]).getRep() + "!");
			}
			JSON.save(cfgFile_, repList_);
		}
	}