/* RuntimeException_Sub2 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringReader;
import java.io.StringWriter;
import java.net.URL;

public class RuntimeException_Sub2 extends RuntimeException {
	String aString10955;
	public static String aString10956;
	public static int anInt10957;
	static long aLong10958;
	Throwable aThrowable10959;

	static final String method17283(String string, String string_0_, String string_1_) {
		for (int i = string.indexOf(string_0_); i != -1; i = string.indexOf(string_0_, i + string_1_.length()))
			string = new StringBuilder().append(string.substring(0, i)).append(string_1_).append(string.substring(i + string_0_.length())).toString();
		return string;
	}

	public static void method17284(String string, Throwable throwable) {
		try {
			String string_2_ = "";
			if (null != throwable)
				string_2_ = Class441_Sub8.method13834(throwable, 2001944104);
			if (string != null) {
				if (null != throwable)
					string_2_ = new StringBuilder().append(string_2_).append(" | ").toString();
				string_2_ = new StringBuilder().append(string_2_).append(string).toString();
			}
			Class531.method11777(string_2_, -1410624699);
			string_2_ = Class506.method11465(string_2_, 632627067);
			if (Class587_Sub13_Sub1.anApplet10333 != null) {
				String string_3_ = "Unknown";
				String string_4_ = "1.1";
				try {
					string_3_ = System.getProperty("java.vendor");
					string_4_ = System.getProperty("java.version");
				} catch (Exception exception) {
					/* empty */
				}
				URL url = new URL(Class587_Sub13_Sub1.anApplet10333.getCodeBase(), new StringBuilder().append("clienterror.ws?c=").append(521557007 * anInt10957).append("&cs=").append(1094588909 * Class566.anInt7335).append("&u=").append(null != aString10956 ? Class506.method11465(aString10956, 632627067) : new StringBuilder().append("").append(-485527343823823469L * aLong10958).toString()).append("&v1=").append(Class506.method11465(string_3_, 632627067)).append("&v2=").append(Class506.method11465(string_4_, 632627067)).append("&e=").append(string_2_).toString());
				DataInputStream datainputstream = new DataInputStream(url.openStream());
				datainputstream.read();
				datainputstream.close();
			}
		} catch (Exception exception) {
			exception.printStackTrace();
		}
	}

	public static RuntimeException_Sub2 method17285(Throwable throwable, String string) {
		RuntimeException_Sub2 runtimeexception_sub2;
		if (throwable instanceof RuntimeException_Sub2) {
			runtimeexception_sub2 = (RuntimeException_Sub2) throwable;
			StringBuilder stringbuilder = new StringBuilder();
			RuntimeException_Sub2 runtimeexception_sub2_5_ = runtimeexception_sub2;
			((RuntimeException_Sub2) runtimeexception_sub2_5_).aString10955 = stringbuilder.append(((RuntimeException_Sub2) runtimeexception_sub2_5_).aString10955).append(' ').append(string).toString();
		} else
			runtimeexception_sub2 = new RuntimeException_Sub2(throwable, string);
		return runtimeexception_sub2;
	}

	public static RuntimeException_Sub2 method17286(Throwable throwable, String string) {
		RuntimeException_Sub2 runtimeexception_sub2;
		if (throwable instanceof RuntimeException_Sub2) {
			runtimeexception_sub2 = (RuntimeException_Sub2) throwable;
			StringBuilder stringbuilder = new StringBuilder();
			RuntimeException_Sub2 runtimeexception_sub2_6_ = runtimeexception_sub2;
			((RuntimeException_Sub2) runtimeexception_sub2_6_).aString10955 = stringbuilder.append(((RuntimeException_Sub2) runtimeexception_sub2_6_).aString10955).append(' ').append(string).toString();
		} else
			runtimeexception_sub2 = new RuntimeException_Sub2(throwable, string);
		return runtimeexception_sub2;
	}

	static String method17287(Throwable throwable) throws IOException {
		String string;
		if (throwable instanceof RuntimeException_Sub2) {
			RuntimeException_Sub2 runtimeexception_sub2 = (RuntimeException_Sub2) throwable;
			string = new StringBuilder().append(((RuntimeException_Sub2) runtimeexception_sub2).aString10955).append(" | ").toString();
			throwable = (((RuntimeException_Sub2) runtimeexception_sub2).aThrowable10959);
		} else
			string = "";
		StringWriter stringwriter = new StringWriter();
		PrintWriter printwriter = new PrintWriter(stringwriter);
		throwable.printStackTrace(printwriter);
		printwriter.close();
		String string_7_ = stringwriter.toString();
		BufferedReader bufferedreader = new BufferedReader(new StringReader(string_7_));
		String string_8_ = bufferedreader.readLine();
		for (;;) {
			String string_9_ = bufferedreader.readLine();
			if (null == string_9_)
				break;
			int i = string_9_.indexOf('(');
			int i_10_ = string_9_.indexOf(')', 1 + i);
			String string_11_;
			if (-1 != i)
				string_11_ = string_9_.substring(0, i);
			else
				string_11_ = string_9_;
			string_11_ = string_11_.trim();
			string_11_ = string_11_.substring(string_11_.lastIndexOf(' ') + 1);
			string_11_ = string_11_.substring(string_11_.lastIndexOf('\t') + 1);
			string = new StringBuilder().append(string).append(string_11_).toString();
			if (-1 != i && -1 != i_10_) {
				int i_12_ = string_9_.indexOf(".java:", i);
				if (i_12_ >= 0)
					string = new StringBuilder().append(string).append(string_9_.substring(i_12_ + 5, i_10_)).toString();
			}
			string = new StringBuilder().append(string).append(' ').toString();
		}
		string = new StringBuilder().append(string).append("| ").append(string_8_).toString();
		return string;
	}

	static String method17288(Throwable throwable) throws IOException {
		String string;
		if (throwable instanceof RuntimeException_Sub2) {
			RuntimeException_Sub2 runtimeexception_sub2 = (RuntimeException_Sub2) throwable;
			string = new StringBuilder().append(((RuntimeException_Sub2) runtimeexception_sub2).aString10955).append(" | ").toString();
			throwable = (((RuntimeException_Sub2) runtimeexception_sub2).aThrowable10959);
		} else
			string = "";
		StringWriter stringwriter = new StringWriter();
		PrintWriter printwriter = new PrintWriter(stringwriter);
		throwable.printStackTrace(printwriter);
		printwriter.close();
		String string_13_ = stringwriter.toString();
		BufferedReader bufferedreader = new BufferedReader(new StringReader(string_13_));
		String string_14_ = bufferedreader.readLine();
		for (;;) {
			String string_15_ = bufferedreader.readLine();
			if (null == string_15_)
				break;
			int i = string_15_.indexOf('(');
			int i_16_ = string_15_.indexOf(')', 1 + i);
			String string_17_;
			if (-1 != i)
				string_17_ = string_15_.substring(0, i);
			else
				string_17_ = string_15_;
			string_17_ = string_17_.trim();
			string_17_ = string_17_.substring(string_17_.lastIndexOf(' ') + 1);
			string_17_ = string_17_.substring(string_17_.lastIndexOf('\t') + 1);
			string = new StringBuilder().append(string).append(string_17_).toString();
			if (-1 != i && -1 != i_16_) {
				int i_18_ = string_15_.indexOf(".java:", i);
				if (i_18_ >= 0)
					string = new StringBuilder().append(string).append(string_15_.substring(i_18_ + 5, i_16_)).toString();
			}
			string = new StringBuilder().append(string).append(' ').toString();
		}
		string = new StringBuilder().append(string).append("| ").append(string_14_).toString();
		return string;
	}

	RuntimeException_Sub2(Throwable throwable, String string) {
		((RuntimeException_Sub2) this).aString10955 = string;
		((RuntimeException_Sub2) this).aThrowable10959 = throwable;
		initCause(throwable);
	}

	static final String method17289(String string, String string_19_, String string_20_) {
		for (int i = string.indexOf(string_19_); i != -1; i = string.indexOf(string_19_, i + string_20_.length()))
			string = new StringBuilder().append(string.substring(0, i)).append(string_20_).append(string.substring(i + string_19_.length())).toString();
		return string;
	}
}
