Input:
    public Result onError( Http.RequestHeader requestHeader, Throwable throwable )
    {
        logger.error( String.format( "experienced error {}", Utils.requestToString( requestHeader ) ), throwable );
        Results.Status status = JavaResults.InternalServerError();
        SimpleResult result;
        if ( throwable.getCause() != null && throwable.getCause() instanceof  ExceptionResponse ){
            ExceptionResponseDetails res = ( ( ExceptionResponse) throwable.getCause() ).getResponseDetails();
            Tuple2<String, String> ac = new Tuple2<String, String>( res.getHeaderKey(), res.toJson());
                    ArrayList<Tuple2<String, String>> list = new ArrayList<Tuple2<String, String>>();
                    list.add(ac);
                    scala.collection.immutable.List<Tuple2<String, String>> headers =
                      JavaConversions.asBuffer( list ).toList();
            status.header().headers().$plus(  ac );
           result = status.withHeaders( headers );
        }else{
            return null;
        }
        final SimpleResult finalResult = result;
        return new Result() {
            @Override
            public play.api.mvc.Result getWrappedResult()
            {
                return finalResult;
            }
        };
    }

Output:
    public Result onError( Http.RequestHeader requestHeader, Throwable throwable )
    {
        logger.error( String.format( "experienced error {}", Utils.requestToString( requestHeader ) ), throwable );
        Results.Status status = JavaResults.InternalServerError();
        SimpleResult result;
        if ( throwable.getCause() != null && throwable.getCause() instanceof  ExceptionResponse ){
            ExceptionResponseDetails res = ( ( ExceptionResponse) throwable.getCause() ).getResponseDetails();
            Tuple2<String, String> ac = new Tuple2<String, String>( res.getHeaderKey(), res.toJson());
                    ArrayList<Tuple2<String, String>> list = new ArrayList<Tuple2<String, String>>();
                    list.add(ac);
                    scala.collection.immutable.List<Tuple2<String, String>> headers =
                      JavaConversions.asScalaBuffer( list ).toList();
            status.header().headers().$plus(  ac );
           result = status.withHeaders( headers );
        }else{
            return null;
        }
        final SimpleResult finalResult = result;
        return new Result() {
            @Override
            public play.api.mvc.Result getWrappedResult()
            {
                return finalResult;
            }
        };
    }


Input:
  public void monitorWeather() throws Exception {
	int errorCount = 0;
    try {
        getStation().test();
    } catch (IOException ex) {
        LOGGER.error(ex);
    }
    while (true) {
      try {
        for (int i = 0; i < 15; i++) {
          getStation().readCurrentConditions();
        }
        if (isCheckArchive()) {
          getStation().readArchiveMemory();
        }
      } catch (Exception e) {
        LOGGER.error("exception - waiting 5s", e);
        try {
          Thread.sleep(5000);
          boolean ok = getStation().test();
          LOGGER.warn("station test:" + (ok ? "ok" : "not ok"));
        } catch (Exception e1) {
          if (errorCount++ > MAX_ERRORS) {
            System.exit(1);
          }
          LOGGER.error(e1);
          throw e1;
        }
      }
    }
  }

Output:
  public void monitorWeather() throws Exception {
	int errorCount = 0;
    try {
        getStation().test();
    } catch (IOException ex) {
        LOGGER.error(ex);
    }
    while (true) {
      try {
        for (int i = 0; i < 15; i++) {
          getStation().readCurrentConditions();
        }
        if (isCheckArchive()) {
          getStation().readArchiveMemory();
        }
      } catch (Exception e) {
        LOGGER.error("exception - waiting 5s", e);
        try {
          if (errorCount++ > MAX_ERRORS) {
            System.exit(1);
          }
          Thread.sleep(5000);
          boolean ok = getStation().test();
          LOGGER.warn("station test:" + (ok ? "ok" : "not ok"));
        } catch (Exception e1) {
          LOGGER.error(e1);
          throw e1;
        }
      }
    }
  }


Input:
	private void setUpRecognizerGui(final SpeechRecognizer sr, final Intent intentRecognizer) {
		final AudioCue audioCue;
		if (mPrefs.getBoolean(getString(R.string.keyAudioCues), mRes.getBoolean(R.bool.defaultAudioCues))) {
			audioCue = new AudioCue(this);
		} else {
			audioCue = null;
		}
		sr.setRecognitionListener(new RecognitionListener() {
			@Override
			public void onBeginningOfSpeech() {
				mState = State.LISTENING;
			}
			@Override
			public void onBufferReceived(byte[] buffer) {
			}
			@Override
			public void onEndOfSpeech() {
				mState = State.TRANSCRIBING;
				mButtonMicrophone.setState(mState);
				if (audioCue != null) {
					audioCue.playStopSound();
				}
			}
			@Override
			public void onError(int error) {
				mState = State.ERROR;
				mButtonMicrophone.setState(mState);
				if (audioCue != null) {
					audioCue.playErrorSound();
				}
				switch (error) {
				case SpeechRecognizer.ERROR_AUDIO:
					showErrorDialog(R.string.errorResultAudioError);
					break;
				case SpeechRecognizer.ERROR_CLIENT:
					showErrorDialog(R.string.errorResultClientError);
					break;
				case SpeechRecognizer.ERROR_NETWORK:
					showErrorDialog(R.string.errorResultNetworkError);
					break;
				case SpeechRecognizer.ERROR_NETWORK_TIMEOUT:
					showErrorDialog(R.string.errorResultNetworkError);
					break;
				case SpeechRecognizer.ERROR_SERVER:
					showErrorDialog(R.string.errorResultServerError);
					break;
				case SpeechRecognizer.ERROR_RECOGNIZER_BUSY:
					showErrorDialog(R.string.errorResultServerError);
					break;
				case SpeechRecognizer.ERROR_NO_MATCH:
					showErrorDialog(R.string.errorResultNoMatch);
					break;
				case SpeechRecognizer.ERROR_SPEECH_TIMEOUT:
					showErrorDialog(R.string.errorResultNoMatch);
					break;
				case SpeechRecognizer.ERROR_INSUFFICIENT_PERMISSIONS:
					break;
				default:
					break;
				}
			}
			@Override
			public void onEvent(int eventType, Bundle params) {
			}
			@Override
			public void onPartialResults(Bundle partialResults) {
			}
			@Override
			public void onReadyForSpeech(Bundle params) {
				mState = State.RECORDING;
				mButtonMicrophone.setState(mState);
			}
			@Override
			public void onResults(Bundle results) {
				mState = State.INIT;
				mButtonMicrophone.setState(mState);
				onSuccess(intentRecognizer.getStringExtra(RecognizerIntent.EXTRA_LANGUAGE), results);
			}
			@Override
			public void onRmsChanged(float rmsdB) {
				mButtonMicrophone.setVolumeLevel(rmsdB);
			}
		});
		mButtonMicrophone.setOnTouchListener(new View.OnTouchListener() {
			@Override
			public boolean onTouch(View v, MotionEvent event) {
				if (event.getAction() == MotionEvent.ACTION_DOWN) {
					vibrate();
				}
				return false;
			}
		});
		mButtonMicrophone.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				if (mState == State.INIT || mState == State.ERROR) {
					mTts.stop();
					if (audioCue != null) {
						audioCue.playStartSoundAndSleep();
					}
					sr.startListening(intentRecognizer);
				}
				else if (mState == State.RECORDING) {
				}
				else if (mState == State.TRANSCRIBING) {
				}
				else if (mState == State.LISTENING) {
					sr.stopListening();
				} else {
				}
			}
		});
		LinearLayout llMicrophone = (LinearLayout) findViewById(R.id.llMicrophone);
		llMicrophone.setVisibility(View.VISIBLE);
		llMicrophone.setEnabled(true);
	}

Output:
	private void setUpRecognizerGui(final SpeechRecognizer sr, final Intent intentRecognizer) {
		final AudioCue audioCue;
		if (mPrefs.getBoolean(getString(R.string.keyAudioCues), mRes.getBoolean(R.bool.defaultAudioCues))) {
			audioCue = new AudioCue(this);
		} else {
			audioCue = null;
		}
		sr.setRecognitionListener(new RecognitionListener() {
			@Override
			public void onBeginningOfSpeech() {
				mState = State.LISTENING;
			}
			@Override
			public void onBufferReceived(byte[] buffer) {
			}
			@Override
			public void onEndOfSpeech() {
				mState = State.TRANSCRIBING;
				mButtonMicrophone.setState(mState);
				if (audioCue != null) {
					audioCue.playStopSound();
				}
			}
			@Override
			public void onError(int error) {
				mState = State.ERROR;
				mButtonMicrophone.setState(mState);
				if (audioCue != null) {
					audioCue.playErrorSound();
				}
				switch (error) {
				case SpeechRecognizer.ERROR_AUDIO:
					showErrorDialog(R.string.errorResultAudioError);
					break;
				case SpeechRecognizer.ERROR_CLIENT:
					showErrorDialog(R.string.errorResultClientError);
					break;
				case SpeechRecognizer.ERROR_NETWORK:
					showErrorDialog(R.string.errorResultNetworkError);
					break;
				case SpeechRecognizer.ERROR_NETWORK_TIMEOUT:
					showErrorDialog(R.string.errorResultNetworkError);
					break;
				case SpeechRecognizer.ERROR_SERVER:
					showErrorDialog(R.string.errorResultServerError);
					break;
				case SpeechRecognizer.ERROR_RECOGNIZER_BUSY:
					showErrorDialog(R.string.errorResultServerError);
					break;
				case SpeechRecognizer.ERROR_NO_MATCH:
					showErrorDialog(R.string.errorResultNoMatch);
					break;
				case SpeechRecognizer.ERROR_SPEECH_TIMEOUT:
					showErrorDialog(R.string.errorResultNoMatch);
					break;
				case SpeechRecognizer.ERROR_INSUFFICIENT_PERMISSIONS:
					break;
				default:
					break;
				}
			}
			@Override
			public void onEvent(int eventType, Bundle params) {
			}
			@Override
			public void onPartialResults(Bundle partialResults) {
			}
			@Override
			public void onReadyForSpeech(Bundle params) {
				mState = State.RECORDING;
				mButtonMicrophone.setState(mState);
			}
			@Override
			public void onResults(Bundle results) {
				mState = State.INIT;
				mButtonMicrophone.setState(mState);
				onSuccess(intentRecognizer.getStringExtra(RecognizerIntent.EXTRA_LANGUAGE), results);
			}
			@Override
			public void onRmsChanged(float rmsdB) {
				mButtonMicrophone.setVolumeLevel(rmsdB);
			}
		});
		mButtonMicrophone.setOnTouchListener(new View.OnTouchListener() {
			@Override
			public boolean onTouch(View v, MotionEvent event) {
				if (event.getAction() == MotionEvent.ACTION_DOWN) {
					vibrate();
				}
				return false;
			}
		});
		mButtonMicrophone.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				if (mState == State.INIT || mState == State.ERROR) {
					if (mTts != null) {
						mTts.stop();
					}
					if (audioCue != null) {
						audioCue.playStartSoundAndSleep();
					}
					sr.startListening(intentRecognizer);
				}
				else if (mState == State.RECORDING) {
				}
				else if (mState == State.TRANSCRIBING) {
				}
				else if (mState == State.LISTENING) {
					sr.stopListening();
				} else {
				}
			}
		});
		LinearLayout llMicrophone = (LinearLayout) findViewById(R.id.llMicrophone);
		llMicrophone.setVisibility(View.VISIBLE);
		llMicrophone.setEnabled(true);
	}


Input:
	private void registerScannedPorts(int PortType)
	{
		String[] CandidateDeviceNames;
		if (debug)
			System.out.println("scanning device directory "+deviceDirectory+" for ports of type "+PortType);
		if(osName.toLowerCase().indexOf("windows") != -1 )
		{
			String[] temp = { "COM1", "COM2","COM3","COM4" };
			CandidateDeviceNames=temp;
		}
		else if ( osName.equals("Solaris") || osName.equals("SunOS"))
		{
			String term[] = new String[2];
			int l = 0;
			File dev = null;
			dev = new File( "/dev/term" );
			if( dev.list().length > 0 );
				term[l++] = new String( "term/" );
			dev = new File( "/dev/cua0" );
			if( dev.list().length > 0 );
				term[l++] = new String( "cua/" );
			String[] temp = new String[l];
			for(l--;l >= 0;l--)
				temp[l] = term[l];
			CandidateDeviceNames=temp;
		}
		else
		{
			File dev = new File( deviceDirectory );
			String[] temp = dev.list();
			CandidateDeviceNames=temp;
		}
		if (CandidateDeviceNames==null)
		{
			if (debug)
				System.out.println("RXTXCommDriver:registerScannedPorts() no Device files to check ");
			return;
		}
		String CandidatePortPrefixes[] = {};
		switch (PortType) {
			case CommPortIdentifier.PORT_SERIAL:
				if (debug)
					System.out.println("scanning for serial ports for os "+osName);
				if(osName.equals("Linux"))
				{
					String[] Temp = {
					"ttyS"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("Linux-all-ports"))
				{
					String[] Temp = {
					"comx",
					"holter",
					"modem",
					"ttyircomm",
					"ttycosa0c",
					"ttycosa1c",
					"ttyC",
					"ttyCH",
					"ttyD",
					"ttyE",
					"ttyF",
					"ttyH",
					"ttyI",
					"ttyL",
					"ttyM",
					"ttyMX",
					"ttyP",
					"ttyR",
					"ttyS",
					"ttySI",
					"ttySR",
					"ttyT",
					"ttyUSB",
					"ttyV",
					"ttyW",
					"ttyX"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("Irix"))
				{
					String[] Temp = {
						"ttyc",
						"ttyd",
						"ttyf",
						"ttym",
						"ttyq",
						"tty4d",
						"tty4f",
						"midi",
						"us"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("FreeBSD"))
				{
					String[] Temp = {
						"cuaa"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("NetBSD"))
				{
					String[] Temp = {
						"tty0"
					};
					CandidatePortPrefixes=Temp;
				}
				else if ( osName.equals("Solaris")
						|| osName.equals("SunOS"))
				{
					String[] Temp = {
						"term/",
						"cua/"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("HP-UX"))
				{
					String[] Temp = {
						"tty0p",
						"tty1p"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("UnixWare") ||
						osName.equals("OpenUNIX"))
				{
					String[] Temp = {
						"tty00s",
						"tty01s",
						"tty02s",
						"tty03s"
					};
					CandidatePortPrefixes=Temp;
				}
			else if	(osName.equals("OpenServer"))
				{
					String[] Temp = {
						"tty1A",
						"tty2A",
						"tty3A",
						"tty4A",
						"tty5A",
						"tty6A",
						"tty7A",
						"tty8A",
						"tty9A",
						"tty10A",
						"tty11A",
						"tty12A",
						"tty13A",
						"tty14A",
						"tty15A",
						"tty16A",
						"ttyu1A",
						"ttyu2A",
						"ttyu3A",
						"ttyu4A",
						"ttyu5A",
						"ttyu6A",
						"ttyu7A",
						"ttyu8A",
						"ttyu9A",
						"ttyu10A",
						"ttyu11A",
						"ttyu12A",
						"ttyu13A",
						"ttyu14A",
						"ttyu15A",
						"ttyu16A"
					};
					CandidatePortPrefixes=Temp;
				}
				else if (osName.equals("Compaq's Digital UNIX"))
				{
					String[] Temp = {
						"tty0"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("BeOS"))
				{
					String[] Temp = {
						"serial"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("Mac OS X"))
				{
					String[] Temp = {
						"cu.KeyUSA28X191.",
						"tty.KeyUSA28X191.",
						"cu.KeyUSA28X181.",
						"tty.KeyUSA28X181.",
						"cu.KeyUSA19181.",
						"tty.KeyUSA19181."
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.toLowerCase().indexOf("windows") != -1 )
				{
					String[] Temp = {
						"COM"
					};
					CandidatePortPrefixes=Temp;
				}
				else
				{
					if (debug)
						System.out.println("No valid prefixes for serial ports have been entered for "+osName + " in RXTXCommDriver.java.  This may just be a typo in the method registerScanPorts().");
				}
				break;
			case CommPortIdentifier.PORT_PARALLEL:
				if (debug)
					System.out.println("scanning for parallel ports for os "+osName);
				if(osName.equals("Linux")
				)
				{
					String[] temp={
						"lp"
					};
					CandidatePortPrefixes=temp;
				}
				else if(osName.equals("FreeBSD"))
				{
					String[] temp={
						"lpt"
					};
					CandidatePortPrefixes=temp;
				}
				else
				{
					String [] temp={};
					CandidatePortPrefixes=temp;
				}
				break;
			default:
				if (debug)
					System.out.println("Unknown PortType "+PortType+" passed to RXTXCommDriver.registerScannedPorts()");
		}
		registerValidPorts(CandidateDeviceNames, CandidatePortPrefixes, PortType);
	}

Output:
	private void registerScannedPorts(int PortType)
	{
		String[] CandidateDeviceNames;
		if (debug)
			System.out.println("scanning device directory "+deviceDirectory+" for ports of type "+PortType);
		if(osName.toLowerCase().indexOf("windows") != -1 )
		{
			String[] temp = { "COM1", "COM2","COM3","COM4" };
			CandidateDeviceNames=temp;
		}
		else if ( osName.equals("Solaris") || osName.equals("SunOS"))
		{
			String term[] = new String[2];
			int l = 0;
			File dev = null;
			dev = new File( "/dev/term" );
			if( dev.list().length > 0 );
				term[l++] = new String( "term/" );
			dev = new File( "/dev/cua0" );
			if( dev.list().length > 0 );
				term[l++] = new String( "cua/" );
			String[] temp = new String[l];
			for(l--;l >= 0;l--)
				temp[l] = term[l];
			CandidateDeviceNames=temp;
		}
		else
		{
			File dev = new File( deviceDirectory );
			String[] temp = dev.list();
			CandidateDeviceNames=temp;
		}
		if (CandidateDeviceNames==null)
		{
			if (debug)
				System.out.println("RXTXCommDriver:registerScannedPorts() no Device files to check ");
			return;
		}
		String CandidatePortPrefixes[] = {};
		switch (PortType) {
			case CommPortIdentifier.PORT_SERIAL:
				if (debug)
					System.out.println("scanning for serial ports for os "+osName);
				if(osName.equals("Linux"))
				{
					String[] Temp = {
					"ttyS"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("Linux-all-ports"))
				{
					String[] Temp = {
					"comx",
					"holter",
					"modem",
					"ttyircomm",
					"ttycosa0c",
					"ttycosa1c",
					"ttyC",
					"ttyCH",
					"ttyD",
					"ttyE",
					"ttyF",
					"ttyH",
					"ttyI",
					"ttyL",
					"ttyM",
					"ttyMX",
					"ttyP",
					"ttyR",
					"ttyS",
					"ttySI",
					"ttySR",
					"ttyT",
					"ttyUSB",
					"ttyV",
					"ttyW",
					"ttyX"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("Irix"))
				{
					String[] Temp = {
						"ttyc",
						"ttyd",
						"ttyf",
						"ttym",
						"ttyq",
						"tty4d",
						"tty4f",
						"midi",
						"us"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("FreeBSD"))
				{
					String[] Temp = {
						"cuaa"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("NetBSD"))
				{
					String[] Temp = {
						"tty0"
					};
					CandidatePortPrefixes=Temp;
				}
				else if ( osName.equals("Solaris")
						|| osName.equals("SunOS"))
				{
					String[] Temp = {
						"term/",
						"cua/"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("HP-UX"))
				{
					String[] Temp = {
						"tty0p",
						"tty1p"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("UnixWare") ||
						osName.equals("OpenUNIX"))
				{
					String[] Temp = {
						"tty00s",
						"tty01s",
						"tty02s",
						"tty03s"
					};
					CandidatePortPrefixes=Temp;
				}
			else if	(osName.equals("OpenServer"))
				{
					String[] Temp = {
						"tty1A",
						"tty2A",
						"tty3A",
						"tty4A",
						"tty5A",
						"tty6A",
						"tty7A",
						"tty8A",
						"tty9A",
						"tty10A",
						"tty11A",
						"tty12A",
						"tty13A",
						"tty14A",
						"tty15A",
						"tty16A",
						"ttyu1A",
						"ttyu2A",
						"ttyu3A",
						"ttyu4A",
						"ttyu5A",
						"ttyu6A",
						"ttyu7A",
						"ttyu8A",
						"ttyu9A",
						"ttyu10A",
						"ttyu11A",
						"ttyu12A",
						"ttyu13A",
						"ttyu14A",
						"ttyu15A",
						"ttyu16A"
					};
					CandidatePortPrefixes=Temp;
				}
				else if (osName.equals("Compaq's Digital UNIX") || osName.equals("OSF1"))
				{
					String[] Temp = {
						"tty0"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("BeOS"))
				{
					String[] Temp = {
						"serial"
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.equals("Mac OS X"))
				{
					String[] Temp = {
						"cu.KeyUSA28X191.",
						"tty.KeyUSA28X191.",
						"cu.KeyUSA28X181.",
						"tty.KeyUSA28X181.",
						"cu.KeyUSA19181.",
						"tty.KeyUSA19181."
					};
					CandidatePortPrefixes=Temp;
				}
				else if(osName.toLowerCase().indexOf("windows") != -1 )
				{
					String[] Temp = {
						"COM"
					};
					CandidatePortPrefixes=Temp;
				}
				else
				{
					if (debug)
						System.out.println("No valid prefixes for serial ports have been entered for "+osName + " in RXTXCommDriver.java.  This may just be a typo in the method registerScanPorts().");
				}
				break;
			case CommPortIdentifier.PORT_PARALLEL:
				if (debug)
					System.out.println("scanning for parallel ports for os "+osName);
				if(osName.equals("Linux")
				)
				{
					String[] temp={
						"lp"
					};
					CandidatePortPrefixes=temp;
				}
				else if(osName.equals("FreeBSD"))
				{
					String[] temp={
						"lpt"
					};
					CandidatePortPrefixes=temp;
				}
				else
				{
					String [] temp={};
					CandidatePortPrefixes=temp;
				}
				break;
			default:
				if (debug)
					System.out.println("Unknown PortType "+PortType+" passed to RXTXCommDriver.registerScannedPorts()");
		}
		registerValidPorts(CandidateDeviceNames, CandidatePortPrefixes, PortType);
	}


Input:
    private UrlMappingInfo createUrlMappingInfo(String uri, Matcher m) {
        Map params = new HashMap();
        Errors errors = new MapBindingResult(params, "urlMapping");
        String lastGroup = null;
        for (int i = 0; i < m.groupCount(); i++) {
            lastGroup = m.group(i+1);
            if(constraints.length > i) {
                ConstrainedProperty cp = constraints[i];
                cp.validate(this,lastGroup, errors);
                if(errors.hasErrors()) return null;
                else {
                    params.put(cp.getPropertyName(), lastGroup);
                }
            }
        }
        if(lastGroup!= null) {
            String remainingUri = uri.substring(uri.lastIndexOf(lastGroup)+lastGroup.length());
            if(remainingUri.length() > 0) {
                if(remainingUri.startsWith(SLASH))remainingUri = remainingUri.substring(1);
                String[] tokens = remainingUri.split(SLASH);
                for (int i = 0; i < tokens.length; i=i+2) {
                    String token = tokens[i];
                    if((i+1) < tokens.length) {
                        params.put(token, tokens[i+1]);
                    }
                }
            }
        }
        for (Iterator i = this.parameterValues.keySet().iterator(); i.hasNext();) {
            Object key =  i.next();
            params.put(key, this.parameterValues.get(key));
        }
        if(controllerName == null) {
            this.controllerName = createRuntimeConstraintEvaluator(GrailsControllerClass.CONTROLLER, this.constraints);
        }
        if(actionName == null) {
            this.actionName = createRuntimeConstraintEvaluator(GrailsControllerClass.ACTION, this.constraints);
        }
        if(viewName == null) {
            this.viewName = createRuntimeConstraintEvaluator(GrailsControllerClass.VIEW, this.constraints);
        }
        if (viewName != null && this.controllerName == null) {
           return new DefaultUrlMappingInfo(viewName, params,this.urlData);
        }
        else {
            return new DefaultUrlMappingInfo(this.controllerName, this.actionName,getViewName(), params,this.urlData);
        }
    }

Output:
    private UrlMappingInfo createUrlMappingInfo(String uri, Matcher m) {
        Map params = new HashMap();
        Errors errors = new MapBindingResult(params, "urlMapping");
        String lastGroup = null;
        for (int i = 0; i < m.groupCount(); i++) {
            lastGroup = m.group(i+1);
            int j = lastGroup.indexOf('?');
            if(j >-1) {
                lastGroup = lastGroup.substring(0,j);
            }
            if(constraints.length > i) {
                ConstrainedProperty cp = constraints[i];
                cp.validate(this,lastGroup, errors);
                if(errors.hasErrors()) return null;
                else {
                    params.put(cp.getPropertyName(), lastGroup);
                }
            }
        }
        if(lastGroup!= null) {
            String remainingUri = uri.substring(uri.lastIndexOf(lastGroup)+lastGroup.length());
            if(remainingUri.length() > 0) {
                if(remainingUri.startsWith(SLASH))remainingUri = remainingUri.substring(1);
                String[] tokens = remainingUri.split(SLASH);
                for (int i = 0; i < tokens.length; i=i+2) {
                    String token = tokens[i];
                    if((i+1) < tokens.length) {
                        params.put(token, tokens[i+1]);
                    }
                }
            }
        }
        for (Iterator i = this.parameterValues.keySet().iterator(); i.hasNext();) {
            Object key =  i.next();
            params.put(key, this.parameterValues.get(key));
        }
        if(controllerName == null) {
            this.controllerName = createRuntimeConstraintEvaluator(GrailsControllerClass.CONTROLLER, this.constraints);
        }
        if(actionName == null) {
            this.actionName = createRuntimeConstraintEvaluator(GrailsControllerClass.ACTION, this.constraints);
        }
        if(viewName == null) {
            this.viewName = createRuntimeConstraintEvaluator(GrailsControllerClass.VIEW, this.constraints);
        }
        if (viewName != null && this.controllerName == null) {
           return new DefaultUrlMappingInfo(viewName, params,this.urlData);
        }
        else {
            return new DefaultUrlMappingInfo(this.controllerName, this.actionName,getViewName(), params,this.urlData);
        }
    }


Input:
  public void execute() {
    if (this.outputFile == null) {
      throw new BuildException("outputFile attribute must be set");
    }
    Compiler.setLoggingLevel(Level.OFF);
    CompilerOptions options = createCompilerOptions();
    Compiler compiler = createCompiler(options);
    JSSourceFile[] externs = findExternFiles();
    JSSourceFile[] sources = findSourceFiles();
    log("Compiling " + sources.length + " file(s) with " +
        externs.length + " extern(s)");
    Result result = compiler.compile(externs, sources, options);
    if (result.success) {
      writeResult(compiler.toSource());
    }
  }

Output:
  public void execute() {
    if (this.outputFile == null) {
      throw new BuildException("outputFile attribute must be set");
    }
    Compiler.setLoggingLevel(Level.OFF);
    CompilerOptions options = createCompilerOptions();
    Compiler compiler = createCompiler(options);
    JSSourceFile[] externs = findExternFiles();
    JSSourceFile[] sources = findSourceFiles();
    log("Compiling " + sources.length + " file(s) with " +
        externs.length + " extern(s)");
    Result result = compiler.compile(externs, sources, options);
    if (result.success) {
      writeResult(compiler.toSource());
    } else {
      throw new BuildException("Compilation failed.");
    }
  }


Input:
    public boolean processImpression(User user, Query query, Auction auction) {
        fireQueryIssued(query);
        boolean converted = false;
        boolean clicking = true;
        double continuationProbability = 0.0;
        int queryIndex = userClickModel.queryIndex(query);
        if (queryIndex < 0) {
            log.warning(String.format("Query: %s does not have a click model.",
                    query));
        } else {
            continuationProbability = userClickModel
                    .getContinuationProbability(queryIndex);
        }
        Ranking ranking = auction.getRanking();
        Pricing pricing = auction.getPricing();
        for (int i = 0; i < ranking.size(); i++) {
            AdLink ad = ranking.get(i);
            boolean isPromoted = ranking.isPromoted(i);
            fireAdViewed(query, ad, i + 1, isPromoted);
            if (clicking) {
                AdvertiserInfo info = advertiserInfo.get(ad.getAdvertiser());
                double promotionEffect = ranking.isPromoted(i) ? slotInfo
                        .getPromotedSlotBonus() : 0.0;
                double clickProbability = calculateClickProbability(user, ad.getAd(), info.getTargetEffect(),
                        promotionEffect, findAdvertiserEffect(query, ad, userClickModel));
                if (random.nextDouble() <= clickProbability) {
                    fireAdClicked(query, ad, i + 1, pricing.getPrice(ad));
                    double conversionProbability = calculateConversionProbability( user, query, info,
                            recentConversionsTracker.getRecentConversions(ad.getAdvertiser()));
                    if(user.isTransacting()){
                        if (random.nextDouble() <= conversionProbability) {
                            double salesProfit = catalog.getSalesProfit(user
                                    .getProduct());
                            fireAdConverted(query, ad, i + 1, modifySalesProfitForManufacturerSpecialty(user,
                                            info.getManufacturerSpecialty(), info.getManufacturerBonus(), salesProfit));
                            converted = true;
                            clicking = false;
                        }
                    }
                }
            }
            if (random.nextDouble() > continuationProbability) {
                clicking = false;
            }
        }
        return converted;
    }

Output:
    public boolean processImpression(User user, Query query, Auction auction) {
        fireQueryIssued(query);
        boolean converted = false;
        boolean clicking = true;
        double continuationProbability = 0.0;
        int queryIndex = userClickModel.queryIndex(query);
        if (queryIndex < 0) {
            log.warning(String.format("Query: %s does not have a click model.",
                    query));
        } else {
            continuationProbability = userClickModel
                    .getContinuationProbability(queryIndex);
        }
        Ranking ranking = auction.getRanking();
        Pricing pricing = auction.getPricing();
        for (int i = 0; i < ranking.size(); i++) {
            AdLink ad = ranking.get(i);
            boolean isPromoted = ranking.isPromoted(i);
            fireAdViewed(query, ad, i + 1, isPromoted);
            if (clicking) {
                AdvertiserInfo info = advertiserInfo.get(ad.getAdvertiser());
                double promotionEffect = ranking.isPromoted(i) ? slotInfo
                        .getPromotedSlotBonus() : 0.0;
                double clickProbability = calculateClickProbability(user, ad.getAd(), info.getTargetEffect(),
                        promotionEffect, findAdvertiserEffect(query, ad, userClickModel));
                if (random.nextDouble() <= clickProbability) {
                    fireAdClicked(query, ad, i + 1, pricing.getPrice(ad));
                    double conversionProbability = calculateConversionProbability( user, query, info,
                            recentConversionsTracker.getRecentConversions(ad.getAdvertiser()));
                        if (random.nextDouble() <= conversionProbability) {
                            double salesProfit = catalog.getSalesProfit(user
                                    .getProduct());
                            fireAdConverted(query, ad, i + 1, modifySalesProfitForManufacturerSpecialty(user,
                                            info.getManufacturerSpecialty(), info.getManufacturerBonus(), salesProfit));
                            converted = true;
                            clicking = false;
                        }
                }
            }
            if (random.nextDouble() > continuationProbability) {
                clicking = false;
            }
        }
        return converted;
    }


Input:
    private static DB getDB() {
        Mongo mongoClient;
        try {
            mongoClient = new Mongo("mongodb-rankitapp.jelastic.dogado.eu", 27017);
        } catch (UnknownHostException e) {
            throw new RuntimeException(e);
        }
        final DB pingpong = mongoClient.getDB("pingpong");
        final boolean auth = pingpong.authenticate("admin", "XIyqkxSMgQ".toCharArray());
        if (!auth) {
            throw new RuntimeException("Mongo authentication failed!");
        }
        return pingpong;
    }

Output:
    private static DB getDB() {
        Mongo mongoClient;
        try {
            mongoClient = new Mongo("mongodb-rankitapp.jelastic.dogado.eu", 27017);
        } catch (UnknownHostException e) {
            throw new RuntimeException(e);
        }
        final DB pingpong = mongoClient.getDB("pingpong");
        final boolean auth = pingpong.authenticate("admin", "XIyqkxSMgQ".toCharArray());
        if (!auth) {
            return pingpong;
        }
        return pingpong;
    }


Input:
	public void performGWAS(Transformation transformation, TYPE analysis) {
		final RunGWASAction gwasAction = new RunGWASAction(transformation.getPhenotype(),transformation.getDataset(), transformation.getName(), analysis, gwasResultReader);
		dispatch.execute(gwasAction, new GWASCallback<RunGWASActionResult>(getEventBus()) {
			@Override
			public void onFailure(Throwable caught) {
				ProgressBarEvent.fire(getEventBus(),gwasAction.getUrl(),true);
				getView().showNotification("", "Error", "GWAS analysis failed");
				super.onFailure(caught);
			}
			@Override
			public void onSuccess(RunGWASActionResult result) {
				if (result.result.getStatus() ==  BackendResult.STATUS.OK) {
					googleAnalytics.trackEvent("GWAS", "successful");
					RunGWASFinishedEvent.fire(TransformationListPresenter.this, result.Chromosome, result.Position, result.Phenotypes, result.Phenotype, result.Dataset,result.Transformation, result.ResultName);
				}
				else {
					googleAnalytics.trackEvent("GWAS", "failed");
					getView().showNotification("", "Error", "GWAS analysis failed");
					DisplayNotificationEvent.fireError(TransformationListPresenter.this, "Backend-Error", result.result.getStatustext());
				}
			}
		});
		ProgressBarEvent.fire(getEventBus(),gwasAction.getUrl());
	}

Output:
	public void performGWAS(Transformation transformation, TYPE analysis) {
		final RunGWASAction gwasAction = new RunGWASAction(transformation.getPhenotype(),transformation.getDataset(), transformation.getName(), analysis, gwasResultReader);
		dispatch.execute(gwasAction, new GWASCallback<RunGWASActionResult>(getEventBus()) {
			@Override
			public void onFailure(Throwable caught) {
				ProgressBarEvent.fire(getEventBus(),gwasAction.getUrl(),true);
				getView().showNotification("", "Error", "GWAS analysis failed");
				super.onFailure(caught);
			}
			@Override
			public void onSuccess(RunGWASActionResult result) {
				if (result.result.getStatus() ==  BackendResult.STATUS.OK) {
					googleAnalytics.trackEvent("GWAS", "successful");
					RunGWASFinishedEvent.fire(TransformationListPresenter.this, result.Chromosome, result.Position, result.Phenotypes, result.Phenotype, result.Dataset,result.Transformation, result.ResultName);
				}
				else {
					googleAnalytics.trackEvent("GWAS", "failed");
					ProgressBarEvent.fire(getEventBus(),gwasAction.getUrl(),true);
					getView().showNotification("", "Error", "GWAS analysis failed");
					DisplayNotificationEvent.fireError(TransformationListPresenter.this, "Backend-Error", result.result.getStatustext());
				}
			}
		});
		ProgressBarEvent.fire(getEventBus(),gwasAction.getUrl());
	}


Input:
    public void doJob() throws Exception {
        if(Play.configuration.getProperty("mailbox.username") == null || Play.configuration.getProperty("mailbox.password") == null) {
            Logger.error("Please configure mailbox credentials in conf/credentials.conf");
            return;
        }
        Properties props = new Properties();
        props.setProperty("mail.imap.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
        props.setProperty("mail.imap.socketFactory.port", "993");
        Session session = Session.getDefaultInstance(props);
        Store store = session.getStore("imap");
        store.connect("imap.gmail.com", Play.configuration.getProperty("mailbox.username"), Play.configuration.getProperty("mailbox.password"));
        Folder folder = store.getFolder("jobs");
        folder.open(Folder.READ_WRITE);
        SearchTerm unstarred = new FlagTerm(new Flags(Flags.Flag.FLAGGED), false);
        Message[] messages = folder.search(unstarred);
        for (Message message : messages) {
            String contentString = "";
            List<Attachment> attachments = new ArrayList<Attachment>();
            if (message.getContent() instanceof String) {
                contentString = (String) message.getContent();
            } else if (message.getContent() instanceof Multipart) {
                Multipart mp = (Multipart) message.getContent();
                for (int j = 0; j < mp.getCount(); j++) {
                    Part part = mp.getBodyPart(j);
                    String disposition = part.getDisposition();
                    if (disposition == null
                            || ((disposition != null) && (disposition.equalsIgnoreCase(Part.ATTACHMENT) || disposition
                                    .equalsIgnoreCase(Part.INLINE)))) {
                        MimeBodyPart mbp = (MimeBodyPart) part;
                        if (mbp.isMimeType("text/plain")) {
                            contentString += (String) mbp.getContent();
                        } else {
                            attachments.add(saveAttachment(part));
                        }
                    }
                }
            }
            String name = ((InternetAddress) message.getFrom()[0]).getPersonal();
            String email = ((InternetAddress) message.getFrom()[0]).getAddress();
            String to = ((InternetAddress) message.getAllRecipients()[0]).getAddress();
            if("jobs@zenexity.com".equals(to)) {
                JobApplication application = new JobApplication(name, email, contentString, attachments);
                application.create();
                for(Attachment attachment : attachments) {
                    attachment.jobApplication = application;
                    attachment.create();
                }
                Mails.applied(application);
            } else {
                Pattern regexp = Pattern.compile("^jobs[+][^@]{5}-([0-9]+)@.*$");
                Matcher matcher = regexp.matcher(to);
                if(matcher.matches()) {
                    Long id = Long.parseLong(matcher.group(1));
                    JobApplication application = JobApplication.findById(id);
                    if(application == null) {
                        Logger.warn("Job application not found %s, for %s", id, to);
                    } else {
                        application.addMessage(name, email, contentString);
                        application.save();
                    }
                } else {
                    Logger.warn("Unknow address --> %s", to);
                }
            }
            if (Play.mode == Play.Mode.PROD) {
                message.setFlag(Flag.FLAGGED, true);
            }
        }
        folder.close(false);
        store.close();
    }

Output:
    public void doJob() throws Exception {
        if(Play.configuration.getProperty("mailbox.username") == null || Play.configuration.getProperty("mailbox.password") == null) {
            Logger.error("Please configure mailbox credentials in conf/credentials.conf");
            return;
        }
        Properties props = new Properties();
        props.setProperty("mail.imap.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
        props.setProperty("mail.imap.socketFactory.port", "993");
        Session session = Session.getDefaultInstance(props);
        Store store = session.getStore("imap");
        store.connect("imap.gmail.com", Play.configuration.getProperty("mailbox.username"), Play.configuration.getProperty("mailbox.password"));
        Folder folder = store.getFolder("jobs");
        folder.open(Folder.READ_WRITE);
        SearchTerm unstarred = new FlagTerm(new Flags(Flags.Flag.FLAGGED), false);
        Message[] messages = folder.search(unstarred);
        for (Message message : messages) {
            String contentString = "";
            List<Attachment> attachments = new ArrayList<Attachment>();
            if (message.getContent() instanceof String) {
                contentString = (String) message.getContent();
            } else if (message.getContent() instanceof Multipart) {
                Multipart mp = (Multipart) message.getContent();
                for (int j = 0; j < mp.getCount(); j++) {
                    Part part = mp.getBodyPart(j);
                    String disposition = part.getDisposition();
                    if (disposition == null
                            || ((disposition != null) && (disposition.equalsIgnoreCase(Part.ATTACHMENT) || disposition
                                    .equalsIgnoreCase(Part.INLINE)))) {
                        MimeBodyPart mbp = (MimeBodyPart) part;
                        if (mbp.isMimeType("text/plain")) {
                            contentString += (String) mbp.getContent();
                        } else {
                            attachments.add(saveAttachment(part));
                        }
                    }
                }
            }
            String name = ((InternetAddress) message.getFrom()[0]).getPersonal();
            String email = ((InternetAddress) message.getFrom()[0]).getAddress();
            String to = ((InternetAddress) message.getAllRecipients()[0]).getAddress();
            if("jobs@zenexity.com".equals(to)) {
                JobApplication application = new JobApplication(name, email, contentString, attachments);
                application.create();
                for(Attachment attachment : attachments) {
                    attachment.jobApplication = application;
                    attachment.create();
                }
                Mails.applied(application);
            } else {
                Pattern regexp = Pattern.compile("^jobs[+][^@]{5}-([0-9]+)@.*$");
                Matcher matcher = regexp.matcher(to);
                if(matcher.matches()) {
                    Long id = Long.parseLong(matcher.group(1));
                    JobApplication application = JobApplication.findById(id);
                    if(application == null) {
                        Logger.warn("Job application not found %s, for %s", id, to);
                    } else {
                        application.addMessage(name, email, contentString);
                        application.save();
                    }
                } else {
                    Logger.warn("Unknow address --> %s", to);
                }
            }
            if (Play.mode == Play.Mode.PROD || true) {
                message.setFlag(Flag.FLAGGED, true);
            }
        }
        folder.close(false);
        store.close();
    }


Input:
	public boolean createTexturePart(String texturePartID, String textureID,
			Rectangle rectangle) {
		Texture texture = TextureManager.getInstance().get(textureID);
		Rectangle scaledRectangle = rectangle.scaleAll(new Vector2f(texture
				.getWidth(), texture.getHeight()));
		TexturePart part = new TexturePart(texture, scaledRectangle);
		return put(texturePartID, part);
	}

Output:
	public boolean createTexturePart(String texturePartID, String textureID,
			Rectangle rectangle) {
		Texture texture = TextureManager.getInstance().get(textureID);
		float width = (float) texture.getWidth();
		float height = (float) texture.getHeight();
		Vector2f scale = new Vector2f(1 / width, 1 / height);
		Rectangle scaledRectangle = rectangle.scaleAll(scale);
		TexturePart part = new TexturePart(texture, scaledRectangle);
		return put(texturePartID, part);
	}


Input:
	private static void parse(String in2) {
		String[] result = in.split(" ", 2);
		switch (result[0]) {
		case "about":
			System.out
					.println("Echode version 0.3\nMade by Erik Konijn and Marks Polakovs");
			break;
		case "kill":
			System.out.println("Echode shut down succesfully.");
			System.exit(0);
			break;
		case "help":
			System.out
					.println("List of commands:\n"
							+ "about ----------------------------------- Gives some info about ECHODE\n"
							+ "help ---------------------------------------------- Lists all commands\n"
							+ "kill ---------------------------------------- Quits the ECHODE console\n"
							+ "version ------------------------ Outputs current Echode version number\n"
							+ "time <all|date|digital> ---------------------------------- Outputs time");
			break;
		case "version":
			System.out.println("0.3");
			break;
		case "time":
			try {
				switch (result[1]) {
				case "all":
					String alltime = new SimpleDateFormat(
							"yyyy-MM-dd HH:mm:ss").format(Calendar
							.getInstance().getTime());
					System.out.println(alltime);
					break;
				case "date":
					String datetime = new SimpleDateFormat(
							"yyyy-MM-dd").format(Calendar
							.getInstance().getTime());
					System.out.println(datetime);
					break;
				case "digital":
					String digitaltime = new SimpleDateFormat(
							"HH:mm:ss").format(Calendar
							.getInstance().getTime());
					System.out.println(digitaltime);
					break;
				default:
					System.out.println("Usage: 'time <all|date|digital>'");
					break;
				}
			} catch (ArrayIndexOutOfBoundsException e) {
				System.out.println("Usage: 'time <all|date|digital>'");
			}
			break;
		default:
			System.out.println("Not implemented yet.");
			break;
		}
	}

Output:
	private static void parse(String in2) {
		String[] result = in.split(" ", 2);
		switch (result[0]) {
		case "about":
			System.out
					.println("Echode version 0.3\nMade by Erik Konijn and Marks Polakovs");
			break;
		case "kill":
			System.out.println("Echode shut down succesfully.");
			System.exit(0);
			break;
		case "help":
			System.out
					.println("List of commands:\n"
							+ "about ----------------------------------- Gives some info about ECHODE\n"
							+ "help ---------------------------------------------- Lists all commands\n"
							+ "kill ---------------------------------------- Quits the ECHODE console\n"
							+ "version ------------------------ Outputs current Echode version number\n"
							+ "time <all|date|digital> --------------------------------- Outputs time\n");
			break;
		case "version":
			System.out.println("0.3");
			break;
		case "time":
			try {
				switch (result[1]) {
				case "all":
					String alltime = new SimpleDateFormat(
							"yyyy-MM-dd HH:mm:ss").format(Calendar
							.getInstance().getTime());
					System.out.println(alltime);
					break;
				case "date":
					String datetime = new SimpleDateFormat(
							"yyyy-MM-dd").format(Calendar
							.getInstance().getTime());
					System.out.println(datetime);
					break;
				case "digital":
					String digitaltime = new SimpleDateFormat(
							"HH:mm:ss").format(Calendar
							.getInstance().getTime());
					System.out.println(digitaltime);
					break;
				default:
					System.out.println("Usage: 'time <all|date|digital>'");
					break;
				}
			} catch (ArrayIndexOutOfBoundsException e) {
				System.out.println("Usage: 'time <all|date|digital>'");
			}
			break;
		default:
			System.out.println("Not implemented yet.");
			break;
		}
	}


Input:
    public void Draw()
    {
        Paint pa = new Paint();
        RMR.c.save();
        {
            int mapW = this.width * 32;
            int mapH = this.height * 32;
            Player p = this.p0;
            double mapRotation = Math.toDegrees(Math.asin(Math.abs(p.posY - p.prevPosY) / Math.sqrt(Math.pow(p.posX - p.prevPosX, 2) + Math.pow(p.posY - p.prevPosY, 2))));
            if ((p.posX - p.prevPosX) >= 0)
            {
                if ((p.posY - p.prevPosY) >= 0)
                {
                    mapRotation = 180 - mapRotation;
                }
                else
                {
                    mapRotation = 180 + mapRotation;
                }
            }
            else
            {
                if ((p.posY - p.prevPosY) < 0)
                {
                    mapRotation = 360 - mapRotation;
                }
            }
            RMR.c.scale(((float) RMR.sw.getWidth() / (float) mapH), ((float) RMR.sw.getWidth() / (float) mapH));
            Rect src = new Rect();
            Rect dst = new Rect();
            float α = 0.9f;
            RMR.c.save();
            {
                RMR.c.translate(RMR.mapSideLength * 32 / 2, RMR.mapSideLength * 32 / 2);
                double delta = prevFilteredCompass + Math.toDegrees(RMR.compass.orientationData[0]);
                Log.d("compass", delta + " " + prevFilteredCompass + " " + (Math.abs(delta) > 180));
                delta = (delta > 180) ? (delta - 360) : ((delta < -180) ? (delta + 360) : delta);
                prevFilteredCompass = (float) (α * delta - Math.toDegrees(RMR.compass.orientationData[0]));
                if (this.corner1fixed && this.corner2fixed)
                {
                    RMR.c.rotate((!Double.isNaN(mapRotation) ? (float) mapRotation : 0) + prevFilteredCompass, 0, 0);
                }
                RMR.c.translate(-this.p0.posY, -this.p0.posX);
                pa.setColor(Color.DKGRAY);
                RMR.c.save();
                {
                    RMR.c.drawLine(0, 0, 32 * this.width, 0, pa);
                    RMR.c.drawLine(0, 0, 0, 32 * this.height, pa);
                    RMR.c.drawLine(32 * this.width, 32 * this.height, 32 * this.width, 0, pa);
                    RMR.c.drawLine(32 * this.width, 32 * this.height, 0, 32 * this.height, pa);
                }
                RMR.c.restore();
                pa = new Paint();
                RMR.c.save();
                {
                    if((System.currentTimeMillis() / 30) % 2 == 0) RMGR.tile_0_iterator++;
                    if(RMGR.tile_0_iterator == RMGR.TILE_0.length) RMGR.tile_0_iterator = 0;
                    if((System.currentTimeMillis() / 30) % 2 == 0) RMGR.tile_1_iterator++;
                    if(RMGR.tile_1_iterator == RMGR.TILE_1.length) RMGR.tile_1_iterator = 0;
                    for (int i = 0; i < this.height; i++)
                    {
                        for (int j = 0; j < this.width; j++)
                        {
                            switch (this.tiles[j][i])
                            {
                                default:
                                    continue;
                                case 1:
                                    RMR.c.save();
                                    {
                                        int it =  RMGR.tile_0_iterator + i + j;
                                        it %= RMGR.TILE_0.length;
                                        RMR.c.translate(i * 32, j * 32);
                                        src.set(0, 0, RMGR.TILE_0[it].getWidth(), RMGR.TILE_0[it].getHeight());
                                        dst.set(0, 0, 32, 32);
                                        pa.setColor(Color.WHITE);
                                        RMR.c.drawBitmap(RMGR.TILE_0[it], src, dst, pa);
                                    }
                                    RMR.c.restore();
                                    break;
                                case 2:
                                    RMR.c.save();
                                    {
                                        int it =  RMGR.tile_1_iterator + i + j;
                                        it %= RMGR.TILE_1.length;
                                        RMR.c.translate(i * 32, j * 32);
                                        src.set(0, 0, RMGR.TILE_1[it].getWidth(), RMGR.TILE_1[it].getHeight());
                                        dst.set(0, 0, 32, 32);
                                        pa.setColor(Color.WHITE);
                                        RMR.c.drawBitmap(RMGR.TILE_1[it], src, dst, pa);
                                    }
                                    RMR.c.restore();
                                    break;
                            }
                        }
                    }
                }
                RMR.c.restore();
                RMR.c.save();
                {
                    if((System.currentTimeMillis() / 30) % 2 == 0) RMGR.pickup_0_iterator++;
                    if(RMGR.pickup_0_iterator == RMGR.PICKUP_0.length) RMGR.pickup_0_iterator = 0;
                    if((System.currentTimeMillis() / 30) % 2 == 0) RMGR.pickup_1_iterator++;
                    if(RMGR.pickup_1_iterator == RMGR.PICKUP_1.length) RMGR.pickup_1_iterator = 0;
                    for (int i = 0; i < this.pickups.size(); i++)
                    {
                        RMR.c.save();
                        {
                            RMR.c.translate(this.pickups.get(i)[1] * 32, this.pickups.get(i)[0] * 32);
                            pa.setAlpha((int) Math.floor(100 / ((float)this.pickups.get(i)[3] / ((float)this.pickups.get(i)[2] != 0 ? (float)this.pickups.get(i)[2] : 1))));
                            switch (this.pickups.get(i)[4])
                            {
                                default:
                                case 1:
                                    int it = (RMGR.pickup_0_iterator + this.pickups.get(i)[0] + this.pickups.get(i)[1]);
                                    it %= RMGR.PICKUP_0.length;
                                    src.set(0, 0, RMGR.PICKUP_0[it].getWidth(), RMGR.PICKUP_0[it].getHeight());
                                    dst.set(4, 4, 28, 28);
                                    RMR.c.drawBitmap(RMGR.PICKUP_0[it], src, dst, pa);
                                    break;
                                case 2:
                                    int it1 = (RMGR.pickup_1_iterator + this.pickups.get(i)[0] + this.pickups.get(i)[1]);
                                    it1 %= RMGR.PICKUP_1.length;
                                    src.set(0, 0, RMGR.PICKUP_1[it1].getWidth(), RMGR.PICKUP_1[it1].getHeight());
                                    dst.set(4, 4, 28, 28);
                                    RMR.c.drawBitmap(RMGR.PICKUP_1[it1], src, dst, pa);
                                    break;
                            }
                        }
                        RMR.c.restore();
                    }
                }
                RMR.c.restore();
                pa = new Paint();
                if (this.state == MapState.Suspended)
                {
                    RMR.c.save();
                    {
                        pa.setColor(Color.BLACK);
                        pa.setAlpha(80);
                        RMR.c.drawRect(0, 0, RMR.mapSideLength * 32, this.suspendTile.x * 32, pa);
                        RMR.c.drawRect((this.suspendTile.y + 1) * 32, this.suspendTile.x * 32, RMR.mapSideLength * 32, (this.suspendTile.x + 1) * 32, pa);
                        RMR.c.drawRect(0, this.suspendTile.x * 32, this.suspendTile.y * 32, (this.suspendTile.x + 1) * 32, pa);
                        RMR.c.drawRect(0, (this.suspendTile.x + 1) * 32, RMR.mapSideLength * 32, RMR.mapSideLength * 32, pa);
                        pa.setColor(Color.YELLOW);
                        pa.setAlpha((int) Math.floor((Math.sin(System.currentTimeMillis() / 100) + 2) * 30));
                        RMR.c.drawRect(this.suspendTile.y * 32, this.suspendTile.x * 32, (this.suspendTile.y + 1) * 32, (this.suspendTile.x + 1) * 32, pa);
                    }
                    RMR.c.restore();
                }
                RMR.c.save();
                {
                    pa.setColor(Color.WHITE);
                    RMR.c.translate(p1.posY, p1.posX);
                    src.set(0, 0, RMGR.CHAR_0.getWidth(), RMGR.CHAR_0.getHeight());
                    dst.set(-12, -12, 12, 12);
                    RMR.c.drawBitmap(RMGR.CHAR_0, src, dst, pa);
                }
                RMR.c.restore();
            }
            RMR.c.restore();
            RMR.c.save();
            {
                pa.setColor(Color.WHITE);
                RMR.c.translate(RMR.mapSideLength * 32 / 2, RMR.mapSideLength * 32 / 2);
                src.set(0, 0, RMGR.CHAR_0.getWidth(), RMGR.CHAR_0.getHeight());
                dst.set(-12, -12, 12, 12);
                RMR.c.drawBitmap(RMGR.CHAR_0, src, dst, pa);
            }
            RMR.c.restore();
        }
        RMR.c.restore();
    }

Output:
    public void Draw()
    {
        Paint pa = new Paint();
        RMR.c.save();
        {
            int mapW = this.width * 32;
            int mapH = this.height * 32;
            Player p = this.p0;
            double mapRotation = Math.toDegrees(Math.asin(Math.abs(p.posY - p.prevPosY) / Math.sqrt(Math.pow(p.posX - p.prevPosX, 2) + Math.pow(p.posY - p.prevPosY, 2))));
            if ((p.posX - p.prevPosX) >= 0)
            {
                if ((p.posY - p.prevPosY) >= 0)
                {
                    mapRotation = 180 - mapRotation;
                }
                else
                {
                    mapRotation = 180 + mapRotation;
                }
            }
            else
            {
                if ((p.posY - p.prevPosY) < 0)
                {
                    mapRotation = 360 - mapRotation;
                }
            }
            RMR.c.scale(((float) RMR.sw.getWidth() / (float) mapH), ((float) RMR.sw.getWidth() / (float) mapH));
            Rect src = new Rect();
            Rect dst = new Rect();
            float α = 0.9f;
            RMR.c.save();
            {
                RMR.c.translate(RMR.mapSideLength * 32 / 2, RMR.mapSideLength * 32 / 2);
                double delta = prevFilteredCompass + Math.toDegrees(RMR.compass.orientationData[0]);
                Log.d("compass", delta + " " + prevFilteredCompass + " " + (Math.abs(delta) > 180));
                delta = (delta > 180) ? (delta - 360) : ((delta < -180) ? (delta + 360) : delta);
                prevFilteredCompass = (float) (α * delta - Math.toDegrees(RMR.compass.orientationData[0]));
                if (this.corner1fixed && this.corner2fixed)
                {
                    RMR.c.rotate(prevFilteredCompass, 0, 0);
                }
                RMR.c.translate(-this.p0.posY, -this.p0.posX);
                pa.setColor(Color.DKGRAY);
                RMR.c.save();
                {
                    RMR.c.drawLine(0, 0, 32 * this.width, 0, pa);
                    RMR.c.drawLine(0, 0, 0, 32 * this.height, pa);
                    RMR.c.drawLine(32 * this.width, 32 * this.height, 32 * this.width, 0, pa);
                    RMR.c.drawLine(32 * this.width, 32 * this.height, 0, 32 * this.height, pa);
                }
                RMR.c.restore();
                pa = new Paint();
                RMR.c.save();
                {
                    if((System.currentTimeMillis() / 30) % 2 == 0) RMGR.tile_0_iterator++;
                    if(RMGR.tile_0_iterator == RMGR.TILE_0.length) RMGR.tile_0_iterator = 0;
                    if((System.currentTimeMillis() / 30) % 2 == 0) RMGR.tile_1_iterator++;
                    if(RMGR.tile_1_iterator == RMGR.TILE_1.length) RMGR.tile_1_iterator = 0;
                    for (int i = 0; i < this.height; i++)
                    {
                        for (int j = 0; j < this.width; j++)
                        {
                            switch (this.tiles[j][i])
                            {
                                default:
                                    continue;
                                case 1:
                                    RMR.c.save();
                                    {
                                        int it =  RMGR.tile_0_iterator + i + j;
                                        it %= RMGR.TILE_0.length;
                                        RMR.c.translate(i * 32, j * 32);
                                        src.set(0, 0, RMGR.TILE_0[it].getWidth(), RMGR.TILE_0[it].getHeight());
                                        dst.set(0, 0, 32, 32);
                                        pa.setColor(Color.WHITE);
                                        RMR.c.drawBitmap(RMGR.TILE_0[it], src, dst, pa);
                                    }
                                    RMR.c.restore();
                                    break;
                                case 2:
                                    RMR.c.save();
                                    {
                                        int it =  RMGR.tile_1_iterator + i + j;
                                        it %= RMGR.TILE_1.length;
                                        RMR.c.translate(i * 32, j * 32);
                                        src.set(0, 0, RMGR.TILE_1[it].getWidth(), RMGR.TILE_1[it].getHeight());
                                        dst.set(0, 0, 32, 32);
                                        pa.setColor(Color.WHITE);
                                        RMR.c.drawBitmap(RMGR.TILE_1[it], src, dst, pa);
                                    }
                                    RMR.c.restore();
                                    break;
                            }
                        }
                    }
                }
                RMR.c.restore();
                RMR.c.save();
                {
                    if((System.currentTimeMillis() / 30) % 2 == 0) RMGR.pickup_0_iterator++;
                    if(RMGR.pickup_0_iterator == RMGR.PICKUP_0.length) RMGR.pickup_0_iterator = 0;
                    if((System.currentTimeMillis() / 30) % 2 == 0) RMGR.pickup_1_iterator++;
                    if(RMGR.pickup_1_iterator == RMGR.PICKUP_1.length) RMGR.pickup_1_iterator = 0;
                    for (int i = 0; i < this.pickups.size(); i++)
                    {
                        RMR.c.save();
                        {
                            RMR.c.translate(this.pickups.get(i)[1] * 32, this.pickups.get(i)[0] * 32);
                            pa.setAlpha((int) Math.floor(100 / ((float)this.pickups.get(i)[3] / ((float)this.pickups.get(i)[2] != 0 ? (float)this.pickups.get(i)[2] : 1))));
                            switch (this.pickups.get(i)[4])
                            {
                                default:
                                case 1:
                                    int it = (RMGR.pickup_0_iterator + this.pickups.get(i)[0] + this.pickups.get(i)[1]);
                                    it %= RMGR.PICKUP_0.length;
                                    src.set(0, 0, RMGR.PICKUP_0[it].getWidth(), RMGR.PICKUP_0[it].getHeight());
                                    dst.set(4, 4, 28, 28);
                                    RMR.c.drawBitmap(RMGR.PICKUP_0[it], src, dst, pa);
                                    break;
                                case 2:
                                    int it1 = (RMGR.pickup_1_iterator + this.pickups.get(i)[0] + this.pickups.get(i)[1]);
                                    it1 %= RMGR.PICKUP_1.length;
                                    src.set(0, 0, RMGR.PICKUP_1[it1].getWidth(), RMGR.PICKUP_1[it1].getHeight());
                                    dst.set(4, 4, 28, 28);
                                    RMR.c.drawBitmap(RMGR.PICKUP_1[it1], src, dst, pa);
                                    break;
                            }
                        }
                        RMR.c.restore();
                    }
                }
                RMR.c.restore();
                pa = new Paint();
                if (this.state == MapState.Suspended)
                {
                    RMR.c.save();
                    {
                        pa.setColor(Color.BLACK);
                        pa.setAlpha(80);
                        RMR.c.drawRect(0, 0, RMR.mapSideLength * 32, this.suspendTile.x * 32, pa);
                        RMR.c.drawRect((this.suspendTile.y + 1) * 32, this.suspendTile.x * 32, RMR.mapSideLength * 32, (this.suspendTile.x + 1) * 32, pa);
                        RMR.c.drawRect(0, this.suspendTile.x * 32, this.suspendTile.y * 32, (this.suspendTile.x + 1) * 32, pa);
                        RMR.c.drawRect(0, (this.suspendTile.x + 1) * 32, RMR.mapSideLength * 32, RMR.mapSideLength * 32, pa);
                        pa.setColor(Color.YELLOW);
                        pa.setAlpha((int) Math.floor((Math.sin(System.currentTimeMillis() / 100) + 2) * 30));
                        RMR.c.drawRect(this.suspendTile.y * 32, this.suspendTile.x * 32, (this.suspendTile.y + 1) * 32, (this.suspendTile.x + 1) * 32, pa);
                    }
                    RMR.c.restore();
                }
                RMR.c.save();
                {
                    pa.setColor(Color.WHITE);
                    RMR.c.translate(p1.posY, p1.posX);
                    src.set(0, 0, RMGR.CHAR_0.getWidth(), RMGR.CHAR_0.getHeight());
                    dst.set(-12, -12, 12, 12);
                    RMR.c.drawBitmap(RMGR.CHAR_0, src, dst, pa);
                }
                RMR.c.restore();
            }
            RMR.c.restore();
            RMR.c.save();
            {
                pa.setColor(Color.WHITE);
                RMR.c.translate(RMR.mapSideLength * 32 / 2, RMR.mapSideLength * 32 / 2);
                src.set(0, 0, RMGR.CHAR_0.getWidth(), RMGR.CHAR_0.getHeight());
                dst.set(-12, -12, 12, 12);
                RMR.c.drawBitmap(RMGR.CHAR_0, src, dst, pa);
            }
            RMR.c.restore();
        }
        RMR.c.restore();
    }


Input:
	public void onReceive(Context context, Intent intent) {
		mContext = context;
		mContentResolver = context.getContentResolver();
		mPreferences = context.getSharedPreferences("preferences",
				Context.MODE_PRIVATE);
		boolean firstTime = mPreferences.getBoolean("firstTime", true);
		if (firstTime) {
			SharedPreferences.Editor editor = mPreferences.edit();
			editor.putBoolean("firstTime", false);
			editor.commit();
			new CreateDatabase().execute();
		} else
			new ScanForPackages().execute();
	}

Output:
	public void onReceive(Context context, Intent intent) {
		mContext = context;
		mContentResolver = context.getContentResolver();
		mPreferences = context.getSharedPreferences("preferences",
				Context.MODE_PRIVATE);
		boolean firstTime = mPreferences.getBoolean("firstTime", true);
		if (firstTime) {
			SharedPreferences.Editor editor = mPreferences.edit();
			editor.putBoolean("firstTime", false);
			editor.commit();
			try {
				new CreateDatabase().execute();
			} catch (Exception e) {
			}
		} else {
			try {
				new ScanForPackages().execute();
			} catch (Exception e) {
			}
		}
	}


Input:
    private void updateChildrens(Vector3f cam) {
        TerrainQuad q1 = cache.get(cam.add(quadIndex[5]));
        TerrainQuad q2 = cache.get(cam.add(quadIndex[6]));
        TerrainQuad q3 = cache.get(cam.add(quadIndex[9]));
        TerrainQuad q4 = cache.get(cam.add(quadIndex[10]));
        int dx = 0;
        int dy = 0;
        if (currentCell != null) {
            dx = (int) (cam.x - currentCell.x);
            dy = (int) (cam.z - currentCell.z);
        }
        int kxm = 0;
        int kxM = 4;
        int kym = 0;
        int kyM = 4;
        if (dx == -1) {
            kxM = 3;
        } else if (dx == 1) {
            kxm = 1;
        }
        if (dy == -1) {
            kyM = 3;
        } else if (dy == 1) {
            kym = 1;
        }
        for (int i = kym; i < kyM; i++) {
            for (int j = kxm; j < kxM; j++) {
                cache.get(cam.add(quadIndex[i * 4 + j]));
            }
        }
        if (q1 == null || q2 == null || q3 == null || q4 == null) {
            try {
                executor.submit(new UpdateQuadCache(cam, true)).get();
                q1 = cache.get(cam.add(quadIndex[5]));
                q2 = cache.get(cam.add(quadIndex[6]));
                q3 = cache.get(cam.add(quadIndex[9]));
                q4 = cache.get(cam.add(quadIndex[10]));
            } catch (InterruptedException ex) {
                Logger.getLogger(TerrainGrid.class.getName()).log(Level.SEVERE, null, ex);
                return;
            } catch (ExecutionException ex) {
                Logger.getLogger(TerrainGrid.class.getName()).log(Level.SEVERE, null, ex);
                return;
            }
        }
        executor.execute(new UpdateQuadCache(cam));
        RigidBodyControl control = getControl(RigidBodyControl.class);
        PhysicsSpace space = null;
        if (control != null) {
            space = control.getPhysicsSpace();
            space.remove(this);
            this.removeControl(control);
        }
        this.removeQuad(1);
        this.removeQuad(2);
        this.removeQuad(3);
        this.removeQuad(4);
        attachQuadAt(q1, 1);
        attachQuadAt(q2, 2);
        attachQuadAt(q3, 3);
        attachQuadAt(q4, 4);
        this.currentCell = cam;
        this.setLocalTranslation(cam.mult(this.getLocalScale().mult(this.quadSize)));
        this.updateModelBound();
        if (control != null) {
            int collisionGroupsCollideWith = control.getCollideWithGroups();
            int collisionGroups = control.getCollisionGroup();
            control = new RigidBodyControl(new HeightfieldCollisionShape(getHeightMap(), getLocalScale()), 0);
            control.setCollideWithGroups(collisionGroupsCollideWith);
            control.setCollisionGroup(collisionGroups);
            this.addControl(control);
            space.add(this);
        }
    }

Output:
    private void updateChildrens(Vector3f cam) {
        TerrainQuad q1 = cache.get(cam.add(quadIndex[5]));
        TerrainQuad q2 = cache.get(cam.add(quadIndex[6]));
        TerrainQuad q3 = cache.get(cam.add(quadIndex[9]));
        TerrainQuad q4 = cache.get(cam.add(quadIndex[10]));
        int dx = 0;
        int dy = 0;
        if (currentCell != null) {
            dx = (int) (cam.x - currentCell.x);
            dy = (int) (cam.z - currentCell.z);
        }
        int kxm = 0;
        int kxM = 4;
        int kym = 0;
        int kyM = 4;
        if (dx == -1) {
            kxM = 3;
        } else if (dx == 1) {
            kxm = 1;
        }
        if (dy == -1) {
            kyM = 3;
        } else if (dy == 1) {
            kym = 1;
        }
        for (int i = kym; i < kyM; i++) {
            for (int j = kxm; j < kxM; j++) {
                cache.get(cam.add(quadIndex[i * 4 + j]));
            }
        }
        if (q1 == null || q2 == null || q3 == null || q4 == null) {
            try {
                executor.submit(new UpdateQuadCache(cam, true)).get();
                q1 = cache.get(cam.add(quadIndex[5]));
                q2 = cache.get(cam.add(quadIndex[6]));
                q3 = cache.get(cam.add(quadIndex[9]));
                q4 = cache.get(cam.add(quadIndex[10]));
            } catch (InterruptedException ex) {
                Logger.getLogger(TerrainGrid.class.getName()).log(Level.SEVERE, null, ex);
                return;
            } catch (ExecutionException ex) {
                Logger.getLogger(TerrainGrid.class.getName()).log(Level.SEVERE, null, ex);
                return;
            }
        }
        executor.execute(new UpdateQuadCache(cam));
        RigidBodyControl control = getControl(RigidBodyControl.class);
        PhysicsSpace space = null;
        if (control != null) {
            space = control.getPhysicsSpace();
            space.remove(this);
            this.removeControl(control);
        }
        this.removeQuad(1);
        this.removeQuad(2);
        this.removeQuad(3);
        this.removeQuad(4);
        attachQuadAt(q1, 1);
        attachQuadAt(q2, 2);
        attachQuadAt(q3, 3);
        attachQuadAt(q4, 4);
        this.currentCell = cam;
        this.setLocalTranslation(cam.mult(this.getLocalScale().mult(this.quadSize-1)));
        this.updateModelBound();
        if (control != null) {
            int collisionGroupsCollideWith = control.getCollideWithGroups();
            int collisionGroups = control.getCollisionGroup();
            control = new RigidBodyControl(new HeightfieldCollisionShape(getHeightMap(), getLocalScale()), 0);
            control.setCollideWithGroups(collisionGroupsCollideWith);
            control.setCollisionGroup(collisionGroups);
            this.addControl(control);
            space.add(this);
        }
    }


Input:
	public void write(Writer writer) throws IOException {
		writer.write('{');
		for (Entry<String, Object> entry : values.entrySet()) {
			writer.write(JsonUtils.format(entry.getKey()));
			writer.write(':');
			writer.write(JsonUtils.format(entry.getValue()));
		}
		writer.write('}');
	}

Output:
	public void write(Writer writer) throws IOException {
		writer.write('{');
		boolean first = true;
		for (Entry<String, Object> entry : values.entrySet()) {
			if (first) {
				first = false;
			} else {
				writer.write(',');
			}
			writer.write(JsonUtils.format(entry.getKey()));
			writer.write(':');
			writer.write(JsonUtils.format(entry.getValue()));
		}
		writer.write('}');
	}


Input:
	public static void SetSpawnTick(Player p,String spawntick) {
		if(IsInteger(spawntick)) {
			Block b = p.getTargetBlock(null, 200);
			if(b.getTypeId() == 52) {
				if(IsEMASpawner(b.getLocation())) {
					SpawnerCache sc = getSpawner(b.getLocation());
					sc.TimerTick = Integer.parseInt(spawntick);
					sc.TimerEnabled = true;
					int TimerTickActual = sc.TimerTick * 20;
					if(!SpawnerCacheTimers.get(sc).equals(null)) SpawnerCacheTimers.get(sc).cancel();
					SpawnerCacheTimers.put(sc, new MonsterSpawnTimer(sc).runTaskTimer(Bukkit.getPluginManager().getPlugin("EasyMobArmory"), TimerTickActual, TimerTickActual));
					SaveSpawnerCache(sc);
					String LocString = Spawners.LocString(sc.getLocation());
					Spawners.addtolist("Spawners.Running.List", LocString);
					Messenger.playermessage("The spawner at " + LocString + " had it's TimerTick set to " + spawntick + ".", p);
					Messenger.info("The spawner at " + LocString + " had it's TimerTick set to " + spawntick + " by " + p.getName() + ".");
				}else{
					Messenger.playermessage("The block is a Spawner, but not a EMA-Spawner.", p);
					Messenger.playermessage("Select the block with a bone and with EMA enabled and add some EMA eggs to make it an EMA spawner.", p);
				}
			}else{
				Messenger.playermessage("Please look at a EMA-Spawner before typing this command.", p);
			}
		}else{
			Messenger.playermessage("The second argument must be an integer.", p);
		}
	}

Output:
	public static void SetSpawnTick(Player p,String spawntick) {
		if(IsInteger(spawntick)) {
			Block b = p.getTargetBlock(null, 200);
			if(b.getTypeId() == 52) {
				if(IsEMASpawner(b.getLocation())) {
					SpawnerCache sc = getSpawner(b.getLocation());
					sc.TimerTick = Integer.parseInt(spawntick);
					sc.TimerEnabled = true;
					int TimerTickActual = sc.TimerTick * 20;
					if(SpawnerCacheTimers.get(sc) == null) SpawnerCacheTimers.get(sc).cancel();
					SpawnerCacheTimers.put(sc, new MonsterSpawnTimer(sc).runTaskTimer(Bukkit.getPluginManager().getPlugin("EasyMobArmory"), TimerTickActual, TimerTickActual));
					SaveSpawnerCache(sc);
					String LocString = Spawners.LocString(sc.getLocation());
					Spawners.addtolist("Spawners.Running.List", LocString);
					Messenger.playermessage("The spawner at " + LocString + " had it's TimerTick set to " + spawntick + ".", p);
					Messenger.info("The spawner at " + LocString + " had it's TimerTick set to " + spawntick + " by " + p.getName() + ".");
				}else{
					Messenger.playermessage("The block is a Spawner, but not a EMA-Spawner.", p);
					Messenger.playermessage("Select the block with a bone and with EMA enabled and add some EMA eggs to make it an EMA spawner.", p);
				}
			}else{
				Messenger.playermessage("Please look at a EMA-Spawner before typing this command.", p);
			}
		}else{
			Messenger.playermessage("The second argument must be an integer.", p);
		}
	}


Input:
    protected final int performOperation(final SyncResult syncResult) {
        int redirectCount = 0;
        do {
            final EasResponse response;
            try {
                if (registerClientCert()) {
                    response = mConnection.executeHttpUriRequest(makeRequest(), getTimeout());
                } else {
                    if (syncResult != null) {
                        ++syncResult.stats.numAuthExceptions;
                    }
                    return RESULT_CLIENT_CERTIFICATE_REQUIRED;
                }
            } catch (final IOException e) {
                switch (mConnection.getStoppedReason()) {
                    case EasServerConnection.STOPPED_REASON_ABORT:
                        return RESULT_ABORT;
                    case EasServerConnection.STOPPED_REASON_RESTART:
                        return RESULT_RESTART;
                    default:
                        break;
                }
                LogUtils.e(LOG_TAG, e, "Exception while sending request");
                if (syncResult != null) {
                    ++syncResult.stats.numIoExceptions;
                }
                return RESULT_REQUEST_FAILURE;
            } catch (final IllegalStateException e) {
                LogUtils.e(LOG_TAG, e, "Exception while sending request");
                if (syncResult != null) {
                    syncResult.databaseError = true;
                }
                return RESULT_OTHER_FAILURE;
            }
            try {
                final int result;
                if (response.isSuccess()) {
                    try {
                        result = handleResponse(response, syncResult);
                        if (result >= 0) {
                            return result;
                        }
                    } catch (final IOException e) {
                        LogUtils.e(LOG_TAG, e, "Exception while handling response");
                        if (syncResult != null) {
                            ++syncResult.stats.numParseExceptions;
                        }
                        return RESULT_OTHER_FAILURE;
                    }
                } else {
                    result = RESULT_OTHER_FAILURE;
                }
                if (result == RESULT_FORBIDDEN || (response.isForbidden() && handleForbidden())) {
                    LogUtils.e(LOG_TAG, "Forbidden response");
                    if (syncResult != null) {
                        ++syncResult.stats.numAuthExceptions;
                    }
                    return RESULT_FORBIDDEN;
                }
                if (result == RESULT_PROVISIONING_ERROR || response.isProvisionError()) {
                    if (handleProvisionError(syncResult, mAccountId)) {
                        continue;
                    }
                    if (syncResult != null) {
                        ++syncResult.stats.numAuthExceptions;
                    }
                    return RESULT_PROVISIONING_ERROR;
                }
                if (response.isAuthError()) {
                    LogUtils.e(LOG_TAG, "Authentication error");
                    if (syncResult != null) {
                        ++syncResult.stats.numAuthExceptions;
                    }
                    if (response.isMissingCertificate()) {
                        return RESULT_CLIENT_CERTIFICATE_REQUIRED;
                    }
                    return RESULT_AUTHENTICATION_ERROR;
                }
                if (response.isRedirectError()) {
                    ++redirectCount;
                    mConnection.redirectHostAuth(response.getRedirectAddress());
                } else {
                    LogUtils.e(LOG_TAG, "Generic error");
                    if (syncResult != null) {
                        ++syncResult.stats.numIoExceptions;
                    }
                    return RESULT_OTHER_FAILURE;
                }
            } finally {
                response.close();
            }
        } while (redirectCount < MAX_REDIRECTS);
        LogUtils.e(LOG_TAG, "Too many redirects");
        if (syncResult != null) {
           syncResult.tooManyRetries = true;
        }
        return RESULT_TOO_MANY_REDIRECTS;
    }

Output:
    protected final int performOperation(final SyncResult syncResult) {
        int redirectCount = 0;
        do {
            final EasResponse response;
            try {
                if (registerClientCert()) {
                    response = mConnection.executeHttpUriRequest(makeRequest(), getTimeout());
                } else {
                    if (syncResult != null) {
                        ++syncResult.stats.numAuthExceptions;
                    }
                    return RESULT_CLIENT_CERTIFICATE_REQUIRED;
                }
            } catch (final IOException e) {
                switch (mConnection.getStoppedReason()) {
                    case EasServerConnection.STOPPED_REASON_ABORT:
                        return RESULT_ABORT;
                    case EasServerConnection.STOPPED_REASON_RESTART:
                        return RESULT_RESTART;
                    default:
                        break;
                }
                LogUtils.e(LOG_TAG, e, "Exception while sending request");
                if (syncResult != null) {
                    ++syncResult.stats.numIoExceptions;
                }
                return RESULT_REQUEST_FAILURE;
            } catch (final IllegalStateException e) {
                LogUtils.e(LOG_TAG, e, "Exception while sending request");
                if (syncResult != null) {
                    syncResult.databaseError = true;
                }
                return RESULT_OTHER_FAILURE;
            }
            try {
                final int result;
                if (response.isSuccess()) {
                    try {
                        result = handleResponse(response, syncResult);
                        if (result >= 0) {
                            return result;
                        }
                    } catch (final IOException e) {
                        LogUtils.e(LOG_TAG, e, "Exception while handling response");
                        if (syncResult != null) {
                            ++syncResult.stats.numParseExceptions;
                        }
                        return RESULT_OTHER_FAILURE;
                    }
                } else {
                    result = RESULT_OTHER_FAILURE;
                }
                if (result == RESULT_FORBIDDEN || (response.isForbidden() && handleForbidden())) {
                    LogUtils.e(LOG_TAG, "Forbidden response");
                    if (syncResult != null) {
                        ++syncResult.stats.numAuthExceptions;
                    }
                    return RESULT_FORBIDDEN;
                }
                if (result == RESULT_PROVISIONING_ERROR || response.isProvisionError()) {
                    if (handleProvisionError(syncResult, mAccountId)) {
                        continue;
                    }
                    if (syncResult != null) {
                        ++syncResult.stats.numAuthExceptions;
                    }
                    return RESULT_PROVISIONING_ERROR;
                }
                if (response.isAuthError()) {
                    LogUtils.e(LOG_TAG, "Authentication error");
                    if (syncResult != null) {
                        ++syncResult.stats.numAuthExceptions;
                    }
                    if (response.isMissingCertificate()) {
                        return RESULT_CLIENT_CERTIFICATE_REQUIRED;
                    }
                    return RESULT_AUTHENTICATION_ERROR;
                }
                if (response.isRedirectError()) {
                    ++redirectCount;
                    mConnection.redirectHostAuth(response.getRedirectAddress());
                } else {
                    LogUtils.e(LOG_TAG, "Generic error: " + response.getStatus());
                    if (syncResult != null) {
                        ++syncResult.stats.numIoExceptions;
                    }
                    return RESULT_OTHER_FAILURE;
                }
            } finally {
                response.close();
            }
        } while (redirectCount < MAX_REDIRECTS);
        LogUtils.e(LOG_TAG, "Too many redirects");
        if (syncResult != null) {
           syncResult.tooManyRetries = true;
        }
        return RESULT_TOO_MANY_REDIRECTS;
    }