Input:
    protected void printStats() {
        int size;
        synchronized (this) {
            size = victims.size() + 1;
        }
        StatsMessage me = createStats();
        totalStats.add(me);
        java.text.NumberFormat nf = java.text.NumberFormat.getInstance();
        java.text.NumberFormat pf = java.text.NumberFormat.getInstance();
        pf.setMaximumFractionDigits(3);
        pf.setMinimumFractionDigits(3);
        pf.setGroupingUsed(false);
        out.println("-------------------------------SATIN STATISTICS------"
                + "--------------------------");
        if (SPAWN_STATS) {
            out.println("SATIN: SPAWN:       " + nf.format(totalStats.spawns)
                    + " spawns, " + nf.format(totalStats.jobsExecuted)
                    + " executed, " + nf.format(totalStats.syncs) + " syncs");
            if (ABORTS) {
                out.println("SATIN: ABORT:       "
                        + nf.format(totalStats.aborts) + " aborts, "
                        + nf.format(totalStats.abortMessages) + " abort msgs, "
                        + nf.format(totalStats.abortedJobs) + " aborted jobs");
            }
        }
        if (TUPLE_STATS) {
            out.println("SATIN: TUPLE_SPACE: "
                    + nf.format(totalStats.tupleMsgs) + " bcasts, "
                    + nf.format(totalStats.tupleBytes) + " bytes");
        }
        if (POLL_FREQ != 0 && POLL_TIMING) {
            out.println("SATIN: POLL:        poll count = "
                    + nf.format(totalStats.pollCount));
        }
        if (IDLE_TIMING) {
            out.println("SATIN: IDLE:        idle count = "
                    + nf.format(totalStats.idleCount));
        }
        if (STEAL_STATS) {
            out.println("SATIN: STEAL:       "
                    + nf.format(totalStats.stealAttempts)
                    + " attempts, "
                    + nf.format(totalStats.stealSuccess)
                    + " successes ("
                    + pf.format(perStats((double) totalStats.stealSuccess,
                            totalStats.stealAttempts) * 100.0)
                    + " %)");
	    if(totalStats.asyncStealAttempts != 0) {
		out.println("SATIN: ASYNCSTEAL:   "
			    + nf.format(totalStats.asyncStealAttempts)
			    + " attempts, "
			    + nf.format(totalStats.asyncStealSuccess)
			    + " successes ("
			    + pf.format(perStats((double) totalStats.asyncStealSuccess,
					 totalStats.asyncStealAttempts) * 100.0)
			    + " %)");
	    }
            out.println("SATIN: MESSAGES:    intra "
                    + nf.format(totalStats.intraClusterMessages) + " msgs, "
                    + nf.format(totalStats.intraClusterBytes)
                    + " bytes; inter "
                    + nf.format(totalStats.interClusterMessages) + " msgs, "
                    + nf.format(totalStats.interClusterBytes) + " bytes");
        }
        if (FAULT_TOLERANCE && GRT_STATS) {
            out.println("SATIN: GLOBAL_RESULT_TABLE: result updates "
                    + nf.format(totalStats.tableResultUpdates)
                    + ",update messages "
                    + nf.format(totalStats.tableUpdateMessages)
                    + ", lock updates "
                    + nf.format(totalStats.tableLockUpdates) + ",lookups "
                    + nf.format(totalStats.tableLookups) + ",successful "
                    + nf.format(totalStats.tableSuccessfulLookups) + ",remote "
                    + nf.format(totalStats.tableRemoteLookups));
        }
        if (FAULT_TOLERANCE && FT_STATS) {
            out.println("SATIN: FAULT_TOLERANCE: killed orphans "
                    + nf.format(totalStats.killedOrphans));
            out.println("SATIN: FAULT_TOLERANCE: restarted jobs "
                    + nf.format(totalStats.restartedJobs));
        }
	if (SHARED_OBJECTS && SO_STATS) {
            out.println("SATIN: SHARED_OBJECTS: nr invocations "
			+ nf.format(totalStats.soInvocations)
			+ ", bytes "
			+ nf.format(totalStats.soInvocationsBytes)
			+", object transfers "
			+ nf.format(totalStats.soTransfers)
			+ ", bytes "
			+ nf.format(totalStats.soTransfersBytes));
	}
        out.println("-------------------------------SATIN TOTAL TIMES"
                + "-------------------------------");
        if (STEAL_TIMING) {
            out.println("SATIN: STEAL_TIME:               total "
                    + Timer.format(totalStats.stealTime)
                    + " time/req    "
                    + Timer.format(perStats(totalStats.stealTime,
                            totalStats.stealAttempts)));
            out.println("SATIN: HANDLE_STEAL_TIME:        total "
                    + Timer.format(totalStats.handleStealTime)
                    + " time/handle "
                    + Timer.format(perStats(totalStats.handleStealTime,
                            totalStats.stealAttempts)));
            out.println("SATIN: INV SERIALIZATION_TIME:   total "
                    + Timer.format(totalStats.invocationRecordWriteTime)
                    + " time/write  "
                    + Timer.format(perStats(totalStats.invocationRecordWriteTime,
                            totalStats.stealSuccess)));
            out.println("SATIN: INV DESERIALIZATION_TIME: total "
                    + Timer.format(totalStats.invocationRecordReadTime)
                    + " time/read   "
                    + Timer.format(perStats(totalStats.invocationRecordReadTime,
                            totalStats.stealSuccess)));
            out.println("SATIN: RET SERIALIZATION_TIME:   total "
                    + Timer.format(totalStats.returnRecordWriteTime)
                    + " time/write  "
                    + Timer.format(perStats(totalStats.returnRecordWriteTime,
                            totalStats.returnRecordWriteCount)));
            out.println("SATIN: RET DESERIALIZATION_TIME: total "
                    + Timer.format(totalStats.returnRecordReadTime)
                    + " time/read   "
                    + Timer.format(perStats(totalStats.returnRecordReadTime,
                            totalStats.returnRecordReadCount)));
        }
        if (ABORT_TIMING) {
            out.println("SATIN: ABORT_TIME:               total "
                    + Timer.format(totalStats.abortTime) + " time/abort  "
                    + Timer.format(perStats(totalStats.abortTime, totalStats.aborts)));
        }
        if (TUPLE_TIMING) {
            out.println("SATIN: TUPLE_SPACE_BCAST_TIME:   total "
                    + Timer.format(totalStats.tupleTime) + " time/bcast  "
                    + Timer.format(perStats(totalStats.tupleTime,
                                    totalStats.tupleMsgs)));
            out.println("SATIN: TUPLE_SPACE_WAIT_TIME:    total "
                    + Timer.format(totalStats.tupleWaitTime)
                    + " time/bcast  "
                    + Timer.format(perStats(totalStats.tupleWaitTime,
                            totalStats.tupleWaitCount)));
        }
        if (POLL_FREQ != 0 && POLL_TIMING) {
            out.println("SATIN: POLL_TIME:                total "
                    + Timer.format(totalStats.pollTime) + " time/poll "
                    + Timer.format(perStats(totalStats.pollTime, totalStats.pollCount)));
        }
        if (IDLE_TIMING) {
            out.println("SATIN: IDLE_TIME:                total "
                    + Timer.format(totalStats.idleTime) + " time/idle "
                    + Timer.format(perStats(totalStats.idleTime, totalStats.idleCount)));
        }
        if (FAULT_TOLERANCE && GRT_TIMING) {
            out.println("SATIN: GRT_UPDATE_TIME:          total "
                    + Timer.format(totalStats.tableUpdateTime)
                    + " time/update "
                    + Timer.format(perStats(totalStats.tableUpdateTime,
                            (totalStats.tableResultUpdates
                                    + totalStats.tableLockUpdates))));
            out.println("SATIN: GRT_LOOKUP_TIME:          total "
                    + Timer.format(totalStats.tableLookupTime)
                    + " time/lookup "
                    + Timer.format(perStats(totalStats.tableLookupTime,
                            totalStats.tableLookups)));
            out.println("SATIN: GRT_HANDLE_UPDATE_TIME:   total "
                    + Timer.format(totalStats.tableHandleUpdateTime)
                    + " time/handle "
                    + Timer.format(perStats(totalStats.tableHandleUpdateTime,
                            totalStats.tableResultUpdates * (size - 1))));
            out.println("SATIN: GRT_HANDLE_LOOKUP_TIME:   total "
                    + Timer.format(totalStats.tableHandleLookupTime)
                    + " time/handle "
                    + Timer.format(perStats(totalStats.tableHandleLookupTime,
                            totalStats.tableRemoteLookups)));
            out.println("SATIN: GRT_SERIALIZATION_TIME:   total "
                    + Timer.format(totalStats.tableSerializationTime));
            out.println("SATIN: GRT_DESERIALIZATION_TIME: total "
                    + Timer.format(totalStats.tableDeserializationTime));
            out.println("SATIN: GRT_CHECK_TIME:           total "
                    + Timer.format(totalStats.tableCheckTime)
                    + " time/check "
                    + Timer.format(perStats(totalStats.tableCheckTime,
                            totalStats.tableLookups)));
        }
        if (FAULT_TOLERANCE && CRASH_TIMING) {
            out.println("SATIN: CRASH_HANDLING_TIME:      total "
                    + Timer.format(totalStats.crashHandlingTime));
         }
        if (FAULT_TOLERANCE && ADD_REPLICA_TIMING) {
            out.println("SATIN: ADD_REPLICA_TIME:         total "
                    + Timer.format(totalStats.addReplicaTime));
        }
	if (SHARED_OBJECTS && SO_TIMING) {
	    out.println("SATIN: BROADCAST_SO_INVOCATIONS: total "
			+ Timer.format(totalStats.broadcastSOInvocationsTime)
			+ " time/inv "
			+ Timer.format(perStats(totalStats.broadcastSOInvocationsTime,
						totalStats.soInvocations)));
	    out.println("SATIN: HANDLE_SO_INVOCATIONS:    total "
			+ Timer.format(totalStats.handleSOInvocationsTime)
			+ " time/inv "
			+ Timer.format(perStats(totalStats.handleSOInvocationsTime,
				       totalStats.soInvocations * (size - 1))));
	    out.println("SATIN: SO_TRANSFERS:             total "
			+ Timer.format(totalStats.soTransferTime)
			+ " time/transf "
			+ Timer.format(perStats(totalStats.soTransferTime,
				       totalStats.soTransfers)));
	    out.println("SATIN: HANDLE_SO_TRANSFERS:    total "
			+ Timer.format(totalStats.handleSOTransferTime)
			+ " time/transf "
			+ Timer.format(perStats(totalStats.handleSOTransferTime,
				       totalStats.soTransfers)));
	    out.println("SATIN: SO_SERIALIZATION:       total "
			+ Timer.format(totalStats.soSerializationTime)
			+ " time/transf "
			+ Timer.format(perStats(totalStats.soSerializationTime,
				       totalStats.soTransfers)));
	    out.println("SATIN: SO_DESERIALIZATION:     total "
			+ Timer.format(totalStats.soDeserializationTime)
			+ " time/transf "
			+ Timer.format(perStats(totalStats.soDeserializationTime,
				       totalStats.soTransfers)));
	}
        out.println("-------------------------------SATIN RUN TIME "
                + "BREAKDOWN------------------------");
        out.println("SATIN: TOTAL_RUN_TIME:                           "
                + Timer.format(totalTimer.totalTimeVal()));
        double lbTime = (totalStats.stealTime + totalStats.handleStealTime
                - totalStats.invocationRecordReadTime
                - totalStats.invocationRecordWriteTime) / size;
        if (lbTime < 0.0) {
            lbTime = 0.0;
        }
        double lbPerc = lbTime / totalTimer.totalTimeVal() * 100.0;
        double serTime = (totalStats.invocationRecordWriteTime
                + totalStats.invocationRecordReadTime
                + totalStats.returnRecordWriteTime
                + totalStats.returnRecordReadTime) / size;
        double serPerc = serTime / totalTimer.totalTimeVal() * 100.0;
        double abortTime = totalStats.abortTime / size;
        double abortPerc = abortTime / totalTimer.totalTimeVal() * 100.0;
        double tupleTime = totalStats.tupleTime / size;
        double tuplePerc = tupleTime / totalTimer.totalTimeVal() * 100.0;
	double handleTupleTime = totalStats.handleTupleTime / size;
	double handleTuplePerc = handleTupleTime / totalTimer.totalTimeVal() * 100.0;
        double tupleWaitTime = totalStats.tupleWaitTime / size;
        double tupleWaitPerc = tupleWaitTime / totalTimer.totalTimeVal()
                * 100.0;
        double pollTime = totalStats.pollTime / size;
        double pollPerc = pollTime / totalTimer.totalTimeVal() * 100.0;
        double tableUpdateTime = totalStats.tableUpdateTime / size;
        double tableUpdatePerc = tableUpdateTime / totalTimer.totalTimeVal()
                * 100.0;
        double tableLookupTime = totalStats.tableLookupTime / size;
        double tableLookupPerc = tableLookupTime / totalTimer.totalTimeVal()
                * 100.0;
        double tableHandleUpdateTime = totalStats.tableHandleUpdateTime / size;
        double tableHandleUpdatePerc = tableHandleUpdateTime
                / totalTimer.totalTimeVal() * 100.0;
        double tableHandleLookupTime = totalStats.tableHandleLookupTime / size;
        double tableHandleLookupPerc = tableHandleLookupTime
                / totalTimer.totalTimeVal() * 100.0;
        double tableSerializationTime = totalStats.tableSerializationTime
                / size;
        double tableSerializationPerc = tableSerializationTime
                / totalTimer.totalTimeVal() * 100;
        double tableDeserializationTime = totalStats.tableDeserializationTime
                / size;
        double tableDeserializationPerc = tableDeserializationTime
                / totalTimer.totalTimeVal() * 100;
        double crashHandlingTime = totalStats.crashHandlingTime / size;
        double crashHandlingPerc = crashHandlingTime
                / totalTimer.totalTimeVal() * 100.0;
        double addReplicaTime = totalStats.addReplicaTime / size;
        double addReplicaPerc = addReplicaTime / totalTimer.totalTimeVal()
                * 100.0;
	double broadcastSOInvocationsTime =
	    totalStats.broadcastSOInvocationsTime / size;
	double broadcastSOInvocationsPerc = broadcastSOInvocationsTime
	    / totalTimer.totalTimeVal() * 100;
	double handleSOInvocationsTime = totalStats.handleSOInvocationsTime
	    / size;
	double handleSOInvocationsPerc = handleSOInvocationsTime
	    / totalTimer.totalTimeVal() * 100;
	double soTransferTime = totalStats.soTransferTime / size;
	double soTransferPerc = soTransferTime / totalTimer.totalTimeVal() * 100;
	double handleSOTransferTime = totalStats.handleSOTransferTime / size;
	double handleSOTransferPerc = handleSOTransferTime
	    / totalTimer.totalTimeVal() * 100;
	double soSerializationTime = totalStats.soSerializationTime / size;
	double soSerializationPerc = soSerializationTime
	    / totalTimer.totalTimeVal() * 100;
	double soDeserializationTime = totalStats.soDeserializationTime / size;
	double soDeserializationPerc = soDeserializationTime
	    / totalTimer.totalTimeVal() * 100;
        double totalOverhead = abortTime + tupleTime + handleTupleTime + tupleWaitTime
	    + pollTime + tableUpdateTime + tableLookupTime
	    + tableHandleUpdateTime + tableHandleLookupTime
	    + handleSOInvocationsTime + broadcastSOInvocationsTime
	    + soTransferTime + handleSOTransferTime
	    + (totalStats.stealTime + totalStats.handleStealTime
	       + totalStats.returnRecordReadTime
	       + totalStats.returnRecordWriteTime) / size;
        double totalPerc = totalOverhead / totalTimer.totalTimeVal() * 100.0;
        double appTime = totalTimer.totalTimeVal() - totalOverhead;
        if (appTime < 0.0) {
            appTime = 0.0;
        }
        double appPerc = appTime / totalTimer.totalTimeVal() * 100.0;
        if (STEAL_TIMING) {
            out.println("SATIN: LOAD_BALANCING_TIME:      avg. per machine "
                    + Timer.format(lbTime) + " (" + (lbPerc < 10 ? " " : "")
                    + pf.format(lbPerc) + " %)");
            out.println("SATIN: (DE)SERIALIZATION_TIME:   avg. per machine "
                    + Timer.format(serTime) + " (" + (serPerc < 10 ? " " : "")
                    + pf.format(serPerc) + " %)");
        }
        if (ABORT_TIMING) {
            out.println("SATIN: ABORT_TIME:               avg. per machine "
                    + Timer.format(abortTime) + " ("
                    + (abortPerc < 10 ? " " : "") + pf.format(abortPerc)
                    + " %)");
        }
        if (TUPLE_TIMING) {
            out.println("SATIN: TUPLE_SPACE_BCAST_TIME:   avg. per machine "
                    + Timer.format(tupleTime) + " ("
                    + (tuplePerc < 10 ? " " : "") + pf.format(tuplePerc)
                    + " %)");
            out.println("SATIN: TUPLE_SPACE_HANDLE_TIME:   avg. per machine "
                    + Timer.format(handleTupleTime) + " ("
                    + (handleTuplePerc < 10 ? " " : "") + pf.format(handleTuplePerc)
                    + " %)");
            out.println("SATIN: TUPLE_SPACE_WAIT_TIME:    avg. per machine "
                    + Timer.format(tupleWaitTime) + " ("
                    + (tupleWaitPerc < 10 ? " " : "")
                    + pf.format(tupleWaitPerc) + " %)");
        }
        if (POLL_FREQ != 0 && POLL_TIMING) {
            out.println("SATIN: POLL_TIME:                avg. per machine "
                    + Timer.format(pollTime) + " ("
                    + (pollPerc < 10 ? " " : "") + pf.format(pollPerc) + " %)");
        }
        if (FAULT_TOLERANCE && GRT_TIMING) {
            out.println("SATIN: GRT_UPDATE_TIME:          avg. per machine "
                    + Timer.format(tableUpdateTime) + " ("
                    + pf.format(tableUpdatePerc) + " %)");
            out.println("SATIN: GRT_LOOKUP_TIME:          avg. per machine "
                    + Timer.format(tableLookupTime) + " ("
                    + pf.format(tableLookupPerc) + " %)");
            out.println("SATIN: GRT_HANDLE_UPDATE_TIME:   avg. per machine "
                    + Timer.format(tableHandleUpdateTime) + " ("
                    + pf.format(tableHandleUpdatePerc) + " %)");
            out.println("SATIN: GRT_HANDLE_LOOKUP_TIME:   avg. per machine "
                    + Timer.format(tableHandleLookupTime) + " ("
                    + pf.format(tableHandleLookupPerc) + " %)");
            out.println("SATIN: GRT_SERIALIZATION_TIME:   avg. per machine "
                    + Timer.format(tableSerializationTime) + " ("
                    + pf.format(tableSerializationPerc) + " %)");
            out.println("SATIN: GRT_DESERIALIZATION_TIME: avg. per machine "
                    + Timer.format(tableDeserializationTime) + " ("
                    + pf.format(tableDeserializationPerc) + " %)");
        }
        if (FAULT_TOLERANCE && CRASH_TIMING) {
            out.println("SATIN: CRASH_HANDLING_TIME:      avg. per machine "
                    + Timer.format(crashHandlingTime) + " ("
                    + pf.format(crashHandlingPerc) + " %)");
        }
        if (FAULT_TOLERANCE && ADD_REPLICA_TIMING) {
            out.println("SATIN: ADD_REPLICA_TIME:         avg. per machine "
                    + Timer.format(addReplicaTime) + " ("
                    + pf.format(addReplicaPerc) + " %)");
        }
	if (SHARED_OBJECTS && SO_TIMING) {
            out.println("SATIN: BROADCAST_SO_INVOCATIONS: avg. per machine "
                    + Timer.format(broadcastSOInvocationsTime) + " ("
                    + pf.format(broadcastSOInvocationsPerc) + " %)");
            out.println("SATIN: HANDLE_SO_INVOCATIONS:    avg. per machine "
                    + Timer.format(handleSOInvocationsTime) + " ("
                    + pf.format(handleSOInvocationsPerc) + " %)");
            out.println("SATIN: SO_TRANSFERS:             avg. per machine "
                    + Timer.format(soTransferTime) + " ("
                    + pf.format(soTransferPerc) + " %)");
            out.println("SATIN: HANDLE_SO_TRANSFERS:      avg. per machine "
                    + Timer.format(handleSOTransferTime) + " ("
                    + pf.format(handleSOTransferPerc) + " %)");
            out.println("SATIN: SO_SERIALIZATION:         avg. per machine "
                    + Timer.format(soSerializationTime) + " ("
                    + pf.format(soSerializationPerc) + " %)");
            out.println("SATIN: SO_DESERIALIZATION:       avg. per machine "
                    + Timer.format(soDeserializationTime) + " ("
                    + pf.format(soDeserializationPerc) + " %)");
	}
        out.println("\nSATIN: TOTAL_PARALLEL_OVERHEAD:  avg. per machine "
                + Timer.format(totalOverhead) + " ("
                + (totalPerc < 10 ? " " : "") + pf.format(totalPerc) + " %)");
        out.println("SATIN: USEFUL_APP_TIME:          avg. per machine "
                + Timer.format(appTime) + " (" + (appPerc < 10 ? " " : "")
                + pf.format(appPerc) + " %)");
    }

Output:
    protected void printStats() {
        int size;
        synchronized (this) {
            size = victims.size() + 1;
        }
        StatsMessage me = createStats();
        totalStats.add(me);
        java.text.NumberFormat nf = java.text.NumberFormat.getInstance();
        java.text.NumberFormat pf = java.text.NumberFormat.getInstance();
        pf.setMaximumFractionDigits(3);
        pf.setMinimumFractionDigits(3);
        pf.setGroupingUsed(false);
        out.println("-------------------------------SATIN STATISTICS------"
                + "--------------------------");
        if (SPAWN_STATS) {
            out.println("SATIN: SPAWN:       " + nf.format(totalStats.spawns)
                    + " spawns, " + nf.format(totalStats.jobsExecuted)
                    + " executed, " + nf.format(totalStats.syncs) + " syncs");
            if (ABORTS) {
                out.println("SATIN: ABORT:       "
                        + nf.format(totalStats.aborts) + " aborts, "
                        + nf.format(totalStats.abortMessages) + " abort msgs, "
                        + nf.format(totalStats.abortedJobs) + " aborted jobs");
            }
        }
        if (TUPLE_STATS) {
            out.println("SATIN: TUPLE_SPACE: "
                    + nf.format(totalStats.tupleMsgs) + " bcasts, "
                    + nf.format(totalStats.tupleBytes) + " bytes");
        }
        if (POLL_FREQ != 0 && POLL_TIMING) {
            out.println("SATIN: POLL:        poll count = "
                    + nf.format(totalStats.pollCount));
        }
        if (IDLE_TIMING) {
            out.println("SATIN: IDLE:        idle count = "
                    + nf.format(totalStats.idleCount));
        }
        if (STEAL_STATS) {
            out.println("SATIN: STEAL:       "
                    + nf.format(totalStats.stealAttempts)
                    + " attempts, "
                    + nf.format(totalStats.stealSuccess)
                    + " successes ("
                    + pf.format(perStats((double) totalStats.stealSuccess,
                            totalStats.stealAttempts) * 100.0)
                    + " %)");
	    if(totalStats.asyncStealAttempts != 0) {
		out.println("SATIN: ASYNCSTEAL:   "
			    + nf.format(totalStats.asyncStealAttempts)
			    + " attempts, "
			    + nf.format(totalStats.asyncStealSuccess)
			    + " successes ("
			    + pf.format(perStats((double) totalStats.asyncStealSuccess,
					 totalStats.asyncStealAttempts) * 100.0)
			    + " %)");
	    }
            out.println("SATIN: MESSAGES:    intra "
                    + nf.format(totalStats.intraClusterMessages) + " msgs, "
                    + nf.format(totalStats.intraClusterBytes)
                    + " bytes; inter "
                    + nf.format(totalStats.interClusterMessages) + " msgs, "
                    + nf.format(totalStats.interClusterBytes) + " bytes");
        }
        if (FAULT_TOLERANCE && GRT_STATS) {
            out.println("SATIN: GLOBAL_RESULT_TABLE: result updates "
                    + nf.format(totalStats.tableResultUpdates)
                    + ",update messages "
                    + nf.format(totalStats.tableUpdateMessages)
                    + ", lock updates "
                    + nf.format(totalStats.tableLockUpdates) + ",lookups "
                    + nf.format(totalStats.tableLookups) + ",successful "
                    + nf.format(totalStats.tableSuccessfulLookups) + ",remote "
                    + nf.format(totalStats.tableRemoteLookups));
        }
        if (FAULT_TOLERANCE && FT_STATS) {
            out.println("SATIN: FAULT_TOLERANCE: killed orphans "
                    + nf.format(totalStats.killedOrphans));
            out.println("SATIN: FAULT_TOLERANCE: restarted jobs "
                    + nf.format(totalStats.restartedJobs));
        }
	if (SHARED_OBJECTS && SO_STATS) {
            out.println("SATIN: SHARED_OBJECTS: nr invocations "
			+ nf.format(totalStats.soInvocations)
			+ ", bytes "
			+ nf.format(totalStats.soInvocationsBytes)
			+", object transfers "
			+ nf.format(totalStats.soTransfers)
			+ ", bytes "
			+ nf.format(totalStats.soTransfersBytes));
	}
        out.println("-------------------------------SATIN TOTAL TIMES"
                + "-------------------------------");
        if (STEAL_TIMING) {
            out.println("SATIN: STEAL_TIME:               total "
                    + Timer.format(totalStats.stealTime)
                    + " time/req    "
                    + Timer.format(perStats(totalStats.stealTime,
                            totalStats.stealAttempts)));
            out.println("SATIN: HANDLE_STEAL_TIME:        total "
                    + Timer.format(totalStats.handleStealTime)
                    + " time/handle "
                    + Timer.format(perStats(totalStats.handleStealTime,
                            totalStats.stealAttempts)));
            out.println("SATIN: INV SERIALIZATION_TIME:   total "
                    + Timer.format(totalStats.invocationRecordWriteTime)
                    + " time/write  "
                    + Timer.format(perStats(totalStats.invocationRecordWriteTime,
                            totalStats.stealSuccess)));
            out.println("SATIN: INV DESERIALIZATION_TIME: total "
                    + Timer.format(totalStats.invocationRecordReadTime)
                    + " time/read   "
                    + Timer.format(perStats(totalStats.invocationRecordReadTime,
                            totalStats.stealSuccess)));
            out.println("SATIN: RET SERIALIZATION_TIME:   total "
                    + Timer.format(totalStats.returnRecordWriteTime)
                    + " time/write  "
                    + Timer.format(perStats(totalStats.returnRecordWriteTime,
                            totalStats.returnRecordWriteCount)));
            out.println("SATIN: RET DESERIALIZATION_TIME: total "
                    + Timer.format(totalStats.returnRecordReadTime)
                    + " time/read   "
                    + Timer.format(perStats(totalStats.returnRecordReadTime,
                            totalStats.returnRecordReadCount)));
        }
        if (ABORT_TIMING) {
            out.println("SATIN: ABORT_TIME:               total "
                    + Timer.format(totalStats.abortTime) + " time/abort  "
                    + Timer.format(perStats(totalStats.abortTime, totalStats.aborts)));
        }
        if (TUPLE_TIMING) {
            out.println("SATIN: TUPLE_SPACE_BCAST_TIME:   total "
                    + Timer.format(totalStats.tupleTime) + " time/bcast  "
                    + Timer.format(perStats(totalStats.tupleTime,
                                    totalStats.tupleMsgs)));
            out.println("SATIN: TUPLE_SPACE_WAIT_TIME:    total "
                    + Timer.format(totalStats.tupleWaitTime)
                    + " time/bcast  "
                    + Timer.format(perStats(totalStats.tupleWaitTime,
                            totalStats.tupleWaitCount)));
        }
        if (POLL_FREQ != 0 && POLL_TIMING) {
            out.println("SATIN: POLL_TIME:                total "
                    + Timer.format(totalStats.pollTime) + " time/poll "
                    + Timer.format(perStats(totalStats.pollTime, totalStats.pollCount)));
        }
        if (IDLE_TIMING) {
            out.println("SATIN: IDLE_TIME:                total "
                    + Timer.format(totalStats.idleTime) + " time/idle "
                    + Timer.format(perStats(totalStats.idleTime, totalStats.idleCount)));
        }
        if (FAULT_TOLERANCE && GRT_TIMING) {
            out.println("SATIN: GRT_UPDATE_TIME:          total "
                    + Timer.format(totalStats.tableUpdateTime)
                    + " time/update "
                    + Timer.format(perStats(totalStats.tableUpdateTime,
                            (totalStats.tableResultUpdates
                                    + totalStats.tableLockUpdates))));
            out.println("SATIN: GRT_LOOKUP_TIME:          total "
                    + Timer.format(totalStats.tableLookupTime)
                    + " time/lookup "
                    + Timer.format(perStats(totalStats.tableLookupTime,
                            totalStats.tableLookups)));
            out.println("SATIN: GRT_HANDLE_UPDATE_TIME:   total "
                    + Timer.format(totalStats.tableHandleUpdateTime)
                    + " time/handle "
                    + Timer.format(perStats(totalStats.tableHandleUpdateTime,
                            totalStats.tableResultUpdates * (size - 1))));
            out.println("SATIN: GRT_HANDLE_LOOKUP_TIME:   total "
                    + Timer.format(totalStats.tableHandleLookupTime)
                    + " time/handle "
                    + Timer.format(perStats(totalStats.tableHandleLookupTime,
                            totalStats.tableRemoteLookups)));
            out.println("SATIN: GRT_SERIALIZATION_TIME:   total "
                    + Timer.format(totalStats.tableSerializationTime));
            out.println("SATIN: GRT_DESERIALIZATION_TIME: total "
                    + Timer.format(totalStats.tableDeserializationTime));
            out.println("SATIN: GRT_CHECK_TIME:           total "
                    + Timer.format(totalStats.tableCheckTime)
                    + " time/check "
                    + Timer.format(perStats(totalStats.tableCheckTime,
                            totalStats.tableLookups)));
        }
        if (FAULT_TOLERANCE && CRASH_TIMING) {
            out.println("SATIN: CRASH_HANDLING_TIME:      total "
                    + Timer.format(totalStats.crashHandlingTime));
         }
        if (FAULT_TOLERANCE && ADD_REPLICA_TIMING) {
            out.println("SATIN: ADD_REPLICA_TIME:         total "
                    + Timer.format(totalStats.addReplicaTime));
        }
	if (SHARED_OBJECTS && SO_TIMING) {
	    out.println("SATIN: BROADCAST_SO_INVOCATIONS: total "
			+ Timer.format(totalStats.broadcastSOInvocationsTime)
			+ " time/inv "
			+ Timer.format(perStats(totalStats.broadcastSOInvocationsTime,
						totalStats.soInvocations)));
	    out.println("SATIN: HANDLE_SO_INVOCATIONS:    total "
			+ Timer.format(totalStats.handleSOInvocationsTime)
			+ " time/inv "
			+ Timer.format(perStats(totalStats.handleSOInvocationsTime,
				       totalStats.soInvocations * (size - 1))));
	    out.println("SATIN: SO_TRANSFERS:             total "
			+ Timer.format(totalStats.soTransferTime)
			+ " time/transf "
			+ Timer.format(perStats(totalStats.soTransferTime,
				       totalStats.soTransfers)));
	    out.println("SATIN: HANDLE_SO_TRANSFERS:    total "
			+ Timer.format(totalStats.handleSOTransferTime)
			+ " time/transf "
			+ Timer.format(perStats(totalStats.handleSOTransferTime,
				       totalStats.soTransfers)));
	    out.println("SATIN: SO_SERIALIZATION:       total "
			+ Timer.format(totalStats.soSerializationTime)
			+ " time/transf "
			+ Timer.format(perStats(totalStats.soSerializationTime,
				       totalStats.soTransfers)));
	    out.println("SATIN: SO_DESERIALIZATION:     total "
			+ Timer.format(totalStats.soDeserializationTime)
			+ " time/transf "
			+ Timer.format(perStats(totalStats.soDeserializationTime,
				       totalStats.soTransfers)));
	}
        out.println("-------------------------------SATIN RUN TIME "
                + "BREAKDOWN------------------------");
        out.println("SATIN: TOTAL_RUN_TIME:                           "
                + Timer.format(totalTimer.totalTimeVal()));
        double lbTime = (totalStats.stealTime + totalStats.handleStealTime
                - totalStats.invocationRecordReadTime
                - totalStats.invocationRecordWriteTime) / size;
        if (lbTime < 0.0) {
            lbTime = 0.0;
        }
        double lbPerc = lbTime / totalTimer.totalTimeVal() * 100.0;
        double serTime = (totalStats.invocationRecordWriteTime
                + totalStats.invocationRecordReadTime
                + totalStats.returnRecordWriteTime
                + totalStats.returnRecordReadTime) / size;
        double serPerc = serTime / totalTimer.totalTimeVal() * 100.0;
        double abortTime = totalStats.abortTime / size;
        double abortPerc = abortTime / totalTimer.totalTimeVal() * 100.0;
        double tupleTime = totalStats.tupleTime / size;
        double tuplePerc = tupleTime / totalTimer.totalTimeVal() * 100.0;
	double handleTupleTime = totalStats.handleTupleTime / size;
	double handleTuplePerc = handleTupleTime / totalTimer.totalTimeVal() * 100.0;
        double tupleWaitTime = totalStats.tupleWaitTime / size;
        double tupleWaitPerc = tupleWaitTime / totalTimer.totalTimeVal()
                * 100.0;
        double pollTime = totalStats.pollTime / size;
        double pollPerc = pollTime / totalTimer.totalTimeVal() * 100.0;
        double tableUpdateTime = totalStats.tableUpdateTime / size;
        double tableUpdatePerc = tableUpdateTime / totalTimer.totalTimeVal()
                * 100.0;
        double tableLookupTime = totalStats.tableLookupTime / size;
        double tableLookupPerc = tableLookupTime / totalTimer.totalTimeVal()
                * 100.0;
        double tableHandleUpdateTime = totalStats.tableHandleUpdateTime / size;
        double tableHandleUpdatePerc = tableHandleUpdateTime
                / totalTimer.totalTimeVal() * 100.0;
        double tableHandleLookupTime = totalStats.tableHandleLookupTime / size;
        double tableHandleLookupPerc = tableHandleLookupTime
                / totalTimer.totalTimeVal() * 100.0;
        double tableSerializationTime = totalStats.tableSerializationTime
                / size;
        double tableSerializationPerc = tableSerializationTime
                / totalTimer.totalTimeVal() * 100;
        double tableDeserializationTime = totalStats.tableDeserializationTime
                / size;
        double tableDeserializationPerc = tableDeserializationTime
                / totalTimer.totalTimeVal() * 100;
        double crashHandlingTime = totalStats.crashHandlingTime / size;
        double crashHandlingPerc = crashHandlingTime
                / totalTimer.totalTimeVal() * 100.0;
        double addReplicaTime = totalStats.addReplicaTime / size;
        double addReplicaPerc = addReplicaTime / totalTimer.totalTimeVal()
                * 100.0;
	double broadcastSOInvocationsTime =
	    totalStats.broadcastSOInvocationsTime / size;
	double broadcastSOInvocationsPerc = broadcastSOInvocationsTime
	    / totalTimer.totalTimeVal() * 100;
	double handleSOInvocationsTime = totalStats.handleSOInvocationsTime
	    / size;
	double handleSOInvocationsPerc = handleSOInvocationsTime
	    / totalTimer.totalTimeVal() * 100;
	double soTransferTime = totalStats.soTransferTime / size;
	double soTransferPerc = soTransferTime / totalTimer.totalTimeVal() * 100;
	double handleSOTransferTime = totalStats.handleSOTransferTime / size;
	double handleSOTransferPerc = handleSOTransferTime
	    / totalTimer.totalTimeVal() * 100;
	double soSerializationTime = totalStats.soSerializationTime / size;
	double soSerializationPerc = soSerializationTime
	    / totalTimer.totalTimeVal() * 100;
	double soDeserializationTime = totalStats.soDeserializationTime / size;
	double soDeserializationPerc = soDeserializationTime
	    / totalTimer.totalTimeVal() * 100;
        double totalOverhead = abortTime + tupleTime + handleTupleTime + tupleWaitTime
	    + pollTime + tableUpdateTime + tableLookupTime
	    + tableHandleUpdateTime + tableHandleLookupTime
	    + handleSOInvocationsTime + broadcastSOInvocationsTime
	    + soTransferTime + handleSOTransferTime
	    + (totalStats.stealTime + totalStats.handleStealTime
	       + totalStats.returnRecordReadTime
	       + totalStats.returnRecordWriteTime) / size;
        double totalPerc = totalOverhead / totalTimer.totalTimeVal() * 100.0;
        double appTime = totalTimer.totalTimeVal() - totalOverhead;
        if (appTime < 0.0) {
            appTime = 0.0;
        }
        double appPerc = appTime / totalTimer.totalTimeVal() * 100.0;
        if (STEAL_TIMING) {
            out.println("SATIN: LOAD_BALANCING_TIME:      avg. per machine "
                    + Timer.format(lbTime) + " (" + (lbPerc < 10 ? " " : "")
                    + pf.format(lbPerc) + " %)");
            out.println("SATIN: (DE)SERIALIZATION_TIME:   avg. per machine "
                    + Timer.format(serTime) + " (" + (serPerc < 10 ? " " : "")
                    + pf.format(serPerc) + " %)");
        }
        if (ABORT_TIMING) {
            out.println("SATIN: ABORT_TIME:               avg. per machine "
                    + Timer.format(abortTime) + " ("
                    + (abortPerc < 10 ? " " : "") + pf.format(abortPerc)
                    + " %)");
        }
        if (TUPLE_TIMING) {
            out.println("SATIN: TUPLE_SPACE_BCAST_TIME:   avg. per machine "
                    + Timer.format(tupleTime) + " ("
                    + (tuplePerc < 10 ? " " : "") + pf.format(tuplePerc)
                    + " %)");
            out.println("SATIN: TUPLE_SPACE_HANDLE_TIME:  avg. per machine "
                    + Timer.format(handleTupleTime) + " ("
                    + (handleTuplePerc < 10 ? " " : "") + pf.format(handleTuplePerc)
                    + " %)");
            out.println("SATIN: TUPLE_SPACE_WAIT_TIME:    avg. per machine "
                    + Timer.format(tupleWaitTime) + " ("
                    + (tupleWaitPerc < 10 ? " " : "")
                    + pf.format(tupleWaitPerc) + " %)");
        }
        if (POLL_FREQ != 0 && POLL_TIMING) {
            out.println("SATIN: POLL_TIME:                avg. per machine "
                    + Timer.format(pollTime) + " ("
                    + (pollPerc < 10 ? " " : "") + pf.format(pollPerc) + " %)");
        }
        if (FAULT_TOLERANCE && GRT_TIMING) {
            out.println("SATIN: GRT_UPDATE_TIME:          avg. per machine "
                    + Timer.format(tableUpdateTime) + " ("
                    + pf.format(tableUpdatePerc) + " %)");
            out.println("SATIN: GRT_LOOKUP_TIME:          avg. per machine "
                    + Timer.format(tableLookupTime) + " ("
                    + pf.format(tableLookupPerc) + " %)");
            out.println("SATIN: GRT_HANDLE_UPDATE_TIME:   avg. per machine "
                    + Timer.format(tableHandleUpdateTime) + " ("
                    + pf.format(tableHandleUpdatePerc) + " %)");
            out.println("SATIN: GRT_HANDLE_LOOKUP_TIME:   avg. per machine "
                    + Timer.format(tableHandleLookupTime) + " ("
                    + pf.format(tableHandleLookupPerc) + " %)");
            out.println("SATIN: GRT_SERIALIZATION_TIME:   avg. per machine "
                    + Timer.format(tableSerializationTime) + " ("
                    + pf.format(tableSerializationPerc) + " %)");
            out.println("SATIN: GRT_DESERIALIZATION_TIME: avg. per machine "
                    + Timer.format(tableDeserializationTime) + " ("
                    + pf.format(tableDeserializationPerc) + " %)");
        }
        if (FAULT_TOLERANCE && CRASH_TIMING) {
            out.println("SATIN: CRASH_HANDLING_TIME:      avg. per machine "
                    + Timer.format(crashHandlingTime) + " ("
                    + pf.format(crashHandlingPerc) + " %)");
        }
        if (FAULT_TOLERANCE && ADD_REPLICA_TIMING) {
            out.println("SATIN: ADD_REPLICA_TIME:         avg. per machine "
                    + Timer.format(addReplicaTime) + " ("
                    + pf.format(addReplicaPerc) + " %)");
        }
	if (SHARED_OBJECTS && SO_TIMING) {
            out.println("SATIN: BROADCAST_SO_INVOCATIONS: avg. per machine "
                    + Timer.format(broadcastSOInvocationsTime) + " ("
                    + pf.format(broadcastSOInvocationsPerc) + " %)");
            out.println("SATIN: HANDLE_SO_INVOCATIONS:    avg. per machine "
                    + Timer.format(handleSOInvocationsTime) + " ("
                    + pf.format(handleSOInvocationsPerc) + " %)");
            out.println("SATIN: SO_TRANSFERS:             avg. per machine "
                    + Timer.format(soTransferTime) + " ("
                    + pf.format(soTransferPerc) + " %)");
            out.println("SATIN: HANDLE_SO_TRANSFERS:      avg. per machine "
                    + Timer.format(handleSOTransferTime) + " ("
                    + pf.format(handleSOTransferPerc) + " %)");
            out.println("SATIN: SO_SERIALIZATION:         avg. per machine "
                    + Timer.format(soSerializationTime) + " ("
                    + pf.format(soSerializationPerc) + " %)");
            out.println("SATIN: SO_DESERIALIZATION:       avg. per machine "
                    + Timer.format(soDeserializationTime) + " ("
                    + pf.format(soDeserializationPerc) + " %)");
	}
        out.println("\nSATIN: TOTAL_PARALLEL_OVERHEAD:  avg. per machine "
                + Timer.format(totalOverhead) + " ("
                + (totalPerc < 10 ? " " : "") + pf.format(totalPerc) + " %)");
        out.println("SATIN: USEFUL_APP_TIME:          avg. per machine "
                + Timer.format(appTime) + " (" + (appPerc < 10 ? " " : "")
                + pf.format(appPerc) + " %)");
    }


Input:
	public void run() {
		final TInt21TripleObjectHashMap worldRegistry = this.worldRegistry.get(world);
		if (worldRegistry == null) {
			return;
		}
		if (pastTime == 0) {
			pastTime = System.currentTimeMillis() / 1000;
		}
		final long localTime = System.currentTimeMillis() / 1000;
		final long delta = localTime - pastTime;
		pastTime = localTime;
		worldRegistry.getInternalMap().forEachEntry(new TLongObjectProcedure() {
			@Override
			public boolean execute(long l, Object o) {
				final Sprout sprout = (Sprout) o;
				if (sprout.isFullyGrown()) {
					return true;
				}
				final Stage current = sprout.getCurrentStage();
				if (current == null) {
					((SimpleSprout) sprout).grow((int) delta);
					return true;
				}
				if (RANDOM.nextInt(current.getGrowthChance() - 1 + 1) + 1 != current.getGrowthChance()) {
					return true;
				}
				((SimpleSprout) sprout).grow((int) delta);
				final int x = Int21TripleHashed.key1(l);
				final int y = Int21TripleHashed.key2(l);
				final int z = Int21TripleHashed.key3(l);
				final Block block = Bukkit.getWorld(world).getBlockAt(x, y, z);
				if (!block.getChunk().isLoaded()) {
					return true;
				}
				final CustomBlock customBlock = MaterialData.getCustomBlock(current.getName());
				if (customBlock == null) {
					return true;
				}
				((SpoutBlock) block).setCustomBlock(customBlock);
				return true;
			}
		});
	}

Output:
	public void run() {
		final TInt21TripleObjectHashMap worldRegistry = this.worldRegistry.get(world);
		if (worldRegistry == null) {
			return;
		}
		if (pastTime == 0) {
			pastTime = System.currentTimeMillis() / 1000;
		}
		final long localTime = System.currentTimeMillis() / 1000;
		final long delta = localTime - pastTime;
		pastTime = localTime;
		worldRegistry.getInternalMap().forEachEntry(new TLongObjectProcedure() {
			@Override
			public boolean execute(long l, Object o) {
				final Sprout sprout = (Sprout) o;
				final Stage current = sprout.getCurrentStage();
				if (current == null) {
					((SimpleSprout) sprout).grow((int) delta);
					return true;
				}
				if (RANDOM.nextInt(current.getGrowthChance() - 1 + 1) + 1 != current.getGrowthChance()) {
					return true;
				}
				((SimpleSprout) sprout).grow((int) delta);
				final int x = Int21TripleHashed.key1(l);
				final int y = Int21TripleHashed.key2(l);
				final int z = Int21TripleHashed.key3(l);
				final Block block = Bukkit.getWorld(world).getBlockAt(x, y, z);
				if (!block.getChunk().isLoaded()) {
					return true;
				}
				final CustomBlock customBlock = MaterialData.getCustomBlock(current.getName());
				if (customBlock == null) {
					return true;
				}
				((SpoutBlock) block).setCustomBlock(customBlock);
				return true;
			}
		});
	}


Input:
    public void setHeaders(Map<String, String> headers) {
        String h = headers.get("host");
        if (h != null) {
            int idx = h.indexOf(':');
            if (idx != -1) {
                this.serverName = h.substring(0, idx);
                serverPort = Integer.valueOf(h.substring(idx + 1));
            } else {
                this.serverName = h;
            }
        }
        String ct = headers.get(CONTENT_TYPE);
        if (ct != null) {
            int idx = ct.indexOf(";");
            if (idx != -1) {
                int cidx = ct.indexOf(CHARSET, idx);
                if (cidx != -1) {
                    contentType = ct.substring(0, idx);
                    charset = ct.substring(cidx + CHARSET.length());
                } else {
                    contentType = ct;
                }
            } else {
                contentType = ct;
            }
        }
        String con = headers.get(CONNECTION);
        if (con != null) {
            con = con.toLowerCase();
        }
        isKeepAlive = (version == HTTP_1_1 && !"close".equals(con)) || "keep-alive".equals(con);
        isWebSocket = "websocket".equalsIgnoreCase(headers.get("upgrade"));
        this.headers = headers;
    }

Output:
    public void setHeaders(Map<String, String> headers) {
        String h = headers.get("host");
        if (h != null) {
            int idx = h.lastIndexOf(':');
            if (idx != -1) {
                this.serverName = h.substring(0, idx);
                serverPort = Integer.valueOf(h.substring(idx + 1));
            } else {
                this.serverName = h;
            }
        }
        String ct = headers.get(CONTENT_TYPE);
        if (ct != null) {
            int idx = ct.indexOf(";");
            if (idx != -1) {
                int cidx = ct.indexOf(CHARSET, idx);
                if (cidx != -1) {
                    contentType = ct.substring(0, idx);
                    charset = ct.substring(cidx + CHARSET.length());
                } else {
                    contentType = ct;
                }
            } else {
                contentType = ct;
            }
        }
        String con = headers.get(CONNECTION);
        if (con != null) {
            con = con.toLowerCase();
        }
        isKeepAlive = (version == HTTP_1_1 && !"close".equals(con)) || "keep-alive".equals(con);
        isWebSocket = "websocket".equalsIgnoreCase(headers.get("upgrade"));
        this.headers = headers;
    }


Input:
    public List<MovieInfo> parseMovies(String areaId) {
        final MovieInfo movieInfo = new MovieInfo();
        final MovieTrailer movieTrailer = new MovieTrailer();
        final List<MovieInfo> movies = new ArrayList<MovieInfo>();
        RootElement root = new RootElement(EVENTS);
        Element event = root.getChild(EVENT);
        Element images = event.getChild(IMAGES);
        Element videos = event.getChild(VIDEOS);
        Element eventVideo = videos.getChild(EVENT_VIDEO);
        event.setEndElementListener(new EndElementListener() {
            @Override
            public void end() {
                movies.add(movieInfo.copy());
            }
        });
        eventVideo.setEndElementListener(new EndElementListener() {
            @Override
            public void end() {
                movieInfo.addMovieTrailer(movieTrailer.copy());
            }
        });
        event.getChild(ID).setEndTextElementListener(new EndTextElementListener() {
            @Override
            public void end(String body) {
                movieInfo.setEventId(body);
            }
        });
        event.getChild(TITLE).setEndTextElementListener(new EndTextElementListener() {
            @Override
            public void end(String body) {
                movieInfo.setTitle(body);
            }
        });
        event.getChild(ORIGINAL_TITLE).setEndTextElementListener(
                new EndTextElementListener() {
                    @Override
                    public void end(String body) {
                        movieInfo.setOriginalTitle(body);
                    }
                });
       event.getChild(PRODUCTION_YEAR).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setProductionYear(body);
                   }
               });
       event.getChild(LENGTH_IN_MINUTES).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setLenghtInMinutes(body);
                   }
               });
       event.getChild(DATE_LOCAL_RELEASE).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setDtLocalRelease(body);
                   }
               });
       event.getChild(RATING_LABEL).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setRatingLabel(body);
                   }
               });
       event.getChild(LOGAL_DISTRIBUTOR_NAME).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setLocalDistributorName(body);
                   }
               });
       event.getChild(GLOBAL_DISTRIBUTOR_NAME).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setGlobalDistributorName(body);
                   }
               });
       event.getChild(GENRES).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setGenres(body);
                   }
               });
       event.getChild(SYNOPSIS).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setSynopsis(body);
                   }
               });
       images.getChild(EVENT_SMALL_IMAGE_PORTRAIT).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setEventSmallImagePortrait(body);
                   }
               });
       images.getChild(EVENT_LARGE_IMAGE_PORTRAIT).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setEventLargeImagePortrait(body);
                   }
               });
       images.getChild(EVENT_SMALL_IMAGE_LANDSCAPE).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setEventSmallImageLandscape(body);
                   }
               });
       images.getChild(EVENT_LARGE_IMAGE_LANDSCAPE).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setEventLargeImageLandscape(body);
                   }
               });
       eventVideo.getChild(TITLE).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setTitle(body);
                   }
               });
       eventVideo.getChild(LOCATION).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieTrailer.setLocation(body);
                   }
               });
       eventVideo.getChild(THUMBNAIL_LOCATION).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieTrailer.setThumbnailLocation(body);
                   }
               });
       eventVideo.getChild(MEDIA_RESOURCE_FORMAT).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieTrailer.setMediaResourceFormat(body);
                   }
               });
       eventVideo.getChild(MEDIA_RESOURCE_SUB_TYPE).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieTrailer.setMediaResourceSubType(body);
                   }
               });
        try {
            StringBuffer urlStringBuffer = new StringBuffer(BASE_FINN_FINO_URL);
            urlStringBuffer.append(EVENTS);
            if (areaId != null) {
                urlStringBuffer.append("?");
                urlStringBuffer.append(PARAM_AREA);
                urlStringBuffer.append("=");
                urlStringBuffer.append(areaId);
            }
            URL url = new URL(urlStringBuffer.toString());
            Xml.parse(this.getInputStream(url), Xml.Encoding.UTF_8, root.getContentHandler());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return movies;
    }

Output:
    public List<MovieInfo> parseMovies(String areaId) {
        final MovieInfo movieInfo = new MovieInfo();
        final MovieTrailer movieTrailer = new MovieTrailer();
        final List<MovieInfo> movies = new ArrayList<MovieInfo>();
        RootElement root = new RootElement(EVENTS);
        Element event = root.getChild(EVENT);
        Element images = event.getChild(IMAGES);
        Element videos = event.getChild(VIDEOS);
        Element eventVideo = videos.getChild(EVENT_VIDEO);
        event.setEndElementListener(new EndElementListener() {
            @Override
            public void end() {
                movies.add(movieInfo.copy());
            }
        });
        eventVideo.setEndElementListener(new EndElementListener() {
            @Override
            public void end() {
                movieInfo.addMovieTrailer(movieTrailer.copy());
            }
        });
        event.getChild(ID).setEndTextElementListener(new EndTextElementListener() {
            @Override
            public void end(String body) {
                movieInfo.setEventId(body);
            }
        });
        event.getChild(TITLE).setEndTextElementListener(new EndTextElementListener() {
            @Override
            public void end(String body) {
                movieInfo.setTitle(body);
            }
        });
        event.getChild(ORIGINAL_TITLE).setEndTextElementListener(
                new EndTextElementListener() {
                    @Override
                    public void end(String body) {
                        movieInfo.setOriginalTitle(body);
                    }
                });
       event.getChild(PRODUCTION_YEAR).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setProductionYear(body);
                   }
               });
       event.getChild(LENGTH_IN_MINUTES).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setLenghtInMinutes(body);
                   }
               });
       event.getChild(DATE_LOCAL_RELEASE).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setDtLocalRelease(body);
                   }
               });
       event.getChild(RATING_LABEL).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setRatingLabel(body);
                   }
               });
       event.getChild(LOGAL_DISTRIBUTOR_NAME).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setLocalDistributorName(body);
                   }
               });
       event.getChild(GLOBAL_DISTRIBUTOR_NAME).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setGlobalDistributorName(body);
                   }
               });
       event.getChild(GENRES).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setGenres(body);
                   }
               });
       event.getChild(SYNOPSIS).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setSynopsis(body);
                   }
               });
       images.getChild(EVENT_SMALL_IMAGE_PORTRAIT).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setEventSmallImagePortrait(body);
                   }
               });
       images.getChild(EVENT_LARGE_IMAGE_PORTRAIT).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setEventLargeImagePortrait(body);
                   }
               });
       images.getChild(EVENT_SMALL_IMAGE_LANDSCAPE).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setEventSmallImageLandscape(body);
                   }
               });
       images.getChild(EVENT_LARGE_IMAGE_LANDSCAPE).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieInfo.setEventLargeImageLandscape(body);
                   }
               });
       eventVideo.getChild(TITLE).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieTrailer.setTitle(body);
                   }
               });
       eventVideo.getChild(LOCATION).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieTrailer.setLocation(body);
                   }
               });
       eventVideo.getChild(THUMBNAIL_LOCATION).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieTrailer.setThumbnailLocation(body);
                   }
               });
       eventVideo.getChild(MEDIA_RESOURCE_FORMAT).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieTrailer.setMediaResourceFormat(body);
                   }
               });
       eventVideo.getChild(MEDIA_RESOURCE_SUB_TYPE).setEndTextElementListener(
               new EndTextElementListener() {
                   @Override
                   public void end(String body) {
                       movieTrailer.setMediaResourceSubType(body);
                   }
               });
        try {
            StringBuffer urlStringBuffer = new StringBuffer(BASE_FINN_FINO_URL);
            urlStringBuffer.append(EVENTS);
            if (areaId != null) {
                urlStringBuffer.append("?");
                urlStringBuffer.append(PARAM_AREA);
                urlStringBuffer.append("=");
                urlStringBuffer.append(areaId);
            }
            URL url = new URL(urlStringBuffer.toString());
            Xml.parse(this.getInputStream(url), Xml.Encoding.UTF_8, root.getContentHandler());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return movies;
    }


Input:
	public Result decode(IoBuffer in, Charset charset) {
		log.trace("IoBuffer remaining bytes: {}, current position: {}",
				in.remaining(), in.position());
		if (in.remaining() >= ProtocolLengths.HEAD) {
			boolean sessionKeyDecoded = false;
			long cmdBodySize = 0;
			int start = in.position();
			log.trace("Parsing message header ({} bytes)..",
					ProtocolLengths.HEAD);
			PackageHeadCodec headCodec = new PackageHeadCodec();
			HeadMessage header = headCodec.decode(in);
			log.trace("- message header: {}", header);
			log.trace("- IoBuffer remaining (for body): {}", in.remaining());
			cmdBodySize = header.getMessageSize() - ProtocolLengths.HEAD;
			if ((header.getFlags() & HeadMessage.FLAG_SESSION_ID) != 0) {
				log.debug("flag FLAG_SESSION_ID is set in header");
				log.debug("in.remaining() = {}", in.remaining());
				if (in.remaining() >= 4) {
					short sessionKeyVersion = in.getUnsigned();
					in.getUnsigned();
					int sessionKeyLength = in.getUnsignedShort();
					log.debug("sessionKeyVersion={}", sessionKeyVersion);
					log.debug("sessionKeyLength={}", sessionKeyLength);
					cmdBodySize -= (sessionKeyLength + 4);
					if (sessionKeyVersion == 0 && sessionKeyLength == 0) {
						log.debug("version 0 session key detected, client can process session ID!");
					} else if (in.remaining() < sessionKeyLength) {
						long owe = header.getMessageSize()
								- ProtocolLengths.HEAD - 4 - in.remaining();
						in.position(start);
						return new Result(true, owe, header, null);
					} else {
						try {
							log.debug(
									"decoding session key (version: {}, key length: {})",
									sessionKeyVersion, sessionKeyLength);
							in.position(start + 3);
							ISessionKey sessionKey = sessionKeyCodec.decode(in);
							header.setSessionKey(sessionKey);
							log.debug("session key decoded: {}", sessionKey);
							sessionKeyDecoded = true;
						} catch (CodecException e) {
							log.warn(
									"error when decoding session key (version: {}, key length: {})",
									new Object[] { sessionKeyVersion,
											sessionKeyLength }, e);
						}
					}
				} else {
					long owe = header.getMessageSize()
							- ProtocolLengths.HEAD - in.remaining();
					in.position(start);
					return new Result(true, owe, header, null);
				}
			}
			log.debug("before parsing body: cmdBodySize={}, in.remaining={}", cmdBodySize, in.remaining());
			if (in.remaining() < cmdBodySize) {
				long owe = cmdBodySize - in.remaining();
				log.trace("More bytes are required to parse the complete message (still need {} bytes)",
						owe);
				in.position(start);
				return new Result(true, owe, header, null);
			}
			int calculatedChecksum = 0;
			{
				in.position(start);
				byte[] byteTmp = new byte[(int)header.getMessageSize()];
				in.get(byteTmp);
				Tools.putUnsignedShort(byteTmp, 0, 10);
				calculatedChecksum = Tools.checkSum(byteTmp, byteTmp.length);
			}
			if (calculatedChecksum != header.getChecksum()) {
				ErrorBodyMessage bodyMessage = new ErrorBodyMessage();
				bodyMessage.setErrorCode(CmdConstant.ERROR_CHECKSUM_CODE);
				Message message = new Message(header, bodyMessage);
				log.trace(
						"Received message has invalid checksum (calc: 0x{}, actual: 0x{})",
						Integer.toHexString(calculatedChecksum),
						Integer.toHexString(header.getChecksum()));
				return new Result(false, 0, header, message);
			}
			in.position(start + ProtocolLengths.HEAD);
			ICommand bodyMessage = null;
			try {
				bodyMessage = this.decodeMessageBody(in, charset, header);
				Message message = new Message(header, bodyMessage);
				return new Result(false, 0, header, message);
			} catch (Throwable e) {
				log.trace("Unexpected error when decoding message", e);
				ErrorBodyMessage errorBodyMessage = new ErrorBodyMessage();
				errorBodyMessage.setErrorCode(CmdConstant.ERROR_MESSAGE_CODE);
				Message message = new Message(header, errorBodyMessage);
				return new Result(false, 0, header, message);
			}
		} else {
			long owe = ProtocolLengths.HEAD - in.remaining();
			log.trace("More bytes are required to parse the header message (still need {} bytes)",
					owe);
			return new Result(true, owe, null, null);
		}
	}

Output:
	public Result decode(IoBuffer in, Charset charset) {
		log.trace("IoBuffer remaining bytes: {}, current position: {}",
				in.remaining(), in.position());
		if (in.remaining() >= ProtocolLengths.HEAD) {
			boolean sessionKeyDecoded = false;
			long cmdBodySize = 0;
			int start = in.position();
			log.trace("Parsing message header ({} bytes)..",
					ProtocolLengths.HEAD);
			PackageHeadCodec headCodec = new PackageHeadCodec();
			HeadMessage header = headCodec.decode(in);
			log.trace("- message header: {}", header);
			log.trace("- IoBuffer remaining (for body): {}", in.remaining());
			cmdBodySize = header.getMessageSize() - ProtocolLengths.HEAD;
			if ((header.getFlags() & HeadMessage.FLAG_SESSION_ID) != 0) {
				log.debug("flag FLAG_SESSION_ID is set in header");
				log.debug("in.remaining() = {}", in.remaining());
				if (in.remaining() >= 4) {
					short sessionKeyVersion = in.getUnsigned();
					in.getUnsigned();
					int sessionKeyLength = in.getUnsignedShort();
					log.debug("sessionKeyVersion={}", sessionKeyVersion);
					log.debug("sessionKeyLength={}", sessionKeyLength);
					cmdBodySize -= (sessionKeyLength + 4);
					if (sessionKeyVersion == 0 && sessionKeyLength == 0) {
						log.debug("version 0 session key detected, client can process session ID!");
					} else if (in.remaining() < sessionKeyLength) {
						long owe = header.getMessageSize()
								- ProtocolLengths.HEAD - 4 - in.remaining();
						in.position(start);
						return new Result(true, owe, header, null);
					} else {
						try {
							log.debug(
									"decoding session key (version: {}, key length: {})",
									sessionKeyVersion, sessionKeyLength);
							in.position(start + 3);
							ISessionKey sessionKey = sessionKeyCodec.decode(in);
							header.setSessionKey(sessionKey);
							log.debug("session key decoded: {}", sessionKey);
							sessionKeyDecoded = true;
						} catch (CodecException e) {
							log.warn(
									"error when decoding session key (version: {}, key length: {})",
									new Object[] { sessionKeyVersion,
											sessionKeyLength }, e);
						}
					}
				} else {
					long owe = header.getMessageSize()
							- ProtocolLengths.HEAD - in.remaining();
					in.position(start);
					return new Result(true, owe, header, null);
				}
			}
			log.debug("before parsing body: cmdBodySize={}, in.remaining={}", cmdBodySize, in.remaining());
			if (in.remaining() < cmdBodySize) {
				long owe = cmdBodySize - in.remaining();
				log.trace("More bytes are required to parse the complete message (still need {} bytes)",
						owe);
				in.position(start);
				return new Result(true, owe, header, null);
			}
			int calculatedChecksum = 0;
			{
				in.position(start);
				byte[] byteTmp = new byte[(int)header.getMessageSize()];
				in.get(byteTmp);
				Tools.putUnsignedShort(byteTmp, 0, 10);
				calculatedChecksum = Tools.checkSum(byteTmp, byteTmp.length);
			}
			if (calculatedChecksum != header.getChecksum()) {
				ErrorBodyMessage bodyMessage = new ErrorBodyMessage();
				bodyMessage.setErrorCode(CmdConstant.ERROR_CHECKSUM_CODE);
				Message message = new Message(header, bodyMessage);
				log.trace(
						"Received message has invalid checksum (calc: 0x{}, actual: 0x{})",
						Integer.toHexString(calculatedChecksum),
						Integer.toHexString(header.getChecksum()));
				return new Result(false, 0, header, message);
			}
			in.position(start
					+ ((int) header.getMessageSize() - (int) cmdBodySize));
			ICommand bodyMessage = null;
			try {
				bodyMessage = this.decodeMessageBody(in, charset, header);
				Message message = new Message(header, bodyMessage);
				return new Result(false, 0, header, message);
			} catch (Throwable e) {
				log.trace("Unexpected error when decoding message", e);
				ErrorBodyMessage errorBodyMessage = new ErrorBodyMessage();
				errorBodyMessage.setErrorCode(CmdConstant.ERROR_MESSAGE_CODE);
				Message message = new Message(header, errorBodyMessage);
				return new Result(false, 0, header, message);
			}
		} else {
			long owe = ProtocolLengths.HEAD - in.remaining();
			log.trace("More bytes are required to parse the header message (still need {} bytes)",
					owe);
			return new Result(true, owe, null, null);
		}
	}


Input:
    public void pageBeginRender(PageEvent event) {
        if (getUser() == null) {
            setUser(new User());
        }
        if (getUsers() == null) {
            setUsers(new ArrayList());
        }
        if (isFirstRender()) {
            setFirstRender(false);
        } else {
            search(event.getRequestCycle());
        }
    }

Output:
    public void pageBeginRender(PageEvent event) {
        if (getUser() == null) {
            setUser(new User());
        }
        if (getUsers() == null) {
            setUsers(new ArrayList());
        }
        if (isFirstRender()) {
            getUsers().clear();
            setFirstRender(false);
        } else {
            search(event.getRequestCycle());
        }
    }


Input:
	public void onPlayerCommandPreprocess(
			final PlayerCommandPreprocessEvent event) {
		String command = event.getMessage();
		if (command.startsWith("/toggledownfall")) {
			event.setCancelled(true);
			if (!event.getPlayer().hasPermission("essentials.weather")) {
				event.getPlayer().sendMessage(
						ChatColor.RED + "You don't have permission.");
				return;
			}
			if (event.getPlayer().getWorld().hasStorm()) {
				event.getPlayer().getWorld().setStorm(false);
			} else {
				event.getPlayer().getWorld().setStorm(true);
			}
		}
		if (command.startsWith("/time set")) {
			event.setCancelled(true);
			if (!event.getPlayer().hasPermission("essentials.time.set")) {
				event.getPlayer().sendMessage(
						ChatColor.RED + "You don't have permission.");
				return;
			}
			int ticks;
			try {
				ticks = Integer.parseInt(command.split(" ")[2]);
				event.getPlayer().getWorld().setTime(ticks);
			} catch (Exception e) {
				event.getPlayer().sendMessage(e.toString());
			}
		}
		if (command.startsWith("/give")) {
			if (event.getPlayer().hasPermission("essentials.give"))
				return;
			event.setCancelled(true);
			if (!event.getPlayer().hasPermission("essentials.item")) {
				event.getPlayer().sendMessage(
						ChatColor.RED + "You don't have permission.");
				return;
			}
			try {
				String player = command.split(" ")[1];
				if (Config.config.getBoolean("debug")) System.out.println("'"+player+"'");
				int item = Integer.parseInt(command.split(" ")[2]);
				int amount = Integer.parseInt(command.split(" ")[3]);
				short data = Short.parseShort(command.split(" ")[4]);
				if (event.getPlayer().getName().toLowerCase() != player.toLowerCase()) {
					event.getPlayer().sendMessage(
							ChatColor.RED
									+ "You may only give items to yourself");
					return;
				}
				event.getPlayer().getInventory()
						.addItem(new ItemStack(item, amount, data));
			} catch (Exception e) {
				event.getPlayer().sendMessage(e.toString());
			}
		}
	}

Output:
	public void onPlayerCommandPreprocess(
			final PlayerCommandPreprocessEvent event) {
		String command = event.getMessage();
		if (command.startsWith("/toggledownfall")) {
			event.setCancelled(true);
			if (!event.getPlayer().hasPermission("essentials.weather")) {
				event.getPlayer().sendMessage(
						ChatColor.RED + "You don't have permission.");
				return;
			}
			if (event.getPlayer().getWorld().hasStorm()) {
				event.getPlayer().getWorld().setStorm(false);
			} else {
				event.getPlayer().getWorld().setStorm(true);
			}
		}
		if (command.startsWith("/time set")) {
			event.setCancelled(true);
			if (!event.getPlayer().hasPermission("essentials.time.set")) {
				event.getPlayer().sendMessage(
						ChatColor.RED + "You don't have permission.");
				return;
			}
			int ticks;
			try {
				ticks = Integer.parseInt(command.split(" ")[2]);
				event.getPlayer().getWorld().setTime(ticks);
			} catch (Exception e) {
				event.getPlayer().sendMessage(e.toString());
			}
		}
		if (command.startsWith("/give")) {
			if (event.getPlayer().hasPermission("essentials.give"))
				return;
			event.setCancelled(true);
			if (!event.getPlayer().hasPermission("essentials.item")) {
				event.getPlayer().sendMessage(
						ChatColor.RED + "You don't have permission.");
				return;
			}
			try {
				Player player = Bukkit.getPlayer(command.split(" ")[1]);
				int item = Integer.parseInt(command.split(" ")[2]);
				int amount = Integer.parseInt(command.split(" ")[3]);
				short data = Short.parseShort(command.split(" ")[4]);
				if (event.getPlayer() != player) {
					event.getPlayer().sendMessage(
							ChatColor.RED
									+ "You may only give items to yourself");
					return;
				}
				event.getPlayer().getInventory()
						.addItem(new ItemStack(item, amount, data));
			} catch (Exception e) {
				event.getPlayer().sendMessage(e.toString());
			}
		}
	}


Input:
    public void runJob() {
        SessionConfig cfg = _runner.getConfig();
        if ( (cfg == null) || (cfg.getDestination() == null) ) {
            if (_log.shouldLog(Log.ERROR))
                _log.error("No session config on runner " + _runner);
            return;
        }
        if (_log.shouldLog(Log.INFO))
            _log.info("Requesting lease set for destination " + cfg.getDestination().calculateHash().toBase64());
        ClientTunnelSettings settings = new ClientTunnelSettings();
        Properties props = new Properties();
        props.putAll(_runner.getConfig().getOptions());
        settings.readFromProperties(props);
        getContext().tunnelManager().buildTunnels(_runner.getConfig().getDestination(), settings);
    }

Output:
    public void runJob() {
        SessionConfig cfg = _runner.getConfig();
        if ( (cfg == null) || (cfg.getDestination() == null) ) {
            if (_log.shouldLog(Log.ERROR))
                _log.error("No session config on runner " + _runner);
            return;
        }
        if (_log.shouldLog(Log.INFO))
            _log.info("Requesting lease set for destination " + cfg.getDestination().calculateHash().toBase64());
        ClientTunnelSettings settings = new ClientTunnelSettings();
        Properties props = new Properties();
        props.putAll(cfg.getOptions());
        settings.readFromProperties(props);
        getContext().tunnelManager().buildTunnels(cfg.getDestination(), settings);
    }


Input:
	public void test_AllPathPermutationsGeneratior() throws StopConditionException, InterruptedException {
		logger.info("TEST: test_AllPathPermutationsGeneration");
		logger.info("=======================================================================");
		GraphML gml = new GraphML();
		gml.load("graphml/permutations/simple.graphml");
		FiniteStateMachine FSM = new FiniteStateMachine();
		FSM.setModel(gml.getModel());
		FSM.setWeighted(false);
		PathGenerator pathGenerator = new AllPathPermutationsGenerator(new TestCaseLength(42));
		pathGenerator.setMachine(FSM);
		while (pathGenerator.hasNext()) {
			String[] stepPair = pathGenerator.getNext();
			int stats[] = FSM.getStatistics();
			int ec = 100 * stats[1] / stats[0];
			logger.debug("call( " + stepPair[0] + " ) then verify( " + stepPair[1] + " ) --> Edge coverage @ " + ec + "%");
		}
		assertEquals(3, ((AllPathPermutationsGenerator) pathGenerator).getDepth());
		logger.debug("==============================");
	}

Output:
	public void test_AllPathPermutationsGeneratior() throws StopConditionException, InterruptedException {
		logger.info("TEST: test_AllPathPermutationsGeneration");
		logger.info("=======================================================================");
		GraphML gml = new GraphML();
		gml.load("graphml/permutations/simple.graphml");
		FiniteStateMachine FSM = new FiniteStateMachine();
		FSM.setModel(gml.getModel());
		FSM.setWeighted(false);
		PathGenerator pathGenerator = new AllPathPermutationsGenerator(new TestCaseLength(42));
		pathGenerator.setMachine(FSM);
		while (pathGenerator.hasNext()) {
			String[] stepPair = pathGenerator.getNext();
			int stats[] = FSM.getStatistics();
			int ec = 100 * stats[1] / stats[0];
			logger.debug("call( " + stepPair[0] + " ) then verify( " + stepPair[1] + " ) --> Edge coverage @ " + ec + "%");
		}
		assertEquals(2, ((AllPathPermutationsGenerator) pathGenerator).getDepth());
		logger.debug("==============================");
	}


Input:
    CarRaceGUI(CarRaceImpl i,String carClass) {
        super("CarRace");
        PropertiesControl pc = new PropertiesControl("UTF-8");
        messages = ResourceBundle.getBundle("Messages",pc);
        System.out.println("i18n: test="+i18n("test"));
        impl = i;
        ide = new SimpleIDE(this);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setLayout(new BorderLayout());
        VBox baseBox = new VBox();
        this.add(baseBox,BorderLayout.CENTER);
        HBox controlBox = new HBox();
        baseBox.myAdd(controlBox,0);
        HBox classNameBox = new HBox();
        classNameBox.setBorder(new TitledBorder(i18n("main.carClassname")));
        controlBox.myAdd(classNameBox,1);
        carClassTF = new JTextField(carClass,20);
        classNameBox.myAdd(carClassTF,1);
        HBox loadFromBox = new HBox();
        loadFromBox.setBorder(new TitledBorder(i18n("main.loadFrom")));
        controlBox.myAdd(loadFromBox,0);
        loadFromL = new JLabel("loadFrom???");
        loadFromBox.myAdd(loadFromL,0);
        changeCPB = new JButton(i18n("main.change"));
        changeCPB.addActionListener(this);
        loadFromBox.myAdd(changeCPB,0);
        VBox controlBox1 = new VBox();
        controlBox.myAdd(controlBox1,0);
        confB = new JButton(i18n("main.settings"));
        confB.addActionListener(this);
        controlBox1.myAdd(confB,0);
        ideB = new JButton(i18n("main.programming"));
        ideB.addActionListener(this);
        controlBox1.myAdd(ideB,0);
        VBox controlBox2 = new VBox();
        controlBox.myAdd(controlBox2,0);
        HBox generalInfoBox = new HBox();
        controlBox2.myAdd(generalInfoBox,0);
        fastForwardCB = new JCheckBox(i18n("main.fastForward"));
        fastForwardCB.addActionListener(this);
        generalInfoBox.myAdd(fastForwardCB,0);
        generalInfoL = new JLabel(i18n("main.time"));
        generalInfoBox.myAdd(generalInfoL,1);
        HBox mainButtonsBox = new HBox();
        controlBox2.myAdd(mainButtonsBox,0);
        startB = new JButton(i18n("main.start"));
        startB.addActionListener(this);
        mainButtonsBox.myAdd(startB,1);
        pauseB = new JButton(i18n("main.pause"));
        pauseB.addActionListener(this);
        mainButtonsBox.myAdd(pauseB,1);
        stopB = new JButton(i18n("main.stop"));
        stopB.addActionListener(this);
        mainButtonsBox.myAdd(stopB,1);
        HBox displayBox = new HBox();
        baseBox.myAdd(displayBox,1);
        mainCanvas = A3Canvas.createA3Canvas(400,400);
        mainCanvas.setCameraLocImmediately(0.0,150.0,0.0);
        mainCanvas.setCameraLookAtPointImmediately(-50.0,0.0,1.0);
        a3csController = new A3CSController(150.0);
        mainCanvas.setA3Controller(a3csController);
        displayBox.myAdd(mainCanvas,1);
        VBox subBox = new VBox();
        displayBox.myAdd(subBox,1);
        HBox carBox = new HBox();
        subBox.myAdd(carBox,1);
        carCanvas = A3SubCanvas.createA3SubCanvas(200,200);
        carBox.myAdd(carCanvas,1);
        stdOutTA = new JTextArea(10,40);
        stdOutTA.setEditable(false);
        JScrollPane sp = new JScrollPane(stdOutTA);
        sp.setMinimumSize(new Dimension(100,100));
        baseBox.myAdd(sp,0);
        out = new JTextAreaOutputStream(stdOutTA,System.out);
        PrintStream ps = new PrintStream(out,true);
        System.setOut(ps);
        System.setErr(ps);
        updateLoadFrom();
    }

Output:
    CarRaceGUI(CarRaceImpl i,String carClass) {
        super("CarRace");
        PropertiesControl pc = new PropertiesControl("UTF-8");
        messages = ResourceBundle.getBundle("Messages",pc);
        System.out.println("i18n: test="+i18n("test"));
        impl = i;
        ide = new SimpleIDE(this);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setLayout(new BorderLayout());
        VBox baseBox = new VBox();
        this.add(baseBox,BorderLayout.CENTER);
        HBox controlBox = new HBox();
        baseBox.myAdd(controlBox,0);
        HBox classNameBox = new HBox();
        classNameBox.setBorder(new TitledBorder(i18n("main.carClassname")));
        controlBox.myAdd(classNameBox,1);
        carClassTF = new JTextField(carClass,20);
        classNameBox.myAdd(carClassTF,1);
        HBox loadFromBox = new HBox();
        loadFromBox.setBorder(new TitledBorder(i18n("main.loadFrom")));
        controlBox.myAdd(loadFromBox,0);
        loadFromL = new JLabel("loadFrom???");
        loadFromBox.myAdd(loadFromL,0);
        changeCPB = new JButton(i18n("main.change"));
        changeCPB.addActionListener(this);
        loadFromBox.myAdd(changeCPB,0);
        VBox controlBox1 = new VBox();
        controlBox.myAdd(controlBox1,0);
        confB = new JButton(i18n("main.settings"));
        confB.addActionListener(this);
        controlBox1.myAdd(confB,0);
        ideB = new JButton(i18n("main.programming"));
        ideB.addActionListener(this);
        controlBox1.myAdd(ideB,0);
        VBox controlBox2 = new VBox();
        controlBox.myAdd(controlBox2,0);
        HBox generalInfoBox = new HBox();
        controlBox2.myAdd(generalInfoBox,0);
        fastForwardCB = new JCheckBox(i18n("main.fastForward"));
        fastForwardCB.addActionListener(this);
        generalInfoBox.myAdd(fastForwardCB,0);
        generalInfoL = new JLabel(i18n("main.time"));
        generalInfoBox.myAdd(generalInfoL,1);
        HBox mainButtonsBox = new HBox();
        controlBox2.myAdd(mainButtonsBox,0);
        startB = new JButton(i18n("main.start"));
        startB.addActionListener(this);
        mainButtonsBox.myAdd(startB,1);
        pauseB = new JButton(i18n("main.pause"));
        pauseB.addActionListener(this);
        mainButtonsBox.myAdd(pauseB,1);
        stopB = new JButton(i18n("main.stop"));
        stopB.addActionListener(this);
        mainButtonsBox.myAdd(stopB,1);
        JSplitPane displayAndStdOutSP = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
        baseBox.myAdd(displayAndStdOutSP,1);
        JSplitPane displaySP = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
        displayAndStdOutSP.setTopComponent(displaySP);
        mainCanvas = A3Canvas.createA3Canvas(400,400);
        mainCanvas.setPreferredSize(new Dimension(400,400));
        mainCanvas.setMinimumSize(new Dimension(40,40));
        mainCanvas.setCameraLocImmediately(0.0,150.0,0.0);
        mainCanvas.setCameraLookAtPointImmediately(-50.0,0.0,1.0);
        a3csController = new A3CSController(150.0);
        mainCanvas.setA3Controller(a3csController);
        displaySP.setLeftComponent(mainCanvas);
        VBox subBox = new VBox();
        displaySP.setRightComponent(subBox);
        HBox carBox = new HBox();
        subBox.myAdd(carBox,1);
        carCanvas = A3SubCanvas.createA3SubCanvas(200,200);
        carCanvas.setPreferredSize(new Dimension(200,200));
        carCanvas.setMinimumSize(new Dimension(20,20));
        carBox.myAdd(carCanvas,1);
        stdOutTA = new JTextArea(10,40);
        stdOutTA.setEditable(false);
        JScrollPane sp = new JScrollPane(stdOutTA);
        sp.setPreferredSize(new Dimension(100,100));
        sp.setMinimumSize(new Dimension(10,10));
        displayAndStdOutSP.setBottomComponent(sp);
        out = new JTextAreaOutputStream(stdOutTA,System.out);
        PrintStream ps = new PrintStream(out,true);
        System.setOut(ps);
        System.setErr(ps);
        updateLoadFrom();
    }


Input:
	public void hit(Input in) {
		boolean hoverDone = false;
		boolean downDone = false;
		boolean clickDone = false;
		for (int i = list.size() - 1; i >= 0; i--) {
			Pair<Rect, Hook> h = list.get(i);
			if (!hoverDone && h.b.ofType(Hook.Type.HOVER) && h.a.contains(in.cursor())) {
				hoverDone = true;
				h.b.run(in, h.a.relative(in.cursor()), Hook.Type.HOVER);
			}
			if (!downDone && h.b.ofType(Hook.Type.values()[in.clickButton()]) && h.a.contains(in.mouseDown())) {
				downDone = true;
				h.b.run(in, h.a.relative(in.mouseDown()), Hook.Type.values()[in.clickButton()]);
			}
			if (!clickDone && (in.clickButton() + 3) < Hook.Type.values().length && h.b.ofType(Hook.Type.values()[in.clickButton() + 3]) && h.a.contains(in.clicked())) {
				clickDone = true;
				h.b.run(in, h.a.relative(in.clicked()), Hook.Type.values()[in.clickButton() + 3]);
			}
			if (clickDone && downDone && hoverDone) { list.clear(); return; }
		}
		list.clear();
	}

Output:
	public void hit(Input in) {
		boolean hoverDone = false;
		boolean downDone = false;
		boolean clickDone = false;
		for (int i = list.size() - 1; i >= 0; i--) {
			Pair<Rect, Hook> h = list.get(i);
			if (!hoverDone && h.b.ofType(Hook.Type.HOVER) && h.a.contains(in.cursor())) {
				hoverDone = true;
				h.b.run(in, h.a.relative(in.cursor()), Hook.Type.HOVER);
			}
			if (!downDone  && h.a.contains(in.mouseDown())) {
				downDone = true;
				h.b.run(in, h.a.relative(in.mouseDown()), Hook.Type.values()[in.clickButton()]);
			}
			if (!clickDone && (in.clickButton() + 3) < Hook.Type.values().length && h.b.ofType(Hook.Type.values()[in.clickButton() + 3]) && h.a.contains(in.clicked())) {
				clickDone = true;
				h.b.run(in, h.a.relative(in.clicked()), Hook.Type.values()[in.clickButton() + 3]);
			}
			if (clickDone && downDone && hoverDone) { list.clear(); return; }
		}
		list.clear();
	}