Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/ReplayGenerator.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/ReplayGenerator.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/ReplayGenerator.java	(revision 171)
@@ -12,42 +12,54 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * This class provides the functionality to generate replay files from sequences
+ * if {@link ReplayableEvent}s.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class ReplayGenerator {
-	
+
+	/**
+	 * <p>
+	 * {@link IReplayDecorator} to be used. If this field is {@code null}, no
+	 * decorator is used. Default: {@code null}
+	 * </p>
+	 */
 	private IReplayDecorator decorator = null;
-	
+
+	/**
+	 * <p>
+	 * Id of the current session. The starting id is 1.
+	 * </p>
+	 */
 	int sessionId = 1;
-	
-	public void createLogfileMultipleSessions(List<List<ReplayableEvent<?>>> sequences, String filename) {
+
+	/**
+	 * <p>
+	 * Creates a replay file that contains multiple event sequences.
+	 * </p>
+	 * 
+	 * @param sequences
+	 *            collection of event sequences from which the sessions are
+	 *            generated
+	 * @param filename
+	 *            name and path of the replay file
+	 */
+	public void createLogfileMultipleSessions(
+			List<List<ReplayableEvent<?>>> sequences, String filename) {
 		OutputStreamWriter writer = openReplayFile(filename);
-		if( writer!=null ) {		
+		if (writer != null) {
 			try {
 				decorator = sequences.get(0).get(0).getReplayDecorator();
-				if( decorator!=null ) {
+				if (decorator != null) {
 					writer.write(decorator.getHeader());
 				}
-				for( List<ReplayableEvent<?>> actions : sequences ) {
+				for (List<ReplayableEvent<?>> actions : sequences) {
 					writeSession(actions, writer);
 				}
-				if( decorator!=null ) {
-					writer.write(decorator.getFooter());
-				}
-				decorator = null;
-				writer.close();
-			} catch (IOException e) {
-				Console.printerrln("Unable to write replay file " + filename);
-			}
-		}
-	}
-	
-	public void createLogfileSingleSession(List<ReplayableEvent<?>> actions, String filename) {
-		OutputStreamWriter writer = openReplayFile(filename);
-		if( writer!=null ) {		
-			try {
-				actions.get(0).getReplayDecorator();
-				if( decorator!=null ) {
-					writer.write(decorator.getHeader());
-				}
-				writeSession(actions, writer);
-				if( decorator!=null ) {
+				if (decorator != null) {
 					writer.write(decorator.getFooter());
 				}
@@ -60,4 +72,44 @@
 	}
 
+	/**
+	 * <p>
+	 * Creates a replay file that from a single event sequence.
+	 * </p>
+	 * 
+	 * @param actions
+	 *            event sequence from which the sessions are generated
+	 * @param filename
+	 *            name and path of the replay file
+	 */
+	public void createLogfileSingleSession(List<ReplayableEvent<?>> actions,
+			String filename) {
+		OutputStreamWriter writer = openReplayFile(filename);
+		if (writer != null) {
+			try {
+				actions.get(0).getReplayDecorator();
+				if (decorator != null) {
+					writer.write(decorator.getHeader());
+				}
+				writeSession(actions, writer);
+				if (decorator != null) {
+					writer.write(decorator.getFooter());
+				}
+				decorator = null;
+				writer.close();
+			} catch (IOException e) {
+				Console.printerrln("Unable to write replay file " + filename);
+			}
+		}
+	}
+
+	/**
+	 * <p>
+	 * Helper function that opens the replay file for writing.
+	 * </p>
+	 * 
+	 * @param filename
+	 *            name and path of the replay file
+	 * @return {@link OutputStreamWriter} that writes to the replay file
+	 */
 	private OutputStreamWriter openReplayFile(String filename) {
 		File file = new File(filename);
@@ -65,5 +117,5 @@
 		try {
 			fileCreated = file.createNewFile();
-			if( !fileCreated ) {
+			if (!fileCreated) {
 				Console.traceln("Created logfile " + filename);
 			} else {
@@ -76,26 +128,41 @@
 		OutputStreamWriter writer = null;
 		try {
-			writer = new OutputStreamWriter(new FileOutputStream(file), "UTF-16");
+			writer = new OutputStreamWriter(new FileOutputStream(file),
+					"UTF-16");
 		} catch (IOException e) {
-			Console.printerrln("Unable to open file for writing (read-only file):" + filename);
+			Console.printerrln("Unable to open file for writing (read-only file):"
+					+ filename);
 			Console.printStacktrace(e);
 		}
 		return writer;
 	}
-	
-	private void writeSession(List<ReplayableEvent<?>> actions, OutputStreamWriter writer)
-			throws IOException {
-		if( decorator!=null ) {
+
+	/**
+	 * <p>
+	 * Helper function that adds an event sequence to the replay.
+	 * </p>
+	 * 
+	 * @param actions
+	 *            event sequences to be added
+	 * @param writer
+	 *            {@link OutputStreamWriter} to which the replay is added
+	 * @throws IOException
+	 *             thrown if there is a problem writing to writer
+	 */
+	private void writeSession(List<ReplayableEvent<?>> actions,
+			OutputStreamWriter writer) throws IOException {
+		if (decorator != null) {
 			writer.write(decorator.getSessionHeader(sessionId));
 		}
-		for( ReplayableEvent<?> currentAction : actions ) {
-			
-			List<? extends IReplayable> replayables = currentAction.getReplayMessages();
-			for( IReplayable replayble : replayables ) {
-				writer.write(replayble.getReplay()+StringTools.ENDLINE);
+		for (ReplayableEvent<?> currentAction : actions) {
+
+			List<? extends IReplayable> replayables = currentAction
+					.getReplayMessages();
+			for (IReplayable replayble : replayables) {
+				writer.write(replayble.getReplay() + StringTools.ENDLINE);
 				writer.flush();
 			}
 		}
-		if( decorator!=null ) {
+		if (decorator != null) {
 			writer.write(decorator.getSessionFooter(sessionId));
 		}
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/Runner.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/Runner.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/Runner.java	(revision 171)
@@ -2,18 +2,40 @@
 
 import de.ugoe.cs.util.console.CommandExecuter;
+import de.ugoe.cs.util.console.Console;
 import de.ugoe.cs.util.console.TextConsole;
 
+/**
+ * <p>
+ * Start-up class of the application.
+ * </p>
+ * <p>
+ * It sets up and starts the {@link Console}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class Runner {
 
 	/**
+	 * <p>
+	 * Main method of the application.
+	 * </p>
+	 * 
 	 * @param args
+	 *            if parameters are defined, they are interpreted as commands
+	 *            for the {@link Console} and executed before the user can use
+	 *            the console; can be used to perform batch operations
 	 */
 	public static void main(String[] args) {
-		CommandExecuter.getInstance().addCommandPackage("de.ugoe.cs.eventbench.commands");
-		CommandExecuter.getInstance().addCommandPackage("de.ugoe.cs.eventbench.windows.commands");
-		CommandExecuter.getInstance().addCommandPackage("de.ugoe.cs.eventbench.web.commands");
+		CommandExecuter.getInstance().addCommandPackage(
+				"de.ugoe.cs.eventbench.commands");
+		CommandExecuter.getInstance().addCommandPackage(
+				"de.ugoe.cs.eventbench.windows.commands");
+		CommandExecuter.getInstance().addCommandPackage(
+				"de.ugoe.cs.eventbench.web.commands");
 		TextConsole textConsole = new TextConsole();
-		if( args.length>=1 ) {
-			for( String command : args ) {
+		if (args.length >= 1) {
+			for (String command : args) {
 				CommandExecuter.getInstance().exec(command);
 			}
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDcalcCoverage.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDcalcCoverage.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDcalcCoverage.java	(revision 171)
@@ -13,10 +13,23 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command to calculate the coverage of a test suite.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDcalcCoverage implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@SuppressWarnings("unchecked")
 	@Override
 	public void run(List<Object> parameters) {
-		String modelname;		
+		String modelname;
 		String[] sequenceNames;
 		int minLength;
@@ -28,30 +41,32 @@
 			minLength = Integer.parseInt((String) parameters.get(2));
 			maxLength = Integer.parseInt((String) parameters.get(3));
-			if( parameters.size()==5 ) {
+			if (parameters.size() == 5) {
 				observedName = (String) parameters.get(1);
 			}
-		}
-		catch (Exception e) {
+		} catch (Exception e) {
 			throw new InvalidParameterException();
 		}
-		
-		IStochasticProcess process = null; 
+
+		IStochasticProcess process = null;
 		Collection<List<? extends Event<?>>> observedSequences = null;
 		Collection<List<? extends Event<?>>> sequences = null;
-		Object dataObjectProcess = GlobalDataContainer.getInstance().getData(modelname);
-		Object dataObjectObserved = GlobalDataContainer.getInstance().getData(observedName);
-		if( dataObjectProcess==null ) {
+		Object dataObjectProcess = GlobalDataContainer.getInstance().getData(
+				modelname);
+		Object dataObjectObserved = GlobalDataContainer.getInstance().getData(
+				observedName);
+		if (dataObjectProcess == null) {
 			Console.printerrln("Model " + modelname + " not found in storage.");
 			return;
 		}
-		if( !(dataObjectProcess instanceof IStochasticProcess) ) {
-			Console.printerrln("Object " + modelname + " not of type IStochasticProcess!");
+		if (!(dataObjectProcess instanceof IStochasticProcess)) {
+			Console.printerrln("Object " + modelname
+					+ " not of type IStochasticProcess!");
 			return;
 		}
-		if( dataObjectObserved==null ) {
+		if (dataObjectObserved == null) {
 			Console.printerrln("Observed sequences not found in storage.");
 			return;
 		}
-		if( !(dataObjectObserved instanceof Collection<?>) ) {
+		if (!(dataObjectObserved instanceof Collection<?>)) {
 			// weak instance check!
 			Console.printerrln("Object " + observedName + " not a Collection!");
@@ -60,8 +75,7 @@
 		process = (IStochasticProcess) dataObjectProcess;
 		observedSequences = (Collection<List<? extends Event<?>>>) dataObjectObserved;
-		
-		
+
 		Console.print("seqName");
-		for( int length=minLength ; length<=maxLength ; length++) {
+		for (int length = minLength; length <= maxLength; length++) {
 			Console.print(";numObs_" + length);
 			Console.print(";numCov_" + length);
@@ -78,19 +92,24 @@
 		}
 		Console.println("");
-		for( String sequenceName : sequenceNames ) {
-			Object dataObjectSequences = GlobalDataContainer.getInstance().getData(sequenceName);
-			if( dataObjectSequences==null ) {
-				Console.println("Sequences " + sequenceName + " not found in storage.");
-			}
-			else if( !(dataObjectSequences instanceof Collection<?>) ) {
-				// cannot really perform type check at runtime! this is an approximative substitute
-				Console.printerrln("Object " + sequenceName + "not of type Collection<?>!");
+		for (String sequenceName : sequenceNames) {
+			Object dataObjectSequences = GlobalDataContainer.getInstance()
+					.getData(sequenceName);
+			if (dataObjectSequences == null) {
+				Console.println("Sequences " + sequenceName
+						+ " not found in storage.");
+			} else if (!(dataObjectSequences instanceof Collection<?>)) {
+				// cannot really perform type check at runtime! this is an
+				// approximative substitute
+				Console.printerrln("Object " + sequenceName
+						+ "not of type Collection<?>!");
 				return;
 			}
 			sequences = (Collection<List<? extends Event<?>>>) dataObjectSequences;
 			Console.print(sequenceName);
-			for( int length=minLength ; length<=maxLength ; length++) {
-				CoverageCalculatorProcess covCalcProc = new CoverageCalculatorProcess(process, sequences, length);
-				CoverageCalculatorObserved covCalcObs = new CoverageCalculatorObserved(observedSequences, sequences, length);
+			for (int length = minLength; length <= maxLength; length++) {
+				CoverageCalculatorProcess covCalcProc = new CoverageCalculatorProcess(
+						process, sequences, length);
+				CoverageCalculatorObserved covCalcObs = new CoverageCalculatorObserved(
+						observedSequences, sequences, length);
 				Console.print(";" + covCalcObs.getNumObserved());
 				Console.print(";" + covCalcObs.getNumCovered());
@@ -101,8 +120,10 @@
 				Console.print(";" + covCalcProc.getCoveragePossibleWeight());
 				Console.print(";" + covCalcObs.getCoverageObserved());
-				Console.print(";" + covCalcObs.getCoverageObservedWeigth(process));
+				Console.print(";"
+						+ covCalcObs.getCoverageObservedWeigth(process));
 				Console.print(";" + covCalcObs.getNewPercentage());
 				Console.print(";" + covCalcObs.getCoveragePossibleNew(process));
-				Console.print(";" + covCalcObs.getCoveragePossibleNewWeight(process));
+				Console.print(";"
+						+ covCalcObs.getCoveragePossibleNewWeight(process));
 			}
 			Console.println("");
@@ -110,4 +131,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDcalcEntropy.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDcalcEntropy.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDcalcEntropy.java	(revision 171)
@@ -8,7 +8,17 @@
 import de.ugoe.cs.util.console.Console;
 
-
+/**
+ * <p>
+ * Command to calculate the entropy of first-order Markov models.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDcalcEntropy implements Command {
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
@@ -16,4 +26,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateFixedLengthSequences.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateFixedLengthSequences.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateFixedLengthSequences.java	(revision 171)
@@ -17,6 +17,19 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command to generate all sequences of a given length.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDgenerateFixedLengthSequences implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
@@ -32,33 +45,33 @@
 			minLength = Integer.parseInt((String) parameters.get(2));
 			maxLength = Integer.parseInt((String) parameters.get(3));
-			if( parameters.size()>=5 ) {
+			if (parameters.size() >= 5) {
 				all = Boolean.parseBoolean((String) parameters.get(4));
 			}
-			if( parameters.size()==6 ) {
-				numSequences = Integer.parseInt((String) parameters.get(5)); 
+			if (parameters.size() == 6) {
+				numSequences = Integer.parseInt((String) parameters.get(5));
 			}
-		}
-		catch (Exception e) {
+		} catch (Exception e) {
 			throw new InvalidParameterException();
 		}
-		
-		IStochasticProcess model = null; 
-		Object dataObject = GlobalDataContainer.getInstance().getData(modelname);
-		if( dataObject==null ) {
+
+		IStochasticProcess model = null;
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
 			Console.println("Model " + modelname + " not found in storage.");
-		}
-		else if( !(dataObject instanceof IStochasticProcess) ) {
+		} else if (!(dataObject instanceof IStochasticProcess)) {
 			Console.println("Object " + modelname + " not of type MarkovModel!");
 		} else {
 			model = (IStochasticProcess) dataObject;
 			Collection<List<? extends Event<?>>> sequences = new LinkedHashSet<List<? extends Event<?>>>();
-			for( int length=minLength; length<=maxLength; length++ ) {
-				sequences.addAll(model.generateValidSequences(length+2));
+			for (int length = minLength; length <= maxLength; length++) {
+				sequences.addAll(model.generateValidSequences(length + 2));
 			}
 			Console.traceln("" + sequences.size() + " possible");
-			if( !all && numSequences<sequences.size() ) {
-				List<Double> probabilities = new ArrayList<Double>(sequences.size());
+			if (!all && numSequences < sequences.size()) {
+				List<Double> probabilities = new ArrayList<Double>(
+						sequences.size());
 				double probSum = 0.0;
-				for( List<? extends Event<?>> sequence : sequences ) {
+				for (List<? extends Event<?>> sequence : sequences) {
 					double prob = model.getProbability(sequence);
 					probabilities.add(prob);
@@ -67,14 +80,14 @@
 				Set<Integer> drawnSequences = new HashSet<Integer>(numSequences);
 				Random r = new Random();
-				while( drawnSequences.size()<numSequences ) {
-					double randVal = r.nextDouble()*probSum;
+				while (drawnSequences.size() < numSequences) {
+					double randVal = r.nextDouble() * probSum;
 					double sum = 0.0d;
 					int index = -1;
-					while( sum<randVal ) {
+					while (sum < randVal) {
 						index++;
 						double currentProb = probabilities.get(index);
 						sum += currentProb;
 					}
-					if( !drawnSequences.contains(index) ) {
+					if (!drawnSequences.contains(index)) {
 						drawnSequences.add(index);
 						probSum -= probabilities.get(index);
@@ -84,6 +97,6 @@
 				Collection<List<? extends Event<?>>> retainedSequences = new LinkedList<List<? extends Event<?>>>();
 				int index = 0;
-				for( List<? extends Event<?>> sequence : sequences) {
-					if( drawnSequences.contains(index) ) {
+				for (List<? extends Event<?>> sequence : sequences) {
+					if (drawnSequences.contains(index)) {
 						retainedSequences.add(sequence);
 					}
@@ -92,6 +105,8 @@
 				sequences = retainedSequences;
 			}
-			if( GlobalDataContainer.getInstance().addData(sequencesName, sequences) ) {
-				Console.traceln("Old data \"" + sequencesName + "\" overwritten");
+			if (GlobalDataContainer.getInstance().addData(sequencesName,
+					sequences)) {
+				Console.traceln("Old data \"" + sequencesName
+						+ "\" overwritten");
 			}
 			Console.println("" + sequences.size() + " sequences generated");
@@ -99,4 +114,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateRandomReplay.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateRandomReplay.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateRandomReplay.java	(revision 171)
@@ -12,6 +12,19 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command to create a replay file with randomly generated sessions.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDgenerateRandomReplay implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
@@ -19,4 +32,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@SuppressWarnings("unchecked")
 	@Override
@@ -28,18 +46,17 @@
 			modelname = (String) parameters.get(0);
 			filename = (String) parameters.get(1);
-			if( parameters.size()<3 ) {
+			if (parameters.size() < 3) {
 				numSessions = Integer.parseInt((String) parameters.get(2));
 			}
-		}
-		catch (Exception e) {
+		} catch (Exception e) {
 			throw new InvalidParameterException();
 		}
-		
-		IStochasticProcess model = null; 
-		Object dataObject = GlobalDataContainer.getInstance().getData(modelname);
-		if( dataObject==null ) {
+
+		IStochasticProcess model = null;
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
 			Console.println("Model " + modelname + " not found in storage.");
-		}
-		else if( !(dataObject instanceof IStochasticProcess) ) {
+		} else if (!(dataObject instanceof IStochasticProcess)) {
 			Console.println("Object " + modelname + " not of type MarkovModel!");
 		} else {
@@ -47,6 +64,7 @@
 			List<List<ReplayableEvent<?>>> sequences = new LinkedList<List<ReplayableEvent<?>>>();
 			try {
-				for( int i=0 ; i<numSessions ; i++ ) {
-					sequences.add((List<ReplayableEvent<?>>) model.randomSequence());
+				for (int i = 0; i < numSessions; i++) {
+					sequences.add((List<ReplayableEvent<?>>) model
+							.randomSequence());
 				}
 			} catch (ClassCastException e) {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateRandomSequences.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateRandomSequences.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateRandomSequences.java	(revision 171)
@@ -12,6 +12,14 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>Command to generate random sessions.</p>
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDgenerateRandomSequences implements Command {
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
@@ -68,4 +76,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateReplayfile.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateReplayfile.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateReplayfile.java	(revision 171)
@@ -11,6 +11,14 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>Command to create a replay file from stored sessions.</p>
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDgenerateReplayfile implements Command {
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
@@ -18,4 +26,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@SuppressWarnings("unchecked")
 	@Override
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDlistSymbols.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDlistSymbols.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDlistSymbols.java	(revision 171)
@@ -10,6 +10,20 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command to list all events (symbols) known to a usage profile (stochastic
+ * process).
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDlistSymbols implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
@@ -18,5 +32,5 @@
 		try {
 			modelname = (String) parameters.get(0);
-			if( parameters.size()==2 ) {
+			if (parameters.size() == 2) {
 				sort = Boolean.parseBoolean((String) parameters.get(1));
 			}
@@ -24,19 +38,20 @@
 			throw new InvalidParameterException();
 		}
-		
-		IStochasticProcess model = null; 
-		Object dataObject = GlobalDataContainer.getInstance().getData(modelname);
-		if( dataObject==null ) {
+
+		IStochasticProcess model = null;
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
 			Console.println("Model " + modelname + "not found in storage.");
-		}
-		else if( !(dataObject instanceof IStochasticProcess) ) {
-			Console.println("Object " + modelname + " is not a stochastic process!");
+		} else if (!(dataObject instanceof IStochasticProcess)) {
+			Console.println("Object " + modelname
+					+ " is not a stochastic process!");
 		} else {
 			model = (IStochasticProcess) dataObject;
 			String[] stateStrings = model.getSymbolStrings();
-			if( sort ) {
+			if (sort) {
 				Arrays.sort(stateStrings);
 			}
-			for( String stateString : stateStrings ) {
+			for (String stateString : stateStrings) {
 				Console.println(stateString);
 			}
@@ -44,4 +59,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDload.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDload.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDload.java	(revision 171)
@@ -7,9 +7,23 @@
 import java.util.List;
 
+import de.ugoe.cs.eventbench.data.GlobalDataContainer;
 import de.ugoe.cs.util.console.Command;
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command that loads a previously serialized {@link GlobalDataContainer}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDload implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
@@ -35,8 +49,13 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
 		Console.println("Usage: loadObject <filename>");
 	}
-	
+
 }
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDloadObject.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDloadObject.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDloadObject.java	(revision 171)
@@ -11,6 +11,20 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command to load a previously serialized object and store it in the
+ * {@link GlobalDataContainer}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDloadObject implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
@@ -37,9 +51,14 @@
 			ex.printStackTrace();
 		}
-		if( GlobalDataContainer.getInstance().addData(objectName, data ) ) {
+		if (GlobalDataContainer.getInstance().addData(objectName, data)) {
 			Console.traceln("Old data \"" + objectName + "\" overwritten");
 		}
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDmodelSize.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDmodelSize.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDmodelSize.java	(revision 171)
@@ -1,5 +1,2 @@
-/**
- * 
- */
 package de.ugoe.cs.eventbench.commands;
 
@@ -13,10 +10,16 @@
 
 /**
- * @author sherbold
- *
+ * <p>
+ * Command that prints the size of a stochastic process to the console.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
  */
 public class CMDmodelSize implements Command {
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
 	 */
@@ -29,20 +32,25 @@
 			throw new InvalidParameterException();
 		}
-		
-		Object dataObject = GlobalDataContainer.getInstance().getData(modelname);
-		if( dataObject==null ) {
+
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
 			Console.printerrln("No model with name " + modelname + "found");
 			return;
 		}
-		if( !(dataObject instanceof IStochasticProcess) ) {
-			Console.printerrln("Object " + modelname + " not of type IStochasticProcess!");
+		if (!(dataObject instanceof IStochasticProcess)) {
+			Console.printerrln("Object " + modelname
+					+ " not of type IStochasticProcess!");
 			return;
 		}
-		
+
 		IStochasticProcess process = (IStochasticProcess) dataObject;
-		Console.println("#symbols: " + process.getNumSymbols() + " ; #FOMstates " + process.getNumFOMStates());
+		Console.println("#symbols: " + process.getNumSymbols()
+				+ " ; #FOMstates " + process.getNumFOMStates());
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see de.ugoe.cs.util.console.Command#help()
 	 */
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDprintDot.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDprintDot.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDprintDot.java	(revision 171)
@@ -9,6 +9,20 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command that prints a dot representation of a model (if supported) to the
+ * console.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDprintDot implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
@@ -16,4 +30,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
@@ -24,12 +43,13 @@
 			throw new InvalidParameterException();
 		}
-		
-		IDotCompatible model = null; 
-		Object dataObject = GlobalDataContainer.getInstance().getData(modelname);
-		if( dataObject==null ) {
+
+		IDotCompatible model = null;
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
 			Console.println("Model " + modelname + "not found in storage.");
-		}
-		else if( !(dataObject instanceof IDotCompatible) ) {
-			Console.println("Object " + modelname + " does not implement IDotCompatible!");
+		} else if (!(dataObject instanceof IDotCompatible)) {
+			Console.println("Object " + modelname
+					+ " does not implement IDotCompatible!");
 		} else {
 			model = (IDotCompatible) dataObject;
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDprintRandomSession.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDprintRandomSession.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDprintRandomSession.java	(revision 171)
@@ -10,6 +10,19 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command that prints a randomly generated sessions of events to the console.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDprintRandomSession implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
@@ -17,4 +30,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
@@ -22,19 +40,18 @@
 		try {
 			modelname = (String) parameters.get(0);
-		}
-		catch (Exception e) {
+		} catch (Exception e) {
 			throw new InvalidParameterException();
 		}
-		
-		IStochasticProcess model = null; 
-		Object dataObject = GlobalDataContainer.getInstance().getData(modelname);
-		if( dataObject==null ) {
+
+		IStochasticProcess model = null;
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
 			Console.println("Model " + modelname + " not found in storage.");
-		}
-		else if( !(dataObject instanceof IStochasticProcess) ) {
+		} else if (!(dataObject instanceof IStochasticProcess)) {
 			Console.println("Object " + modelname + " not of type MarkovModel!");
 		} else {
 			model = (IStochasticProcess) dataObject;
-			for( Event<?> event : model.randomSequence() ) {
+			for (Event<?> event : model.randomSequence()) {
 				Console.println(event.toString());
 			}
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDprintTrieDot.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDprintTrieDot.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDprintTrieDot.java	(revision 171)
@@ -5,10 +5,25 @@
 
 import de.ugoe.cs.eventbench.data.GlobalDataContainer;
+import de.ugoe.cs.eventbench.models.Trie;
 import de.ugoe.cs.eventbench.models.TrieBasedModel;
 import de.ugoe.cs.util.console.Command;
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command that prints the {@link Trie} of a {@link TrieBasedModel} as dot to
+ * the console.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version
+ */
 public class CMDprintTrieDot implements Command {
-	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
@@ -16,4 +31,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
@@ -24,11 +44,11 @@
 			throw new InvalidParameterException();
 		}
-		
-		TrieBasedModel model = null; 
-		Object dataObject = GlobalDataContainer.getInstance().getData(modelname);
-		if( dataObject==null ) {
+
+		TrieBasedModel model = null;
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
 			Console.println("Model " + modelname + "not found in storage.");
-		}
-		else if( !(dataObject instanceof TrieBasedModel) ) {
+		} else if (!(dataObject instanceof TrieBasedModel)) {
 			Console.println("Object " + modelname + " is not a TrieBasedModel!");
 		} else {
@@ -37,4 +57,4 @@
 		}
 	}
-	
+
 }
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDsave.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDsave.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDsave.java	(revision 171)
@@ -11,6 +11,19 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command to save the {@link GlobalDataContainer} through serialization.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDsave implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
@@ -18,10 +31,8 @@
 		try {
 			filename = (String) parameters.get(0);
-		}
-		catch (Exception e) {
+		} catch (Exception e) {
 			throw new InvalidParameterException();
 		}
-		
-		
+
 		FileOutputStream fos = null;
 		ObjectOutputStream out = null;
@@ -36,4 +47,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDsaveObject.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDsaveObject.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDsaveObject.java	(revision 171)
@@ -11,6 +11,20 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command that saves an object contained in the {@link GlobalDataContainer}
+ * through serialization.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version
+ */
 public class CMDsaveObject implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
@@ -20,14 +34,14 @@
 			filename = (String) parameters.get(0);
 			objectName = (String) parameters.get(1);
-		}
-		catch (Exception e) {
+		} catch (Exception e) {
 			throw new InvalidParameterException();
 		}
-		
-		Object dataObject = GlobalDataContainer.getInstance().getData(objectName);
-		if( dataObject==null ) {
+
+		Object dataObject = GlobalDataContainer.getInstance().getData(
+				objectName);
+		if (dataObject == null) {
 			Console.println("Object " + objectName + " not found in storage.");
 		}
-		
+
 		FileOutputStream fos = null;
 		ObjectOutputStream out = null;
@@ -42,4 +56,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDsequenceStatistics.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDsequenceStatistics.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDsequenceStatistics.java	(revision 171)
@@ -11,40 +11,59 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command to print basic statistical information about stored sequences, e.g.,
+ * how many there are of which lenght.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDsequenceStatistics implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@SuppressWarnings("unchecked")
 	@Override
 	public void run(List<Object> parameters) {
 		String sequencesName = "sequences";
-		if( parameters.size()==1 ) {
+		if (parameters.size() == 1) {
 			sequencesName = (String) parameters.get(0);
 		}
-		
-		
+
 		List<List<Event<?>>> sequences = null;
-		Object dataObject = GlobalDataContainer.getInstance().getData(sequencesName);
-			
+		Object dataObject = GlobalDataContainer.getInstance().getData(
+				sequencesName);
+
 		try {
 			sequences = (List<List<Event<?>>>) dataObject;
 			Console.traceln("Number of Sequences: " + sequences.size());
-			SortedMap<Integer,Integer> lengthMap = new TreeMap<Integer, Integer>();
-			for( List<Event<?>> sequence : sequences ) {
+			SortedMap<Integer, Integer> lengthMap = new TreeMap<Integer, Integer>();
+			for (List<Event<?>> sequence : sequences) {
 				Integer currentSize = sequence.size();
-				if( lengthMap.containsKey(currentSize) ) {
-					lengthMap.put(currentSize, lengthMap.get(currentSize)+1);
+				if (lengthMap.containsKey(currentSize)) {
+					lengthMap.put(currentSize, lengthMap.get(currentSize) + 1);
 				} else {
 					lengthMap.put(currentSize, 1);
 				}
 			}
-			for( Entry<Integer, Integer> entry : lengthMap.entrySet() ) {
-				Console.traceln("Of length " + entry.getKey() + ": " + entry.getValue());
+			for (Entry<Integer, Integer> entry : lengthMap.entrySet()) {
+				Console.traceln("Of length " + entry.getKey() + ": "
+						+ entry.getValue());
 			}
-			
-		}
-		catch(ClassCastException e) {
+
+		} catch (ClassCastException e) {
 			Console.println("Sequences not found");
 		}
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDshowMarkovModel.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDshowMarkovModel.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDshowMarkovModel.java	(revision 171)
@@ -23,6 +23,19 @@
 import edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position;
 
+/**
+ * <p>
+ * Command that visualizes first-order Markov models.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDshowMarkovModel implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
@@ -30,4 +43,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
@@ -36,41 +54,50 @@
 		try {
 			modelname = (String) parameters.get(0);
-			if( parameters.size()==2 ) {
-				showNodeNames = Boolean.parseBoolean((String) parameters.get(1));
+			if (parameters.size() == 2) {
+				showNodeNames = Boolean
+						.parseBoolean((String) parameters.get(1));
 			}
 		} catch (Exception e) {
 			throw new InvalidParameterException();
 		}
-		
-		Object dataObject = GlobalDataContainer.getInstance().getData(modelname);
-		if( dataObject==null ) {
+
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
 			Console.printerrln("No model with name " + modelname + "found");
 		} else {
 			FirstOrderMarkovModel mm = (FirstOrderMarkovModel) dataObject;
-			
+
 			Graph<String, MarkovEdge> graph = mm.getGraph();
-			Layout<String, MarkovEdge> layout = new ISOMLayout<String, MarkovEdge>(graph);
-			layout.setSize(new Dimension(1000,800)); // sets the initial size of the space
-			// The BasicVisualizationServer<V,E> is parameterized by the edge types
-			BasicVisualizationServer<String,MarkovEdge> vv =
-			new BasicVisualizationServer<String,MarkovEdge>(layout);
-			vv.setPreferredSize(new Dimension(1100,850)); //Sets the viewing area size
+			Layout<String, MarkovEdge> layout = new ISOMLayout<String, MarkovEdge>(
+					graph);
+			layout.setSize(new Dimension(1000, 800)); // sets the initial size
+														// of the space
+			// The BasicVisualizationServer<V,E> is parameterized by the edge
+			// types
+			BasicVisualizationServer<String, MarkovEdge> vv = new BasicVisualizationServer<String, MarkovEdge>(
+					layout);
+			vv.setPreferredSize(new Dimension(1100, 850)); // Sets the viewing
+															// area size
 
-			if( showNodeNames ) {
+			if (showNodeNames) {
 				final Rectangle rect = new Rectangle(240, 20);
-				
-				Transformer<String, Shape> vertexShapeTransformer =
-					new Transformer<String, Shape>() {
-						public Shape transform(String s) {
-							return rect;
-						}
+
+				Transformer<String, Shape> vertexShapeTransformer = new Transformer<String, Shape>() {
+					public Shape transform(String s) {
+						return rect;
+					}
 				};
-				vv.getRenderer().getVertexLabelRenderer().setPosition(Position.CNTR);
-				vv.getRenderContext().setVertexShapeTransformer(vertexShapeTransformer);
-				vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller<String>());
+				vv.getRenderer().getVertexLabelRenderer()
+						.setPosition(Position.CNTR);
+				vv.getRenderContext().setVertexShapeTransformer(
+						vertexShapeTransformer);
+				vv.getRenderContext().setVertexLabelTransformer(
+						new ToStringLabeller<String>());
 			}
-			
-			vv.getRenderContext().setEdgeLabelTransformer(new ToStringLabeller<MarkovEdge>());
-			
+
+			vv.getRenderContext().setEdgeLabelTransformer(
+					new ToStringLabeller<MarkovEdge>());
+
 			JFrame frame = new JFrame("Markov Model");
 			frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDshowTrie.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDshowTrie.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDshowTrie.java	(revision 171)
@@ -12,4 +12,5 @@
 
 import de.ugoe.cs.eventbench.data.GlobalDataContainer;
+import de.ugoe.cs.eventbench.models.Trie;
 import de.ugoe.cs.eventbench.models.Trie.Edge;
 import de.ugoe.cs.eventbench.models.Trie.TrieVertex;
@@ -24,11 +25,29 @@
 import edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel.Position;
 
+/**
+ * <p>
+ * Command that visualizes the {@link Trie} of a {@link TrieBasedModel}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDshowTrie implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
 		Console.println("Usage: showTrie <modelName>");
 	}
-	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
@@ -39,30 +58,35 @@
 			throw new InvalidParameterException();
 		}
-		
-		Object dataObject = GlobalDataContainer.getInstance().getData(modelname);
-		if( dataObject==null ) {
+
+		Object dataObject = GlobalDataContainer.getInstance()
+				.getData(modelname);
+		if (dataObject == null) {
 			Console.printerrln("No model with name " + modelname + "found");
 		} else {
 			TrieBasedModel model = (TrieBasedModel) dataObject;
 			Tree<TrieVertex, Edge> graph = model.getTrieGraph();
-			Layout<TrieVertex, Edge> layout = new TreeLayout<TrieVertex, Edge>(graph, 60);
-			// The BasicVisualizationServer<V,E> is parameterized by the edge types
-			BasicVisualizationServer<TrieVertex,Edge> vv =
-			new BasicVisualizationServer<TrieVertex,Edge>(layout);
-			vv.setPreferredSize(new Dimension(1100,850)); //Sets the viewing area size
-			
-			
+			Layout<TrieVertex, Edge> layout = new TreeLayout<TrieVertex, Edge>(
+					graph, 60);
+			// The BasicVisualizationServer<V,E> is parameterized by the edge
+			// types
+			BasicVisualizationServer<TrieVertex, Edge> vv = new BasicVisualizationServer<TrieVertex, Edge>(
+					layout);
+			vv.setPreferredSize(new Dimension(1100, 850)); // Sets the viewing
+															// area size
+
 			final Rectangle rect = new Rectangle(40, 20);
-				
-			Transformer<TrieVertex, Shape> vertexShapeTransformer =
-				new Transformer<TrieVertex, Shape>() {
-					public Shape transform(TrieVertex s) {
-						return rect;
-					}
+
+			Transformer<TrieVertex, Shape> vertexShapeTransformer = new Transformer<TrieVertex, Shape>() {
+				public Shape transform(TrieVertex s) {
+					return rect;
+				}
 			};
-			vv.getRenderer().getVertexLabelRenderer().setPosition(Position.CNTR);
-			vv.getRenderContext().setVertexShapeTransformer(vertexShapeTransformer);
-			vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller<TrieVertex>());
-			
+			vv.getRenderer().getVertexLabelRenderer()
+					.setPosition(Position.CNTR);
+			vv.getRenderContext().setVertexShapeTransformer(
+					vertexShapeTransformer);
+			vv.getRenderContext().setVertexLabelTransformer(
+					new ToStringLabeller<TrieVertex>());
+
 			JFrame frame = new JFrame("Trie");
 			frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
@@ -73,5 +97,3 @@
 	}
 
-
-
 }
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDtrainDFA.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDtrainDFA.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDtrainDFA.java	(revision 171)
@@ -11,6 +11,19 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command to train a Deterministic Finite Automaton (DFA).
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDtrainDFA implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
@@ -18,4 +31,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@SuppressWarnings("unchecked")
 	@Override
@@ -27,16 +45,20 @@
 			throw new InvalidParameterException();
 		}
-		
+
 		List<List<Event<?>>> sequences = null;
-		Object dataObject = GlobalDataContainer.getInstance().getData("sequences");
-			
+		Object dataObject = GlobalDataContainer.getInstance().getData(
+				"sequences");
+
 		try {
 			sequences = (List<List<Event<?>>>) dataObject;
-			if( sequences.size()>0 ) {
-				if( sequences.get(0).get(0) instanceof Event ) {
-					DeterministicFiniteAutomaton model =  new DeterministicFiniteAutomaton(new Random());
+			if (sequences.size() > 0) {
+				if (sequences.get(0).get(0) instanceof Event) {
+					DeterministicFiniteAutomaton model = new DeterministicFiniteAutomaton(
+							new Random());
 					model.train(sequences);
-					if( GlobalDataContainer.getInstance().addData(modelname, model) ) {
-						Console.traceln("Old data \"" + modelname + "\" overwritten");
+					if (GlobalDataContainer.getInstance().addData(modelname,
+							model)) {
+						Console.traceln("Old data \"" + modelname
+								+ "\" overwritten");
 					}
 				} else {
@@ -45,6 +67,5 @@
 				}
 			}
-		}
-		catch(ClassCastException e) {
+		} catch (ClassCastException e) {
 			Console.println("Sequences need to be loaded first using parseXML");
 		}
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDtrainMarkovModel.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDtrainMarkovModel.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDtrainMarkovModel.java	(revision 171)
@@ -1,4 +1,3 @@
 package de.ugoe.cs.eventbench.commands;
-
 
 import java.security.InvalidParameterException;
@@ -13,6 +12,19 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command to train first-order and high-order Markov models.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDtrainMarkovModel implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
@@ -20,4 +32,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@SuppressWarnings("unchecked")
 	@Override
@@ -27,5 +44,5 @@
 		try {
 			modelname = (String) parameters.get(0);
-			if( parameters.size()==2 ) {
+			if (parameters.size() == 2) {
 				order = Integer.parseInt((String) parameters.get(1));
 			}
@@ -33,14 +50,15 @@
 			throw new InvalidParameterException();
 		}
-		
+
 		List<List<Event<?>>> sequences = null;
-		Object dataObject = GlobalDataContainer.getInstance().getData("sequences");
-			
+		Object dataObject = GlobalDataContainer.getInstance().getData(
+				"sequences");
+
 		try {
 			sequences = (List<List<Event<?>>>) dataObject;
-			if( sequences.size()>0 ) {
-				if( sequences.get(0).get(0) instanceof Event ) {
+			if (sequences.size() > 0) {
+				if (sequences.get(0).get(0) instanceof Event) {
 					HighOrderMarkovModel model;
-					if( order==1 ) {
+					if (order == 1) {
 						model = new FirstOrderMarkovModel(new Random());
 					} else {
@@ -48,6 +66,8 @@
 					}
 					model.train(sequences);
-					if( GlobalDataContainer.getInstance().addData(modelname, model) ) {
-						Console.traceln("Old data \"" + modelname + "\" overwritten");
+					if (GlobalDataContainer.getInstance().addData(modelname,
+							model)) {
+						Console.traceln("Old data \"" + modelname
+								+ "\" overwritten");
 					}
 				} else {
@@ -56,6 +76,5 @@
 				}
 			}
-		}
-		catch(ClassCastException e) {
+		} catch (ClassCastException e) {
 			Console.println("Sequences need to be loaded first using parseXML");
 		}
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDtrainPPM.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDtrainPPM.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDtrainPPM.java	(revision 171)
@@ -11,6 +11,19 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command that trains Prediction by Partial Match (PPM) models.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDtrainPPM implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
@@ -18,4 +31,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@SuppressWarnings("unchecked")
 	@Override
@@ -29,5 +47,5 @@
 			probEscape = Double.parseDouble((String) parameters.get(1));
 			maxOrder = Integer.parseInt((String) parameters.get(2));
-			if( parameters.size()==4 ) {
+			if (parameters.size() == 4) {
 				minOrder = Integer.parseInt((String) parameters.get(3));
 			}
@@ -35,17 +53,21 @@
 			throw new InvalidParameterException();
 		}
-		
+
 		List<List<Event<?>>> sequences = null;
-		Object dataObject = GlobalDataContainer.getInstance().getData("sequences");
-			
+		Object dataObject = GlobalDataContainer.getInstance().getData(
+				"sequences");
+
 		try {
 			sequences = (List<List<Event<?>>>) dataObject;
-			if( sequences.size()>0 ) {
-				if( sequences.get(0).get(0) instanceof Event ) {
-					PredictionByPartialMatch model = new PredictionByPartialMatch(maxOrder, minOrder, new Random(), probEscape);
+			if (sequences.size() > 0) {
+				if (sequences.get(0).get(0) instanceof Event) {
+					PredictionByPartialMatch model = new PredictionByPartialMatch(
+							maxOrder, minOrder, new Random(), probEscape);
 					model.train(sequences);
-					if( GlobalDataContainer.getInstance().addData(modelname, model) ) {
-						Console.traceln("Old data \"" + modelname + "\" overwritten");
-					}					
+					if (GlobalDataContainer.getInstance().addData(modelname,
+							model)) {
+						Console.traceln("Old data \"" + modelname
+								+ "\" overwritten");
+					}
 				} else {
 					Console.traceln("Illegal use of \"sequences\" parameter in the GlobalDataContainer.");
@@ -53,6 +75,5 @@
 				}
 			}
-		}
-		catch(ClassCastException e) {
+		} catch (ClassCastException e) {
 			Console.println("Sequences need to be loaded first using parseXML");
 		}
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/data/GlobalDataContainer.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/data/GlobalDataContainer.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/data/GlobalDataContainer.java	(revision 171)
@@ -8,58 +8,164 @@
 import java.util.Map;
 
+/**
+ * <p>
+ * This data structure can be used by the commands to store any {@link Object}.
+ * The data is stored in a key-value map, with strings as keys.
+ * </p>
+ * <p>
+ * This class is implemented as a singleton, as more than one data container
+ * does not serves no purpose.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class GlobalDataContainer implements Serializable {
-	
+
 	/**
+	 * <p>
 	 * Id for object serialization.
+	 * </p>
 	 */
 	private static final long serialVersionUID = 1L;
 
+	/**
+	 * <p>
+	 * Instance of the {@link GlobalDataContainer} (implemented as singleton).
+	 * </p>
+	 */
 	transient private static GlobalDataContainer theInstance = null;
-	
+
+	/**
+	 * <p>
+	 * Internal storage of the data.
+	 * </p>
+	 */
 	private Map<String, Object> dataObjects;
-	
+
+	/**
+	 * <p>
+	 * Returns the instance of the container. If it does not yet exist, the data
+	 * container is created.
+	 * </p>
+	 * 
+	 * @return instance of the container
+	 */
 	public static GlobalDataContainer getInstance() {
-		if( theInstance==null ) {
+		if (theInstance == null) {
 			theInstance = new GlobalDataContainer();
 		}
 		return theInstance;
 	}
-	
+
+	/**
+	 * <p>
+	 * Manual serialization of the object. Necessary to guarantee the singleton
+	 * property.
+	 * </p>
+	 * 
+	 * @param s
+	 *            output stream for the serialization
+	 * @throws IOException
+	 *             thrown if there is problem writing to the output stream
+	 */
 	private void writeObject(ObjectOutputStream s) throws IOException {
 		s.defaultWriteObject();
 		s.writeObject(dataObjects);
 	}
-	
+
+	/**
+	 * <p>
+	 * Manual de-serialization of the object. Necessary to guarantee the
+	 * singleton property.
+	 * 
+	 * @param s
+	 *            input stream for the de-serialization
+	 * @throws IOException
+	 *             thrown if there is problem reading from the input stream
+	 * @throws ClassNotFoundException
+	 *             thrown if there is a problem reading from the input stream
+	 */
 	@SuppressWarnings("unchecked")
-	private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
+	private void readObject(ObjectInputStream s) throws IOException,
+			ClassNotFoundException {
 		s.defaultReadObject();
-		if( theInstance==null ) {
+		if (theInstance == null) {
 			theInstance = new GlobalDataContainer();
 		}
 		theInstance.dataObjects = (Map<String, Object>) s.readObject();
 	}
-	
+
+	/**
+	 * <p>
+	 * Manual de-serialization to guarantee the singleton property.
+	 * </p>
+	 * 
+	 * @return instance of the container
+	 */
 	private Object readResolve() {
 		return theInstance;
 	}
-	
+
+	/**
+	 * <p>
+	 * Constructor. Creates a new GlobalDataContainer. Private to guarantee the
+	 * singleton property.
+	 * </p>
+	 */
 	private GlobalDataContainer() {
 		dataObjects = new HashMap<String, Object>();
 	}
-	
+
+	/**
+	 * <p>
+	 * Adds data to the container.
+	 * </p>
+	 * 
+	 * @param key
+	 *            key that identifies the data
+	 * @param data
+	 *            data that is stored
+	 * @return true, if an old entry was overwritten; false otherwise
+	 */
 	public boolean addData(String key, Object data) {
 		Object previousEntry = dataObjects.put(key, data);
-		return previousEntry!=null;
+		return previousEntry != null;
 	}
-	
+
+	/**
+	 * <p>
+	 * Removes data from the container.
+	 * </p>
+	 * 
+	 * @param key
+	 *            key of the data to be removed
+	 * @return true, if the object was removed; false if it was not present
+	 */
 	public boolean removeData(String key) {
 		Object previousEntry = dataObjects.remove(key);
-		return previousEntry==null;
+		return previousEntry != null;
 	}
-	
+
+	/**
+	 * <p>
+	 * Returns the data associated with a key or {@code null} if no data is
+	 * stored for the key.
+	 * </p>
+	 * 
+	 * @param key
+	 *            key whose data is returned
+	 * @return data associated with the key; {@code null} if no data is
+	 *         available
+	 */
 	public Object getData(String key) {
 		return dataObjects.get(key);
 	}
-	
+
+	/**
+	 * <p>
+	 * Resets the data container, i.e., deletes all its contents.
+	 * </p>
+	 */
 	public void reset() {
 		dataObjects = new HashMap<String, Object>();
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/WeblogParser.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/WeblogParser.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/WeblogParser.java	(revision 171)
@@ -17,53 +17,145 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Provides functionality to parse log files with web request.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class WeblogParser {
-	
+
+	/**
+	 * <p>
+	 * Timeout between two sessions in milliseconds.
+	 * </p>
+	 */
 	private long timeout;
-	
+
+	/**
+	 * <p>
+	 * Minimal length of a session. All shorter sessions will be pruned.
+	 * Default: 2
+	 * </p>
+	 */
 	private int minLength = 2;
-	
+
+	/**
+	 * <p>
+	 * Collection of generated sequences.
+	 * </p>
+	 */
 	private List<List<WebEvent>> sequences;
-	
+
+	/**
+	 * <p>
+	 * Name and path of the robot filter.
+	 * </p>
+	 */
 	private static final String ROBOTFILTERFILE = "misc/robotfilter.txt";
-	
-	private String robotRegex = ".*";
-	
+
+	/**
+	 * <p>
+	 * Field that contains a regular expression that matches all robots
+	 * contained in {@link #ROBOTFILTERFILE}.
+	 * </p>
+	 */
+	private String robotRegex = null;
+
+	/**
+	 * <p>
+	 * Constructor. Creates a new WeblogParser with a default timeout of
+	 * 3,600,000 milliseconds (1 hour).
+	 * </p>
+	 */
 	public WeblogParser() {
-		timeout = 3600000; // 1 hour session-timeout as default
-	}
-	
+		this(3600000);
+	}
+
+	/**
+	 * <p>
+	 * Constructor. Creates a new WeblogParser.
+	 * </p>
+	 * 
+	 * @param timeout
+	 *            session timeout
+	 */
 	public WeblogParser(long timeout) {
 		this.timeout = timeout;
 	}
-	
+
+	/**
+	 * <p>
+	 * Returns the generated event sequences.
+	 * </p>
+	 * 
+	 * @return generated event sequences
+	 */
 	public List<List<WebEvent>> getSequences() {
-		return sequences; 
-	}
-	
+		return sequences;
+	}
+
+	/**
+	 * <p>
+	 * Sets the session timeout.
+	 * </p>
+	 * 
+	 * @param timeout
+	 *            new session timeout
+	 */
 	public void setTimeout(long timeout) {
 		this.timeout = timeout;
 	}
-	
+
+	/**
+	 * <p>
+	 * Sets the minimal length of a session. All sessions that contain less
+	 * events will be pruned.
+	 * </p>
+	 * 
+	 * @param minLength
+	 *            new minimal length
+	 */
 	public void setMinLength(int minLength) {
 		this.minLength = minLength;
 	}
-	
-	public void parseFile(String filename) throws IOException, FileNotFoundException, ParseException, URISyntaxException {
+
+	/**
+	 * <p>
+	 * Parses a web log file.
+	 * </p>
+	 * 
+	 * @param filename
+	 *            name and path of the log file
+	 * @throws IOException
+	 *             thrown if there is a problem with reading the log file
+	 * @throws FileNotFoundException
+	 *             thrown if the log file is not found
+	 * @throws ParseException
+	 *             thrown the date format is invalid
+	 * @throws URISyntaxException
+	 *             thrown if the URI is invalid
+	 */
+	public void parseFile(String filename) throws IOException,
+			FileNotFoundException, ParseException, URISyntaxException {
 		String[] lines = FileTools.getLinesFromFile(filename);
-		
+
 		Map<String, List<Integer>> cookieSessionMap = new HashMap<String, List<Integer>>();
 		int lastId = -1;
-		
-		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+		SimpleDateFormat dateFormat = new SimpleDateFormat(
+				"yyyy-MM-dd HH:mm:ss");
 		loadRobotRegex();
-		
+
 		sequences = new ArrayList<List<WebEvent>>();
-		
-		for( String line : lines ) {
-			String[] values = line.substring(1, line.length()-1).split("\" \"");
-			
+
+		for (String line : lines) {
+			String[] values = line.substring(1, line.length() - 1).split(
+					"\" \"");
+
 			// use cookie as session identifier
 			int cookieStart = values[0].lastIndexOf('.');
-			String cookie = values[0].substring(cookieStart+1);
+			String cookie = values[0].substring(cookieStart + 1);
 			String dateString = values[1];
 			long timestamp = dateFormat.parse(dateString).getTime();
@@ -71,27 +163,28 @@
 			// String ref = values[3]; // referer is not yet used!
 			String agent;
-			if( values.length>4 ) {
+			if (values.length > 4) {
 				agent = values[4];
 			} else {
 				agent = "noagent";
 			}
-			
+
 			List<String> postedVars = new ArrayList<String>();
-			if( values.length==6 ) { // post vars found
-				for( String postVar : values[5].trim().split(" ") ) {
+			if (values.length == 6) { // post vars found
+				for (String postVar : values[5].trim().split(" ")) {
 					postedVars.add(postVar);
 				}
 			}
-			if( !isRobot(agent) ) {
+			if (!isRobot(agent)) {
 				URI uri = new URI(uriString);
-				
-				String path = uri.getPath();				
+
+				String path = uri.getPath();
 				List<String> getVars = extractGetVarsFromUri(uri);
-				
-				WebEvent event = new WebEvent(path, timestamp, postedVars, getVars);
-				
+
+				WebEvent event = new WebEvent(path, timestamp, postedVars,
+						getVars);
+
 				// find session and add event
 				List<Integer> sessionIds = cookieSessionMap.get(cookie);
-				if( sessionIds==null ) {
+				if (sessionIds == null) {
 					sessionIds = new ArrayList<Integer>();
 					// start new session
@@ -99,12 +192,14 @@
 					cookieSessionMap.put(cookie, sessionIds);
 					sequences.add(new LinkedList<WebEvent>());
-				} 
-				Integer lastSessionIndex = sessionIds.get(sessionIds.size()-1);
+				}
+				Integer lastSessionIndex = sessionIds
+						.get(sessionIds.size() - 1);
 				List<WebEvent> lastSession = sequences.get(lastSessionIndex);
 				long lastEventTime = timestamp;
-				if( !lastSession.isEmpty() ) {
-					lastEventTime = lastSession.get(lastSession.size()-1).getTimestamp();
-				}
-				if( timestamp-lastEventTime>timeout ) {
+				if (!lastSession.isEmpty()) {
+					lastEventTime = lastSession.get(lastSession.size() - 1)
+							.getTimestamp();
+				}
+				if (timestamp - lastEventTime > timeout) {
 					sessionIds.add(++lastId);
 					List<WebEvent> newSession = new LinkedList<WebEvent>();
@@ -119,10 +214,15 @@
 	}
 
+	/**
+	 * <p>
+	 * Prunes sequences shorter than {@link #minLength}.
+	 * </p>
+	 */
 	private void pruneShortSequences() {
-		Console.traceln(""+sequences.size()+ " user sequences found");
+		Console.traceln("" + sequences.size() + " user sequences found");
 		// prune sequences shorter than min-length
-		int i=0;
-		while( i<sequences.size() ) {
-			if( sequences.get(i).size()<minLength ) {
+		int i = 0;
+		while (i < sequences.size()) {
+			if (sequences.get(i).size() < minLength) {
 				sequences.remove(i);
 			} else {
@@ -130,13 +230,27 @@
 			}
 		}
-		Console.traceln(""+sequences.size()+ " remaining after pruning of sequences shorter than " + minLength);
-	}
-	
+		Console.traceln("" + sequences.size()
+				+ " remaining after pruning of sequences shorter than "
+				+ minLength);
+	}
+
+	/**
+	 * <p>
+	 * Reads {@link #ROBOTFILTERFILE} and creates a regular expression that
+	 * matches all the robots defined in the file. The regular expression is
+	 * stored in the field {@link #robotRegex}.
+	 * </p>
+	 * 
+	 * @throws IOException
+	 *             thrown if there is a problem reading the robot filter
+	 * @throws FileNotFoundException
+	 *             thrown if the robot filter is not found
+	 */
 	private void loadRobotRegex() throws IOException, FileNotFoundException {
 		String[] lines = FileTools.getLinesFromFile(ROBOTFILTERFILE);
 		StringBuilder regex = new StringBuilder();
-		for( int i=0; i<lines.length; i++ ) {
-			regex.append("(.*"+lines[i]+".*)");
-			if( i!=lines.length-1 ) {
+		for (int i = 0; i < lines.length; i++) {
+			regex.append("(.*" + lines[i] + ".*)");
+			if (i != lines.length - 1) {
 				regex.append("|");
 			}
@@ -144,15 +258,33 @@
 		robotRegex = regex.toString();
 	}
-	
+
+	/**
+	 * <p>
+	 * Checks whether an agent is a robot.
+	 * </p>
+	 * 
+	 * @param agent
+	 *            agent that is checked
+	 * @return true, if the agent is a robot; false otherwise
+	 */
 	private boolean isRobot(String agent) {
 		return agent.matches(robotRegex);
 	}
-	
+
+	/**
+	 * <p>
+	 * Parses the URI and extracts the GET variables that have been passed.
+	 * </p>
+	 * 
+	 * @param uri
+	 *            URI that is parsed
+	 * @return a list with all GET variables
+	 */
 	private List<String> extractGetVarsFromUri(URI uri) {
 		List<String> getVars = new ArrayList<String>();
 		String query = uri.getQuery();
-		if( query!=null ) {
+		if (query != null) {
 			String[] paramPairs = query.split("&");
-			for( String paramPair : paramPairs ) {
+			for (String paramPair : paramPairs) {
 				String[] paramSplit = paramPair.split("=");
 				getVars.add(paramSplit[0]);
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/commands/CMDloadSessionsFromClickstream.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/commands/CMDloadSessionsFromClickstream.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/commands/CMDloadSessionsFromClickstream.java	(revision 171)
@@ -13,6 +13,16 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command to load sessions from a web log.
+ * </p>
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDloadSessionsFromClickstream implements Command {
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
@@ -52,4 +62,7 @@
 	}
 	
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/data/WebEvent.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/data/WebEvent.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/data/WebEvent.java	(revision 171)
@@ -5,4 +5,13 @@
 import de.ugoe.cs.eventbench.data.ReplayableEvent;
 
+/**
+ * <p>
+ * This class defines web events (of PHP-based web applications).
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ * 
+ */
 public class WebEvent extends ReplayableEvent<WebRequest> {
 
@@ -13,25 +22,64 @@
 	 */
 	private static final long serialVersionUID = 1L;
-	
+
+	/**
+	 * Timestamp of the event.
+	 */
 	private final long timestamp;
-		
-	
-	private final static String makeType(String path, List<String> postVars, List<String> getVars) {
+
+	/**
+	 * <p>
+	 * Helper method that generates the type of the event based on the of the
+	 * URI, the POST variables, and the GET variables.
+	 * </p>
+	 * 
+	 * @param path
+	 *            path of the URI of the event
+	 * @param postVars
+	 *            POST variables send with the event
+	 * @param getVars
+	 *            GET variables send with the event
+	 * @return type of the event
+	 */
+	private final static String makeType(String path, List<String> postVars,
+			List<String> getVars) {
 		String type = path;
-		if( getVars!=null && !getVars.isEmpty() ) {
-			type += "+GET"+getVars.toString().replace(" ", "");
+		if (getVars != null && !getVars.isEmpty()) {
+			type += "+GET" + getVars.toString().replace(" ", "");
 		}
-		if( postVars!=null && !postVars.isEmpty() ) {
-			type += "+POST"+postVars.toString().replace(" ", "");
+		if (postVars != null && !postVars.isEmpty()) {
+			type += "+POST" + postVars.toString().replace(" ", "");
 		}
 		return type;
 	}
-	
-	public WebEvent(String path, long timestamp, List<String> postVars, List<String> getVars) {
+
+	/**
+	 * <p>
+	 * Constructor. Creates a new WebEvent.
+	 * </p>
+	 * 
+	 * @param path
+	 *            path of the URI
+	 * @param timestamp
+	 *            timestamp of when the event took place
+	 * @param postVars
+	 *            POST variables send with the event
+	 * @param getVars
+	 *            GET variables send with the event
+	 */
+	public WebEvent(String path, long timestamp, List<String> postVars,
+			List<String> getVars) {
 		super(makeType(path, postVars, getVars));
 		this.timestamp = timestamp;
 		addReplayEvent(new WebRequest(path, postVars, getVars));
 	}
-	
+
+	/**
+	 * <p>
+	 * Returns the timestamp of the event.
+	 * </p>
+	 * 
+	 * @return timestamp of th event
+	 */
 	public long getTimestamp() {
 		return timestamp;
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/data/WebRequest.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/data/WebRequest.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/web/data/WebRequest.java	(revision 171)
@@ -6,16 +6,55 @@
 import de.ugoe.cs.eventbench.data.IReplayable;
 
+/**
+ * <p>
+ * Contains all information related to a web request, i.e., the path, the POST
+ * variables and the GET variables.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class WebRequest implements IReplayable {
 
 	/**
+	 * <p>
 	 * Id for object serialization.
+	 * </p>
 	 */
 	private static final long serialVersionUID = 1L;
 
+	/**
+	 * <p>
+	 * POST variables of the web request.
+	 * </p>
+	 */
 	List<String> postVars;
+
+	/**
+	 * <p>
+	 * GET variables of the web request.
+	 * </p>
+	 */
 	List<String> getVars;
-	
+
+	/**
+	 * <p>
+	 * URI of the web request.
+	 * </p>
+	 */
 	String targetUri;
-	
+
+	/**
+	 * <p>
+	 * Constructor. Creates a new WebRequest.
+	 * </p>
+	 * 
+	 * @param uri
+	 *            URI of the request
+	 * @param postVars
+	 *            POST variables of the request
+	 * @param getVars
+	 *            GET variables of the request
+	 */
 	public WebRequest(String uri, List<String> postVars, List<String> getVars) {
 		targetUri = uri;
@@ -23,5 +62,10 @@
 		this.getVars = new ArrayList<String>(getVars);
 	}
-	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.eventbench.data.IReplayable#getReplay()
+	 */
 	@Override
 	public String getReplay() {
@@ -30,4 +74,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.eventbench.data.IReplayable#getTarget()
+	 */
 	@Override
 	public String getTarget() {
@@ -35,16 +84,31 @@
 		return null;
 	}
-	
+
+	/**
+	 * <p>
+	 * Two {@link WebRequest}s are equal, if their {@link #targetUri},
+	 * {@link #postVars}, and {@link #getVars} are equal.
+	 * </p>
+	 * 
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
 	@Override
 	public boolean equals(Object other) {
-		if( this==other ) {
+		if (this == other) {
 			return true;
 		}
-		if( other instanceof WebRequest ) {
-			return targetUri.equals(((WebRequest) other).targetUri) && postVars.equals(((WebRequest) other).postVars);
+		if (other instanceof WebRequest) {
+			return targetUri.equals(((WebRequest) other).targetUri)
+					&& postVars.equals(((WebRequest) other).postVars)
+					&& getVars.equals(((WebRequest) other).getVars);
 		}
 		return false;
 	}
-	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#hashCode()
+	 */
 	@Override
 	public int hashCode() {
@@ -54,4 +118,5 @@
 		hash = multiplier * hash + targetUri.hashCode();
 		hash = multiplier * hash + postVars.hashCode();
+		hash = multiplier * hash + getVars.hashCode();
 
 		return hash;
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/EventGenerator.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/EventGenerator.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/EventGenerator.java	(revision 171)
@@ -17,4 +17,5 @@
 import org.jdom.input.SAXBuilder;
 
+import de.ugoe.cs.eventbench.data.Event;
 import de.ugoe.cs.eventbench.windows.data.WindowTree;
 import de.ugoe.cs.eventbench.windows.data.WindowTreeNode;
@@ -24,10 +25,10 @@
 /**
  * <p>
- * Translates sequences of windows messages into events that can be used by the
- * Logalyzer core libraries for usage analysis.
+ * Translates sequences of windows messages into {@link WindowsEvent}s that can
+ * be used by the EventBench core libraries.
  * </p>
  * 
  * @author Steffen Herbold
- * 
+ * @version 1.0
  */
 public class EventGenerator {
@@ -214,125 +215,125 @@
 	}
 
-	private boolean createSequenceLParam(
-			List<WindowsMessage> generatedMessageSeq, boolean msgsGenerated,
-			int constMsgType, Element termElement)
-			throws NoSuchElementException {
-		Iterator<WindowsMessage> seqIterator = generatedMessageSeq.iterator();
-		if (termElement.getName().equals("seqValue")) {
-			String obj = termElement.getAttributeValue("seqObj");
-			List<WindowsMessage> seqVar = getStoredSeqVariable(obj);
-			if (msgsGenerated && seqVar.size() != generatedMessageSeq.size()) {
-				throw new InvalidParameterException(
-						"Failure generating replay sequence for rule "
-								+ currentRuleName
-								+ ": One or more of the sequence variables used to generate a sequence have different lenghts.");
-			}
-			for (WindowsMessage msg : seqVar) {
-				WindowsMessage currentSeqMsg = getCurrentSeqMsg(
-						generatedMessageSeq, msgsGenerated, constMsgType,
-						seqIterator);
-				String paramValueStr = msg.getParameter(termElement
-						.getAttributeValue("param"));
-				int paramValue = 0;
-				try {
-					paramValue = Integer.parseInt(paramValueStr);
-					currentSeqMsg.setLPARAM(paramValue);
-				} catch (NumberFormatException e) {
-					currentSeqMsg.setLPARAMasWindowDesc(paramValueStr);
-				}
-			}
-			if (seqIterator.hasNext()) {
-				// the first seq-var has a different number of elements than the
-				// current one
-				throw new NoSuchElementException();
-			}
-			msgsGenerated = true;
-		} else { // const value
-			int paramValue = Integer.parseInt(getTermValue(null, termElement));
-			while (seqIterator.hasNext()) {
-				seqIterator.next().setLPARAM(paramValue);
-			}
-		}
-		return msgsGenerated;
-	}
-
-	private boolean createSequenceTarget(
-			List<WindowsMessage> generatedMessageSeq, boolean msgsGenerated,
-			int constMsgType, Element termElement)
-			throws NoSuchElementException {
-		Iterator<WindowsMessage> seqIterator = generatedMessageSeq.iterator();
-		if (termElement.getName().equals("seqValue")) {
-			String obj = termElement.getAttributeValue("seqObj");
-			List<WindowsMessage> seqVar = getStoredSeqVariable(obj);
-			if (msgsGenerated && seqVar.size() != generatedMessageSeq.size()) {
-				throw new InvalidParameterException(
-						"Failure generating replay sequence for rule "
-								+ currentRuleName
-								+ ": One or more of the sequence variables used to generate a sequence have different lenghts.");
-			}
-			for (WindowsMessage msg : seqVar) {
-				WindowsMessage currentSeqMsg = getCurrentSeqMsg(
-						generatedMessageSeq, msgsGenerated, constMsgType,
-						seqIterator);
-				String targetString = msg.getParameter(termElement
-						.getAttributeValue("param"));
-				currentSeqMsg.setXmlWindowDescription(targetString);
-			}
-			msgsGenerated = true;
-		} else { // const value
-			throw new AssertionError("target must be a sequence variable!");
+	// ////////////////////////////////////////////////////////////
+	// Helper functions for matching of events, i.e., msg-nodes //
+	// ////////////////////////////////////////////////////////////
+
+	/**
+	 * <p>
+	 * Handles msg-nodes where multiple is not true, i.e., not a sequences.
+	 * </p>
+	 * 
+	 * @param messageElement
+	 *            {@link Element} representing the msg-node
+	 * @return true, if a match is found; false otherwise
+	 */
+	private boolean matchSingleMessage(Element messageElement) {
+		boolean isMatch = false;
+		WindowsMessage currentMessage = null;
+
+		int type = Integer.parseInt(messageElement.getAttributeValue("type"));
+
+		while (!isMatch && sequenceIterator.hasNext()) {
 			/*
-			 * If target would not be a variable, the message-elements could not
-			 * yet be created and the whole sequence might be broken. If this is
-			 * to be changed, createSequenceLParam and createSequenceWParam need
-			 * to be addepted, too.
+			 * traverses the messages from the current position forward till a
+			 * message with the correct type is found
 			 */
-		}
-		return msgsGenerated;
-	}
-
-	private boolean createSequenceWParam(
-			List<WindowsMessage> generatedMessageSeq, boolean msgsGenerated,
-			int constMsgType, Element termElement)
-			throws NoSuchElementException {
-		Iterator<WindowsMessage> seqIterator = generatedMessageSeq.iterator();
-		if (termElement.getName().equals("seqValue")) {
-			String obj = termElement.getAttributeValue("seqObj");
-			List<WindowsMessage> seqVar = getStoredSeqVariable(obj);
-			if (msgsGenerated && seqVar.size() != generatedMessageSeq.size()) {
-				throw new InvalidParameterException(
-						"Failure generating replay sequence for rule "
-								+ currentRuleName
-								+ ": One or more of the sequence variables used to generate a sequence have different lenghts.");
-			}
-			for (WindowsMessage msg : seqVar) {
-				WindowsMessage currentSeqMsg = getCurrentSeqMsg(
-						generatedMessageSeq, msgsGenerated, constMsgType,
-						seqIterator);
-				String paramValueStr = msg.getParameter(termElement
-						.getAttributeValue("param"));
-				int paramValue = 0;
-				try {
-					paramValue = Integer.parseInt(paramValueStr);
-					currentSeqMsg.setWPARAM(paramValue);
-				} catch (NumberFormatException e) {
-					currentSeqMsg.setWPARAMasWindowDesc(paramValueStr);
-				}
-			}
-			if (seqIterator.hasNext()) {
-				// the first seq-var has a different number of elements than the
-				// current one
-				throw new NoSuchElementException();
-			}
-			msgsGenerated = true;
-		} else { // const value
-			int paramValue = Integer.parseInt(getTermValue(null, termElement));
-			while (seqIterator.hasNext()) {
-				seqIterator.next().setWPARAM(paramValue);
-			}
-		}
-		return msgsGenerated;
-	}
-
+			currentMessage = sequenceIterator.next();
+			if (type == currentMessage.getType()) {
+				// message with the correct type found
+				// eval child nodes for further matching/storing
+				isMatch = evalEqualRestrictions(currentMessage, messageElement);
+
+				// in case the message is a match, eval storage children
+				if (isMatch) {
+					handleStorage(messageElement, currentMessage);
+					currentToken.setTarget(currentMessage
+							.getXmlWindowDescription());
+					currentToken
+							.setTargetShort(currentMessage.getParentNames());
+				}
+			}
+		}
+
+		return isMatch;
+	}
+
+	/**
+	 * <p>
+	 * Handles msg-nodes where multiple is true, i.e., sequences. Requires
+	 * knowledge about the next msg-node to determine the end of the sequence.
+	 * </p>
+	 * 
+	 * @param messageElement
+	 *            {@link Element} representing the msg-node
+	 * @param nextMessageElement
+	 *            {@link Element} representing the next msg-node; {@code null}
+	 *            if the current node is the last one
+	 * @return true, if a sequence is matched; false otherwise
+	 */
+	private boolean matchMultipleMessages(Element messageElement,
+			Element nextMessageElement) {
+		boolean isMatch = false;
+		boolean isCurrentMatch = false;
+		boolean nextMatchFound = false;
+		WindowsMessage currentMessage = null;
+		WindowsMessage nextMessage = null;
+
+		int type = Integer.parseInt(messageElement.getAttributeValue("type"));
+
+		int nextType = -1;
+		if (nextMessageElement != null) {
+			nextType = Integer.parseInt(nextMessageElement
+					.getAttributeValue("type"));
+		}
+
+		while (!nextMatchFound && sequenceIterator.hasNext()) {
+			currentMessage = sequenceIterator.next();
+			if (type == currentMessage.getType()) {
+				isCurrentMatch = evalEqualRestrictions(currentMessage,
+						messageElement);
+				isMatch = isMatch || isCurrentMatch;
+
+				if (isCurrentMatch) {
+					handleStorage(messageElement, currentMessage);
+					currentToken.setTarget(currentMessage
+							.getXmlWindowDescription());
+					currentToken
+							.setTargetShort(currentMessage.getParentNames());
+				}
+			}
+			if (nextMessageElement != null && isMatch) {
+				// peek next message to check if the sequence ends and the next
+				// match is found
+				if (!sequenceIterator.hasNext()) {
+					return false; // sequence is over, but not all messages are
+									// found
+				}
+				nextMessage = sequenceIterator.next();
+				sequenceIterator.previous();
+
+				if (nextType == nextMessage.getType()) {
+					nextMatchFound = evalEqualRestrictions(nextMessage,
+							nextMessageElement);
+				}
+
+			}
+		}
+
+		return isMatch;
+	}
+
+	/**
+	 * <p>
+	 * Handles equals-nodes.
+	 * </p>
+	 * 
+	 * @param currentMessage
+	 *            {@link Element} representing the msg-node the equals-node
+	 *            belongs to
+	 * @param messageElement
+	 *            {@link Element} representing the equals-node to be evaluated
+	 * @return true, if constraint is fulfilled; false otherwise
+	 */
 	@SuppressWarnings("unchecked")
 	private boolean evalEqualRestrictions(WindowsMessage currentMessage,
@@ -354,8 +355,6 @@
 				"equalsSeq", rulesNamespace)) {
 			List<Element> termElements = childElement.getChildren();
-			List<String> values1 = getTermValueSeq(currentMessage,
-					termElements.get(0));
-			List<String> values2 = getTermValueSeq(currentMessage,
-					termElements.get(0));
+			List<String> values1 = getTermValueSeq(termElements.get(0));
+			List<String> values2 = getTermValueSeq(termElements.get(0));
 			if (values1 == null || values2 == null) {
 				isMatch = false;
@@ -367,4 +366,85 @@
 	}
 
+	/**
+	 * <p>
+	 * Handles store-nodes and storeSeq-nodes.
+	 * </p>
+	 * 
+	 * @param messageElement
+	 *            {@link Element} representing the msg-node that is currently
+	 *            being evaluated
+	 * @param currentMessage
+	 *            current message in the message sequence that is matched; this
+	 *            is the message that is stored
+	 */
+	@SuppressWarnings("unchecked")
+	private void handleStorage(Element messageElement,
+			WindowsMessage currentMessage) {
+		for (Element childElement : (List<Element>) messageElement.getChildren(
+				"store", rulesNamespace)) {
+			String identifier = childElement.getAttributeValue("var");
+			messageStorage.put(identifier, currentMessage);
+			resolveHwnd(currentMessage, childElement);
+		}
+		for (Element childElement : (List<Element>) messageElement.getChildren(
+				"storeSeq", rulesNamespace)) {
+			String identifier = childElement.getAttributeValue("varSeq");
+			Object tmp = messageStorage.get(identifier);
+			List<WindowsMessage> storedSequence;
+			if (tmp == null || tmp instanceof WindowsMessage) {
+				storedSequence = new LinkedList<WindowsMessage>();
+				storedSequence.add(currentMessage);
+				messageStorage.put(identifier, storedSequence);
+			} else if (tmp instanceof List<?>) {
+				storedSequence = (List<WindowsMessage>) tmp;
+				storedSequence.add(currentMessage);
+				messageStorage.put(identifier, storedSequence);
+			}
+			resolveHwnd(currentMessage, childElement);
+		}
+	}
+
+	/**
+	 * <p>
+	 * Resolves a parameter that contains a HWND of a message to the target
+	 * string of the HWND and stores it.
+	 * </p>
+	 * 
+	 * @param currentMessage
+	 *            message whose HWND is resolved
+	 * @param childElement
+	 *            child element of the store node that represents the resolve
+	 */
+	@SuppressWarnings("unchecked")
+	private void resolveHwnd(WindowsMessage currentMessage, Element childElement) {
+		List<Element> resolveElements = childElement.getChildren("resolveHwnd",
+				rulesNamespace);
+		for (Element resolveElement : resolveElements) {
+			String param = resolveElement.getAttributeValue("param");
+			String storeParam = resolveElement.getAttributeValue("storeParam");
+			int paramHwnd = Integer
+					.parseInt(currentMessage.getParameter(param));
+			WindowTreeNode node = WindowTree.getInstance().find(paramHwnd);
+			if (node != null) {
+				currentMessage.addParameter(storeParam,
+						node.xmlRepresentation());
+			}
+		}
+	}
+
+	// /////////////////////////////////////////////////////
+	// Helper functions for generating the replay, i.e.,
+	// parsing of genMsg und genMsgSeq-nodes
+	// /////////////////////////////////////////////////////
+
+	/**
+	 * <p>
+	 * Handles genMsg-nodes and adds the replay to the {@link Event} that is
+	 * generated.
+	 * </p>
+	 * 
+	 * @param genMsgElement
+	 *            {@link Element} representing the genMsg-node
+	 */
 	@SuppressWarnings("unchecked")
 	private void generateReplayMessage(Element genMsgElement) {
@@ -396,6 +476,7 @@
 					String paramValueStr = getTermValue(null, termElement);
 					long paramValue = 0;
-					Element loword = genMsgChild.getChild("LOWORD", rulesNamespace);
-					if( loword!=null ) {
+					Element loword = genMsgChild.getChild("LOWORD",
+							rulesNamespace);
+					if (loword != null) {
 						paramValue = loHiWord(genMsgChild);
 						generatedMessage.setLPARAM(paramValue);
@@ -405,5 +486,6 @@
 							generatedMessage.setLPARAM(paramValue);
 						} catch (NumberFormatException e) {
-							generatedMessage.setLPARAMasWindowDesc(paramValueStr);
+							generatedMessage
+									.setLPARAMasWindowDesc(paramValueStr);
 						}
 					}
@@ -411,6 +493,7 @@
 					String paramValueStr = getTermValue(null, termElement);
 					long paramValue = 0;
-					Element loword = genMsgChild.getChild("LOWORD", rulesNamespace);
-					if( loword!=null ) {
+					Element loword = genMsgChild.getChild("LOWORD",
+							rulesNamespace);
+					if (loword != null) {
 						paramValue = loHiWord(genMsgChild);
 						generatedMessage.setWPARAM(paramValue);
@@ -420,5 +503,6 @@
 							generatedMessage.setWPARAM(paramValue);
 						} catch (NumberFormatException e) {
-							generatedMessage.setWPARAMasWindowDesc(paramValueStr);
+							generatedMessage
+									.setWPARAMasWindowDesc(paramValueStr);
 						}
 					}
@@ -436,4 +520,11 @@
 	}
 
+	/**
+	 * Handles genMsgSeq-nodes and adds the replay to the {@link Event} that is
+	 * generated.</p>
+	 * 
+	 * @param genMsgElement
+	 *            {@link Element} representing the genMsgSeq-node.
+	 */
 	@SuppressWarnings("unchecked")
 	private void generateReplaySequence(Element genMsgElement) {
@@ -479,4 +570,216 @@
 	}
 
+	/**
+	 * <p>
+	 * Creates the targets for replay sequences generated with genMsgSeq-nodes.
+	 * </p>
+	 * 
+	 * @param generatedMessageSeq
+	 *            list of the messages that is being generated
+	 * @param msgsGenerated
+	 *            boolean stating if the list of messages is already generated
+	 *            or if the generation has to be handles by this method
+	 * @param constMsgType
+	 *            a constant message type that is used for message generation,
+	 *            in case the list of message is generated by this method
+	 * @param termElement
+	 *            {@link Element} representing the term-node describing the
+	 *            target
+	 * @return true, if the list of message is generated after calling this
+	 *         method; false otherwise
+	 * @throws NoSuchElementException
+	 *             thrown if the seqVar referred to in the termElement contains
+	 *             a different number of messages than is contained in
+	 *             messageSeq
+	 */
+	private boolean createSequenceTarget(
+			List<WindowsMessage> generatedMessageSeq, boolean msgsGenerated,
+			int constMsgType, Element termElement)
+			throws NoSuchElementException {
+		Iterator<WindowsMessage> seqIterator = generatedMessageSeq.iterator();
+		if (termElement.getName().equals("seqValue")) {
+			String obj = termElement.getAttributeValue("seqObj");
+			List<WindowsMessage> seqVar = getStoredSeqVariable(obj);
+			if (msgsGenerated && seqVar.size() != generatedMessageSeq.size()) {
+				throw new InvalidParameterException(
+						"Failure generating replay sequence for rule "
+								+ currentRuleName
+								+ ": One or more of the sequence variables used to generate a sequence have different lenghts.");
+			}
+			for (WindowsMessage msg : seqVar) {
+				WindowsMessage currentSeqMsg = getCurrentSeqMsg(
+						generatedMessageSeq, msgsGenerated, constMsgType,
+						seqIterator);
+				String targetString = msg.getParameter(termElement
+						.getAttributeValue("param"));
+				currentSeqMsg.setXmlWindowDescription(targetString);
+			}
+			msgsGenerated = true;
+		} else { // const value
+			throw new AssertionError("target must be a sequence variable!");
+			/*
+			 * If target would not be a variable, the message-elements could not
+			 * yet be created and the whole sequence might be broken. If this is
+			 * to be changed, createSequenceLParam and createSequenceWParam need
+			 * to be addepted, too.
+			 */
+		}
+		return msgsGenerated;
+	}
+
+	/**
+	 * <p>
+	 * Creates the LPARAMs for replay sequences generated with genMsgSeq-nodes.
+	 * </p>
+	 * 
+	 * @param generatedMessageSeq
+	 *            list of the messages that is being generated
+	 * @param msgsGenerated
+	 *            boolean stating if the list of messages is already generated
+	 *            or if the generation has to be handles by this method
+	 * @param constMsgType
+	 *            a constant message type that is used for message generation,
+	 *            in case the list of message is generated by this method
+	 * @param termElement
+	 *            {@link Element} representing the term-node describing the
+	 *            LPARAM
+	 * @return true, if the list of message is generated after calling this
+	 *         method; false otherwise
+	 * @throws NoSuchElementException
+	 *             thrown if the seqVar referred to in the termElement contains
+	 *             a different number of messages than is contained in
+	 *             messageSeq
+	 */
+	private boolean createSequenceLParam(
+			List<WindowsMessage> generatedMessageSeq, boolean msgsGenerated,
+			int constMsgType, Element termElement)
+			throws NoSuchElementException {
+		Iterator<WindowsMessage> seqIterator = generatedMessageSeq.iterator();
+		if (termElement.getName().equals("seqValue")) {
+			String obj = termElement.getAttributeValue("seqObj");
+			List<WindowsMessage> seqVar = getStoredSeqVariable(obj);
+			if (msgsGenerated && seqVar.size() != generatedMessageSeq.size()) {
+				throw new InvalidParameterException(
+						"Failure generating replay sequence for rule "
+								+ currentRuleName
+								+ ": One or more of the sequence variables used to generate a sequence have different lenghts.");
+			}
+			for (WindowsMessage msg : seqVar) {
+				WindowsMessage currentSeqMsg = getCurrentSeqMsg(
+						generatedMessageSeq, msgsGenerated, constMsgType,
+						seqIterator);
+				String paramValueStr = msg.getParameter(termElement
+						.getAttributeValue("param"));
+				int paramValue = 0;
+				try {
+					paramValue = Integer.parseInt(paramValueStr);
+					currentSeqMsg.setLPARAM(paramValue);
+				} catch (NumberFormatException e) {
+					currentSeqMsg.setLPARAMasWindowDesc(paramValueStr);
+				}
+			}
+			if (seqIterator.hasNext()) {
+				// the first seq-var has a different number of elements than the
+				// current one
+				throw new NoSuchElementException();
+			}
+			msgsGenerated = true;
+		} else { // const value
+			int paramValue = Integer.parseInt(getTermValue(null, termElement));
+			while (seqIterator.hasNext()) {
+				seqIterator.next().setLPARAM(paramValue);
+			}
+		}
+		return msgsGenerated;
+	}
+
+	/**
+	 * <p>
+	 * Creates the WPARAMs for replay sequences generated with genMsgSeq-nodes.
+	 * </p>
+	 * 
+	 * @param generatedMessageSeq
+	 *            list of the messages that is being generated
+	 * @param msgsGenerated
+	 *            boolean stating if the list of messages is already generated
+	 *            or if the generation has to be handles by this method
+	 * @param constMsgType
+	 *            a constant message type that is used for message generation,
+	 *            in case the list of message is generated by this method
+	 * @param termElement
+	 *            {@link Element} representing the term-node describing the
+	 *            WPARAM
+	 * @return true, if the list of message is generated after calling this
+	 *         method; false otherwise
+	 * @throws NoSuchElementException
+	 *             thrown if the seqVar referred to in the termElement contains
+	 *             a different number of messages than is contained in
+	 *             messageSeq
+	 */
+	private boolean createSequenceWParam(
+			List<WindowsMessage> generatedMessageSeq, boolean msgsGenerated,
+			int constMsgType, Element termElement)
+			throws NoSuchElementException {
+		Iterator<WindowsMessage> seqIterator = generatedMessageSeq.iterator();
+		if (termElement.getName().equals("seqValue")) {
+			String obj = termElement.getAttributeValue("seqObj");
+			List<WindowsMessage> seqVar = getStoredSeqVariable(obj);
+			if (msgsGenerated && seqVar.size() != generatedMessageSeq.size()) {
+				throw new InvalidParameterException(
+						"Failure generating replay sequence for rule "
+								+ currentRuleName
+								+ ": One or more of the sequence variables used to generate a sequence have different lenghts.");
+			}
+			for (WindowsMessage msg : seqVar) {
+				WindowsMessage currentSeqMsg = getCurrentSeqMsg(
+						generatedMessageSeq, msgsGenerated, constMsgType,
+						seqIterator);
+				String paramValueStr = msg.getParameter(termElement
+						.getAttributeValue("param"));
+				int paramValue = 0;
+				try {
+					paramValue = Integer.parseInt(paramValueStr);
+					currentSeqMsg.setWPARAM(paramValue);
+				} catch (NumberFormatException e) {
+					currentSeqMsg.setWPARAMasWindowDesc(paramValueStr);
+				}
+			}
+			if (seqIterator.hasNext()) {
+				// the first seq-var has a different number of elements than the
+				// current one
+				throw new NoSuchElementException();
+			}
+			msgsGenerated = true;
+		} else { // const value
+			int paramValue = Integer.parseInt(getTermValue(null, termElement));
+			while (seqIterator.hasNext()) {
+				seqIterator.next().setWPARAM(paramValue);
+			}
+		}
+		return msgsGenerated;
+	}
+
+	/**
+	 * <p>
+	 * If a message sequence is already generated, i.e., msgsGenerated is true,
+	 * the seqIterator is used to iterate through these messages and return the
+	 * current one. If the message sequence is not yet generated, i.e.,
+	 * msgsGenerated is false, the message sequence is generated on the fly
+	 * during each call of this message and the newly generated messages are
+	 * returned.
+	 * </p>
+	 * 
+	 * @param generatedMessageSeq
+	 *            message sequence
+	 * @param msgsGenerated
+	 *            indicates if generatedMessageSeq is already generated or has
+	 *            to be generated on the fly by this method
+	 * @param constMsgType
+	 *            type of the message to be used for message generation
+	 * @param seqIterator
+	 *            iterates through an already generated message sequence; must
+	 *            not be {@code null}, if msgsGenerated is true
+	 * @return current message
+	 */
 	private WindowsMessage getCurrentSeqMsg(
 			List<WindowsMessage> generatedMessageSeq, boolean msgsGenerated,
@@ -492,4 +795,23 @@
 	}
 
+	// ////////////////////////////
+	// General helper functions //
+	// ////////////////////////////
+
+	/**
+	 * <p>
+	 * Retrieves a message from the storage for, e.g., comparison or replay.
+	 * "this" is used to refer to the current message.
+	 * </p>
+	 * 
+	 * @param currentMessage
+	 *            current message during the parsing; passed to handle "this"
+	 * @param obj
+	 *            object identifier in the storage
+	 * @return message retrieved from the storage
+	 * @throws InvalidParameterException
+	 *             thrown in case of invalid uses of "this" or if no message
+	 *             with the identifier obj is found in the storage
+	 */
 	private WindowsMessage getStoredMessageVariable(
 			WindowsMessage currentMessage, String obj)
@@ -518,4 +840,16 @@
 	}
 
+	/**
+	 * <p>
+	 * Retrieves a stored message sequence from the storage.
+	 * </p>
+	 * 
+	 * @param obj
+	 *            object identifier in the storage
+	 * @return message sequence retrieved from the storage
+	 * @throws InvalidParameterException
+	 *             thrown if no message sequences with the identifier obj is
+	 *             found in the storage
+	 */
 	@SuppressWarnings("unchecked")
 	private List<WindowsMessage> getStoredSeqVariable(String obj)
@@ -533,4 +867,17 @@
 	}
 
+	/**
+	 * <p>
+	 * Handles term-nodes and returns the value of the described term.
+	 * </p>
+	 * 
+	 * @param currentMessage
+	 *            current message during the parsing; required to resolve
+	 *            references to "this" in a term
+	 * @param termElement
+	 *            {@link Element} representing the term node
+	 * @return value of the term or {@code null} of the term node could not be
+	 *         evaluated
+	 */
 	private String getTermValue(WindowsMessage currentMessage,
 			Element termElement) {
@@ -560,5 +907,5 @@
 					String target = varMessage.getXmlWindowDescription();
 					int index = target.lastIndexOf("<");
-					if( index==0 ) {
+					if (index == 0) {
 						Console.println("Trying to adress parent of top-level window! Replay probably invalid!");
 					}
@@ -583,6 +930,14 @@
 	}
 
-	private List<String> getTermValueSeq(WindowsMessage currentMessage,
-			Element termElement) {
+	/**
+	 * <p>
+	 * Handles term-nodes contained by equalSeq nodes.
+	 * </p>
+	 * 
+	 * @param termElement
+	 *            {@link Element} representing the term-node
+	 * @return list of values of the term
+	 */
+	private List<String> getTermValueSeq(Element termElement) {
 		List<String> values = new LinkedList<String>();
 		if (termElement.getName().equals("seqValue")) {
@@ -600,139 +955,39 @@
 	}
 
-	@SuppressWarnings("unchecked")
-	private void handleStorage(Element messageElement,
-			WindowsMessage currentMessage) {
-		for (Element childElement : (List<Element>) messageElement.getChildren(
-				"store", rulesNamespace)) {
-			String identifier = childElement.getAttributeValue("var");
-			messageStorage.put(identifier, currentMessage);
-			resolveHwnd(currentMessage, childElement);
-		}
-		for (Element childElement : (List<Element>) messageElement.getChildren(
-				"storeSeq", rulesNamespace)) {
-			String identifier = childElement.getAttributeValue("varSeq");
-			Object tmp = messageStorage.get(identifier);
-			List<WindowsMessage> storedSequence;
-			if (tmp == null || tmp instanceof WindowsMessage) {
-				storedSequence = new LinkedList<WindowsMessage>();
-				storedSequence.add(currentMessage);
-				messageStorage.put(identifier, storedSequence);
-			} else if (tmp instanceof List<?>) {
-				storedSequence = (List<WindowsMessage>) tmp;
-				storedSequence.add(currentMessage);
-				messageStorage.put(identifier, storedSequence);
-			}
-			resolveHwnd(currentMessage, childElement);
-		}
-	}
-
-	private boolean matchMultipleMessages(Element messageElement,
-			Element nextMessageElement) {
-		boolean isMatch = false;
-		boolean isCurrentMatch = false;
-		boolean nextMatchFound = false;
-		WindowsMessage currentMessage = null;
-		WindowsMessage nextMessage = null;
-
-		int type = Integer.parseInt(messageElement.getAttributeValue("type"));
-
-		int nextType = -1;
-		if (nextMessageElement != null) {
-			nextType = Integer.parseInt(nextMessageElement
-					.getAttributeValue("type"));
-		}
-
-		while (!nextMatchFound && sequenceIterator.hasNext()) {
-			currentMessage = sequenceIterator.next();
-			if (type == currentMessage.getType()) {
-				isCurrentMatch = evalEqualRestrictions(currentMessage,
-						messageElement);
-				isMatch = isMatch || isCurrentMatch;
-
-				if (isCurrentMatch) {
-					handleStorage(messageElement, currentMessage);
-					currentToken.setTarget(currentMessage
-							.getXmlWindowDescription());
-					currentToken
-							.setTargetShort(currentMessage.getParentNames());
-				}
-			}
-			if (nextMessageElement != null && isMatch) {
-				// peek next message to check if the sequence ends and the next
-				// match is found
-				if (!sequenceIterator.hasNext()) {
-					return false; // sequence is over, but not all messages are
-									// found
-				}
-				nextMessage = sequenceIterator.next();
-				sequenceIterator.previous();
-
-				if (nextType == nextMessage.getType()) {
-					nextMatchFound = evalEqualRestrictions(nextMessage,
-							nextMessageElement);
-				}
-
-			}
-		}
-
-		return isMatch;
-	}
-
-	private boolean matchSingleMessage(Element messageElement) {
-		boolean isMatch = false;
-		WindowsMessage currentMessage = null;
-
-		int type = Integer.parseInt(messageElement.getAttributeValue("type"));
-
-		while (!isMatch && sequenceIterator.hasNext()) {
-			// traverses the messages from the current position forward till a
-			// message with the correct type is found
-			currentMessage = sequenceIterator.next();
-			if (type == currentMessage.getType()) {
-				// message with the correct type found
-				// eval child nodes for further matching/storing
-				isMatch = evalEqualRestrictions(currentMessage, messageElement);
-
-				// in case the message is a match, eval storage children
-				if (isMatch) {
-					handleStorage(messageElement, currentMessage);
-					currentToken.setTarget(currentMessage
-							.getXmlWindowDescription());
-					currentToken
-							.setTargetShort(currentMessage.getParentNames());
-				}
-			}
-		}
-
-		return isMatch;
-	}
-
-	@SuppressWarnings("unchecked")
-	private void resolveHwnd(WindowsMessage currentMessage, Element childElement) {
-		List<Element> resolveElements = childElement.getChildren("resolveHwnd",
-				rulesNamespace);
-		for (Element resolveElement : resolveElements) {
-			String param = resolveElement.getAttributeValue("param");
-			String storeParam = resolveElement.getAttributeValue("storeParam");
-			int paramHwnd = Integer
-					.parseInt(currentMessage.getParameter(param));
-			WindowTreeNode node = WindowTree.getInstance().find(paramHwnd);
-			if (node != null) {
-				currentMessage.addParameter(storeParam,
-						node.xmlRepresentation());
-			}
-		}
-	}
-	
+	/**
+	 * <p>
+	 * Handles LOWORD and HIWORD child nodes of LPARAM and WPARAM nodes. The
+	 * returned value is the LPARAM/WPARAM value based on the LOWORD and HIWORD.
+	 * </p>
+	 * 
+	 * @param param
+	 *            {@link Element} representing the LPARAM/WPARAM node
+	 * @return value of the LPARAM/WPARAM
+	 */
 	private long loHiWord(Element param) {
 		Element loword = param.getChild("LOWORD", rulesNamespace);
 		Element hiword = param.getChild("HIWORD", rulesNamespace);
-		String lowordStr = getTermValue(null, (Element) loword.getChildren().get(0));
-		String hiwordStr = getTermValue(null, (Element) hiword.getChildren().get(0));
-		return MAKEPARAM(Short.parseShort(lowordStr), Short.parseShort(hiwordStr));
-	}
-	
+		String lowordStr = getTermValue(null, (Element) loword.getChildren()
+				.get(0));
+		String hiwordStr = getTermValue(null, (Element) hiword.getChildren()
+				.get(0));
+		return MAKEPARAM(Short.parseShort(lowordStr),
+				Short.parseShort(hiwordStr));
+	}
+
+	/**
+	 * <p>
+	 * Takes to short integers and combines them into the high and low order
+	 * bits of an integer.
+	 * </p>
+	 * 
+	 * @param loword
+	 *            low word
+	 * @param hiword
+	 *            high word
+	 * @return combined integer
+	 */
 	private static int MAKEPARAM(short loword, short hiword) {
-		return loword| ((int) hiword) << Short.SIZE;
+		return loword | ((int) hiword) << Short.SIZE;
 	}
 
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/HandlerCreate.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/HandlerCreate.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/HandlerCreate.java	(revision 171)
@@ -3,47 +3,104 @@
 import de.ugoe.cs.eventbench.windows.data.WindowTree;
 
+/**
+ * <p>
+ * Message handler for {@code WM_CREATE} messages. The handler maintains the
+ * {@link WindowTree}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class HandlerCreate extends MessageHandler {
 
+	/**
+	 * <p>
+	 * Constructor. Creates a new HandlerCreate.
+	 * </p>
+	 */
 	public HandlerCreate() {
 		super();
 	}
 
+	/**
+	 * <p>
+	 * Name of the created window.
+	 * </p>
+	 */
 	private String windowName;
+
+	/**
+	 * <p>
+	 * HWND of the created window.
+	 * </p>
+	 */
 	private int hwnd;
+
+	/**
+	 * <p>
+	 * HWND of the created window's parent.
+	 * </p>
+	 */
 	private int parentHwnd;
+
+	/**
+	 * <p>
+	 * Resource Id of the created window.
+	 * </p>
+	 */
 	private int resourceId;
+
+	/**
+	 * <p>
+	 * Window class of the created window.
+	 * </p>
+	 */
 	private String className;
+
+	/**
+	 * <p>
+	 * Modality of the created window.
+	 * </p>
+	 */
 	private boolean isModal;
-	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.eventbench.windows.MessageHandler#onEndElement()
+	 */
 	@Override
 	public void onEndElement() {
-		if( hwnd!=0 ) {
-			WindowTree.getInstance().add(parentHwnd, hwnd, windowName, resourceId, className, isModal);
+		if (hwnd != 0) {
+			WindowTree.getInstance().add(parentHwnd, hwnd, windowName,
+					resourceId, className, isModal);
 		}
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * de.ugoe.cs.eventbench.windows.MessageHandler#onParameter(java.lang.String
+	 * , java.lang.String)
+	 */
 	@Override
 	public void onParameter(String name, String value) {
-		if( name.equals("window.hwnd") ) {
+		if (name.equals("window.hwnd")) {
 			hwnd = Integer.parseInt(value);
-		}
-		else if( name.equals("window.name") ) {
+		} else if (name.equals("window.name")) {
 			windowName = value;
-		}
-		else if( name.equals("window.parent.hwnd") ) {
+		} else if (name.equals("window.parent.hwnd")) {
 			parentHwnd = Integer.parseInt(value);
-		}
-		else if( name.equals("window.resourceId") ) {
+		} else if (name.equals("window.resourceId")) {
 			resourceId = Integer.parseInt(value);
-		}
-		else if( name.equals("window.class") ) {
-			if( value.startsWith("Afx:") ) {
+		} else if (name.equals("window.class")) {
+			if (value.startsWith("Afx:")) {
 				className = "Afx:";
 			} else {
 				className = value;
 			}
-		}
-		else if( name.equals("window.ismodal") ) {
-			if( value.equals("true") || value.equals("1") ) {
+		} else if (name.equals("window.ismodal")) {
+			if (value.equals("true") || value.equals("1")) {
 				isModal = true;
 			}
@@ -51,4 +108,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.eventbench.windows.MessageHandler#onStartElement()
+	 */
 	@Override
 	public void onStartElement() {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/HandlerDestroy.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/HandlerDestroy.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/HandlerDestroy.java	(revision 171)
@@ -3,26 +3,62 @@
 import de.ugoe.cs.eventbench.windows.data.WindowTree;
 
+/**
+ * <p>
+ * Handler for {@code WM_DESTROY} message. The handler maintains the
+ * {@link WindowTree}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class HandlerDestroy extends MessageHandler {
 
+	/**
+	 * <p>
+	 * Constructor. Creates a new HandlerDestroy.
+	 * </p>
+	 */
 	public HandlerDestroy() {
 		super();
 	}
 
+	/**
+	 * <p>
+	 * HWND of the window that is destroyed.
+	 * </p>
+	 */
 	private int hwnd;
-	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.eventbench.windows.MessageHandler#onEndElement()
+	 */
 	@Override
 	public void onEndElement() {
-		if( hwnd!=0 ) {
+		if (hwnd != 0) {
 			WindowTree.getInstance().remove(hwnd);
 		}
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * de.ugoe.cs.eventbench.windows.MessageHandler#onParameter(java.lang.String
+	 * , java.lang.String)
+	 */
 	@Override
 	public void onParameter(String name, String value) {
-		if( name.equals("window.hwnd") ) {
+		if (name.equals("window.hwnd")) {
 			hwnd = Integer.parseInt(value);
 		}
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.eventbench.windows.MessageHandler#onStartElement()
+	 */
 	@Override
 	public void onStartElement() {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/HandlerSetText.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/HandlerSetText.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/HandlerSetText.java	(revision 171)
@@ -4,13 +4,42 @@
 import de.ugoe.cs.eventbench.windows.data.WindowTreeNode;
 
+/**
+ * <p>
+ * Handles {@code WM_SETTEXT} messages. Handler maintains the {@link WindowTree}.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class HandlerSetText extends MessageHandler {
 
+	/**
+	 * <p>
+	 * Constructor. Creates a new HanderSetText.
+	 * </p>
+	 */
 	public HandlerSetText() {
 		super();
 	}
 
+	/**
+	 * <p>
+	 * New name of the window.
+	 * </p>
+	 */
 	private String windowName;
+
+	/**
+	 * <p>
+	 * HWND of the window.
+	 * </p>
+	 */
 	private int hwnd;
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.eventbench.windows.MessageHandler#onEndElement()
+	 */
 	@Override
 	public void onEndElement() {
@@ -21,4 +50,11 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * de.ugoe.cs.eventbench.windows.MessageHandler#onParameter(java.lang.String
+	 * , java.lang.String)
+	 */
 	@Override
 	public void onParameter(String name, String value) {
@@ -30,4 +66,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.eventbench.windows.MessageHandler#onStartElement()
+	 */
 	@Override
 	public void onStartElement() {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/LogParser.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/LogParser.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/LogParser.java	(revision 171)
@@ -28,22 +28,83 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * This class provides functionality to parse XML log files generated by the
+ * MFCUsageMonitor of EventBench. The result of parsing a file is a collection
+ * of event sequences. It uses the {@link SequenceSplitter} and the
+ * {@link EventGenerator} as well as custom defined {@link MessageHandler} for
+ * the parsing.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class LogParser extends DefaultHandler {
-	
+
+	/**
+	 * <p>
+	 * If a custom message handler is used, this field contains its handle.
+	 * Otherwise this field is {@code null}.
+	 * </p>
+	 */
 	private MessageHandler currentHandler;
-	
+
+	/**
+	 * <p>
+	 * Handle to the message that is currently parsed.
+	 * </p>
+	 */
 	private WindowsMessage currentMessage;
-	
+
+	/**
+	 * <p>
+	 * {@link SequenceSplitter} instance used by the {@link LogParser}.
+	 * </p>
+	 */
 	private SequenceSplitter sequenceSplitter;
-	
+
+	/**
+	 * <p>
+	 * Collection of event sequences that is contained in the log file, which is
+	 * parsed.
+	 * </p>
+	 */
 	private List<List<WindowsEvent>> sequences;
-	
+
+	/**
+	 * <p>
+	 * Debugging variable that allows the analysis which message type occurs how
+	 * often in the log file. Can be used to enhance the message filter.
+	 * </p>
+	 */
 	private SortedMap<Integer, Integer> typeCounter;
-	
+
+	/**
+	 * <p>
+	 * Debugging variable that enables the counting of the occurrences of each
+	 * message. Used in combination with {@link #typeCounter}.
+	 * </p>
+	 */
 	private boolean countMessageOccurences;
-	
+
+	/**
+	 * <p>
+	 * Constructor. Creates a new LogParser that does not count message
+	 * occurrences.
+	 * </p>
+	 */
 	public LogParser() {
 		this(false);
 	}
-	
+
+	/**
+	 * <p>
+	 * Constructor. Creates a new LogParser.
+	 * </p>
+	 * 
+	 * @param countMessageOccurences
+	 *            if true, the occurrences of each message type in the log is
+	 *            counted.
+	 */
 	public LogParser(boolean countMessageOccurences) {
 		sequenceSplitter = new SequenceSplitter();
@@ -51,44 +112,56 @@
 		currentHandler = null;
 		this.countMessageOccurences = countMessageOccurences;
-		if( countMessageOccurences) {
+		if (countMessageOccurences) {
 			typeCounter = new TreeMap<Integer, Integer>();
 		}
-		
-	}
-	
+
+	}
+
+	/**
+	 * <p>
+	 * Returns the collection of event sequences that is obtained from parsing
+	 * log files.
+	 * </p>
+	 * 
+	 * @return collection of event sequences
+	 */
 	public List<List<WindowsEvent>> getSequences() {
 		return sequences;
 	}
-	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.xml.sax.helpers.DefaultHandler#startElement(java.lang.String,
+	 * java.lang.String, java.lang.String, org.xml.sax.Attributes)
+	 */
 	@Override
-	public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
-		if( qName.equals("session") ) {
+	public void startElement(String uri, String localName, String qName,
+			Attributes atts) throws SAXException {
+		if (qName.equals("session")) {
 			Console.traceln("start of session");
 			sequenceSplitter = new SequenceSplitter();
-		}
-		else if( qName.equals("msg") ) {
+		} else if (qName.equals("msg")) {
 			String msgType = atts.getValue("type");
 			int msgInt = -1;
 			try {
 				msgInt = Integer.parseInt(msgType);
-				
-				if( countMessageOccurences ) {
+
+				if (countMessageOccurences) {
 					Integer currentCount = typeCounter.get(msgInt);
-					if( currentCount==null ) {
+					if (currentCount == null) {
 						typeCounter.put(msgInt, 1);
 					} else {
-						typeCounter.put(msgInt, currentCount+1);
+						typeCounter.put(msgInt, currentCount + 1);
 					}
 				}
-				
-				if( msgInt==MessageDefs.WM_CREATE ) {
+
+				if (msgInt == MessageDefs.WM_CREATE) {
 					currentHandler = new HandlerCreate();
 					currentHandler.onStartElement();
-				}
-				else if( msgInt==MessageDefs.WM_DESTROY ) {
+				} else if (msgInt == MessageDefs.WM_DESTROY) {
 					currentHandler = new HandlerDestroy();
 					currentHandler.onStartElement();
-				}
-				else if( msgInt==MessageDefs.WM_SETTEXT ) {
+				} else if (msgInt == MessageDefs.WM_SETTEXT) {
 					currentHandler = new HandlerSetText();
 					currentHandler.onStartElement();
@@ -96,22 +169,30 @@
 					currentMessage = new WindowsMessage(msgInt);
 				}
-			} catch(NumberFormatException e) {
+			} catch (NumberFormatException e) {
 				Console.printerrln("Invalid message type: type not a number");
 				e.printStackTrace();
 			}
-		}
-		else if( qName.equals("param") ) {
-			if( currentHandler!=null ) {
-				currentHandler.onParameter(atts.getValue("name"), atts.getValue("value"));
+		} else if (qName.equals("param")) {
+			if (currentHandler != null) {
+				currentHandler.onParameter(atts.getValue("name"),
+						atts.getValue("value"));
 			} else {
-				currentMessage.addParameter(atts.getValue("name"), atts.getValue("value"));
-			}
-		}
-	}
-	
+				currentMessage.addParameter(atts.getValue("name"),
+						atts.getValue("value"));
+			}
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.xml.sax.helpers.DefaultHandler#endElement(java.lang.String,
+	 * java.lang.String, java.lang.String)
+	 */
 	@Override
-	public void endElement(String uri, String localName, String qName) throws SAXException {
-		if( qName.equals("msg") ) {
-			if( currentHandler!=null ) {
+	public void endElement(String uri, String localName, String qName)
+			throws SAXException {
+		if (qName.equals("msg")) {
+			if (currentHandler != null) {
 				currentHandler.onEndElement();
 				currentHandler = null;
@@ -121,9 +202,9 @@
 					sequenceSplitter.addMessage(currentMessage);
 				} catch (InvalidParameterException e) {
-					Console.traceln(e.getMessage() + " WindowsMessage " + currentMessage + " ignored.");
-				}				
-			}
-		}
-		else if(qName.equals("session")) {
+					Console.traceln(e.getMessage() + " WindowsMessage "
+							+ currentMessage + " ignored.");
+				}
+			}
+		} else if (qName.equals("session")) {
 			sequenceSplitter.endSession();
 			sequences.add(sequenceSplitter.getSequence());
@@ -131,18 +212,28 @@
 		}
 	}
-	
+
+	/**
+	 * <p>
+	 * Parses a given log file and adds its contents to the collection of event
+	 * sequences.
+	 * </p>
+	 * 
+	 * @param filename
+	 *            name and path of the log file
+	 */
 	public void parseFile(String filename) {
-		if( filename==null ) {
+		if (filename == null) {
 			throw new InvalidParameterException("filename must not be null");
 		}
-		
+
 		SAXParserFactory spf = SAXParserFactory.newInstance();
 		spf.setValidating(true);
-		
+
 		SAXParser saxParser = null;
 		InputSource inputSource = null;
 		try {
 			saxParser = spf.newSAXParser();
-			inputSource = new InputSource(new InputStreamReader(new FileInputStream(filename), "UTF-16"));
+			inputSource = new InputSource(new InputStreamReader(
+					new FileInputStream(filename), "UTF-16"));
 		} catch (UnsupportedEncodingException e) {
 			e.printStackTrace();
@@ -154,14 +245,17 @@
 			e.printStackTrace();
 		}
-		if( inputSource!=null ) {
-	        inputSource.setSystemId("file://" + new File(filename).getAbsolutePath());
-	        try {
-	        	if( saxParser==null) {
-	        		throw new RuntimeException("SAXParser creation failed");
-	        	}
+		if (inputSource != null) {
+			inputSource.setSystemId("file://"
+					+ new File(filename).getAbsolutePath());
+			try {
+				if (saxParser == null) {
+					throw new RuntimeException("SAXParser creation failed");
+				}
 				saxParser.parse(inputSource, this);
-	        } catch (SAXParseException e) {
-	        	Console.printerrln("Failure parsing file in line " + e.getLineNumber() + ", column " + e.getColumnNumber() +".");
-	        	e.printStackTrace();
+			} catch (SAXParseException e) {
+				Console.printerrln("Failure parsing file in line "
+						+ e.getLineNumber() + ", column " + e.getColumnNumber()
+						+ ".");
+				e.printStackTrace();
 			} catch (SAXException e) {
 				e.printStackTrace();
@@ -170,7 +264,9 @@
 			}
 		}
-		if( countMessageOccurences ) {
+		if (countMessageOccurences) {
 			Console.println("Message statistics:");
-			Console.println(typeCounter.toString().replace(" ", StringTools.ENDLINE).replaceAll("[\\{\\}]",""));
+			Console.println(typeCounter.toString()
+					.replace(" ", StringTools.ENDLINE)
+					.replaceAll("[\\{\\}]", ""));
 		}
 	}
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/LogPreprocessor.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/LogPreprocessor.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/LogPreprocessor.java	(revision 171)
@@ -13,25 +13,86 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Pre-processes log files generated by the EventBench's MFCUsageMonitor. It
+ * decodes Base64 encoding into UTF-16. It removes all lines of the log file,
+ * that do not start with the prefix "UL:", end everything before the prefix and
+ * the prefix itself.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class LogPreprocessor {
-	
+
+	/**
+	 * <p>
+	 * Internal flag that monitors whether there is an open session-node in the
+	 * XML file to ensure that there is a closing session-node for each opening
+	 * session node and, thereby, ensure that the XML file is well formed.
+	 * </p>
+	 */
 	private boolean sessionOpen = false;
+
+	/**
+	 * <p>
+	 * Internal flag that monitors whether a message node is longer than one
+	 * line, as the prefix handling is different in this case.
+	 * </p>
+	 */
 	private boolean msgIncomplete = false;
-	
+
+	/**
+	 * <p>
+	 * Flag that marks whether the log file is Base64 encoded.
+	 * </p>
+	 */
 	private boolean base64;
-	
+
+	/**
+	 * <p>
+	 * Constructor. Creates a new LogPreprocessor that does not decode Base64.
+	 * </p>
+	 */
 	public LogPreprocessor() {
 		this(false);
 	}
-	
+
+	/**
+	 * <p>
+	 * Constructor. Creates a new LogPreprocessor.
+	 * </p>
+	 * 
+	 * @param base64
+	 *            if true, Base64 will be decoded.
+	 */
 	public LogPreprocessor(boolean base64) {
 		this.base64 = base64;
 	}
-	
-	public void convertToXml(String source, String target) throws IOException, FileNotFoundException {
-		OutputStreamWriter targetFile = new OutputStreamWriter(new FileOutputStream(target), "UTF-16");
-		targetFile.write("<?xml version=\"1.0\" encoding=\"UTF-16\"?>" + StringTools.ENDLINE);
+
+	/**
+	 * <p>
+	 * Pre-processes a single log file.
+	 * </p>
+	 * 
+	 * @param source
+	 *            name and path of the source file
+	 * @param target
+	 *            name and path of the target file
+	 * @throws IOException
+	 *             thrown if there is a problem with reading from or writing to
+	 *             the source, respectively target file
+	 * @throws FileNotFoundException
+	 *             thrown if the source file is not found
+	 */
+	public void convertToXml(String source, String target) throws IOException,
+			FileNotFoundException {
+		OutputStreamWriter targetFile = new OutputStreamWriter(
+				new FileOutputStream(target), "UTF-16");
+		targetFile.write("<?xml version=\"1.0\" encoding=\"UTF-16\"?>"
+				+ StringTools.ENDLINE);
 		targetFile.write("<log>" + StringTools.ENDLINE);
 		processFile(source, targetFile);
-		if( sessionOpen ) {
+		if (sessionOpen) {
 			targetFile.write(" </session>" + StringTools.ENDLINE);
 		}
@@ -39,22 +100,39 @@
 		targetFile.close();
 	}
-	
-	
-	public void convertDirToXml(String path, String target) throws IOException, FileNotFoundException {
-		OutputStreamWriter targetFile = new OutputStreamWriter(new FileOutputStream(target), "UTF-16");
-		targetFile.write("<?xml version=\"1.0\" encoding=\"UTF-16\"?>" + StringTools.ENDLINE);
+
+	/**
+	 * <p>
+	 * Pre-processes all files in a given source folder.
+	 * </p>
+	 * 
+	 * @param source
+	 *            path of the source folder
+	 * @param target
+	 *            name and path of the target file
+	 * @throws IOException
+	 *             thrown if there is a problem with reading from or writing to
+	 *             the source, respectively target file
+	 * @throws FileNotFoundException
+	 *             thrown if the source file is not found
+	 */
+	public void convertDirToXml(String path, String target) throws IOException,
+			FileNotFoundException {
+		OutputStreamWriter targetFile = new OutputStreamWriter(
+				new FileOutputStream(target), "UTF-16");
+		targetFile.write("<?xml version=\"1.0\" encoding=\"UTF-16\"?>"
+				+ StringTools.ENDLINE);
 		targetFile.write("<log>" + StringTools.ENDLINE);
 		File folder = new File(path);
-		if( !folder.isDirectory() ) {
+		if (!folder.isDirectory()) {
 			throw new IOException(path + " is not a directory");
 		}
 		String absolutPath = folder.getAbsolutePath();
-		for( String filename : folder.list() ) {
+		for (String filename : folder.list()) {
 			String source = absolutPath + "/" + filename;
 			Console.traceln("Processing file: " + source);
 			processFile(source, targetFile);
 		}
-		
-		if( sessionOpen ) {
+
+		if (sessionOpen) {
 			targetFile.write(" </session>" + StringTools.ENDLINE);
 		}
@@ -63,4 +141,19 @@
 	}
 
+	/**
+	 * <p>
+	 * Internal function that pre-processes a log file.
+	 * </p>
+	 * 
+	 * @param source
+	 *            name and path of the source file
+	 * @param target
+	 *            name and path of the target file
+	 * @throws IOException
+	 *             thrown if there is a problem with reading from or writing to
+	 *             the source, respectively target file
+	 * @throws FileNotFoundException
+	 *             thrown if the source file is not found
+	 */
 	private void processFile(String source, OutputStreamWriter targetFile)
 			throws FileNotFoundException, IOException {
@@ -68,7 +161,7 @@
 		String incompleteLine = "";
 		// Open source and read line by line
-		for( String currentLine : lines ) {
-			if( currentLine.contains("UL: <session>")) {
-				if( sessionOpen) {
+		for (String currentLine : lines) {
+			if (currentLine.contains("UL: <session>")) {
+				if (sessionOpen) {
 					targetFile.write(" </session>" + StringTools.ENDLINE);
 					targetFile.write(" <session>" + StringTools.ENDLINE);
@@ -77,14 +170,14 @@
 					sessionOpen = true;
 				}
-			} else if( currentLine.contains("UL: </session>")) {
-				if( sessionOpen) {
+			} else if (currentLine.contains("UL: </session>")) {
+				if (sessionOpen) {
 					targetFile.write(" </session>" + StringTools.ENDLINE);
 					sessionOpen = false;
 				}
-			} else if( msgIncomplete || currentLine.contains("UL: ")) {
-				
+			} else if (msgIncomplete || currentLine.contains("UL: ")) {
+
 				String currentContent;
 				String actualLine;
-				if( msgIncomplete ) {
+				if (msgIncomplete) {
 					actualLine = currentLine;
 				} else {
@@ -92,15 +185,16 @@
 					actualLine = splitResult[1];
 				}
-				if( base64 ) {
+				if (base64) {
 					Base64 decoder = new Base64();
 					byte[] decoded = decoder.decode(actualLine);
 					currentContent = new String(decoded, "UTF-16LE");
-					currentContent = currentContent.substring(0, currentContent.length()-1);
+					currentContent = currentContent.substring(0,
+							currentContent.length() - 1);
 				} else {
 					currentContent = actualLine;
 				}
-				if( msgIncomplete ) {
+				if (msgIncomplete) {
 					incompleteLine += currentContent;
-					if( incompleteLine.contains("</msg>") ) {
+					if (incompleteLine.contains("</msg>")) {
 						msgIncomplete = false;
 						targetFile.write(incompleteLine + StringTools.ENDLINE);
@@ -108,7 +202,8 @@
 					}
 				} else {
-					if( currentContent.contains("<msg") && sessionOpen ) {
-						if( currentContent.contains("</msg>") ) {
-							targetFile.write("  " + currentContent + StringTools.ENDLINE);
+					if (currentContent.contains("<msg") && sessionOpen) {
+						if (currentContent.contains("</msg>")) {
+							targetFile.write("  " + currentContent
+									+ StringTools.ENDLINE);
 						} else {
 							msgIncomplete = true;
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/MFCReplayDecorator.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/MFCReplayDecorator.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/MFCReplayDecorator.java	(revision 171)
@@ -4,29 +4,69 @@
 import de.ugoe.cs.util.StringTools;
 
+/**
+ * <p>
+ * {@link IReplayDecorator} for replay generated for EventBench's MFCReplay tool.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class MFCReplayDecorator implements IReplayDecorator {
 
 	/**
+	 * <p>
 	 * Id for object serialization.
+	 * </p>
 	 */
 	private static final long serialVersionUID = 1L;
-	
+
+	/**
+	 * <p>
+	 * The instance of the {@link MFCReplayDecorator} (implemented as
+	 * singleton).
+	 * </p>
+	 */
 	transient private static MFCReplayDecorator theInstance;
-	
-	private MFCReplayDecorator() {};
-	
+
+	/**
+	 * <p>
+	 * Constructor. Private to guarantee that only one instance of the replay
+	 * generator exists.
+	 * </p>
+	 */
+	private MFCReplayDecorator() {
+	};
+
+	/**
+	 * <p>
+	 * Returns the instance of the MFCReplayDecorator.
+	 * </p>
+	 * 
+	 * @return instance of the MFCReplayDecorator.
+	 */
 	public static MFCReplayDecorator getInstance() {
-		if( theInstance==null ) {
+		if (theInstance == null) {
 			theInstance = new MFCReplayDecorator();
 		}
 		return theInstance;
 	}
-	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.eventbench.IReplayDecorator#getHeader()
+	 */
 	@Override
 	public String getHeader() {
-		return "<?xml version=\"1.0\" encoding=\"UTF-16\"?>" + StringTools.ENDLINE +
-			   "<log>" + StringTools.ENDLINE;
-		
+		return "<?xml version=\"1.0\" encoding=\"UTF-16\"?>"
+				+ StringTools.ENDLINE + "<log>" + StringTools.ENDLINE;
+
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.eventbench.IReplayDecorator#getFooter()
+	 */
 	@Override
 	public String getFooter() {
@@ -34,14 +74,23 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.eventbench.IReplayDecorator#getSessionHeader(int)
+	 */
 	@Override
 	public String getSessionHeader(int sessionId) {
-		return " <session id=\""+sessionId+"\">" + StringTools.ENDLINE;
+		return " <session id=\"" + sessionId + "\">" + StringTools.ENDLINE;
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.eventbench.IReplayDecorator#getSessionFooter(int)
+	 */
 	@Override
 	public String getSessionFooter(int sessionId) {
 		return " </session>" + StringTools.ENDLINE;
 	}
-	
 
 }
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/MessageDefs.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/MessageDefs.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/MessageDefs.java	(revision 171)
@@ -1,6 +1,16 @@
 package de.ugoe.cs.eventbench.windows;
 
+/**
+ * <p>
+ * Contains definitions of windows message codes, such that they can be used
+ * internally by their name and not their integer value, to improve the
+ * readability of the source code.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public interface MessageDefs {
-	
+
 	public static final int WM_NULL = 0;
 	public static final int WM_CREATE = 1;
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/MessageHandler.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/MessageHandler.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/MessageHandler.java	(revision 171)
@@ -1,11 +1,55 @@
 package de.ugoe.cs.eventbench.windows;
 
+/**
+ * <p>
+ * Base class to define custom message handlers, for messages that shall be
+ * handled differently during the parsing of usage logs. It provides dummy
+ * implementations for all required methods, such that implementations can only
+ * overwrite the parts they actually require and ignore the rest.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
+public class MessageHandler {
 
-public class MessageHandler {
-		
-	protected MessageHandler() {}
-	
-	public void onStartElement() {}
-	public void onParameter(String name, String value) {}
-	public void onEndElement() {}
+	/**
+	 * <p>
+	 * Constructor. Protected to prohibit initialization of the base class
+	 * itself.
+	 * </p>
+	 */
+	protected MessageHandler() {
+	}
+
+	/**
+	 * <p>
+	 * Called in the startElement() method of the {@link LogParser} when a
+	 * msg-node begins.
+	 * </p>
+	 */
+	public void onStartElement() {
+	}
+
+	/**
+	 * <p>
+	 * Called by the {@link LogParser} to handle param-nodes.
+	 * </p>
+	 * 
+	 * @param name
+	 *            name (type) of the parameter
+	 * @param value
+	 *            value of the parameter
+	 */
+	public void onParameter(String name, String value) {
+	}
+
+	/**
+	 * <p>
+	 * Called in the endElement() method of {@link LogParser} when a msg-node
+	 * ends.
+	 * </p>
+	 */
+	public void onEndElement() {
+	}
 }
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/SequenceSplitter.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/SequenceSplitter.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/SequenceSplitter.java	(revision 171)
@@ -4,19 +4,63 @@
 import java.util.List;
 
+import de.ugoe.cs.eventbench.data.Event;
 import de.ugoe.cs.eventbench.windows.data.WindowsMessage;
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Responsible to split sequences into subsequences, such that each subsequences
+ * contains exactly one event.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class SequenceSplitter {
 
+	/**
+	 * <p>
+	 * Contains the current subsequence.
+	 * </p>
+	 */
 	private List<WindowsMessage> currentSequence;
-	
+
+	/**
+	 * <p>
+	 * Number of messages in the current sequences, that signal that a key or
+	 * mouse button has been pressed down to which not yet a message has been
+	 * found, that signals that the button has been released.
+	 * </p>
+	 */
 	private int openDowns;
-	
+
+	/**
+	 * <p>
+	 * Internal flag that signals if {@link #currentSequence} needs to be
+	 * initialized.
+	 * </p>
+	 */
 	private boolean initMessages;
-	
+
+	/**
+	 * <p>
+	 * The {@link EventGenerator} used to convert the subsequences into
+	 * {@link Event}s
+	 * </p>
+	 */
 	private EventGenerator tokenGenerator;
-	
+
+	/**
+	 * <p>
+	 * The event sequence generated.
+	 * </p>
+	 */
 	private List<WindowsEvent> actionSequence;
-	
+
+	/**
+	 * <p>
+	 * Constructor. Creates a new SequenceSplitter.
+	 * </p>
+	 */
 	public SequenceSplitter() {
 		currentSequence = new LinkedList<WindowsMessage>();
@@ -26,13 +70,22 @@
 		actionSequence = new LinkedList<WindowsEvent>();
 	}
-	
+
+	/**
+	 * <p>
+	 * Called by the {@link LogParser} every time a message is parsed.
+	 * </p>
+	 * 
+	 * @param msg
+	 *            message to be added
+	 */
 	public void addMessage(WindowsMessage msg) {
-		if( startOfSequence(msg) ) {
-			if( !initMessages ) {
-				WindowsEvent currentAction = tokenGenerator.generateEvent(currentSequence);
-				if( currentAction!=null ) {
+		if (startOfSequence(msg)) {
+			if (!initMessages) {
+				WindowsEvent currentAction = tokenGenerator
+						.generateEvent(currentSequence);
+				if (currentAction != null) {
 					actionSequence.add(currentAction);
 				}
-				if( isKeyMessage(msg.getType()) && openDowns>0 ) {
+				if (isKeyMessage(msg.getType()) && openDowns > 0) {
 					Console.traceln("Key message found with open down mouse messages - will probabably result in a faulty sequence.");
 				}
@@ -41,7 +94,7 @@
 			}
 			currentSequence = new LinkedList<WindowsMessage>();
-		} 
-		if( isUpMessage(msg.getType()) ) {
-			if( openDowns>0 ) { 
+		}
+		if (isUpMessage(msg.getType())) {
+			if (openDowns > 0) {
 				openDowns--;
 			}
@@ -49,29 +102,53 @@
 		currentSequence.add(msg);
 	}
-	
+
+	/**
+	 * <p>
+	 * Returns the event sequence generated from the message that have been
+	 * added.
+	 * </p>
+	 * 
+	 * @return generated event sequence
+	 */
 	public List<WindowsEvent> getSequence() {
 		return actionSequence;
 	}
-	
+
+	/**
+	 * <p>
+	 * Called when a session in the log file is finished, i.e., a closing
+	 * session-node is found.
+	 * </p>
+	 */
 	public void endSession() {
-		WindowsEvent currentAction = tokenGenerator.generateEvent(currentSequence);
-		if( currentAction!=null ) {
+		WindowsEvent currentAction = tokenGenerator
+				.generateEvent(currentSequence);
+		if (currentAction != null) {
 			actionSequence.add(currentAction);
 		}
 	}
 
+	/**
+	 * <p>
+	 * Checks if the message starts a new subsequence and returns the result.
+	 * </p>
+	 * 
+	 * @param msg
+	 *            message that is checked
+	 * @return true, if a new subsequence begins
+	 */
 	private boolean startOfSequence(WindowsMessage msg) {
 		boolean isStart = false;
 		int msgType = msg.getType();
-		if( isKeyMessage(msgType) ) {
+		if (isKeyMessage(msgType)) {
 			isStart = true;
 		}
-		if( isDownMessage(msgType) ) {
+		if (isDownMessage(msgType)) {
 			openDowns++;
-			if( openDowns==1 ) {
+			if (openDowns == 1) {
 				isStart = true;
 			}
 		}
-		if( isDblclkMessage(msgType) ) {
+		if (isDblclkMessage(msgType)) {
 			openDowns++;
 		}
@@ -79,75 +156,114 @@
 	}
 
+	/**
+	 * <p>
+	 * Checks if the type of a message is generated is a keyboard interaction.
+	 * </p>
+	 * 
+	 * @param msgType
+	 *            type of the message
+	 * @return true if it is a keyboard interaction; false otherwise
+	 */
 	private boolean isKeyMessage(int msgType) {
 		boolean isKeyMsg = false;
 		switch (msgType) {
-			case MessageDefs.WM_KEYDOWN:
-			case MessageDefs.WM_KEYUP:
-			case MessageDefs.WM_SYSKEYDOWN:
-			case MessageDefs.WM_SYSKEYUP:
-				isKeyMsg = true;
-				break;
-			default:
-					break;
+		case MessageDefs.WM_KEYDOWN:
+		case MessageDefs.WM_KEYUP:
+		case MessageDefs.WM_SYSKEYDOWN:
+		case MessageDefs.WM_SYSKEYUP:
+			isKeyMsg = true;
+			break;
+		default:
+			break;
 		}
 		return isKeyMsg;
 	}
-	
+
+	/**
+	 * <p>
+	 * Checks if the type of a message indicates that the mouse has been pressed
+	 * down.
+	 * </p>
+	 * 
+	 * @param msgType
+	 *            type of the message
+	 * @return true if it is mouse-down message; false otherwise
+	 */
 	private boolean isDownMessage(int msgType) {
 		boolean isDownMsg = false;
 		switch (msgType) {
-			case MessageDefs.WM_LBUTTONDOWN:
-			case MessageDefs.WM_RBUTTONDOWN:
-			case MessageDefs.WM_MBUTTONDOWN:
-			case MessageDefs.WM_XBUTTONDOWN:
-			case MessageDefs.WM_NCLBUTTONDOWN:
-			case MessageDefs.WM_NCRBUTTONDOWN:
-			case MessageDefs.WM_NCMBUTTONDOWN:
-			case MessageDefs.WM_NCXBUTTONDOWN:
-				isDownMsg = true;
-				break;
-			default:
-				break;
+		case MessageDefs.WM_LBUTTONDOWN:
+		case MessageDefs.WM_RBUTTONDOWN:
+		case MessageDefs.WM_MBUTTONDOWN:
+		case MessageDefs.WM_XBUTTONDOWN:
+		case MessageDefs.WM_NCLBUTTONDOWN:
+		case MessageDefs.WM_NCRBUTTONDOWN:
+		case MessageDefs.WM_NCMBUTTONDOWN:
+		case MessageDefs.WM_NCXBUTTONDOWN:
+			isDownMsg = true;
+			break;
+		default:
+			break;
 		}
 		return isDownMsg;
 	}
 
+	/**
+	 * <p>
+	 * Checks if the type of a message indicates that a double click has been
+	 * performed.
+	 * </p>
+	 * 
+	 * @param msgType
+	 *            type of the message
+	 * @return true if it is a double click message; false otherwise
+	 */
 	private boolean isDblclkMessage(int msgType) {
 		boolean isDblclkMsg = false;
 		switch (msgType) {
-			case MessageDefs.WM_LBUTTONDBLCLK:
-			case MessageDefs.WM_RBUTTONDBLCLK:
-			case MessageDefs.WM_MBUTTONDBLCLK:
-			case MessageDefs.WM_XBUTTONDBLCLK:
-			case MessageDefs.WM_NCLBUTTONDBLCLK:
-			case MessageDefs.WM_NCRBUTTONDBLCLK:
-			case MessageDefs.WM_NCMBUTTONDBLCLK:
-			case MessageDefs.WM_NCXBUTTONDBLCLK:
-				isDblclkMsg = true;
-				break;
-			default:
-				break;
+		case MessageDefs.WM_LBUTTONDBLCLK:
+		case MessageDefs.WM_RBUTTONDBLCLK:
+		case MessageDefs.WM_MBUTTONDBLCLK:
+		case MessageDefs.WM_XBUTTONDBLCLK:
+		case MessageDefs.WM_NCLBUTTONDBLCLK:
+		case MessageDefs.WM_NCRBUTTONDBLCLK:
+		case MessageDefs.WM_NCMBUTTONDBLCLK:
+		case MessageDefs.WM_NCXBUTTONDBLCLK:
+			isDblclkMsg = true;
+			break;
+		default:
+			break;
 		}
 		return isDblclkMsg;
 	}
-	
+
+	/**
+	 * <p>
+	 * Checks if the type of a message indicates that the mouse has been
+	 * released.
+	 * </p>
+	 * 
+	 * @param msgType
+	 *            type of the message
+	 * @return true if it is mouse-up message; false otherwise
+	 */
 	private boolean isUpMessage(int msgType) {
 		boolean isUpMsg = false;
 		switch (msgType) {
-			case MessageDefs.WM_LBUTTONUP:
-			case MessageDefs.WM_RBUTTONUP:
-			case MessageDefs.WM_MBUTTONUP:
-			case MessageDefs.WM_XBUTTONUP:
-			case MessageDefs.WM_NCLBUTTONUP:
-			case MessageDefs.WM_NCRBUTTONUP:
-			case MessageDefs.WM_NCMBUTTONUP:
-			case MessageDefs.WM_NCXBUTTONUP:
-				isUpMsg = true;
-				break;
-			default:
-				break;
+		case MessageDefs.WM_LBUTTONUP:
+		case MessageDefs.WM_RBUTTONUP:
+		case MessageDefs.WM_MBUTTONUP:
+		case MessageDefs.WM_XBUTTONUP:
+		case MessageDefs.WM_NCLBUTTONUP:
+		case MessageDefs.WM_NCRBUTTONUP:
+		case MessageDefs.WM_NCMBUTTONUP:
+		case MessageDefs.WM_NCXBUTTONUP:
+			isUpMsg = true;
+			break;
+		default:
+			break;
 		}
 		return isUpMsg;
 	}
-	
+
 }
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/WindowsEvent.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/WindowsEvent.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/WindowsEvent.java	(revision 171)
@@ -4,13 +4,30 @@
 import de.ugoe.cs.eventbench.windows.data.WindowsMessage;
 
-
-// convenience class
+/**
+ * <p>
+ * Convenience class for working with Windows MFC events.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class WindowsEvent extends ReplayableEvent<WindowsMessage> {
 
 	/**
+	 * <p>
 	 * Id for object serialization.
+	 * </p>
 	 */
 	private static final long serialVersionUID = 1L;
 
+	/**
+	 * <p>
+	 * Constructor. Creates a new WindowEvent.
+	 * </p>
+	 * 
+	 * @see de.ugoe.cs.eventbench.data.Event#Event(String)
+	 * @param type
+	 *            type of the event.
+	 */
 	public WindowsEvent(String type) {
 		super(type);
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/commands/CMDconvertDirToXml.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/commands/CMDconvertDirToXml.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/commands/CMDconvertDirToXml.java	(revision 171)
@@ -10,6 +10,19 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command to pre-process all files in a folder.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDconvertDirToXml implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
@@ -17,7 +30,12 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
-		if( parameters.size() < 2 ) {
+		if (parameters.size() < 2) {
 			throw new InvalidParameterException();
 		}
@@ -25,8 +43,8 @@
 		String target = (String) parameters.get(1);
 		boolean base64 = false;
-		if( parameters.size() == 3 ) {
+		if (parameters.size() == 3) {
 			base64 = Boolean.parseBoolean((String) parameters.get(2));
 		}
-		
+
 		try {
 			new LogPreprocessor(base64).convertDirToXml(path, target);
@@ -36,5 +54,5 @@
 			Console.println(e.getMessage());
 		}
-		
+
 	}
 
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/commands/CMDconvertToXml.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/commands/CMDconvertToXml.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/commands/CMDconvertToXml.java	(revision 171)
@@ -10,6 +10,19 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command to pre-process a single file.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDconvertToXml implements Command {
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
@@ -17,7 +30,12 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
-		if( parameters.size() < 2 ) {
+		if (parameters.size() < 2) {
 			throw new InvalidParameterException();
 		}
@@ -25,8 +43,8 @@
 		String target = (String) parameters.get(1);
 		boolean base64 = false;
-		if( parameters.size() == 3 ) {
+		if (parameters.size() == 3) {
 			base64 = Boolean.parseBoolean((String) parameters.get(2));
 		}
-		
+
 		try {
 			new LogPreprocessor(base64).convertToXml(source, target);
@@ -36,5 +54,5 @@
 			Console.println(e.getMessage());
 		}
-		
+
 	}
 
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/commands/CMDparseXML.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/commands/CMDparseXML.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/commands/CMDparseXML.java	(revision 171)
@@ -10,6 +10,18 @@
 import de.ugoe.cs.util.console.Console;
 
+/**
+ * <p>
+ * Command to parse an XML file with sessions monitored by EventBench's
+ * MFCUsageMonitor.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ */
 public class CMDparseXML implements Command {
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.util.console.Command#help()
+	 */
 	@Override
 	public void help() {
@@ -17,26 +29,30 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.util.console.Command#run(java.util.List)
+	 */
 	@Override
 	public void run(List<Object> parameters) {
 		String filename;
 		boolean countMessageOccurences = false;
-		
+
 		try {
 			filename = (String) parameters.get(0);
-			if( parameters.size()==2 ) {
-				countMessageOccurences = Boolean.parseBoolean((String) parameters.get(1));
+			if (parameters.size() == 2) {
+				countMessageOccurences = Boolean
+						.parseBoolean((String) parameters.get(1));
 			}
 		} catch (Exception e) {
 			throw new InvalidParameterException();
 		}
-		
+
 		LogParser parser = new LogParser(countMessageOccurences);
 		parser.parseFile(filename);
-		
+
 		List<List<WindowsEvent>> sequences = parser.getSequences();
-		
-		if( GlobalDataContainer.getInstance().addData("sequences", sequences ) ) {
+
+		if (GlobalDataContainer.getInstance().addData("sequences", sequences)) {
 			Console.traceln("Old data \"" + "sequences" + "\" overwritten");
-		}	
+		}
 	}
 
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/data/WindowTree.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/data/WindowTree.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/data/WindowTree.java	(revision 171)
@@ -28,4 +28,5 @@
  * 
  * @author Steffen Herbold
+ * @version 1.0
  */
 public class WindowTree {
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/data/WindowTreeNode.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/data/WindowTreeNode.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/data/WindowTreeNode.java	(revision 171)
@@ -18,4 +18,5 @@
  * 
  * @author Steffen Herbold
+ * @version 1.0
  */
 public class WindowTreeNode {
@@ -69,5 +70,5 @@
 	 */
 	private List<WindowTreeNode> children;
-	
+
 	/**
 	 * <p>
@@ -263,14 +264,24 @@
 			xmlString = parent.xmlRepresentation();
 		}
-		xmlString += "<window name=\"" + StringTools.xmlEntityReplacement(windowName) + "\" class=\""
-				+ StringTools.xmlEntityReplacement(className) + "\" resourceId=\"" + resourceId + "\" isModal=\""
-				+ isModal + "\"/>";
+		xmlString += "<window name=\""
+				+ StringTools.xmlEntityReplacement(windowName) + "\" class=\""
+				+ StringTools.xmlEntityReplacement(className)
+				+ "\" resourceId=\"" + resourceId + "\" isModal=\"" + isModal
+				+ "\"/>";
 		return xmlString;
 	}
-	
+
+	/**
+	 * <p>
+	 * Returns the names of the parents and itself separated by dots, e.g.,
+	 * "GrandParent.Parent.windowName"
+	 * </p>
+	 * 
+	 * @return names of the parents separated by dots
+	 */
 	public String getParentNames() {
 		String parentNames = "";
-		if (parent != null ) {
-			parentNames = parent.getParentNames()+".";
+		if (parent != null) {
+			parentNames = parent.getParentNames() + ".";
 		}
 		parentNames += windowName;
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/data/WindowsMessage.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/data/WindowsMessage.java	(revision 164)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/windows/data/WindowsMessage.java	(revision 171)
@@ -8,31 +8,131 @@
 import de.ugoe.cs.util.StringTools;
 
+/**
+ * <p>
+ * Contains all informations about a windows message, i.e., all parameters that
+ * are read when a windows message is parsed as well as its target, hwnd, etc.
+ * </p>
+ * 
+ * @author Steffen Herbold
+ * @version 1.0
+ * 
+ */
 public class WindowsMessage implements IReplayable {
-	/**
-	 * Id for object serialization. 
+
+	/**
+	 * <p>
+	 * Id for object serialization.
+	 * </p>
 	 */
 	private static final long serialVersionUID = 1L;
-	
+
+	/**
+	 * <p>
+	 * Type of the message.
+	 * </p>
+	 */
 	final int type;
+
+	/**
+	 * <p>
+	 * Window class of the message target. Default: ""
+	 * </p>
+	 */
 	private String windowClass = "";
+
+	/**
+	 * <p>
+	 * Resource Id of the message target. Default: 0
+	 * </p>
+	 */
 	private int resourceId = 0;
+
+	/**
+	 * <p>
+	 * XML representation of the message target.
+	 * </p>
+	 */
 	private String xmlWindowDescription = "";
+
+	/**
+	 * <p>
+	 * String that contains the names of all parent widgets and itself, separated by dots,
+	 * e.g., "GrandParent.Parent.self".
+	 * </p>
+	 */
 	private String parentNames = null;
+
+	/**
+	 * <p>
+	 * String that contains the window class of the parent widget.
+	 * </p>
+	 */
 	private String parentClass = null;
 
+	/**
+	 * <p>
+	 * LPARAM of the message. Default: 0
+	 * </p>
+	 */
 	private long LPARAM = 0;
+
+	/**
+	 * <p>
+	 * WPARAM of the message. Default: 0
+	 * </p>
+	 */
 	private long WPARAM = 0;
 
+	/**
+	 * <p>
+	 * If the LPARAM contains a HWND, this string stores the target of the HWND.
+	 * </p>
+	 */
 	private String LPARAMasWindowDesc = null;
+
+	/**
+	 * <p>
+	 * If the WPARAM contains a HWND, this string stores the target of the HWND.
+	 * </p>
+	 */
 	private String WPARAMasWindowDesc = null;
 
+	/**
+	 * <p>
+	 * Delay after sending the messages during a replay. Default: 0
+	 * </p>
+	 */
 	private int delay = 0;
-	
+
+	/**
+	 * <p>
+	 * A map of all parameters, associated with the message, created during the
+	 * parsing of messages from the logs {@code param}-nodes.
+	 * </p>
+	 */
 	private Map<String, String> params = new HashMap<String, String>();
 
+	/**
+	 * <p>
+	 * Constructor. Creates a new message with a given message type.
+	 * </p>
+	 * 
+	 * @param type
+	 *            type of the message
+	 */
 	public WindowsMessage(int type) {
 		this.type = type;
 	}
 
+	/**
+	 * <p>
+	 * Adds a parameter to the message.
+	 * </p>
+	 * 
+	 * @param type
+	 *            type descriptor of the parameter
+	 * @param value
+	 *            value of the parameter
+	 */
 	public void addParameter(String type, String value) {
 		params.put(type, value);
@@ -44,16 +144,47 @@
 	}
 
+	/**
+	 * <p>
+	 * Returns the type of the message.
+	 * </p>
+	 * 
+	 * @return type of the message
+	 */
 	public int getType() {
 		return type;
 	}
 
+	/**
+	 * <p>
+	 * Returns the value of a parameter, given its type. If the parameter is not
+	 * found, {@code null} is returned.
+	 * </p>
+	 * 
+	 * @param type
+	 *            type of the parameter
+	 * @return value of the parameter
+	 */
 	public String getParameter(String type) {
 		return params.get(type);
 	}
 
+	/**
+	 * <p>
+	 * Returns the window class of the message target.
+	 * </p>
+	 * 
+	 * @return window class of the message target
+	 */
 	public String getWindowClass() {
 		return windowClass;
 	}
 
+	/**
+	 * <p>
+	 * Returns the HWND the message is addressed to.
+	 * </p>
+	 * 
+	 * @return HWND the message is addressed to
+	 */
 	public int getHwnd() {
 		int hwnd = -1;
@@ -67,11 +198,26 @@
 	}
 
+	/**
+	 * <p>
+	 * Returns the resource Id of the message target.
+	 * </p>
+	 * 
+	 * @return resource Id of the message target
+	 */
 	public int getWindowResourceId() {
 		return resourceId;
 	}
 
+	/**
+	 * <p>
+	 * Two {@link WindowsMessage} are equal, if their {@link #type},
+	 * {@link #xmlWindowDescription}, and {@link #params} are equal.
+	 * </p>
+	 * 
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
 	@Override
 	public boolean equals(Object other) {
-		if( other==this) {
+		if (other == this) {
 			return true;
 		}
@@ -86,4 +232,9 @@
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#hashCode()
+	 */
 	@Override
 	public int hashCode() {
@@ -98,4 +249,12 @@
 	}
 
+	/**
+	 * <p>
+	 * Returns a string representation of the message of the form
+	 * "msg[target=HWND;type=TYPE]".
+	 * </p>
+	 * 
+	 * @see java.lang.Object#toString()
+	 */
 	@Override
 	public String toString() {
@@ -104,4 +263,16 @@
 	}
 
+	/**
+	 * <p>
+	 * Retrieves the target string of a message from a given {@link WindowTree}
+	 * through looking up the HWND the message is addressed to in the window
+	 * tree.
+	 * </p>
+	 * 
+	 * @param windowTree
+	 *            {@link WindowTree} from which the target is extracted
+	 * @throws InvalidParameterException
+	 *             thrown if HWND is not contained in windowTree
+	 */
 	public void setTarget(WindowTree windowTree)
 			throws InvalidParameterException {
@@ -117,5 +288,5 @@
 			parentNames = node.getParentNames();
 			WindowTreeNode parent = node.getParent();
-			if( parent==null ) {
+			if (parent == null) {
 				parentClass = "";
 			} else {
@@ -125,71 +296,194 @@
 	}
 
+	/**
+	 * <p>
+	 * Sets the LPARAM of a message.
+	 * </p>
+	 * 
+	 * @param paramValue
+	 *            value of the LPARAM
+	 */
 	public void setLPARAM(long paramValue) {
 		LPARAM = paramValue;
 	}
 
+	/**
+	 * <p>
+	 * Sets the WPARAM of a message.
+	 * </p>
+	 * 
+	 * @param paramValue
+	 *            value of the WPARAM
+	 */
 	public void setWPARAM(long paramValue) {
 		WPARAM = paramValue;
 	}
 
+	/**
+	 * <p>
+	 * Returns the LPARAM of a message.
+	 * </p>
+	 * 
+	 * @return LPARAM of the message
+	 */
 	public long getLPARAM() {
 		return LPARAM;
 	}
 
+	/**
+	 * <p>
+	 * Returns the WPARAM of a message.
+	 * </p>
+	 * 
+	 * @return WPARAM of the message
+	 */
 	public long getWPARAM() {
 		return WPARAM;
 	}
 
+	/**
+	 * <p>
+	 * If the LPARAM contains a HWND, this function can be used to set a target
+	 * string to identify the HWND at run-time.
+	 * </p>
+	 * 
+	 * @param windowDesc
+	 *            target string
+	 */
 	public void setLPARAMasWindowDesc(String windowDesc) {
 		LPARAMasWindowDesc = windowDesc;
 	}
 
+	/**
+	 * <p>
+	 * If the WPARAM contains a HWND, this function can be used to set a target
+	 * string to identify the HWND at run-time.
+	 * </p>
+	 * 
+	 * @param windowDesc
+	 *            target string
+	 */
 	public void setWPARAMasWindowDesc(String windowDesc) {
 		WPARAMasWindowDesc = windowDesc;
 	}
 
+	/**
+	 * <p>
+	 * If the LPARAM contains a HWND and the target string for the HWND is set,
+	 * this function returns the target string. Otherwise, {@code null} is
+	 * returned.
+	 * </p>
+	 * 
+	 * @return target string if available; {@code null} otherwise
+	 */
 	public String getLPARAMasWindowDesc() {
 		return LPARAMasWindowDesc;
 	}
 
+	/**
+	 * <p>
+	 * If the WPARAM contains a HWND and the target string for the HWND is set,
+	 * this function returns the target string. Otherwise, {@code null} is
+	 * returned.
+	 * </p>
+	 * 
+	 * @return target string if available; {@code null} otherwise
+	 */
 	public String getWPARAMasWindowDesc() {
 		return WPARAMasWindowDesc;
 	}
 
+	/**
+	 * <p>
+	 * Returns the target string of the message.
+	 * </p>
+	 * 
+	 * @return target string of the message
+	 */
 	public String getXmlWindowDescription() {
 		return xmlWindowDescription;
 	}
 
+	/**
+	 * <p>
+	 * Sets the target string manually.
+	 * </p>
+	 * 
+	 * @param xmlWindowDescription
+	 *            target string
+	 */
 	public void setXmlWindowDescription(String xmlWindowDescription) {
 		this.xmlWindowDescription = xmlWindowDescription;
 	}
 
+	/**
+	 * <p>
+	 * Returns the delay after this message during replays.
+	 * </p>
+	 * 
+	 * @return delay after this message
+	 */
 	public int getDelay() {
 		return delay;
 	}
 
+	/**
+	 * <p>
+	 * Sets the delay after this message during replays.
+	 * </p>
+	 * 
+	 * @param delay
+	 *            delay after this message
+	 */
 	public void setDelay(int delay) {
 		this.delay = delay;
 	}
 
+	/**
+	 * <p>
+	 * Returns the parent names separated by dots, e.g., "GrandParent.Parent".
+	 * </p>
+	 * 
+	 * @return names of the parents
+	 */
 	public String getParentNames() {
 		return parentNames;
 	}
-	
+
+	/**
+	 * <p>
+	 * Returns the window class of the parent.
+	 * </p>
+	 * 
+	 * @return window classes of the parents
+	 */
 	public String getParentClass() {
 		return parentClass;
 	}
 
+	/**
+	 * <p>
+	 * Returns the number of parameters stored together with this message.
+	 * </p>
+	 * 
+	 * @return
+	 */
 	public int getNumParams() {
 		return params.size();
 	}
-	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.eventbench.data.IReplayable#getReplay()
+	 */
+	@Override
 	public String getReplay() {
 		StringBuilder currentMsgStr = new StringBuilder(400);
-		currentMsgStr.append("  <msg type=\""+type+"\" ");
-		currentMsgStr.append("LPARAM=\""+LPARAM+"\" ");
-		currentMsgStr.append("WPARAM=\""+WPARAM+"\" ");
-		currentMsgStr.append("delay=\""+delay+"\">");
-		if( LPARAMasWindowDesc!=null ) {
+		currentMsgStr.append("  <msg type=\"" + type + "\" ");
+		currentMsgStr.append("LPARAM=\"" + LPARAM + "\" ");
+		currentMsgStr.append("WPARAM=\"" + WPARAM + "\" ");
+		currentMsgStr.append("delay=\"" + delay + "\">");
+		if (LPARAMasWindowDesc != null) {
 			currentMsgStr.append(StringTools.ENDLINE);
 			currentMsgStr.append("   <LPARAM>");
@@ -198,6 +492,6 @@
 			currentMsgStr.append(StringTools.ENDLINE);
 			currentMsgStr.append("</LPARAM>");
-		} 
-		if( WPARAMasWindowDesc!=null ) {
+		}
+		if (WPARAMasWindowDesc != null) {
 			currentMsgStr.append(StringTools.ENDLINE);
 			currentMsgStr.append("   <WPARAM>");
@@ -214,5 +508,11 @@
 		return currentMsgStr.toString();
 	}
-	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see de.ugoe.cs.eventbench.data.IReplayable#getTarget()
+	 */
+	@Override
 	public String getTarget() {
 		return xmlWindowDescription;
