Jon's changes on my machine

Nikhil Sarda [2012-08-09 20:47:06]
Jon's changes on my machine
Filename
testcase-generation-tester/.classpath
testcase-generation-tester/src/edu/columbia/cs/psl/invivo/example/JettyTester.java
testcase-generation/src/edu/columbia/cs/psl/invivo/record/CloningUtils.java
testcase-generation/src/edu/columbia/cs/psl/invivo/record/WallaceExportRunner.java
diff --git a/testcase-generation-tester/.classpath b/testcase-generation-tester/.classpath
index c6b826d..6de83a2 100644
--- a/testcase-generation-tester/.classpath
+++ b/testcase-generation-tester/.classpath
@@ -12,5 +12,7 @@
 	<classpathentry kind="lib" path="/home/nikhil/in-vivo/testcase-generation-tester/lib/jetty-http-7.5.4.v20111024.jar"/>
 	<classpathentry kind="lib" path="/home/nikhil/in-vivo/testcase-generation-tester/lib/jetty-io-7.5.4.v20111024.jar"/>
 	<classpathentry kind="lib" path="/home/nikhil/in-vivo/testcase-generation-tester/lib/jetty-util-7.5.4.v20111024.jar"/>
+	<classpathentry kind="lib" path="/home/nikhil/in-vivo/testcase-generation-tester/lib/jetty-server-7.5.4.v20111024.jar"/>
+	<classpathentry kind="lib" path="/home/nikhil/in-vivo/testcase-generation-tester/lib/jetty-servlet-7.5.4.v20111024.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/testcase-generation-tester/src/edu/columbia/cs/psl/invivo/example/JettyTester.java b/testcase-generation-tester/src/edu/columbia/cs/psl/invivo/example/JettyTester.java
index 07d14e9..01d2dc8 100644
--- a/testcase-generation-tester/src/edu/columbia/cs/psl/invivo/example/JettyTester.java
+++ b/testcase-generation-tester/src/edu/columbia/cs/psl/invivo/example/JettyTester.java
@@ -2,12 +2,21 @@ package edu.columbia.cs.psl.invivo.example;

 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
+import java.net.InetAddress;
+import java.util.EventListener;
 import java.util.Scanner;

 import org.eclipse.jetty.http.HttpParser;
 import org.eclipse.jetty.io.Buffer;
 import org.eclipse.jetty.io.ByteArrayBuffer;
 import org.eclipse.jetty.io.View;
+import org.eclipse.jetty.server.LocalConnector;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.bio.SocketConnector;
+import org.eclipse.jetty.server.handler.ErrorHandler;
+import org.eclipse.jetty.server.nio.SelectChannelConnector;
+import org.eclipse.jetty.servlet.FilterHolder;
+import org.eclipse.jetty.servlet.ServletContextHandler;

 public class JettyTester {

@@ -18,16 +27,16 @@ public class JettyTester {
 			// TODO Auto-generated catch block
 			return str.getBytes();
 		}
-	}
+	}

 	public static void main(String[] args) {
 		Scanner scanner = new Scanner(System.in);

 		System.out.println("Enter your input: ");
-		String rawText = "HTTP/1.1 200 OK\r\n"+
+		String rawText = scanner.nextLine();/*"HTTP/1.1 200 OK\r\n"+
 	            "Content-Type: text/html\r\n"+
 	            "Content-Length: 22\r\n"+
-	            "\r\n";
+	            "\r\n";*/

 		ByteArrayBuffer buf = new ByteArrayBuffer(getByteArray(rawText));
 		View view = new View(buf);
diff --git a/testcase-generation/src/edu/columbia/cs/psl/invivo/record/CloningUtils.java b/testcase-generation/src/edu/columbia/cs/psl/invivo/record/CloningUtils.java
index 7084a8d..6061eef 100644
--- a/testcase-generation/src/edu/columbia/cs/psl/invivo/record/CloningUtils.java
+++ b/testcase-generation/src/edu/columbia/cs/psl/invivo/record/CloningUtils.java
@@ -31,7 +31,6 @@ public class CloningUtils {
 	private static HashSet<Class<?>>	nullInsteads;

 //	private static BufferedWriter		log;
-	public static WallaceExportRunner exporter = new WallaceExportRunner();
 	static {
 		moreIgnoredImmutables = new HashSet<Class<?>>();
 		moreIgnoredImmutables.add(ClassLoader.class);
@@ -56,7 +55,7 @@ public class CloningUtils {
 		nullInsteads.add(Permissions.class);
 		cloner.setExtraNullInsteadOfClone(nullInsteads);
 //		cloner.setDumpClonedClasses(true);
-		exporter.start();
+		WallaceExportRunner.inst.start();
 		if (CATCH_ALL_ERRORS) {
 			Thread.setDefaultUncaughtExceptionHandler(new WallaceUncaughtExceptionHandler());
 		}
diff --git a/testcase-generation/src/edu/columbia/cs/psl/invivo/record/WallaceExportRunner.java b/testcase-generation/src/edu/columbia/cs/psl/invivo/record/WallaceExportRunner.java
index 8906b4f..82e15e9 100644
--- a/testcase-generation/src/edu/columbia/cs/psl/invivo/record/WallaceExportRunner.java
+++ b/testcase-generation/src/edu/columbia/cs/psl/invivo/record/WallaceExportRunner.java
@@ -46,9 +46,8 @@ public class WallaceExportRunner extends Thread {
 		}
 				}
 	}
-	private static WallaceExportRunner inst;
+	static WallaceExportRunner inst = new WallaceExportRunner();
 	public WallaceExportRunner() {
-		inst = this;
 		setDaemon(true);
 	}