New heuristic for serializing is implemented

Jonathan Bell [2012-08-09 01:20:25]
New heuristic for serializing is implemented
Filename
testcase-generation-tester/src/edu/columbia/cs/psl/invivo/example/ReaderUser.java
testcase-generation/src/edu/columbia/cs/psl/invivo/record/Constants.java
testcase-generation/src/edu/columbia/cs/psl/invivo/record/visitor/CloningAdviceAdapter.java
diff --git a/testcase-generation-tester/src/edu/columbia/cs/psl/invivo/example/ReaderUser.java b/testcase-generation-tester/src/edu/columbia/cs/psl/invivo/example/ReaderUser.java
index a969b90..ae11330 100644
--- a/testcase-generation-tester/src/edu/columbia/cs/psl/invivo/example/ReaderUser.java
+++ b/testcase-generation-tester/src/edu/columbia/cs/psl/invivo/example/ReaderUser.java
@@ -38,7 +38,7 @@ public class ReaderUser extends InputStreamReader {
 			f.exists();
 			f.getAbsoluteFile();
 			BufferedReader r = new BufferedReader(new FileReader("in-vivo.log"));
-			char[] buf = new char[2];
+			char[] buf = new char[5000];
 //			int zz = read(new byte[4]);
 //			System.out.println("zz: " + zz);
 			int charsRead = 0;
@@ -49,9 +49,9 @@ public class ReaderUser extends InputStreamReader {
 			{
 				charsRead = r.read(buf, 0, buf.length);
 				System.out.println(charsRead);
-				System.out.println(buf);
-//				Thread.sleep(100);
-				System.out.println("Size" + Log.logsize);
+//				System.out.println(buf);
+				Thread.sleep(100);
+//				System.out.println("Size" + Log.logsize);
 			}
 			c++;
 			System.out.println(c);
diff --git a/testcase-generation/src/edu/columbia/cs/psl/invivo/record/Constants.java b/testcase-generation/src/edu/columbia/cs/psl/invivo/record/Constants.java
index 1940fb2..e5d677d 100644
--- a/testcase-generation/src/edu/columbia/cs/psl/invivo/record/Constants.java
+++ b/testcase-generation/src/edu/columbia/cs/psl/invivo/record/Constants.java
@@ -9,7 +9,7 @@ public interface Constants {
 	public static String LOG_REPLAY_CLASS = "edu/columbia/cs/psl/invivo/record/ExportedLog";

 	public static int DEFAULT_LOG_SIZE = 1000;
-	public static int MAX_LOG_SIZE = 5000;
+	public static int MAX_LOG_SIZE = 50000;
 	public static double LOG_GROWTH_RATE = 1.5;
 	public static String REPLAY_CLASS_SUFFIX = "InvivoReplay";
 	public static String INNER_COPY_METHOD_NAME = "_Invivo___copy";
diff --git a/testcase-generation/src/edu/columbia/cs/psl/invivo/record/visitor/CloningAdviceAdapter.java b/testcase-generation/src/edu/columbia/cs/psl/invivo/record/visitor/CloningAdviceAdapter.java
index 45fd8aa..6ffaa57 100644
--- a/testcase-generation/src/edu/columbia/cs/psl/invivo/record/visitor/CloningAdviceAdapter.java
+++ b/testcase-generation/src/edu/columbia/cs/psl/invivo/record/visitor/CloningAdviceAdapter.java
@@ -289,7 +289,7 @@ public class CloningAdviceAdapter extends GeneratorAdapter implements Opcodes {
 			super.visitFieldInsn(PUTSTATIC, logFieldOwner, "logsize", Type.INT_TYPE.getDescriptor());
 			super.visitLdcInsn(Constants.MAX_LOG_SIZE);
 //			super.visitInsn(ISUB);
-			super.visitJumpInsn(IF_ICMPGE, endLbl);
+			super.visitJumpInsn(IF_ICMPLE, endLbl);
 //			super.ifCmp(Type.INT_TYPE, Opcodes.IFGE, endLbl);
 			super.visitMethodInsn(INVOKESTATIC, Type.getInternalName(WallaceExportRunner.class), "_export", "()V");