Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Alignment.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Alignment.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Alignment.java	(revision 1734)
@@ -1,7 +1,16 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms;
 
 import java.util.ArrayList;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Alignment.
+ */
 public class Alignment {
+	
+	/** The alingment. */
 	ArrayList<NumberSequence> alingment;
 
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithm.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithm.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithm.java	(revision 1734)
@@ -1,2 +1,5 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms;
 
@@ -5,22 +8,57 @@
 import de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Interface AlignmentAlgorithm.
+ */
 public interface AlignmentAlgorithm {
 
+	/**
+	 * Align.
+	 *
+	 * @param input1 the input1
+	 * @param input2 the input2
+	 * @param submat the submat
+	 * @param threshold the threshold
+	 */
 	void align(NumberSequence input1, NumberSequence input2,
 			SubstitutionMatrix submat, float threshold);
 
+	/**
+	 * Gets the alignment.
+	 *
+	 * @return the alignment
+	 */
 	public abstract ArrayList<NumberSequence> getAlignment();
 
 	/**
 	 * Get the alignment score between the two input strings.
+	 *
+	 * @return the alignment score
 	 */
 	public abstract double getAlignmentScore();
 
+	/**
+	 * Gets the matches.
+	 *
+	 * @return the matches
+	 */
 	public abstract ArrayList<Match> getMatches();
 
+	/**
+	 * Gets the max score.
+	 *
+	 * @return the max score
+	 */
 	public double getMaxScore();
 
+	/**
+	 * Prints the alignment.
+	 */
 	public abstract void printAlignment();
 
+	/**
+	 * Prints the dp matrix.
+	 */
 	public abstract void printDPMatrix();
 
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithmFactory.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithmFactory.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithmFactory.java	(revision 1734)
@@ -1,6 +1,18 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms;
 
+// TODO: Auto-generated Javadoc
+/**
+ * A factory for creating AlignmentAlgorithm objects.
+ */
 public class AlignmentAlgorithmFactory {
 
+	/**
+	 * Creates the.
+	 *
+	 * @return the alignment algorithm
+	 */
 	public static AlignmentAlgorithm create() {
 		Class<?> newclass;
@@ -18,4 +30,9 @@
 	}
 
+	/**
+	 * Sets the default algorithm.
+	 *
+	 * @param algorithmname the new default algorithm
+	 */
 	public static void setDefaultAlgorithm(String algorithmname) {
 		// TODO: check for valid algorihm class names here
@@ -23,4 +40,5 @@
 	}
 
+	/** The algorithmclass. */
 	private static String algorithmclass = "de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.SmithWatermanRepeated";
 }
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentHelpers.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentHelpers.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentHelpers.java	(revision 1734)
@@ -1,2 +1,5 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms;
 
@@ -7,6 +10,17 @@
 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Class AlignmentHelpers.
+ */
 public class AlignmentHelpers extends GUIModel {
 
+	/**
+	 * Distance between.
+	 *
+	 * @param first the first
+	 * @param second the second
+	 * @return the int
+	 */
 	public static int distanceBetween(IGUIElement first, IGUIElement second) {
 
@@ -37,4 +51,7 @@
 	 * in the list. If there is no common denominator, the method returns null.
 	 * </p>
+	 *
+	 * @param guiElements the gui elements
+	 * @return the common denominator
 	 */
 	private static IGUIElement getCommonDenominator(
@@ -99,7 +116,5 @@
 	}
 
-	/**
-	 * 
-	 */
+	/** The Constant serialVersionUID. */
 	private static final long serialVersionUID = -2593092958275693133L;
 
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Constants.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Constants.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Constants.java	(revision 1734)
@@ -1,7 +1,17 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Constants.
+ */
 public class Constants {
 
+	/** The Constant GAP_SYMBOL. */
 	public static final int GAP_SYMBOL = -1;
+	
+	/** The Constant UNMATCHED_SYMBOL. */
 	public static final int UNMATCHED_SYMBOL = -2;
 
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Match.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Match.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/Match.java	(revision 1734)
@@ -1,2 +1,5 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms;
 
@@ -5,14 +8,22 @@
 import java.util.LinkedList;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Match.
+ */
 public class Match implements Serializable {
-	/**
-	 * 
-	 */
+	
+	/** The Constant serialVersionUID. */
 	private static final long serialVersionUID = -3206992723755714741L;
 
+	/** The matchseqs. */
 	private final ArrayList<NumberSequence> matchseqs;
 
+	/** The occurences. */
 	private LinkedList<MatchOccurence> occurences;
 
+	/**
+	 * Instantiates a new match.
+	 */
 	public Match() {
 		matchseqs = new ArrayList<NumberSequence>(2);
@@ -22,12 +33,28 @@
 	}
 
+	/**
+	 * Adds the occurence.
+	 *
+	 * @param occurence the occurence
+	 */
 	public void addOccurence(MatchOccurence occurence) {
 		occurences.add(occurence);
 	}
 
+	/**
+	 * Adds the occurences of.
+	 *
+	 * @param m the m
+	 */
 	public void addOccurencesOf(Match m) {
 		occurences.addAll(m.getOccurences());
 	}
 
+	/**
+	 * Equals.
+	 *
+	 * @param m the m
+	 * @return true, if successful
+	 */
 	public boolean equals(Match m) {
 		if ((m.getFirstSequence().equals(this.getFirstSequence()) || m
@@ -40,32 +67,72 @@
 	}
 
+	/**
+	 * Gets the first sequence.
+	 *
+	 * @return the first sequence
+	 */
 	public NumberSequence getFirstSequence() {
 		return matchseqs.get(0);
 	}
 
+	/**
+	 * Gets the occurences.
+	 *
+	 * @return the occurences
+	 */
 	public LinkedList<MatchOccurence> getOccurences() {
 		return occurences;
 	}
 
+	/**
+	 * Gets the second sequence.
+	 *
+	 * @return the second sequence
+	 */
 	public NumberSequence getSecondSequence() {
 		return matchseqs.get(1);
 	}
 
+	/**
+	 * Occurence count.
+	 *
+	 * @return the int
+	 */
 	public int occurenceCount() {
 		return occurences.size();
 	}
 
+	/**
+	 * Sets the first sequence.
+	 *
+	 * @param seq the new first sequence
+	 */
 	public void setFirstSequence(NumberSequence seq) {
 		matchseqs.set(0, seq);
 	}
 
+	/**
+	 * Sets the occurences.
+	 *
+	 * @param occurences the new occurences
+	 */
 	public void setOccurences(LinkedList<MatchOccurence> occurences) {
 		this.occurences = occurences;
 	}
 
+	/**
+	 * Sets the second sequence.
+	 *
+	 * @param seq the new second sequence
+	 */
 	public void setSecondSequence(NumberSequence seq) {
 		matchseqs.set(1, seq);
 	}
 
+	/**
+	 * Size.
+	 *
+	 * @return the int
+	 */
 	public int size() {
 		// Both sequences should be equally long
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/MatchOccurence.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/MatchOccurence.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/MatchOccurence.java	(revision 1734)
@@ -1,15 +1,34 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms;
 
 import java.io.Serializable;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Class MatchOccurence.
+ */
 public class MatchOccurence implements Serializable {
-	/**
-	 * 
-	 */
+	
+	/** The Constant serialVersionUID. */
 	private static final long serialVersionUID = 6186633243145293781L;
+	
+	/** The startindex. */
 	private int startindex;
+	
+	/** The endindex. */
 	private int endindex;
+	
+	/** The sequence id. */
 	private int sequenceId;
 
+	/**
+	 * Instantiates a new match occurence.
+	 *
+	 * @param startindex the startindex
+	 * @param endindex the endindex
+	 * @param sequenceId the sequence id
+	 */
 	public MatchOccurence(int startindex, int endindex, int sequenceId) {
 		this.startindex = startindex;
@@ -18,24 +37,54 @@
 	}
 
+	/**
+	 * Gets the endindex.
+	 *
+	 * @return the endindex
+	 */
 	public int getEndindex() {
 		return endindex;
 	}
 
+	/**
+	 * Gets the sequence id.
+	 *
+	 * @return the sequence id
+	 */
 	public int getSequenceId() {
 		return sequenceId;
 	}
 
+	/**
+	 * Gets the startindex.
+	 *
+	 * @return the startindex
+	 */
 	public int getStartindex() {
 		return startindex;
 	}
 
+	/**
+	 * Sets the endindex.
+	 *
+	 * @param endindex the new endindex
+	 */
 	public void setEndindex(int endindex) {
 		this.endindex = endindex;
 	}
 
+	/**
+	 * Sets the sequence id.
+	 *
+	 * @param sequenceId the new sequence id
+	 */
 	public void setSequenceId(int sequenceId) {
 		this.sequenceId = sequenceId;
 	}
 
+	/**
+	 * Sets the startindex.
+	 *
+	 * @param startindex the new startindex
+	 */
 	public void setStartindex(int startindex) {
 		this.startindex = startindex;
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/MatrixEntry.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/MatrixEntry.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/MatrixEntry.java	(revision 1734)
@@ -1,13 +1,37 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Class MatrixEntry.
+ */
 public class MatrixEntry {
+	
+	/** The score. */
 	private double score;
+	
+	/** The previous. */
 	private MatrixEntry previous;
+	
+	/** The xvalue. */
 	private int xvalue;
+	
+	/** The yvalue. */
 	private int yvalue;
 
+	/**
+	 * Instantiates a new matrix entry.
+	 */
 	public MatrixEntry() {
 	}
 
+	/**
+	 * Instantiates a new matrix entry.
+	 *
+	 * @param score the score
+	 * @param previous the previous
+	 */
 	public MatrixEntry(float score, MatrixEntry previous) {
 		this.score = score;
@@ -15,32 +39,72 @@
 	}
 
+	/**
+	 * Gets the previous.
+	 *
+	 * @return the previous
+	 */
 	public MatrixEntry getPrevious() {
 		return previous;
 	}
 
+	/**
+	 * Gets the score.
+	 *
+	 * @return the score
+	 */
 	public double getScore() {
 		return score;
 	}
 
+	/**
+	 * Gets the xvalue.
+	 *
+	 * @return the xvalue
+	 */
 	public int getXvalue() {
 		return xvalue;
 	}
 
+	/**
+	 * Gets the yvalue.
+	 *
+	 * @return the yvalue
+	 */
 	public int getYvalue() {
 		return yvalue;
 	}
 
+	/**
+	 * Sets the previous.
+	 *
+	 * @param previous the new previous
+	 */
 	public void setPrevious(MatrixEntry previous) {
 		this.previous = previous;
 	}
 
+	/**
+	 * Sets the score.
+	 *
+	 * @param score the new score
+	 */
 	public void setScore(double score) {
 		this.score = score;
 	}
 
+	/**
+	 * Sets the xvalue.
+	 *
+	 * @param xvalue the new xvalue
+	 */
 	public void setXvalue(int xvalue) {
 		this.xvalue = xvalue;
 	}
 
+	/**
+	 * Sets the yvalue.
+	 *
+	 * @param yvalue the new yvalue
+	 */
 	public void setYvalue(int yvalue) {
 		this.yvalue = yvalue;
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/NeedlemanWunsch.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/NeedlemanWunsch.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/NeedlemanWunsch.java	(revision 1734)
@@ -1,2 +1,5 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms;
 
@@ -8,19 +11,17 @@
 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.Constants;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Class NeedlemanWunsch.
+ */
 public class NeedlemanWunsch implements AlignmentAlgorithm {
 
-	/**
-	 * The first input
-	 */
+	/** The first input. */
 	private int[] input1;
 
-	/**
-	 * The second input String
-	 */
+	/** The second input String. */
 	private int[] input2;
 
-	/**
-	 * The lengths of the input
-	 */
+	/** The lengths of the input. */
 	private int length1, length2;
 
@@ -31,11 +32,13 @@
 	private MatrixEntry[][] matrix;
 
+	/** The alignment. */
 	private ArrayList<NumberSequence> alignment;
 
-	/**
-	 * Substitution matrix to calculate scores
-	 */
+	/** Substitution matrix to calculate scores. */
 	private SubstitutionMatrix submat;
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm#align(de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.NumberSequence, de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.NumberSequence, de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix, float)
+	 */
 	@Override
 	public void align(NumberSequence input1, NumberSequence input2,
@@ -155,4 +158,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm#getMatches()
+	 */
 	@Override
 	public ArrayList<Match> getMatches() {
@@ -163,4 +169,6 @@
 	/**
 	 * Get the maximum value in the score matrix.
+	 *
+	 * @return the max score
 	 */
 	@Override
@@ -180,4 +188,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm#printAlignment()
+	 */
 	@Override
 	public void printAlignment() {
@@ -210,5 +221,5 @@
 
 	/**
-	 * print the dynmaic programming matrix
+	 * print the dynmaic programming matrix.
 	 */
 	@Override
@@ -232,4 +243,9 @@
 	}
 
+	/**
+	 * Sets the alignment.
+	 *
+	 * @param alignment the new alignment
+	 */
 	public void setAlignment(ArrayList<NumberSequence> alignment) {
 		this.alignment = alignment;
@@ -250,4 +266,7 @@
 	}
 
+	/**
+	 * Traceback.
+	 */
 	public void traceback() {
 		MatrixEntry tmp = matrix[length1][length2];
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/NumberSequence.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/NumberSequence.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/NumberSequence.java	(revision 1734)
@@ -1,2 +1,5 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms;
 
@@ -5,12 +8,24 @@
 import java.util.Random;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Class NumberSequence.
+ */
 public class NumberSequence implements Serializable {
-	/**
-	 * 
-	 */
+	
+	/** The Constant serialVersionUID. */
 	private static final long serialVersionUID = -4604570107534055589L;
+	
+	/** The sequence. */
 	private int[] sequence;
+	
+	/** The id. */
 	private int id;
 
+	/**
+	 * Instantiates a new number sequence.
+	 *
+	 * @param size the size
+	 */
 	public NumberSequence(int size) {
 
@@ -19,4 +34,10 @@
 
 	// Searching occurrences of pattern
+	/**
+	 * Contains pattern.
+	 *
+	 * @param pattern the pattern
+	 * @return the linked list
+	 */
 	public LinkedList<Integer> containsPattern(Match pattern) {
 		final LinkedList<Integer> result = new LinkedList<Integer>();
@@ -34,4 +55,10 @@
 	}
 
+	/**
+	 * Equals.
+	 *
+	 * @param n the n
+	 * @return true, if successful
+	 */
 	public boolean equals(NumberSequence n) {
 		final int[] seq = n.getSequence();
@@ -48,4 +75,10 @@
 
 	// Returns the number of times event occurs in this sequence
+	/**
+	 * Event count.
+	 *
+	 * @param event the event
+	 * @return the int
+	 */
 	public int eventCount(int event) {
 		int count = 0;
@@ -58,8 +91,18 @@
 	}
 
+	/**
+	 * Gets the id.
+	 *
+	 * @return the id
+	 */
 	public int getId() {
 		return id;
 	}
 
+	/**
+	 * Gets the sequence.
+	 *
+	 * @return the sequence
+	 */
 	public int[] getSequence() {
 		return sequence;
@@ -67,4 +110,19 @@
 
 	// Recursive check if sequence contains pattern at position i
+	/**
+	 * Matches.
+	 *
+	 * @param i the i
+	 * @param p1 the p1
+	 * @param p2 the p2
+	 * @param ip1 the ip1
+	 * @param ip2 the ip2
+	 * @param jumped1 the jumped1
+	 * @param jumped2 the jumped2
+	 * @param hadSelection the had selection
+	 * @param matchseq1 the matchseq1
+	 * @param matchseq2 the matchseq2
+	 * @return true, if successful
+	 */
 	private boolean matches(int i, int[] p1, int[] p2, int ip1, int ip2,
 			boolean jumped1, // True if there was a gap in Sequence 1 of the
@@ -134,4 +192,7 @@
 	}
 
+	/**
+	 * Prints the sequence.
+	 */
 	public void printSequence() {
 		for (int i = 0; i < sequence.length; i++) {
@@ -141,12 +202,27 @@
 	}
 
+	/**
+	 * Sets the id.
+	 *
+	 * @param id the new id
+	 */
 	public void setId(int id) {
 		this.id = id;
 	}
 
+	/**
+	 * Sets the sequence.
+	 *
+	 * @param sequence the new sequence
+	 */
 	public void setSequence(int[] sequence) {
 		this.sequence = sequence;
 	}
 
+	/**
+	 * Shuffle.
+	 *
+	 * @return the number sequence
+	 */
 	public NumberSequence shuffle() {
 		final NumberSequence result = new NumberSequence(sequence.length);
@@ -165,4 +241,9 @@
 	}
 
+	/**
+	 * Size.
+	 *
+	 * @return the int
+	 */
 	public int size() {
 		return sequence.length;
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWaterman.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWaterman.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWaterman.java	(revision 1734)
@@ -1,2 +1,5 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms;
 
@@ -8,19 +11,17 @@
 import de.ugoe.cs.util.console.Console;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Class SmithWaterman.
+ */
 public class SmithWaterman implements AlignmentAlgorithm {
 
-	/**
-	 * The first input
-	 */
+	/** The first input. */
 	private int[] input1;
 
-	/**
-	 * The second input String
-	 */
+	/** The second input String. */
 	private int[] input2;
 
-	/**
-	 * The lengths of the input
-	 */
+	/** The lengths of the input. */
 	private int length1, length2;
 
@@ -31,11 +32,13 @@
 	private MatrixEntry[][] matrix;
 
+	/** The alignment. */
 	private ArrayList<NumberSequence> alignment;
 
-	/**
-	 * Substitution matrix to calculate scores
-	 */
+	/** Substitution matrix to calculate scores. */
 	private SubstitutionMatrix submat;
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm#align(de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.NumberSequence, de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.NumberSequence, de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix, float)
+	 */
 	@Override
 	public void align(NumberSequence input1, NumberSequence input2,
@@ -163,4 +166,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm#getMatches()
+	 */
 	@Override
 	public ArrayList<Match> getMatches() {
@@ -171,4 +177,6 @@
 	/**
 	 * Get the maximum value in the score matrix.
+	 *
+	 * @return the max score
 	 */
 	@Override
@@ -188,4 +196,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm#printAlignment()
+	 */
 	@Override
 	public void printAlignment() {
@@ -223,5 +234,5 @@
 
 	/**
-	 * print the dynmaic programming matrix
+	 * print the dynmaic programming matrix.
 	 */
 	@Override
@@ -245,4 +256,9 @@
 	}
 
+	/**
+	 * Sets the alignment.
+	 *
+	 * @param alignment the new alignment
+	 */
 	public void setAlignment(ArrayList<NumberSequence> alignment) {
 		this.alignment = alignment;
@@ -263,4 +279,7 @@
 	}
 
+	/**
+	 * Traceback.
+	 */
 	public void traceback() {
 		MatrixEntry tmp = matrix[length1][length2];
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWatermanRepeated.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWatermanRepeated.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/SmithWatermanRepeated.java	(revision 1734)
@@ -1,2 +1,5 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms;
 
@@ -8,19 +11,17 @@
 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.Constants;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Class SmithWatermanRepeated.
+ */
 public class SmithWatermanRepeated implements AlignmentAlgorithm {
 
-	/**
-	 * The first input
-	 */
+	/** The first input. */
 	private int[] input1;
 
-	/**
-	 * The second input String
-	 */
+	/** The second input String. */
 	private int[] input2;
 
-	/**
-	 * The lengths of the input
-	 */
+	/** The lengths of the input. */
 	private int length1, length2;
 
@@ -31,17 +32,23 @@
 	private MatrixEntry[][] matrix;
 
+	/** The alignment. */
 	private ArrayList<NumberSequence> alignment;
 
+	/** The score threshold. */
 	private float scoreThreshold;
 
-	/**
-	 * Substitution matrix to calculate scores
-	 */
+	/** Substitution matrix to calculate scores. */
 	private SubstitutionMatrix submat;
 
+	/**
+	 * Instantiates a new smith waterman repeated.
+	 */
 	public SmithWatermanRepeated() {
 
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm#align(de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.NumberSequence, de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.NumberSequence, de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix, float)
+	 */
 	@Override
 	public void align(NumberSequence input1, NumberSequence input2,
@@ -219,4 +226,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm#getMatches()
+	 */
 	@Override
 	public ArrayList<Match> getMatches() {
@@ -265,4 +275,6 @@
 	/**
 	 * Get the maximum value in the score matrix.
+	 *
+	 * @return the max score
 	 */
 	@Override
@@ -282,4 +294,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm#printAlignment()
+	 */
 	@Override
 	public void printAlignment() {
@@ -312,5 +327,5 @@
 
 	/**
-	 * print the dynmaic programming matrix
+	 * print the dynmaic programming matrix.
 	 */
 	@Override
@@ -337,4 +352,9 @@
 	}
 
+	/**
+	 * Sets the alignment.
+	 *
+	 * @param alignment the new alignment
+	 */
 	public void setAlignment(ArrayList<NumberSequence> alignment) {
 		this.alignment = alignment;
@@ -355,4 +375,7 @@
 	}
 
+	/**
+	 * Traceback.
+	 */
 	public void traceback() {
 		MatrixEntry tmp = matrix[length1 + 1][0].getPrevious();
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/DifferenceSubstitutionMatrix.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/DifferenceSubstitutionMatrix.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/DifferenceSubstitutionMatrix.java	(revision 1734)
@@ -9,14 +9,27 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 
+// TODO: Auto-generated Javadoc
 /**
+ * The Class DifferenceSubstitutionMatrix.
+ *
  * @author Ralph Krimmel
- *
  */
 public class DifferenceSubstitutionMatrix implements SubstitutionMatrix {
 
+	/** The input1. */
 	private final int[] input1;
+	
+	/** The input2. */
 	private final int[] input2;
+	
+	/** The max value. */
 	private final int maxValue;
 
+	/**
+	 * Instantiates a new difference substitution matrix.
+	 *
+	 * @param input1 the input1
+	 * @param input2 the input2
+	 */
 	public DifferenceSubstitutionMatrix(int[] input1, int[] input2) {
 		this.input1 = input1;
@@ -25,8 +38,14 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#generate(java.util.HashSet)
+	 */
 	@Override
 	public void generate(HashSet<ITask> uniqueTasks) {
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#getGapPenalty()
+	 */
 	@Override
 	public float getGapPenalty() {
@@ -34,4 +53,9 @@
 	}
 
+	/**
+	 * Gets the max value.
+	 *
+	 * @return the max value
+	 */
 	private int getMaxValue() {
 		int max = input1[0];
@@ -61,4 +85,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#update(java.util.LinkedList)
+	 */
 	@Override
 	public void update(LinkedList<ITask> newlyGeneratedTasks) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/DummySubstitutionMatrix.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/DummySubstitutionMatrix.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/DummySubstitutionMatrix.java	(revision 1734)
@@ -1,2 +1,5 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.matrix;
 
@@ -6,10 +9,20 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Class DummySubstitutionMatrix.
+ */
 public class DummySubstitutionMatrix implements SubstitutionMatrix {
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#generate(java.util.HashSet)
+	 */
 	@Override
 	public void generate(HashSet<ITask> uniqueTasks) {
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#getGapPenalty()
+	 */
 	@Override
 	public float getGapPenalty() {
@@ -17,4 +30,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#getScore(int, int)
+	 */
 	@Override
 	public float getScore(int pos1, int pos2) {
@@ -26,4 +42,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#update(java.util.LinkedList)
+	 */
 	@Override
 	public void update(LinkedList<ITask> newlyGeneratedTasks) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/DynamicTriangleMatrix.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/DynamicTriangleMatrix.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/DynamicTriangleMatrix.java	(revision 1734)
@@ -1,13 +1,30 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.matrix;
 
 import java.util.ArrayList;
 
+// TODO: Auto-generated Javadoc
 //Must be initialized!
+/**
+ * The Class DynamicTriangleMatrix.
+ */
 public class DynamicTriangleMatrix implements ITriangleMatrix {
 
+	/** The matrix. */
 	private final ArrayList<Float> matrix;
+	
+	/** The size. */
 	protected int size;
+	
+	/** The initalization value. */
 	private float initalizationValue;
 
+	/**
+	 * Instantiates a new dynamic triangle matrix.
+	 *
+	 * @param size the size
+	 */
 	public DynamicTriangleMatrix(int size) {
 		this.size = size;
@@ -81,4 +98,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.ITriangleMatrix#size()
+	 */
 	@Override
 	public int size() {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/EventTaskInstancesListGenerator.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/EventTaskInstancesListGenerator.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/EventTaskInstancesListGenerator.java	(revision 1734)
@@ -1,2 +1,5 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.matrix;
 
@@ -7,21 +10,42 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Class EventTaskInstancesListGenerator.
+ */
 public class EventTaskInstancesListGenerator extends
 		DefaultTaskTraversingVisitor {
 
+	/** The eventlist. */
 	private LinkedList<IEventTaskInstance> eventlist;
 
+	/**
+	 * Instantiates a new event task instances list generator.
+	 */
 	public EventTaskInstancesListGenerator() {
 		eventlist = new LinkedList<IEventTaskInstance>();
 	}
 
+	/**
+	 * Gets the eventlist.
+	 *
+	 * @return the eventlist
+	 */
 	public LinkedList<IEventTaskInstance> getEventlist() {
 		return eventlist;
 	}
 
+	/**
+	 * Sets the eventlist.
+	 *
+	 * @param eventlist the new eventlist
+	 */
 	public void setEventlist(LinkedList<IEventTaskInstance> eventlist) {
 		this.eventlist = eventlist;
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.DefaultTaskTraversingVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask)
+	 */
 	@Override
 	public void visit(IEventTask eventTask) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/ITriangleMatrix.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/ITriangleMatrix.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/ITriangleMatrix.java	(revision 1734)
@@ -1,17 +1,59 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.matrix;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Interface ITriangleMatrix.
+ */
 public interface ITriangleMatrix {
 
+	/**
+	 * Gets the.
+	 *
+	 * @param first the first
+	 * @param second the second
+	 * @return the float
+	 */
 	public abstract float get(int first, int second);
 
 	// Increases the size
+	/**
+	 * Increase size.
+	 *
+	 * @param count the count
+	 * @throws Exception the exception
+	 */
 	public abstract void increaseSize(int count) throws Exception;
 
+	/**
+	 * Initialize.
+	 *
+	 * @param value the value
+	 */
 	public abstract void initialize(float value);
 
+	/**
+	 * Sets the.
+	 *
+	 * @param first the first
+	 * @param second the second
+	 * @param value the value
+	 */
 	public abstract void set(int first, int second, float value);
 
+	/**
+	 * Size.
+	 *
+	 * @return the int
+	 */
 	public abstract int size();
 
+	/**
+	 * To string.
+	 *
+	 * @return the string
+	 */
 	@Override
 	public abstract String toString();
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/NearbySubstitutionMatrix.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/NearbySubstitutionMatrix.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/NearbySubstitutionMatrix.java	(revision 1734)
@@ -9,14 +9,28 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 
+// TODO: Auto-generated Javadoc
 /**
+ * The Class NearbySubstitutionMatrix.
+ *
  * @author Ralph Krimmel
- *
  */
 public class NearbySubstitutionMatrix implements SubstitutionMatrix {
 
+	/** The input1. */
 	private final int[] input1;
+	
+	/** The input2. */
 	private final int[] input2;
+	
+	/** The range. */
 	private final int range;
 
+	/**
+	 * Instantiates a new nearby substitution matrix.
+	 *
+	 * @param input1 the input1
+	 * @param input2 the input2
+	 * @param range the range
+	 */
 	public NearbySubstitutionMatrix(int[] input1, int[] input2, int range) {
 		this.input1 = input1;
@@ -25,8 +39,14 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#generate(java.util.HashSet)
+	 */
 	@Override
 	public void generate(HashSet<ITask> uniqueTasks) {
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#getGapPenalty()
+	 */
 	@Override
 	public float getGapPenalty() {
@@ -51,4 +71,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#update(java.util.LinkedList)
+	 */
 	@Override
 	public void update(LinkedList<ITask> newlyGeneratedTasks) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/ObjectDistanceSubstitionMatrix.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/ObjectDistanceSubstitionMatrix.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/ObjectDistanceSubstitionMatrix.java	(revision 1734)
@@ -1,2 +1,5 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.matrix;
 
@@ -17,22 +20,48 @@
 import de.ugoe.cs.util.console.Console;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ObjectDistanceSubstitionMatrix.
+ */
 public class ObjectDistanceSubstitionMatrix implements SubstitutionMatrix,
 		Serializable {
 
-	/**
-	 * 
-	 */
+	/** The Constant serialVersionUID. */
 	private static final long serialVersionUID = -4253258274617754083L;
+	
+	/** The idmapping. */
 	private final HashMap<Integer, Integer> idmapping;
+	
+	/** The matrix. */
 	private ITriangleMatrix matrix;
+	
+	/** The unique tasks. */
 	private HashSet<ITask> uniqueTasks;
+	
+	/** The gap penalty. */
 	private float gapPenalty;
+	
+	/** The index. */
 	private int index = 0;
+	
+	/** The etis of tasks. */
 	private final HashMap<Integer, LinkedList<IEventTaskInstance>> etisOfTasks;
+	
+	/** The calculate non task instances. */
 	private boolean calculateNonTaskInstances = true;
+	
+	/** The first round max index. */
 	private int firstRoundMaxIndex = 0;
 
+	/** The positive threshold. */
 	private final double positiveThreshold;
 
+	/**
+	 * Instantiates a new object distance substition matrix.
+	 *
+	 * @param positiveThreshold the positive threshold
+	 * @param gapPenalty the gap penalty
+	 * @param calculateNonTaskInstances the calculate non task instances
+	 */
 	public ObjectDistanceSubstitionMatrix(float positiveThreshold,
 			int gapPenalty, boolean calculateNonTaskInstances) {
@@ -45,4 +74,10 @@
 	}
 
+	/**
+	 * Compute distance.
+	 *
+	 * @param task1 the task1
+	 * @param task2 the task2
+	 */
 	private void computeDistance(ITask task1, ITask task2) {
 		int index1 = -1;
@@ -92,4 +127,11 @@
 	}
 
+	/**
+	 * Distance between instances.
+	 *
+	 * @param eti1 the eti1
+	 * @param eti2 the eti2
+	 * @return the float
+	 */
 	private float distanceBetweenInstances(IEventTaskInstance eti1,
 			IEventTaskInstance eti2) {
@@ -101,4 +143,11 @@
 	}
 
+	/**
+	 * Distance between task and instance.
+	 *
+	 * @param task1 the task1
+	 * @param eti1 the eti1
+	 * @return the float
+	 */
 	private float distanceBetweenTaskAndInstance(ITask task1,
 			IEventTaskInstance eti1) {
@@ -127,4 +176,11 @@
 	}
 
+	/**
+	 * Distance between tasks.
+	 *
+	 * @param task1 the task1
+	 * @param task2 the task2
+	 * @return the float
+	 */
 	private float distanceBetweenTasks(ITask task1, ITask task2) {
 		if (this.calculateNonTaskInstances) {
@@ -144,4 +200,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#generate(java.util.HashSet)
+	 */
 	@Override
 	public void generate(HashSet<ITask> uniqueTasks) {
@@ -174,4 +233,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#getGapPenalty()
+	 */
 	@Override
 	public float getGapPenalty() {
@@ -179,4 +241,10 @@
 	}
 
+	/**
+	 * Gets the index.
+	 *
+	 * @param eti the eti
+	 * @return the index
+	 */
 	synchronized private int getIndex(IEventTaskInstance eti) {
 		int tempindex = -1;
@@ -191,4 +259,10 @@
 	}
 
+	/**
+	 * Gets the index.
+	 *
+	 * @param task the task
+	 * @return the index
+	 */
 	synchronized private int getIndex(ITask task) {
 		int tempindex = -1;
@@ -211,4 +285,7 @@
 	// }
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#getScore(int, int)
+	 */
 	@Override
 	public float getScore(int taskId1, int taskId2) {
@@ -230,4 +307,7 @@
 
 	// TODO: Merge this with updateEventTaskInstances
+	/**
+	 * Search event task instances.
+	 */
 	private void searchEventTaskInstances() {
 		for (final Iterator<ITask> it = uniqueTasks.iterator(); it.hasNext();) {
@@ -243,8 +323,16 @@
 	}
 
+	/**
+	 * Sets the gap penalty.
+	 *
+	 * @param gapPenalty the new gap penalty
+	 */
 	public void setGapPenalty(float gapPenalty) {
 		this.gapPenalty = gapPenalty;
 	};
 
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
 	@Override
 	public String toString() {
@@ -253,4 +341,7 @@
 
 	// Just Calculate the distance between the new tasks and the matrix.
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.SubstitutionMatrix#update(java.util.LinkedList)
+	 */
 	@Override
 	public void update(LinkedList<ITask> newTasks) {
@@ -277,4 +368,9 @@
 	}
 
+	/**
+	 * Update event task instances.
+	 *
+	 * @param newTasks the new tasks
+	 */
 	public void updateEventTaskInstances(LinkedList<ITask> newTasks) {
 		for (final Iterator<ITask> it = newTasks.iterator(); it.hasNext();) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/StaticTriangleMatrix.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/StaticTriangleMatrix.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/StaticTriangleMatrix.java	(revision 1734)
@@ -1,15 +1,29 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.matrix;
 
 import java.io.Serializable;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Class StaticTriangleMatrix.
+ */
 public class StaticTriangleMatrix implements ITriangleMatrix, Serializable {
 
-	/**
-	 * 
-	 */
+	/** The Constant serialVersionUID. */
 	private static final long serialVersionUID = 7599542322424894866L;
+	
+	/** The matrix. */
 	private final float[] matrix;
+	
+	/** The size. */
 	protected int size;
 
+	/**
+	 * Instantiates a new static triangle matrix.
+	 *
+	 * @param size the size
+	 */
 	public StaticTriangleMatrix(int size) {
 		this.size = size;
@@ -17,4 +31,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.ITriangleMatrix#get(int, int)
+	 */
 	@Override
 	public float get(int first, int second) {
@@ -25,4 +42,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.ITriangleMatrix#increaseSize(int)
+	 */
 	@Override
 	public void increaseSize(int count) throws Exception {
@@ -32,4 +52,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.ITriangleMatrix#initialize(float)
+	 */
 	@Override
 	public void initialize(float value) {
@@ -39,4 +62,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.ITriangleMatrix#set(int, int, float)
+	 */
 	@Override
 	public void set(int first, int second, float value) {
@@ -46,4 +72,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.ITriangleMatrix#size()
+	 */
 	@Override
 	public int size() {
@@ -51,4 +80,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
 	@Override
 	public String toString() {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/SubstitutionMatrix.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/SubstitutionMatrix.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/SubstitutionMatrix.java	(revision 1734)
@@ -1,2 +1,5 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.matrix;
 
@@ -6,12 +9,38 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Interface SubstitutionMatrix.
+ */
 public interface SubstitutionMatrix {
 
+	/**
+	 * Generate.
+	 *
+	 * @param uniqueTasks the unique tasks
+	 */
 	public void generate(HashSet<ITask> uniqueTasks);
 
+	/**
+	 * Gets the gap penalty.
+	 *
+	 * @return the gap penalty
+	 */
 	public float getGapPenalty();
 
+	/**
+	 * Gets the score.
+	 *
+	 * @param pos1 the pos1
+	 * @param pos2 the pos2
+	 * @return the score
+	 */
 	public float getScore(int pos1, int pos2);
 
+	/**
+	 * Update.
+	 *
+	 * @param newlyGeneratedTasks the newly generated tasks
+	 */
 	public void update(LinkedList<ITask> newlyGeneratedTasks);
 
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/UPGMAMatrix.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/UPGMAMatrix.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/UPGMAMatrix.java	(revision 1734)
@@ -1,10 +1,25 @@
+/*
+ * 
+ */
 package de.ugoe.cs.autoquest.tasktrees.alignment.matrix;
 
+// TODO: Auto-generated Javadoc
+/**
+ * The Class UPGMAMatrix.
+ */
 public class UPGMAMatrix extends StaticTriangleMatrix {
 
+	/**
+	 * Instantiates a new UPGMA matrix.
+	 *
+	 * @param size the size
+	 */
 	public UPGMAMatrix(int size) {
 		super(size);
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.StaticTriangleMatrix#size()
+	 */
 	@Override
 	public int size() {
@@ -12,4 +27,7 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see de.ugoe.cs.autoquest.tasktrees.alignment.matrix.StaticTriangleMatrix#toString()
+	 */
 	@Override
 	public String toString() {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/manager/ComponentManager.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/manager/ComponentManager.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/manager/ComponentManager.java	(revision 1734)
@@ -21,4 +21,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -28,7 +29,7 @@
  * well as the default task factory.
  * </p>
- * 
+ *
+ * @author pharms
  * @version 1.0
- * @author pharms
  */
 public class ComponentManager {
@@ -47,6 +48,6 @@
 	 * <p>
 	 * returns the default task builder
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return as described
 	 */
@@ -58,6 +59,6 @@
 	 * <p>
 	 * returns the default task factory
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return as described
 	 */
@@ -69,6 +70,6 @@
 	 * <p>
 	 * returns the singleton instance of this class
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return as described
 	 */
@@ -84,6 +85,6 @@
 	 * <p>
 	 * returns the default temporal relationship rule manager
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return as described
 	 */
@@ -92,30 +93,14 @@
 	}
 
-	/**
-	 * <p>
-	 * singleton instance of this class
-	 * </p>
-	 */
+	/** <p> singleton instance of this class </p>. */
 	private static ComponentManager instance;
 
-	/**
-	 * <p>
-	 * the default temporal relationship rule manager
-	 * </p>
-	 */
+	/** <p> the default temporal relationship rule manager </p>. */
 	private TemporalRelationshipRuleManager temporalRelationshipRuleManager;
 
-	/**
-	 * <p>
-	 * the default task builder
-	 * </p>
-	 */
+	/** <p> the default task builder </p>. */
 	private ITaskBuilder taskBuilder;
 
-	/**
-	 * <p>
-	 * the default task factory
-	 * </p>
-	 */
+	/** <p> the default task factory </p>. */
 	private ITaskFactory taskFactory;
 
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/manager/TaskTreeManager.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/manager/TaskTreeManager.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/manager/TaskTreeManager.java	(revision 1734)
@@ -28,4 +28,5 @@
 import de.ugoe.cs.util.console.Console;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -37,38 +38,22 @@
  * well.
  * </p>
- * 
+ *
+ * @author pharms
  * @version 1.0
- * @author pharms
  */
 public class TaskTreeManager {
 
-	/**
-	 * <p>
-	 * the internally used task builder
-	 * </p>
-	 */
+	/** <p> the internally used task builder </p>. */
 	private final ITaskBuilder taskBuilder = ComponentManager
 			.getDefaultTaskBuilder();
 
-	/**
-	 * <p>
-	 * the internally used task factory
-	 * </p>
-	 */
+	/** <p> the internally used task factory </p>. */
 	private final ITaskFactory taskFactory = ComponentManager
 			.getDefaultTaskFactory();
 
-	/**
-	 * <p>
-	 * if single events are provided, the user sessions collected so far
-	 * </p>
-	 */
+	/** <p> if single events are provided, the user sessions collected so far </p>. */
 	private List<IUserSession> sessions = null;
 
-	/**
-	 * <p>
-	 * if single events are provided, the currently collected user session
-	 * </p>
-	 */
+	/** <p> if single events are provided, the currently collected user session </p>. */
 	private IUserSession currentSession = null;
 
@@ -76,5 +61,5 @@
 	 * <p>
 	 * initializes the task tree manager
-	 * </p>
+	 * </p>.
 	 */
 	public TaskTreeManager() {
@@ -85,5 +70,5 @@
 	 * <p>
 	 * internally asserts that there is a current session to add new events to
-	 * </p>
+	 * </p>.
 	 */
 	private void assertSessionSequence() {
@@ -103,13 +88,7 @@
 	 * return value of this method.
 	 * </p>
-	 * 
-	 * @param newSessions
-	 *            the user sessions of which the task model shall be created
-	 * 
+	 *
+	 * @param newSessions            the user sessions of which the task model shall be created
 	 * @return the task model created from the user sessions
-	 * 
-	 * @throws IllegalStateException
-	 *             if the task manager is already used by providing it with
-	 *             single events
 	 */
 	public synchronized ITaskModel createTaskModel(
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/EventTaskComparisonRule.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/EventTaskComparisonRule.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/EventTaskComparisonRule.java	(revision 1734)
@@ -22,4 +22,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRule.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRule.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/GUIEventTaskComparisonRule.java	(revision 1734)
@@ -47,4 +47,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -457,15 +458,7 @@
 	 * </p>
 	 *
-	 * @param interaction1
-	 *            the first mouse button interaction to compare
-	 * @param interaction2
-	 *            the second mouse button interaction to compare
-	 * @param eventTarget
-	 *            the event target on which the interactions happened (used
-	 *            within special comparisons like mouse clicks on buttons, where
-	 *            the coordinates can be ignored)
-	 * @param equalityLevel
-	 *            the equality level to be checked for
-	 * 
+	 * @param interaction1            the first mouse button interaction to compare
+	 * @param interaction2            the second mouse button interaction to compare
+	 * @param equalityLevel            the equality level to be checked for
 	 * @return as described
 	 */
@@ -573,5 +566,10 @@
 
 	/**
-	 * 
+	 * Gets the equality.
+	 *
+	 * @param task1 the task1
+	 * @param task2 the task2
+	 * @param requiredEqualityLevel the required equality level
+	 * @return the equality
 	 */
 	private TaskEquality getEquality(ITask task1, ITask task2,
@@ -618,5 +616,10 @@
 
 	/**
-	 * 
+	 * Gets the equality.
+	 *
+	 * @param instance1 the instance1
+	 * @param instance2 the instance2
+	 * @param requiredEqualityLevel the required equality level
+	 * @return the equality
 	 */
 	private TaskEquality getEquality(ITaskInstance instance1,
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/IterationComparisonRule.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/IterationComparisonRule.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/IterationComparisonRule.java	(revision 1734)
@@ -21,4 +21,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -79,7 +80,7 @@
  * </tr>
  * </table>
- * 
+ *
+ * @author 2012, last modified by $Author: patrick$
  * @version $Revision: $ $Date: 19.02.2012$
- * @author 2012, last modified by $Author: patrick$
  */
 public class IterationComparisonRule implements TaskComparisonRule {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SelectionComparisonRule.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SelectionComparisonRule.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SelectionComparisonRule.java	(revision 1734)
@@ -22,4 +22,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -36,7 +37,7 @@
  * equality is checked for and this equality is ensured.
  * </p>
- * 
+ *
+ * @author 2012, last modified by $Author: patrick$
  * @version $Revision: $ $Date: 19.02.2012$
- * @author 2012, last modified by $Author: patrick$
  */
 public class SelectionComparisonRule implements TaskComparisonRule {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SequenceComparisonRule.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SequenceComparisonRule.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/SequenceComparisonRule.java	(revision 1734)
@@ -22,4 +22,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -29,7 +30,7 @@
  * can not decide, if two sequences are syntactically or semantically equal.
  * </p>
- * 
+ *
+ * @author 2012, last modified by $Author: patrick$
  * @version $Revision: $ $Date: 19.02.2012$
- * @author 2012, last modified by $Author: patrick$
  */
 public class SequenceComparisonRule implements TaskComparisonRule {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRule.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRule.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndIterationComparisonRule.java	(revision 1734)
@@ -20,4 +20,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndSelectionComparisonRule.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndSelectionComparisonRule.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskAndSelectionComparisonRule.java	(revision 1734)
@@ -22,4 +22,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskComparisonRule.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskComparisonRule.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskComparisonRule.java	(revision 1734)
@@ -18,4 +18,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -24,7 +25,7 @@
  * to be called for a comparison.
  * </p>
- * 
+ *
+ * @author 2012, last modified by $Author: patrick$
  * @version $Revision: $ $Date: 19.02.2012$
- * @author 2012, last modified by $Author: patrick$
  */
 public interface TaskComparisonRule {
@@ -33,11 +34,8 @@
 	 * <p>
 	 * checks, if the provided tasks are lexically equal
-	 * </p>
-	 * 
-	 * @param task1
-	 *            the first task to compare
-	 * @param task2
-	 *            the second task to compare
-	 * 
+	 * </p>.
+	 *
+	 * @param task1            the first task to compare
+	 * @param task2            the second task to compare
 	 * @return true, if the tasks are equal, false else
 	 */
@@ -47,11 +45,8 @@
 	 * <p>
 	 * checks, if the provided task instances are lexically equal
-	 * </p>
-	 * 
-	 * @param instance1
-	 *            the first task instance to compare
-	 * @param instance2
-	 *            the second task instance to compare
-	 * 
+	 * </p>.
+	 *
+	 * @param instance1            the first task instance to compare
+	 * @param instance2            the second task instance to compare
 	 * @return true, if the tasks are equal, false else
 	 */
@@ -62,11 +57,8 @@
 	 * <p>
 	 * checks, if the provided tasks are semantically equal
-	 * </p>
-	 * 
-	 * @param task1
-	 *            the first task to compare
-	 * @param task2
-	 *            the second task to compare
-	 * 
+	 * </p>.
+	 *
+	 * @param task1            the first task to compare
+	 * @param task2            the second task to compare
 	 * @return true, if the tasks are equal, false else
 	 */
@@ -76,11 +68,8 @@
 	 * <p>
 	 * checks, if the provided task instances are semantically equal
-	 * </p>
-	 * 
-	 * @param instance1
-	 *            the first task instance to compare
-	 * @param instance2
-	 *            the second task instance to compare
-	 * 
+	 * </p>.
+	 *
+	 * @param instance1            the first task instance to compare
+	 * @param instance2            the second task instance to compare
 	 * @return true, if the tasks are equal, false else
 	 */
@@ -91,11 +80,8 @@
 	 * <p>
 	 * checks, if the provided tasks are syntactically equal
-	 * </p>
-	 * 
-	 * @param task1
-	 *            the first task to compare
-	 * @param task2
-	 *            the second task to compare
-	 * 
+	 * </p>.
+	 *
+	 * @param task1            the first task to compare
+	 * @param task2            the second task to compare
 	 * @return true, if the tasks are equal, false else
 	 */
@@ -105,11 +91,8 @@
 	 * <p>
 	 * checks, if the provided task instances are syntactically equal
-	 * </p>
-	 * 
-	 * @param instance1
-	 *            the first task instance to compare
-	 * @param instance2
-	 *            the second task instance to compare
-	 * 
+	 * </p>.
+	 *
+	 * @param instance1            the first task instance to compare
+	 * @param instance2            the second task instance to compare
 	 * @return true, if the tasks are equal, false else
 	 */
@@ -152,11 +135,8 @@
 	 * <p>
 	 * checks if the rule is applicable for comparing the two provided tasks
-	 * </p>
-	 * 
-	 * @param task1
-	 *            the first task to compare
-	 * @param task2
-	 *            the second task to compare
-	 * 
+	 * </p>.
+	 *
+	 * @param task1            the first task to compare
+	 * @param task2            the second task to compare
 	 * @return true, if the rule is applicable, false else
 	 */
@@ -167,11 +147,8 @@
 	 * checks if the rule is applicable for comparing the two provided task
 	 * instances
-	 * </p>
-	 * 
-	 * @param instance1
-	 *            the first task instance to compare
-	 * @param instance2
-	 *            the second task instance to compare
-	 * 
+	 * </p>.
+	 *
+	 * @param instance1            the first task instance to compare
+	 * @param instance2            the second task instance to compare
 	 * @return true, if the rule is applicable, false else
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskEquality.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskEquality.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskEquality.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.taskequality;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -58,10 +59,20 @@
  * are always also semantically equal.
  * </p>
- * 
+ *
+ * @author 2012, last modified by $Author: patrick$
  * @version $Revision: $ $Date: 19.02.2012$
- * @author 2012, last modified by $Author: patrick$
  */
 public enum TaskEquality {
-	IDENTICAL, LEXICALLY_EQUAL, SYNTACTICALLY_EQUAL, SEMANTICALLY_EQUAL, UNEQUAL;
+	
+	/** The identical. */
+	IDENTICAL, 
+ /** The lexically equal. */
+ LEXICALLY_EQUAL, 
+ /** The syntactically equal. */
+ SYNTACTICALLY_EQUAL, 
+ /** The semantically equal. */
+ SEMANTICALLY_EQUAL, 
+ /** The unequal. */
+ UNEQUAL;
 
 	/**
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskEqualityRuleManager.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskEqualityRuleManager.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskEqualityRuleManager.java	(revision 1734)
@@ -21,4 +21,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -37,6 +38,6 @@
 	 * <p>
 	 * returns the singleton instance of this class
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return as described
 	 */
@@ -45,16 +46,8 @@
 	}
 
-	/**
-	 * <p>
-	 * the singleton instance of this class
-	 * </p>
-	 */
+	/** <p> the singleton instance of this class </p>. */
 	private static final TaskEqualityRuleManager instance = new TaskEqualityRuleManager();
 
-	/**
-	 * <p>
-	 * the rules that can be used for comparing tasks
-	 * </p>
-	 */
+	/** <p> the rules that can be used for comparing tasks </p>. */
 	private List<TaskComparisonRule> mRuleIndex = null;
 
@@ -82,17 +75,9 @@
 	 * returns true, if this level is given.
 	 * </p>
-	 * 
-	 * @param task1
-	 *            the first task to be compared
-	 * @param task2
-	 *            the second task to be compared
-	 * @param equalityLevel
-	 *            the level of equality to be checked for
-	 * 
-	 * @return as described
-	 * 
-	 * @throws IllegalStateException
-	 *             in the case, the {@link #init()} method was not called on the
-	 *             manager before a call to this method.
+	 *
+	 * @param task1            the first task to be compared
+	 * @param task2            the second task to be compared
+	 * @param equalityLevel            the level of equality to be checked for
+	 * @return as described
 	 */
 	public boolean areAtLeastEqual(ITask task1, ITask task2,
@@ -125,17 +110,9 @@
 	 * equality level and returns true, if this level is given.
 	 * </p>
-	 * 
-	 * @param instance1
-	 *            the first task instance to be compared
-	 * @param instance2
-	 *            the second task instance to be compared
-	 * @param equalityLevel
-	 *            the level of equality to be checked for
-	 * 
-	 * @return as described
-	 * 
-	 * @throws IllegalStateException
-	 *             in the case, the {@link #init()} method was not called on the
-	 *             manager before a call to this method.
+	 *
+	 * @param instance1            the first task instance to be compared
+	 * @param instance2            the second task instance to be compared
+	 * @param equalityLevel            the level of equality to be checked for
+	 * @return as described
 	 */
 	public boolean areAtLeastEqual(ITaskInstance instance1,
@@ -170,15 +147,8 @@
 	 * method returns false.
 	 * </p>
-	 * 
-	 * @param task1
-	 *            the first task to be compared
-	 * @param task2
-	 *            the second task to be compared
-	 * 
-	 * @return as described
-	 * 
-	 * @throws IllegalStateException
-	 *             in the case, the {@link #init()} method was not called on the
-	 *             manager before a call to this method.
+	 *
+	 * @param task1            the first task to be compared
+	 * @param task2            the second task to be compared
+	 * @return as described
 	 */
 	public boolean areIdentical(ITask task1, ITask task2) {
@@ -204,15 +174,8 @@
 	 * true, this method returns false.
 	 * </p>
-	 * 
-	 * @param instance1
-	 *            the first task instance to be compared
-	 * @param instance2
-	 *            the second task instance to be compared
-	 * 
-	 * @return as described
-	 * 
-	 * @throws IllegalStateException
-	 *             in the case, the {@link #init()} method was not called on the
-	 *             manager before a call to this method.
+	 *
+	 * @param instance1            the first task instance to be compared
+	 * @param instance2            the second task instance to be compared
+	 * @return as described
 	 */
 	public boolean areIdentical(ITaskInstance instance1, ITaskInstance instance2) {
@@ -238,15 +201,8 @@
 	 * this method returns false.
 	 * </p>
-	 * 
-	 * @param task1
-	 *            the first task to be compared
-	 * @param task2
-	 *            the second task to be compared
-	 * 
-	 * @return as described
-	 * 
-	 * @throws IllegalStateException
-	 *             in the case, the {@link #init()} method was not called on the
-	 *             manager before a call to this method.
+	 *
+	 * @param task1            the first task to be compared
+	 * @param task2            the second task to be compared
+	 * @return as described
 	 */
 	public boolean areLexicallyEqual(ITask task1, ITask task2) {
@@ -272,15 +228,8 @@
 	 * true, this method returns false.
 	 * </p>
-	 * 
-	 * @param instance1
-	 *            the first task instance to be compared
-	 * @param instance2
-	 *            the second task instance to be compared
-	 * 
-	 * @return as described
-	 * 
-	 * @throws IllegalStateException
-	 *             in the case, the {@link #init()} method was not called on the
-	 *             manager before a call to this method.
+	 *
+	 * @param instance1            the first task instance to be compared
+	 * @param instance2            the second task instance to be compared
+	 * @return as described
 	 */
 	public boolean areLexicallyEqual(ITaskInstance instance1,
@@ -307,15 +256,8 @@
 	 * true, this method returns false.
 	 * </p>
-	 * 
-	 * @param task1
-	 *            the first task to be compared
-	 * @param task2
-	 *            the second task to be compared
-	 * 
-	 * @return as described
-	 * 
-	 * @throws IllegalStateException
-	 *             in the case, the {@link #init()} method was not called on the
-	 *             manager before a call to this method.
+	 *
+	 * @param task1            the first task to be compared
+	 * @param task2            the second task to be compared
+	 * @return as described
 	 */
 	public boolean areSemanticallyEqual(ITask task1, ITask task2) {
@@ -341,15 +283,8 @@
 	 * returns true, this method returns false.
 	 * </p>
-	 * 
-	 * @param instance1
-	 *            the first task instance to be compared
-	 * @param instance2
-	 *            the second task instance to be compared
-	 * 
-	 * @return as described
-	 * 
-	 * @throws IllegalStateException
-	 *             in the case, the {@link #init()} method was not called on the
-	 *             manager before a call to this method.
+	 *
+	 * @param instance1            the first task instance to be compared
+	 * @param instance2            the second task instance to be compared
+	 * @return as described
 	 */
 	public boolean areSemanticallyEqual(ITaskInstance instance1,
@@ -376,15 +311,8 @@
 	 * true, this method returns false.
 	 * </p>
-	 * 
-	 * @param task1
-	 *            the first task to be compared
-	 * @param task2
-	 *            the second task to be compared
-	 * 
-	 * @return as described
-	 * 
-	 * @throws IllegalStateException
-	 *             in the case, the {@link #init()} method was not called on the
-	 *             manager before a call to this method.
+	 *
+	 * @param task1            the first task to be compared
+	 * @param task2            the second task to be compared
+	 * @return as described
 	 */
 	public boolean areSyntacticallyEqual(ITask task1, ITask task2) {
@@ -410,15 +338,8 @@
 	 * returns true, this method returns false.
 	 * </p>
-	 * 
-	 * @param instance1
-	 *            the first task instance to be compared
-	 * @param instance2
-	 *            the second task instance to be compared
-	 * 
-	 * @return as described
-	 * 
-	 * @throws IllegalStateException
-	 *             in the case, the {@link #init()} method was not called on the
-	 *             manager before a call to this method.
+	 *
+	 * @param instance1            the first task instance to be compared
+	 * @param instance2            the second task instance to be compared
+	 * @return as described
 	 */
 	public boolean areSyntacticallyEqual(ITaskInstance instance1,
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskIdentityRule.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskIdentityRule.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/taskequality/TaskIdentityRule.java	(revision 1734)
@@ -18,4 +18,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -24,7 +25,7 @@
  * Else it returns null to denote, that it can not compare the tasks.
  * </p>
- * 
+ *
+ * @author 2012, last modified by $Author: patrick$
  * @version $Revision: $ $Date: 19.02.2012$
- * @author 2012, last modified by $Author: patrick$
  */
 public class TaskIdentityRule implements TaskComparisonRule {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/ISessionScopeRule.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/ISessionScopeRule.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/ISessionScopeRule.java	(revision 1734)
@@ -19,4 +19,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/ITaskInstanceScopeRule.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/ITaskInstanceScopeRule.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/ITaskInstanceScopeRule.java	(revision 1734)
@@ -17,4 +17,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleApplicationResult.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleApplicationResult.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleApplicationResult.java	(revision 1734)
@@ -22,4 +22,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -35,16 +36,14 @@
 class RuleApplicationResult implements Serializable {
 
-	/**
-	 * 
-	 */
+	/** The Constant serialVersionUID. */
 	private static final long serialVersionUID = -5927099713841481328L;
 
-	/** */
+	/** The status. */
 	private RuleApplicationStatus status = RuleApplicationStatus.NOT_APPLIED;
 
-	/** */
+	/** The new parent tasks. */
 	private final List<ITask> newParentTasks = new ArrayList<ITask>();
 
-	/** */
+	/** The new parent instances. */
 	private final List<ITaskInstance> newParentInstances = new ArrayList<ITaskInstance>();
 
@@ -53,5 +52,5 @@
 	 * create a rule application result with a status
 	 * {@link RuleApplicationStatus#RULE_NOT_APPLIED}
-	 * </p>
+	 * </p>.
 	 */
 	RuleApplicationResult() {
@@ -62,5 +61,7 @@
 	 * <p>
 	 * add a further parent task created during the rule application
-	 * </p>
+	 * </p>.
+	 *
+	 * @param newParent the new parent
 	 */
 	void addNewlyCreatedTask(ITask newParent) {
@@ -71,5 +72,7 @@
 	 * <p>
 	 * add a further parent task instance created during the rule application
-	 * </p>
+	 * </p>.
+	 *
+	 * @param newParent the new parent
 	 */
 	void addNewlyCreatedTaskInstance(ITaskInstance newParent) {
@@ -80,5 +83,7 @@
 	 * <p>
 	 * return all parent task instances created during the rule application
-	 * </p>
+	 * </p>.
+	 *
+	 * @return the newly created task instances
 	 */
 	List<ITaskInstance> getNewlyCreatedTaskInstances() {
@@ -89,5 +94,7 @@
 	 * <p>
 	 * return all parent tasks created during the rule application
-	 * </p>
+	 * </p>.
+	 *
+	 * @return the newly created tasks
 	 */
 	List<ITask> getNewlyCreatedTasks() {
@@ -98,5 +105,7 @@
 	 * <p>
 	 * return the rule application status
-	 * </p>
+	 * </p>.
+	 *
+	 * @return the rule application status
 	 */
 	RuleApplicationStatus getRuleApplicationStatus() {
@@ -107,5 +116,7 @@
 	 * <p>
 	 * set the rule application status
-	 * </p>
+	 * </p>.
+	 *
+	 * @param status the new rule application status
 	 */
 	void setRuleApplicationStatus(RuleApplicationStatus status) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleApplicationStatus.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleApplicationStatus.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleApplicationStatus.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.temporalrelation;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -25,4 +26,8 @@
  */
 enum RuleApplicationStatus {
-	FINISHED, NOT_APPLIED;
+	
+	/** The finished. */
+	FINISHED, 
+ /** The not applied. */
+ NOT_APPLIED;
 }
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleUtils.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleUtils.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/RuleUtils.java	(revision 1734)
@@ -28,9 +28,10 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskFactory;
 
+
 /**
  * <p>
  * provides some convenience methods for rule application
- * </p>
- * 
+ * </p>.
+ *
  * @author Patrick Harms
  */
@@ -41,21 +42,13 @@
 	 * replaces a sub sequence for a specified range of elements in the provided
 	 * task instances list by a sub task instance
-	 * </p>
-	 *
-	 * @param parent
-	 *            the list of which the range shall be replaced
-	 * @param startIndex
-	 *            the start index of the range
-	 * @param endIndex
-	 *            the end index of the range (inclusive)
-	 * @param model
-	 *            the task model (required for instantiating the sub sequence)
-	 * @param taskFactory
-	 *            the task factory used for instantiating the sub sequence
-	 * @param taskBuilder
-	 *            the task builder to perform changes in the task structure
-	 * 
+	 * </p>.
+	 *
+	 * @param parent            the list of which the range shall be replaced
+	 * @param startIndex            the start index of the range
+	 * @param endIndex            the end index of the range (inclusive)
+	 * @param model            the task model (required for instantiating the sub sequence)
+	 * @param taskFactory            the task factory used for instantiating the sub sequence
+	 * @param taskBuilder            the task builder to perform changes in the task structure
 	 * @return the replacement for the range
-	 * @throws
 	 */
 	static ISequenceInstance createNewSubSequenceInRange(
@@ -65,32 +58,6 @@
 				.createNewTaskInstance(model);
 
-		// TODO: Debug output
-		/*
-		 * System.out.println("PRINTING MODEL: "); for (int i = 0; i <
-		 * subsequence.getSequence().getChildren().size(); i++) {
-		 * System.out.println(subsequence.getSequence().getChildren().get(i));
-		 * 
-		 * if (subsequence.getSequence().getChildren().get(i).getType() ==
-		 * "selection") { for (int j = 0; j < ((ISelection)
-		 * subsequence.getSequence().getChildren().get(i))
-		 * .getChildren().size(); j++) { if(((IStructuringTemporalRelationship)
-		 * subsequence
-		 * .getSequence().getChildren().get(i)).getChildren().get(j).getType()
-		 * =="sequence") { ISequence foo = (ISequence) ((ISelection)
-		 * (subsequence
-		 * .getSequence().getChildren().get(i))).getChildren().get(j);
-		 * System.out.println("\t" + foo); for(int k=0; k<
-		 * foo.getChildren().size();k++) { System.out.println("\t\t"
-		 * +foo.getChildren().get(k)); } System.out.println(); } else{
-		 * System.out.println("\t" + ((ISelection)
-		 * subsequence.getSequence().getChildren().get(i))
-		 * .getChildren().get(j)); }
-		 * 
-		 * } }
-		 * 
-		 * } System.out.println();
-		 */
-
-		// TODO: This is dirty!
+		
+		// TODO: This is dirty, return this in addition with the sequence instance instead
 		missedOptionals = 0;
 		int modelindex = 0;
@@ -144,9 +111,4 @@
 							|| (parent.get(startIndex).getTask().getId() == tmpSel
 									.getChildren().get(1).getId())) {
-						// System.out.println("Session ID: " +
-						// parent.get(startIndex).getTask().getId() +
-						// " tmpSel(0): " + tmpSel.getChildren().get(0).getId()
-						// + " tmpSel(1): " +tmpSel.getChildren().get(1).getId()
-						// );
 						continue;
 					}
@@ -154,13 +116,8 @@
 					for (int k = 0; k < selseq.getSequence().getChildren()
 							.size(); k++) {
-						// System.out.println("Trying to add " +
-						// parent.get(startIndex) + " to " + selseq);
 						taskBuilder.addChild(selseq, parent.get(startIndex));
 						taskBuilder.removeTaskInstance(parent, startIndex);
 						i++;
-						// System.out.println("I:" + i);
 					}
-					// System.out.println("Trying to add " + selseq + " to " +
-					// tmpSel);
 					taskBuilder.setChild(selection, selseq);
 					taskBuilder.addChild(subsequence, selection);
@@ -168,21 +125,12 @@
 					continue;
 				} else {
-					// System.out.println("Trying to adding SelectionInstance "
-					// + parent.get(startIndex) + " to " + tempTask);
 					taskBuilder.setChild(selection, parent.get(startIndex));
 					taskBuilder.addChild(subsequence, selection);
 				}
 			} else if (tempTask.getType() == "sequence") {
-				// System.out.println("Adding SequenceInstance " +
-				// parent.get(startIndex) + " to " + tempTask);
 				taskBuilder.addChild(subsequence, parent.get(startIndex));
 			} else if (tempTask.getType() == "iteration") {
-				// System.out.println("Adding IterationInstance " +
-				// parent.get(startIndex) + " to " + tempTask);
 				taskBuilder.addChild(subsequence, parent.get(startIndex));
 			} else {
-				// System.out.println("Adding EventInstance " +
-				// parent.get(startIndex) + " to " + tempTask);
-				// System.out.println("Foo");
 				taskBuilder.addChild(subsequence, parent.get(startIndex));
 			}
@@ -199,6 +147,6 @@
 	 * <p>
 	 * returns the next available id (uses the id counter)
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return the next available id
 	 */
@@ -241,5 +189,11 @@
 	}
 
-	// Print out the progress
+	/**
+	 * Prints the progress percentage.
+	 *
+	 * @param message the message
+	 * @param count the count
+	 * @param size the size
+	 */
 	static void printProgressPercentage(String message, int count, int size) {
 		if (size > 100) {
@@ -270,4 +224,5 @@
 	private static int idCounter = 0;
 
+	/** The missed optionals. */
 	public static int missedOptionals = 0;
 
@@ -275,5 +230,5 @@
 	 * <p>
 	 * prevent instantiation
-	 * </p>
+	 * </p>.
 	 */
 	private RuleUtils() {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRule.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRule.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRule.java	(revision 1734)
@@ -43,4 +43,5 @@
 import de.ugoe.cs.util.console.Console;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -66,4 +67,6 @@
 
 	/**
+	 * The Class MaxCountAndLongestTasksFinder.
+	 *
 	 * @author Patrick Harms
 	 */
@@ -71,16 +74,12 @@
 			TrieProcessor<ITaskInstance> {
 
-		/**
-		 * 
-		 */
+		/** The current count. */
 		private int currentCount;
 
-		/**
-		 * 
-		 */
+		/** The found tasks. */
 		private final List<List<ITaskInstance>> foundTasks = new LinkedList<List<ITaskInstance>>();
 
 		/**
-		 *
+		 * Instantiates a new max count and longest tasks finder.
 		 */
 		public MaxCountAndLongestTasksFinder() {
@@ -90,5 +89,7 @@
 
 		/**
-		 * @return
+		 * Gets the found tasks.
+		 *
+		 * @return the found tasks
 		 */
 		public Tasks getFoundTasks() {
@@ -158,5 +159,5 @@
 
 		/**
-		 *
+		 * Removes the permutations of shorter tasks.
 		 */
 		private void removePermutationsOfShorterTasks() {
@@ -189,45 +190,33 @@
 
 	/**
-	 * 
+	 * The Class RuleApplicationData.
 	 */
 	private static class RuleApplicationData {
 
-		/**
-		 * 
-		 */
+		/** The sessions. */
 		private final List<IUserSession> sessions;
 
-		/**
-		 * 
-		 */
+		/** The last trie. */
 		private TaskInstanceTrie lastTrie;
 
-		/**
-		 * default and minimum trained sequence length is 3
-		 */
+		/** default and minimum trained sequence length is 3. */
 		private int trainedSequenceLength = 3;
 
-		/**
-		 * 
-		 */
+		/** The last found tasks. */
 		private Tasks lastFoundTasks = new Tasks(Integer.MAX_VALUE, null);
 
-		/**
-		 * 
-		 */
+		/** The detected and replaced tasks. */
 		private boolean detectedAndReplacedTasks;
 
-		/**
-		 * 
-		 */
+		/** The result. */
 		private final RuleApplicationResult result = new RuleApplicationResult();
 
-		/**
-		 * 
-		 */
+		/** The stop watch. */
 		private final StopWatch stopWatch = new StopWatch();
 
 		/**
-		 * 
+		 * Instantiates a new rule application data.
+		 *
+		 * @param sessions the sessions
 		 */
 		private RuleApplicationData(List<IUserSession> sessions) {
@@ -236,5 +225,7 @@
 
 		/**
-		 *
+		 * Detected and replaced tasks.
+		 *
+		 * @return true, if successful
 		 */
 		private boolean detectedAndReplacedTasks() {
@@ -243,5 +234,7 @@
 
 		/**
-		 *
+		 * Detected and replaced tasks.
+		 *
+		 * @param detectedAndReplacedTasks the detected and replaced tasks
 		 */
 		private void detectedAndReplacedTasks(boolean detectedAndReplacedTasks) {
@@ -250,4 +243,6 @@
 
 		/**
+		 * Gets the last found tasks.
+		 *
 		 * @return the lastFoundSequences
 		 */
@@ -257,4 +252,6 @@
 
 		/**
+		 * Gets the last trie.
+		 *
 		 * @return the lastTrie
 		 */
@@ -264,4 +261,6 @@
 
 		/**
+		 * Gets the result.
+		 *
 		 * @return the result
 		 */
@@ -271,4 +270,6 @@
 
 		/**
+		 * Gets the sessions.
+		 *
 		 * @return the tree
 		 */
@@ -278,4 +279,6 @@
 
 		/**
+		 * Gets the stop watch.
+		 *
 		 * @return the stopWatch
 		 */
@@ -285,4 +288,6 @@
 
 		/**
+		 * Gets the trained sequence length.
+		 *
 		 * @return the trainedSequenceLength
 		 */
@@ -292,6 +297,7 @@
 
 		/**
-		 * @param lastFoundSequences
-		 *            the lastFoundSequences to set
+		 * Sets the last found tasks.
+		 *
+		 * @param lastFoundSequences            the lastFoundSequences to set
 		 */
 		private void setLastFoundTasks(Tasks lastFoundSequences) {
@@ -300,6 +306,7 @@
 
 		/**
-		 * @param lastTrie
-		 *            the lastTrie to set
+		 * Sets the last trie.
+		 *
+		 * @param lastTrie            the lastTrie to set
 		 */
 		private void setLastTrie(TaskInstanceTrie lastTrie) {
@@ -308,6 +315,7 @@
 
 		/**
-		 * @param trainedSequenceLength
-		 *            the trainedSequenceLength to set
+		 * Sets the trained sequence length.
+		 *
+		 * @param trainedSequenceLength            the trainedSequenceLength to set
 		 */
 		private void setTrainedSequenceLength(int trainedSequenceLength) {
@@ -318,21 +326,21 @@
 
 	/**
+	 * The Class Tasks.
+	 *
 	 * @author Patrick Harms
 	 */
 	private static class Tasks implements Iterable<List<ITaskInstance>> {
 
-		/**
-		 * 
-		 */
+		/** The occurrence count. */
 		private final int occurrenceCount;
 
-		/**
-		 * 
-		 */
+		/** The sequences. */
 		private final List<List<ITaskInstance>> sequences;
 
 		/**
-		 * @param occurrenceCount
-		 * @param sequences
+		 * Instantiates a new tasks.
+		 *
+		 * @param occurrenceCount the occurrence count
+		 * @param sequences the sequences
 		 */
 		private Tasks(int occurrenceCount, List<List<ITaskInstance>> sequences) {
@@ -343,5 +351,7 @@
 
 		/**
-		 * @return
+		 * Gets the occurrence count.
+		 *
+		 * @return the occurrence count
 		 */
 		private int getOccurrenceCount() {
@@ -364,5 +374,7 @@
 
 		/**
-		 * @return
+		 * Size.
+		 *
+		 * @return the int
 		 */
 		private int size() {
@@ -391,18 +403,8 @@
 	}
 
-	/**
-	 * <p>
-	 * the task factory to be used for creating substructures for the temporal
-	 * relationships identified during rul application
-	 * </p>
-	 */
+	/** <p> the task factory to be used for creating substructures for the temporal relationships identified during rul application </p>. */
 	private final ITaskFactory taskFactory;;
 
-	/**
-	 * <p>
-	 * the task builder to be used for creating substructures for the temporal
-	 * relationships identified during rule application
-	 * </p>
-	 */
+	/** <p> the task builder to be used for creating substructures for the temporal relationships identified during rule application </p>. */
 	private final ITaskBuilder taskBuilder;
 
@@ -498,6 +500,7 @@
 
 	/**
-	 * @param appData
-	 *            the rule application data combining all data used for applying
+	 * Creates the new trie.
+	 *
+	 * @param appData            the rule application data combining all data used for applying
 	 *            this rule
 	 */
@@ -554,8 +557,7 @@
 
 	/**
-	 * TODO go on commenting
-	 * 
-	 * @param appData
-	 *            the rule application data combining all data used for applying
+	 * TODO go on commenting.
+	 *
+	 * @param appData            the rule application data combining all data used for applying
 	 *            this rule
 	 */
@@ -578,7 +580,9 @@
 
 	/**
-	 * @param appData
-	 *            the rule application data combining all data used for applying
+	 * Gets the sequences occuring most often.
+	 *
+	 * @param appData            the rule application data combining all data used for applying
 	 *            this rule
+	 * @return the sequences occuring most often
 	 */
 	private void getSequencesOccuringMostOften(RuleApplicationData appData) {
@@ -668,7 +672,10 @@
 
 	/**
-	 * @param trie
-	 * @param object
-	 * @return
+	 * Gets the sub list index.
+	 *
+	 * @param list the list
+	 * @param subList the sub list
+	 * @param startIndex the start index
+	 * @return the sub list index
 	 */
 	private int getSubListIndex(ITaskInstanceList list,
@@ -702,7 +709,10 @@
 
 	/**
-	 * @param trie
-	 * @param object
-	 * @return
+	 * Gets the sub list index.
+	 *
+	 * @param list the list
+	 * @param subList the sub list
+	 * @param startIndex the start index
+	 * @return the sub list index
 	 */
 	private int getSubListIndex(List<ITaskInstance> list,
@@ -790,5 +800,8 @@
 	 * <p>
 	 * TODO clarify why this is done
-	 * </p>
+	 * </p>.
+	 *
+	 * @param iteration the iteration
+	 * @param iterationInstances the iteration instances
 	 */
 	private void harmonizeIterationInstancesModel(IIteration iteration,
@@ -851,5 +864,9 @@
 
 	/**
-	 *
+	 * Harmonize sequence instances model.
+	 *
+	 * @param sequence the sequence
+	 * @param sequenceInstances the sequence instances
+	 * @param sequenceLength the sequence length
 	 */
 	private void harmonizeSequenceInstancesModel(ISequence sequence,
@@ -924,12 +941,9 @@
 	 * <p>
 	 * replaces all occurrences of all tasks provided in the set with iterations
-	 * </p>
-	 *
-	 * @param iteratedTasks
-	 *            the tasks to be replaced with iterations
-	 * @param sessions
-	 *            the sessions in which the tasks are to be replaced
-	 * @param appData
-	 *            the rule application data combining all data used for applying
+	 * </p>.
+	 *
+	 * @param iteratedTasks            the tasks to be replaced with iterations
+	 * @param sessions            the sessions in which the tasks are to be replaced
+	 * @param appData            the rule application data combining all data used for applying
 	 *            this rule
 	 */
@@ -990,6 +1004,7 @@
 
 	/**
-	 * @param appData
-	 *            the rule application data combining all data used for applying
+	 * Replace sequences occurring most often.
+	 *
+	 * @param appData            the rule application data combining all data used for applying
 	 *            this rule
 	 */
@@ -1032,5 +1047,10 @@
 
 	/**
-	 * @param tree
+	 * Replace task occurrences.
+	 *
+	 * @param task the task
+	 * @param sessions the sessions
+	 * @param temporalTaskModel the temporal task model
+	 * @return the list
 	 */
 	private List<ISequenceInstance> replaceTaskOccurrences(
@@ -1116,8 +1136,6 @@
 	 * iterated, it is added to the returned set.
 	 * </p>
-	 * 
-	 * @param the
-	 *            session to search for iterations in
-	 * 
+	 *
+	 * @param sessions the sessions
 	 * @return a set of tasks being iterated somewhere
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignment.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignment.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/SequenceForTaskDetectionRuleAlignment.java	(revision 1734)
@@ -15,9 +15,4 @@
 package de.ugoe.cs.autoquest.tasktrees.temporalrelation;
 
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
 import java.io.Serializable;
 import java.util.ArrayList;
@@ -36,5 +31,4 @@
 import java.util.logging.Level;
 
-import de.ugoe.cs.autoquest.CommandHelpers;
 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithm;
 import de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.AlignmentAlgorithmFactory;
@@ -59,5 +53,5 @@
 import de.ugoe.cs.util.StopWatch;
 import de.ugoe.cs.util.console.Console;
-import de.ugoe.cs.util.console.GlobalDataContainer;
+
 
 /**
@@ -66,6 +60,6 @@
  * of recorded user sessions. For this, it first harmonizes all tasks. This
  * eases later comparison. Then it searches the sessions for iterations and
- * replaces them accordingly. Then it searches for sub sequences being the
- * longest and occurring most often. For each found sub sequence, it replaces
+ * replaces them accordingly. Then it searches for sub sequences using alignment algorithms
+ * For each found sub sequence, it replaces
  * the occurrences by creating appropriate {@link ISequence}s. Afterwards, again
  * searches for iterations and then again for sub sequences until no more
@@ -75,13 +69,916 @@
  * 
  * 
- * @author Patrick Harms
+ * @author Ralph Krimmel
  */
 public class SequenceForTaskDetectionRuleAlignment implements ISessionScopeRule {
 
+	
+	/**
+	 * The Class RuleApplicationData.
+	 */
+	private static class RuleApplicationData implements Serializable {
+
+		/** The Constant serialVersionUID. */
+		private static final long serialVersionUID = -7559657686755522960L;
+
+		/** The number2task HashMap. Since we align the tasks just by their integer id, 
+		 *  we need this to convert them back to Tasks again*/
+		private final HashMap<Integer, ITask> number2task;
+
+		
+		/** The unique tasks, keeps track about all unique tasks 
+		 * TODO: We Actually just need number2task here, this structure can be
+		 * removed in the future.*/
+		private final HashSet<ITask> uniqueTasks;
+
+		/** The substitution matrix used by the alignment algorithm to be able to compare
+		 *  distances of tasks */
+		private final ObjectDistanceSubstitionMatrix submat;
+
+		/** HashMap for keeping track in which sequence which replacement has been performed.
+		 *  Neccessary for updating the indices of other occurrences accordingly */
+		public HashMap<Integer, List<MatchOccurence>> replacedOccurences;
+
+		/** The list of all found matches */
+		public LinkedList<Match> matchseqs;
+
+		/** The generated NumberSequences. 
+		 * This is the integer representation of the user sessions */
+		private ArrayList<NumberSequence> numberseqs;
+
+		/** The list of newly created tasks (of one iteration). */
+		private final LinkedList<ITask> newTasks;
+
+		/** The user sessions containing all EventTasks/Instances */
+		private final List<IUserSession> sessions;
+
+		/** True if we replaced something in the user sessions in one iteration. */
+		private boolean detectedAndReplacedTasks;
+
+		/** The result we give autoquest back */
+		private final RuleApplicationResult result;
+
+		/** Stop Watch to measure performance */
+		private final StopWatch stopWatch;
+
+		/**
+		 * Instantiates a new rule application data.
+		 *
+		 * @param sessions The user sessions
+		 */
+		private RuleApplicationData(List<IUserSession> sessions) {
+			this.sessions = sessions;
+			numberseqs = new ArrayList<NumberSequence>();
+			uniqueTasks = new HashSet<ITask>();
+			number2task = new HashMap<Integer, ITask>();
+			stopWatch = new StopWatch();
+			result = new RuleApplicationResult();
+			submat = new ObjectDistanceSubstitionMatrix(6, -3, false);
+			newTasks = new LinkedList<ITask>();
+			this.detectedAndReplacedTasks = true;
+		}
+
+		/**
+		 * Detected and replaced tasks.
+		 *
+		 * @return true, if successful
+		 */
+		private boolean detectedAndReplacedTasks() {
+			return detectedAndReplacedTasks;
+		}
+
+		/**
+		 * Gets the matchseqs.
+		 *
+		 * @return the matchseqs
+		 */
+		public LinkedList<Match> getMatchseqs() {
+			return matchseqs;
+		}
+
+		/**
+		 * Gets the new tasks.
+		 *
+		 * @return the new tasks
+		 */
+		public LinkedList<ITask> getNewTasks() {
+			return newTasks;
+		}
+
+		/**
+		 * Gets the number2task.
+		 *
+		 * @return the number2task HashMap
+		 */
+		private HashMap<Integer, ITask> getNumber2Task() {
+			return number2task;
+		}
+
+		/**
+		 * Gets the number sequences.
+		 *
+		 * @return the number sequences
+		 */
+		private ArrayList<NumberSequence> getNumberSequences() {
+			return numberseqs;
+		}
+
+		/**
+		 * Gets the replaced occurrences.
+		 *
+		 * @return the replaced occurences
+		 */
+		public HashMap<Integer, List<MatchOccurence>> getReplacedOccurrences() {
+			return replacedOccurences;
+		}
+
+		/**
+		 * Gets the result.
+		 *
+		 * @return the result
+		 */
+		private RuleApplicationResult getResult() {
+			return result;
+		}
+
+		/**
+		 * Gets the sessions.
+		 *
+		 * @return the UserSessions as List.
+		 */
+		private List<IUserSession> getSessions() {
+			return sessions;
+		}
+
+		/**
+		 * Gets the stop watch.
+		 *
+		 * @return the stopWatch
+		 */
+		private StopWatch getStopWatch() {
+			return stopWatch;
+		}
+
+		/**
+		 * Gets the submat.
+		 *
+		 * @return the submat
+		 */
+		private ObjectDistanceSubstitionMatrix getSubmat() {
+			return submat;
+		}
+
+		/**
+		 * Gets the unique tasks.
+		 *
+		 * @return the unique tasks
+		 */
+		private HashSet<ITask> getUniqueTasks() {
+			return uniqueTasks;
+		}
+
+		/**
+		 * New task created.
+		 *
+		 * @param task the task
+		 */
+		private void newTaskCreated(ITask task) {
+			number2task.put(task.getId(), task);
+			newTasks.add(task);
+		}
+
+		/**
+		 * Reset newly created tasks.
+		 */
+		synchronized private void resetNewlyCreatedTasks() {
+			uniqueTasks.addAll(newTasks);
+			newTasks.clear();
+		}
+
+		/**
+		 * Sets the number sequences.
+		 *
+		 * @param numberseqs the new number sequences
+		 */
+		private void setNumberSequences(ArrayList<NumberSequence> numberseqs) {
+			this.numberseqs = numberseqs;
+		}
+
+		/**
+		 * Sets the replaced occurences.
+		 *
+		 * @param replacedOccurences the replaced occurences
+		 */
+		public void setReplacedOccurences(
+				HashMap<Integer, List<MatchOccurence>> replacedOccurences) {
+			this.replacedOccurences = replacedOccurences;
+		}
+
+		/**
+		 * Update substitution matrix.
+		 */
+		private void updateSubstitutionMatrix() {
+			submat.update(getNewTasks());
+			resetNewlyCreatedTasks();
+		}
+
+	}
+
+	/** The n threads. */
+	public static int nThreads = Runtime.getRuntime().availableProcessors() - 1;
+
+	/** The iteration. */
+	private int iteration = 0;
+
+	/** <p> the task factory to be used for creating substructures for the temporal relationships identified during rul application </p>. */
+	private final ITaskFactory taskFactory;
+
+	/** <p> the task builder to be used for creating substructures for the temporal relationships identified during rule application </p>. */
+	private final ITaskBuilder taskBuilder;
+
+	/**
+	 * <p>
+	 * the task handling strategy to be used for comparing tasks for
+	 * preparation, i.e., before the tasks are harmonized
+	 * </p>
+	 */
+	private final TaskHandlingStrategy preparationTaskHandlingStrategy;
+
+	/**
+	 * <p>
+	 * instantiates the rule and initializes it with a task equality to be
+	 * considered when comparing tasks as well as a task factory and builder to
+	 * be used for creating task structures.
+	 * </p>
+	 * 
+	 * @param minimalTaskEquality
+	 *            the task equality to be considered when comparing tasks
+	 * @param taskFactory
+	 *            the task factory to be used for creating substructures
+	 * @param taskBuilder
+	 *            the task builder to be used for creating substructures
+	 */
+
+	SequenceForTaskDetectionRuleAlignment(TaskEquality minimalTaskEquality,
+			ITaskFactory taskFactory, ITaskBuilder taskBuilder) {
+		this.taskFactory = taskFactory;
+		this.taskBuilder = taskBuilder;
+
+		this.preparationTaskHandlingStrategy = new TaskHandlingStrategy(
+				minimalTaskEquality);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * de.ugoe.cs.autoquest.tasktrees.temporalrelation.ISessionScopeRule#apply
+	 * (java.util.List)
+	 */
+	@Override
+	public RuleApplicationResult apply(List<IUserSession> sessions) {
+		final RuleApplicationData appData = new RuleApplicationData(sessions);
+		
+		harmonizeEventTaskInstancesModel(appData);
+
+
+		Console.traceln(Level.INFO, "generating substitution matrix from "
+				+ appData.getUniqueTasks().size() + " unique tasks");
+		appData.getStopWatch().start("substitution matrix");
+		appData.getSubmat().generate(appData.getUniqueTasks());
+		appData.getStopWatch().stop("substitution matrix");
+
+		Console.traceln(Level.INFO, "Starting main loop");
+		do {
+			Console.traceln(Level.INFO, "Iteration Number: " + iteration);
+			iteration++;
+			appData.detectedAndReplacedTasks = false;
+			appData.getStopWatch().start("whole loop");
+			detectAndReplaceIterations(appData);
+			appData.getStopWatch().start("task replacement");
+			appData.updateSubstitutionMatrix();
+			detectAndReplaceTasks(appData); //
+			appData.getStopWatch().stop("task replacement");
+			appData.getStopWatch().stop("whole loop");
+			appData.getStopWatch().dumpStatistics(System.out);
+			appData.getStopWatch().reset();
+
+		} while (appData.detectedAndReplacedTasks());
+
+		Console.println("created "
+				+ appData.getResult().getNewlyCreatedTasks().size()
+				+ " new tasks and "
+				+ appData.getResult().getNewlyCreatedTaskInstances().size()
+				+ " appropriate instances\n");
+
+		if ((appData.getResult().getNewlyCreatedTasks().size() > 0)
+				|| (appData.getResult().getNewlyCreatedTaskInstances().size() > 0)) {
+			appData.getResult().setRuleApplicationStatus(
+					RuleApplicationStatus.FINISHED);
+		}
+
+		return appData.getResult();
+	}
+
+	/**
+	 * Creates the number sequences.
+	 *
+	 * @param appData the app data
+	 * @return the array list
+	 */
+	private ArrayList<NumberSequence> createNumberSequences(
+			RuleApplicationData appData) {
+		final ArrayList<NumberSequence> result = new ArrayList<NumberSequence>();
+		for (int i = 0; i < appData.getSessions().size(); i++) {
+			final IUserSession session = appData.getSessions().get(i);
+			final NumberSequence templist = new NumberSequence(session.size());
+			for (int j = 0; j < session.size(); j++) {
+				final ITaskInstance taskInstance = session.get(j);
+				templist.getSequence()[j] = taskInstance.getTask().getId();
+			}
+			// Each NumberSequence is identified by its id, beginning to count
+			// at zero
+			templist.setId(i);
+			result.add(templist);
+		}
+		return result;
+	}
+
+	/**
+	 * <p>
+	 * searches for direct iterations of single tasks in all sequences and
+	 * replaces them with {@link IIteration}s, respectively appropriate
+	 * instances. Also all single occurrences of a task that is iterated
+	 * somewhen are replaced with iterations to have again an efficient way for
+	 * task comparisons.
+	 * </p>
+	 * 
+	 * @param appData
+	 *            the rule application data combining all data used for applying
+	 *            this rule
+	 */
+	private void detectAndReplaceIterations(RuleApplicationData appData) {
+		Console.traceln(Level.FINE, "detecting iterations");
+		appData.getStopWatch().start("detecting iterations");
+
+		final List<IUserSession> sessions = appData.getSessions();
+
+		final Set<ITask> iteratedTasks = searchIteratedTasks(sessions);
+
+		if (iteratedTasks.size() > 0) {
+			replaceIterationsOf(iteratedTasks, sessions, appData);
+		}
+
+		appData.getStopWatch().stop("detecting iterations");
+		Console.traceln(Level.INFO, "replaced " + iteratedTasks.size()
+				+ " iterated tasks");
+	}
+
+	/**
+	 * Detect and replace tasks.
+	 *
+	 * @param appData            the rule application data combining all data used for applying
+	 *            this rule
+	 */
+	private void detectAndReplaceTasks(RuleApplicationData appData) {
+		Console.traceln(Level.FINE, "detecting and replacing tasks");
+		appData.getStopWatch().start("detecting tasks");
+
+		// Create NumberSequences
+		appData.setNumberSequences(this.createNumberSequences(appData));
+
+		// Generate pairwise alignments
+		// appData.setMatchseqs(generatePairwiseAlignments(appData));
+		generatePairwiseAlignments(appData);
+
+		// Searching each match in all other sessions, counting its occurences
+		searchMatchesInAllSessions(appData);
+
+		// Sort results to get the most occurring results
+		Console.traceln(Level.INFO, "sorting " + appData.getMatchseqs().size()
+				+ " results");
+		final Comparator<Match> comparator = new Comparator<Match>() {
+			@Override
+			public int compare(Match m1, Match m2) {
+				return m2.occurenceCount() - m1.occurenceCount();
+
+			}
+		};
+		Collections.sort(appData.getMatchseqs(), comparator);
+		appData.getStopWatch().stop("detecting tasks");
+
+		// Replace matches in the sessions
+		Console.traceln(Level.INFO, "Replacing matches in sessions");
+		appData.getStopWatch().start("replacing tasks");
+		replaceMatches(appData);
+		appData.getStopWatch().stop("replacing tasks");
+	}
+
+	
+	/**
+	 * Generate pairwise alignments.
+	 *
+	 * @param appData the app data
+	 */
+	private void generatePairwiseAlignments(RuleApplicationData appData) {
+		final int numberSeqSize = appData.getNumberSequences().size();
+		appData.matchseqs = new LinkedList<Match>();
+		Console.traceln(Level.INFO, "generating pairwise alignments from "
+				+ numberSeqSize + " sessions with " + nThreads + " threads");
+
+		int newThreads = nThreads;
+		if (numberSeqSize < nThreads) {
+			newThreads = numberSeqSize;
+		}
+
+		final ExecutorService executor = Executors
+				.newFixedThreadPool(newThreads);
+		final int interval = numberSeqSize / newThreads;
+		int rest = numberSeqSize % newThreads;
+
+		for (int i = 0; i < (numberSeqSize - interval); i += interval) {
+			int offset = 0;
+			if (rest != 0) {
+				offset = 1;
+				rest--;
+			}
+			final int from = i;
+			final int to = i + interval + offset;
+			System.out.println("Creating thread for sessions " + from
+					+ " till " + to);
+			final ParallelPairwiseAligner aligner = new ParallelPairwiseAligner(
+					appData, from, to);
+			executor.execute(aligner);
+		}
+		executor.shutdown();
+		try {
+			executor.awaitTermination(2, TimeUnit.HOURS);
+		} catch (final InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * <p>
+	 * harmonizes the event task instances by unifying tasks. This is done, as
+	 * initially the event tasks being equal with respect to the considered task
+	 * equality are distinct objects. The comparison of these distinct objects
+	 * is more time consuming than comparing the object references.
+	 * </p>
+	 * 
+	 * @param appData
+	 *            the rule application data combining all data used for applying
+	 *            this rule
+	 * @return Returns the unique tasks symbol map
+	 */
+	private void harmonizeEventTaskInstancesModel(RuleApplicationData appData) {
+		Console.traceln(Level.INFO,
+				"harmonizing task model of event task instances");
+		appData.getStopWatch().start("harmonizing event tasks");
+		final SymbolMap<ITaskInstance, ITask> uniqueTasks = preparationTaskHandlingStrategy
+				.createSymbolMap();
+
+		final TaskInstanceComparator comparator = preparationTaskHandlingStrategy
+				.getTaskComparator();
+
+		int unifiedTasks = 0;
+		ITask task;
+		final List<IUserSession> sessions = appData.getSessions();
+		for (int j = 0; j < sessions.size(); j++) {
+			final IUserSession session = sessions.get(j);
+
+			for (int i = 0; i < session.size(); i++) {
+				final ITaskInstance taskInstance = session.get(i);
+				task = uniqueTasks.getValue(taskInstance);
+
+				if (task == null) {
+					uniqueTasks.addSymbol(taskInstance, taskInstance.getTask());
+					appData.getUniqueTasks().add(taskInstance.getTask());
+					appData.getNumber2Task().put(
+							taskInstance.getTask().getId(),
+							taskInstance.getTask());
+				} else {
+					taskBuilder.setTask(taskInstance, task);
+					unifiedTasks++;
+				}
+			}
+			comparator.clearBuffers();
+		}
+
+		appData.getStopWatch().stop("harmonizing event tasks");
+		Console.traceln(Level.INFO, "harmonized " + unifiedTasks
+				+ " task occurrences (still " + appData.getUniqueTasks().size()
+				+ " different tasks)");
+
+		appData.getStopWatch().dumpStatistics(System.out);
+		appData.getStopWatch().reset();
+	}
+
+	/**
+	 * <p>
+	 * TODO clarify why this is done
+	 * </p>.
+	 *
+	 * @param iteration the iteration
+	 * @param iterationInstances the iteration instances
+	 */
+	private void harmonizeIterationInstancesModel(IIteration iteration,
+			List<IIterationInstance> iterationInstances) {
+		final List<ITask> iteratedTaskVariants = new LinkedList<ITask>();
+		final TaskInstanceComparator comparator = preparationTaskHandlingStrategy
+				.getTaskComparator();
+
+		// merge the lexically different variants of iterated task to a unique
+		// list
+		for (final IIterationInstance iterationInstance : iterationInstances) {
+			for (final ITaskInstance executionVariant : iterationInstance) {
+				final ITask candidate = executionVariant.getTask();
+
+				boolean found = false;
+				for (final ITask taskVariant : iteratedTaskVariants) {
+					if (comparator.areLexicallyEqual(taskVariant, candidate)) {
+						taskBuilder.setTask(executionVariant, taskVariant);
+						found = true;
+						break;
+					}
+				}
+
+				if (!found) {
+					iteratedTaskVariants.add(candidate);
+				}
+			}
+		}
+
+		// if there are more than one lexically different variant of iterated
+		// tasks, adapt the
+		// iteration model to be a selection of different variants. In this case
+		// also adapt
+		// the generated iteration instances to correctly contain selection
+		// instances. If there
+		// is only one variant of an iterated task, simply set this as the
+		// marked task of the
+		// iteration. In this case, the instances can be preserved as is
+		if (iteratedTaskVariants.size() > 1) {
+			final ISelection selection = taskFactory.createNewSelection();
+
+			for (final ITask variant : iteratedTaskVariants) {
+				taskBuilder.addChild(selection, variant);
+			}
+
+			taskBuilder.setMarkedTask(iteration, selection);
+
+			for (final IIterationInstance instance : iterationInstances) {
+				for (int i = 0; i < instance.size(); i++) {
+					final ISelectionInstance selectionInstance = taskFactory
+							.createNewTaskInstance(selection);
+					taskBuilder.setChild(selectionInstance, instance.get(i));
+					taskBuilder.setTaskInstance(instance, i, selectionInstance);
+				}
+			}
+		} else {
+			taskBuilder.setMarkedTask(iteration, iteratedTaskVariants.get(0));
+		}
+	}
+
+
+	/**
+	 * Match as sequence.
+	 *
+	 * @param appData            , Ruleapplication Data needed to keep track of all created
+	 *            tasks
+	 * @param m            The match to be converted into a Task
+	 * @return The task of the match with an ISequence as it's root
+	 */
+	synchronized public ISequence matchAsSequence(RuleApplicationData appData,
+			Match m) {
+		final ISequence sequence = taskFactory.createNewSequence();
+		appData.newTaskCreated(sequence);
+
+		final int[] first = m.getFirstSequence().getSequence();
+		final int[] second = m.getSecondSequence().getSequence();
+
+		// Both sequences of a match are equally long
+		for (int i = 0; i < m.getFirstSequence().size(); i++) {
+
+			// Two gaps aligned to each other: Have not seen it happening so
+			// far, just to handle it
+			if ((first[i] == -1) && (second[i] == -1)) {
+				// Do nothing here.
+			}
+			// Both events are equal, we can simply add the task referring to
+			// the number
+			else if (first[i] == second[i]) {
+				taskBuilder.addChild(sequence,
+						appData.getNumber2Task().get(first[i]));
+			}
+			// We have a gap in the first sequence, we need to add the task of
+			// the second sequence as optional
+			else if ((first[i] == -1) && (second[i] != -1)) {
+				final IOptional optional = taskFactory.createNewOptional();
+				appData.newTaskCreated(optional);
+				taskBuilder.setMarkedTask(optional, appData.getNumber2Task()
+						.get(second[i]));
+				taskBuilder.addChild(sequence, optional);
+			}
+			// We have a gap in the second sequence, we need to add the task of
+			// the first sequence as optional
+			else if ((first[i] != -1) && (second[i] == -1)) {
+				final IOptional optional = taskFactory.createNewOptional();
+				appData.newTaskCreated(optional);
+				taskBuilder.setMarkedTask(optional, appData.getNumber2Task()
+						.get(first[i]));
+				taskBuilder.addChild(sequence, optional);
+			}
+			// Both tasks are not equal, we need to insert a selection here.
+			// Check if the next position is not a selection
+			else if (i < (first.length - 1)) {
+
+				if ((first[i] != second[i])
+						&& (((first[i + 1] == second[i + 1])
+								|| (first[i + 1] == -1) || (second[i + 1] == -1)))) {
+
+					final ISelection selection = taskFactory
+							.createNewSelection();
+					appData.newTaskCreated(selection);
+					taskBuilder.addChild(selection, appData.getNumber2Task()
+							.get(first[i]));
+					taskBuilder.addChild(selection, appData.getNumber2Task()
+							.get(second[i]));
+					taskBuilder.addChild(sequence, selection);
+				} else {
+					boolean selectionfound = true;
+					final ISelection selection = taskFactory
+							.createNewSelection();
+					appData.newTaskCreated(selection);
+
+					final ISequence subsequence1 = taskFactory
+							.createNewSequence();
+					appData.newTaskCreated(subsequence1);
+
+					final ISequence subsequence2 = taskFactory
+							.createNewSequence();
+					appData.newTaskCreated(subsequence2);
+
+					taskBuilder.addChild(selection, subsequence1);
+					taskBuilder.addChild(selection, subsequence2);
+					taskBuilder.addChild(sequence, selection);
+					while ((i < (first.length - 1)) && selectionfound) {
+						selectionfound = false;
+						taskBuilder.addChild(subsequence1, appData
+								.getNumber2Task().get(first[i]));
+						taskBuilder.addChild(subsequence2, appData
+								.getNumber2Task().get(second[i]));
+						if ((first[i + 1] != second[i + 1])
+								&& (first[i + 1] != -1)
+								&& (second[i + 1] != -1)) {
+							selectionfound = true;
+						} else {
+							continue;
+						}
+						i++;
+					}
+					if ((i == (first.length - 1)) && selectionfound) {
+						taskBuilder.addChild(subsequence1, appData
+								.getNumber2Task().get(first[i]));
+						taskBuilder.addChild(subsequence2, appData
+								.getNumber2Task().get(second[i]));
+					}
+				}
+			} else {
+				if ((first[i] != second[i])) {
+
+					final ISelection selection = taskFactory
+							.createNewSelection();
+					appData.newTaskCreated(selection);
+					taskBuilder.addChild(selection, appData.getNumber2Task()
+							.get(first[i]));
+					taskBuilder.addChild(selection, appData.getNumber2Task()
+							.get(second[i]));
+					taskBuilder.addChild(sequence, selection);
+				}
+			}
+
+		}
+		return sequence;
+	}
+
+	/**
+	 * <p>
+	 * replaces all occurrences of all tasks provided in the set with iterations
+	 * </p>.
+	 *
+	 * @param iteratedTasks            the tasks to be replaced with iterations
+	 * @param sessions            the sessions in which the tasks are to be replaced
+	 * @param appData            the rule application data combining all data used for applying
+	 *            this rule
+	 */
+	private void replaceIterationsOf(Set<ITask> iteratedTasks,
+			List<IUserSession> sessions, RuleApplicationData appData) {
+		final Map<ITask, IIteration> iterations = new HashMap<ITask, IIteration>();
+		final Map<IIteration, List<IIterationInstance>> iterationInstances = new HashMap<IIteration, List<IIterationInstance>>();
+
+		for (final ITask iteratedTask : iteratedTasks) {
+
+			final IIteration iteration = taskFactory.createNewIteration();
+			appData.newTaskCreated(iteration);
+			iterations.put(iteratedTask, iteration);
+			iterationInstances.put(iteration,
+					new LinkedList<IIterationInstance>());
+		}
+
+		IIterationInstance iterationInstance;
+
+		for (final IUserSession session : sessions) {
+			int index = 0;
+			iterationInstance = null;
+
+			while (index < session.size()) {
+				// we prepared the task instances to refer to unique tasks, if
+				// they are treated
+				// as equal. Therefore, we just compare the identity of the
+				// tasks of the task
+				// instances
+				final ITask currentTask = session.get(index).getTask();
+				final IIteration iteration = iterations.get(currentTask);
+				if (iteration != null) {
+					if ((iterationInstance == null)
+							|| (iterationInstance.getTask() != iteration)) {
+						iterationInstance = taskFactory
+								.createNewTaskInstance(iteration);
+						iterationInstances.get(iteration)
+								.add(iterationInstance);// TODO:: Don't create
+						// TaskInstances here,
+						// use a set of tasks
+						// instead
+						taskBuilder.addTaskInstance(session, index,
+								iterationInstance);
+						index++;
+					}
+
+					taskBuilder.addChild(iterationInstance, session.get(index));
+					taskBuilder.removeTaskInstance(session, index);
+				} else {
+					if (iterationInstance != null) {
+						iterationInstance = null;
+					}
+					index++;
+				}
+			}
+		}
+
+		for (final Map.Entry<IIteration, List<IIterationInstance>> entry : iterationInstances
+				.entrySet()) {
+			harmonizeIterationInstancesModel(entry.getKey(), entry.getValue());
+		}
+	}
+
+	/**
+	 * Replace matches.
+	 *
+	 * @param appData the app data
+	 */
+	private void replaceMatches(RuleApplicationData appData) {
+		appData.replacedOccurences = new HashMap<Integer, List<MatchOccurence>>();
+
+		final int matchSeqSize = appData.getMatchseqs().size();
+		int newThreads = nThreads;
+		if (matchSeqSize < nThreads) {
+			newThreads = matchSeqSize;
+		}
+		final ExecutorService executor = Executors
+				.newFixedThreadPool(newThreads);
+		final int interval = matchSeqSize / newThreads;
+		int rest = matchSeqSize % newThreads;
+
+		for (int i = 0; i < (matchSeqSize - interval); i += interval) {
+			int offset = 0;
+			if (rest != 0) {
+				offset = 1;
+				rest--;
+			}
+			final int from = i;
+			final int to = i + interval + offset;
+			System.out
+			.println("Replacement: Creating thread with matches from "
+					+ from + " to " + to);
+			// search each match in every other sequence
+			final ParallelMatchReplacer replacer = new ParallelMatchReplacer(
+					appData, from, to);
+			executor.execute(replacer);
+		}
+		executor.shutdown();
+		try {
+			executor.awaitTermination(2, TimeUnit.HOURS);
+		} catch (final InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+
+	/**
+	 * <p>
+	 * searches the provided sessions for task iterations. If a task is
+	 * iterated, it is added to the returned set.
+	 * </p>
+	 *
+	 * @param sessions the sessions
+	 * @return a set of tasks being iterated somewhere
+	 */
+	private Set<ITask> searchIteratedTasks(List<IUserSession> sessions) {
+		final Set<ITask> iteratedTasks = new HashSet<ITask>();
+		for (final IUserSession session : sessions) {
+			for (int i = 0; i < (session.size() - 1); i++) {
+				// we prepared the task instances to refer to unique tasks, if
+				// they are treated
+				// as equal. Therefore, we just compare the identity of the
+				// tasks of the task
+				// instances
+				if (session.get(i).getTask() == session.get(i + 1).getTask()) {
+					iteratedTasks.add(session.get(i).getTask());
+				}
+			}
+		}
+		return iteratedTasks;
+	}
+
+	/**
+	 * Search matches in all sessions.
+	 *
+	 * @param appData the app data
+	 */
+	private void searchMatchesInAllSessions(RuleApplicationData appData) {
+		Console.traceln(Level.INFO,
+				"searching for patterns occuring most with " + nThreads
+						+ " threads");
+		// Prepare parallel search of matchseqs
+
+		final int matchSeqSize = appData.getMatchseqs().size();
+		int newThreads = nThreads;
+		if (matchSeqSize < nThreads) {
+			newThreads = matchSeqSize;
+		}
+		final int interval = matchSeqSize / newThreads;
+		int rest = matchSeqSize % newThreads;
+		final ExecutorService executor = Executors.newFixedThreadPool(nThreads);
+
+		for (int i = 0; i < (matchSeqSize - interval); i += interval) {
+			int offset = 0;
+			if (rest != 0) {
+				offset = 1;
+				rest--;
+			}
+			final int from = i;
+			final int to = i + interval + offset;
+			System.out
+			.println("Match finding: Creating thread with matches from "
+					+ from + " to " + to);
+			// search each match in every other sequence
+			final ParallelMatchOcurrencesFinder finder = new ParallelMatchOcurrencesFinder(
+					appData, from, to);
+			executor.execute(finder);
+		}
+		executor.shutdown();
+		try {
+			executor.awaitTermination(2, TimeUnit.HOURS);
+		} catch (final InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#toString()
+	 */
+	@Override
+	public String toString() {
+		return "SequenceForTaskDetectionRuleAlignment";
+	}
+
+	/**
+	 * The Class ParallelMatchOcurrencesFinder.
+	 */
 	private class ParallelMatchOcurrencesFinder implements Runnable {
+		
+		/** The app data. */
 		private final RuleApplicationData appData;
+		
+		/** The from. */
 		private final int from;
+		
+		/** The to. */
 		private final int to;
 
+		/**
+		 * Instantiates a new parallel match ocurrences finder.
+		 *
+		 * @param appData the app data
+		 * @param from the from
+		 * @param to the to
+		 */
 		ParallelMatchOcurrencesFinder(RuleApplicationData appData, int from,
 				int to) {
@@ -91,4 +988,7 @@
 		}
 
+		/* (non-Javadoc)
+		 * @see java.lang.Runnable#run()
+		 */
 		@Override
 		public void run() {
@@ -129,10 +1029,25 @@
 	}
 
+	/**
+	 * The Class ParallelMatchReplacer.
+	 */
 	private class ParallelMatchReplacer implements Runnable {
 
+		/** The app data. */
 		private final RuleApplicationData appData;
+		
+		/** The from. */
 		private final int from;
+		
+		/** The to. */
 		private final int to;
 
+		/**
+		 * Instantiates a new parallel match replacer.
+		 *
+		 * @param appData the app data
+		 * @param from the from
+		 * @param to the to
+		 */
 		ParallelMatchReplacer(RuleApplicationData appData, int from, int to) {
 			this.appData = appData;
@@ -141,4 +1056,7 @@
 		}
 
+		/* (non-Javadoc)
+		 * @see java.lang.Runnable#run()
+		 */
 		@Override
 		public void run() {
@@ -164,8 +1082,8 @@
 						// want to replace now
 
-						synchronized (appData.getReplacedOccurences()) {
-							if (appData.getReplacedOccurences().get(
+						synchronized (appData.getReplacedOccurrences()) {
+							if (appData.getReplacedOccurrences().get(
 									oc.getSequenceId()) == null) {
-								appData.getReplacedOccurences().put(
+								appData.getReplacedOccurrences().put(
 										oc.getSequenceId(),
 										new LinkedList<MatchOccurence>());
@@ -186,5 +1104,5 @@
 								// harmonized.
 								for (final Iterator<MatchOccurence> jt = appData
-										.getReplacedOccurences()
+										.getReplacedOccurrences()
 										.get(oc.getSequenceId()).iterator(); jt
 										.hasNext();) {
@@ -239,7 +1157,7 @@
 						// instance. (OptionalInstances may be shorter)
 
-						synchronized (appData.getReplacedOccurences().get(
+						synchronized (appData.getReplacedOccurrences().get(
 								oc.getSequenceId())) {
-							appData.getReplacedOccurences()
+							appData.getReplacedOccurrences()
 							.get(oc.getSequenceId()).add(oc);
 						}
@@ -250,9 +1168,25 @@
 	}
 
+	/**
+	 * The Class ParallelPairwiseAligner.
+	 */
 	private class ParallelPairwiseAligner implements Runnable {
+		
+		/** The app data. */
 		private final RuleApplicationData appData;
+		
+		/** The from. */
 		private final int from;
+		
+		/** The to. */
 		private final int to;
 
+		/**
+		 * Instantiates a new parallel pairwise aligner.
+		 *
+		 * @param appData the app data
+		 * @param from the from
+		 * @param to the to
+		 */
 		ParallelPairwiseAligner(RuleApplicationData appData, int from, int to) {
 			this.appData = appData;
@@ -261,4 +1195,7 @@
 		}
 
+		/* (non-Javadoc)
+		 * @see java.lang.Runnable#run()
+		 */
 		@Override
 		public void run() {
@@ -286,877 +1223,4 @@
 		}
 	}
-
-	/**
-	 * 
-	 */
-	private static class RuleApplicationData implements Serializable {
-
-		/**
-		 * 
-		 */
-		private static final long serialVersionUID = -7559657686755522960L;
-
-		private final HashMap<Integer, ITask> number2task;
-
-		// TODO: We Actually just need number2task here, this structure can be
-		// removed in the future.
-		private final HashSet<ITask> uniqueTasks;
-
-		private final ObjectDistanceSubstitionMatrix submat;
-
-		public HashMap<Integer, List<MatchOccurence>> replacedOccurences;
-
-		public LinkedList<Match> matchseqs;
-
-		private ArrayList<NumberSequence> numberseqs;
-
-		private final LinkedList<ITask> newTasks;
-
-		/**
-		 * 
-		 */
-		private final List<IUserSession> sessions;
-
-		/**
-		 * 
-		 */
-		private boolean detectedAndReplacedTasks;
-
-		/**
-		 * 
-		 */
-		private final RuleApplicationResult result;
-
-		/**
-		 * 
-		 */
-		private final StopWatch stopWatch;
-
-		/**
-		 * 
-		 */
-		private RuleApplicationData(List<IUserSession> sessions) {
-			this.sessions = sessions;
-			numberseqs = new ArrayList<NumberSequence>();
-			uniqueTasks = new HashSet<ITask>();
-			number2task = new HashMap<Integer, ITask>();
-			stopWatch = new StopWatch();
-			result = new RuleApplicationResult();
-			submat = new ObjectDistanceSubstitionMatrix(6, -3, false);
-			newTasks = new LinkedList<ITask>();
-			this.detectedAndReplacedTasks = true;
-		}
-
-		/**
-		 *
-		 */
-		private boolean detectedAndReplacedTasks() {
-			return detectedAndReplacedTasks;
-		}
-
-		public LinkedList<Match> getMatchseqs() {
-			return matchseqs;
-		}
-
-		public LinkedList<ITask> getNewTasks() {
-			return newTasks;
-		}
-
-		private HashMap<Integer, ITask> getNumber2Task() {
-			return number2task;
-		}
-
-		private ArrayList<NumberSequence> getNumberSequences() {
-			return numberseqs;
-		}
-
-		public HashMap<Integer, List<MatchOccurence>> getReplacedOccurences() {
-			return replacedOccurences;
-		}
-
-		/**
-		 * @return the result
-		 */
-		private RuleApplicationResult getResult() {
-			return result;
-		}
-
-		/**
-		 * @return the UserSessions as List.
-		 */
-		private List<IUserSession> getSessions() {
-			return sessions;
-		}
-
-		/**
-		 * @return the stopWatch
-		 */
-		private StopWatch getStopWatch() {
-			return stopWatch;
-		}
-
-		private ObjectDistanceSubstitionMatrix getSubmat() {
-			return submat;
-		}
-
-		private HashSet<ITask> getUniqueTasks() {
-			return uniqueTasks;
-		}
-
-		private void newTaskCreated(ITask task) {
-			number2task.put(task.getId(), task);
-			newTasks.add(task);
-		}
-
-		synchronized private void resetNewlyCreatedTasks() {
-			uniqueTasks.addAll(newTasks);
-			newTasks.clear();
-		}
-
-		private void setNumberSequences(ArrayList<NumberSequence> numberseqs) {
-			this.numberseqs = numberseqs;
-		}
-
-		public void setReplacedOccurences(
-				HashMap<Integer, List<MatchOccurence>> replacedOccurences) {
-			this.replacedOccurences = replacedOccurences;
-		}
-
-		private void updateSubstitutionMatrix() {
-			submat.update(getNewTasks());
-			resetNewlyCreatedTasks();
-		}
-
-	}
-
-	public static int nThreads = Runtime.getRuntime().availableProcessors() - 1;
-
-	private int iteration = 0;
-
-	/**
-	 * <p>
-	 * the task factory to be used for creating substructures for the temporal
-	 * relationships identified during rul application
-	 * </p>
-	 */
-	private final ITaskFactory taskFactory;
-
-	/**
-	 * <p>
-	 * the task builder to be used for creating substructures for the temporal
-	 * relationships identified during rule application
-	 * </p>
-	 */
-	private final ITaskBuilder taskBuilder;
-
-	/**
-	 * <p>
-	 * the task handling strategy to be used for comparing tasks for
-	 * preparation, i.e., before the tasks are harmonized
-	 * </p>
-	 */
-	private final TaskHandlingStrategy preparationTaskHandlingStrategy;
-
-	/**
-	 * <p>
-	 * instantiates the rule and initializes it with a task equality to be
-	 * considered when comparing tasks as well as a task factory and builder to
-	 * be used for creating task structures.
-	 * </p>
-	 * 
-	 * @param minimalTaskEquality
-	 *            the task equality to be considered when comparing tasks
-	 * @param taskFactory
-	 *            the task factory to be used for creating substructures
-	 * @param taskBuilder
-	 *            the task builder to be used for creating substructures
-	 */
-
-	SequenceForTaskDetectionRuleAlignment(TaskEquality minimalTaskEquality,
-			ITaskFactory taskFactory, ITaskBuilder taskBuilder) {
-		this.taskFactory = taskFactory;
-		this.taskBuilder = taskBuilder;
-
-		this.preparationTaskHandlingStrategy = new TaskHandlingStrategy(
-				minimalTaskEquality);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see
-	 * de.ugoe.cs.autoquest.tasktrees.temporalrelation.ISessionScopeRule#apply
-	 * (java.util.List)
-	 */
-	@Override
-	public RuleApplicationResult apply(List<IUserSession> sessions) {
-		final RuleApplicationData appData = new RuleApplicationData(sessions);
-		// File harmonized = new File("harmonized.dat");
-		// if(harmonized.exists() && !harmonized.isDirectory()) {
-		// Console.traceln(Level.INFO,"loading harmonized sessions from file");
-		// appData = loadAppData("harmonized");
-		// }
-		// else {
-		// appData.getStopWatch().start("harmonization");
-		harmonizeEventTaskInstancesModel(appData);
-		// appData.getStopWatch().stop("harmonization");
-		GlobalDataContainer.getInstance().addData("harmonized", appData);
-		// Saving intermediate results to file
-		Console.traceln(Level.INFO, "saving substitution matrix to file");
-		// saveAppData("harmonized");
-		// }
-
-		// File substitution = new File("substitution.dat");
-		// if(!(substitution.exists() && !substitution.isDirectory())) {
-		Console.traceln(Level.INFO, "generating substitution matrix from "
-				+ appData.getUniqueTasks().size() + " unique tasks");
-		appData.getStopWatch().start("substitution matrix");
-		appData.getSubmat().generate(appData.getUniqueTasks());
-		appData.getStopWatch().stop("substitution matrix");
-		// GlobalDataContainer.getInstance().addData("substitution", appData);
-		// saveAppData("substitution");
-		// }
-		// else {
-		// Console.traceln(Level.INFO,"loading substitution matrix from file");
-		// appData = loadAppData("substitution");
-		// }
-
-		Console.traceln(Level.INFO, "Starting main loop");
-		do {
-			Console.traceln(Level.INFO, "Iteration Number: " + iteration);
-			iteration++;
-			appData.detectedAndReplacedTasks = false;
-			appData.getStopWatch().start("whole loop");
-			detectAndReplaceIterations(appData);
-			appData.getStopWatch().start("task replacement");
-			// appData.updateSubstitutionMatrix();
-			detectAndReplaceTasks(appData); //
-			appData.getStopWatch().stop("task replacement");
-			appData.getStopWatch().stop("whole loop");
-			appData.getStopWatch().dumpStatistics(System.out);
-			appData.getStopWatch().reset();
-
-		} while (appData.detectedAndReplacedTasks());
-
-		Console.println("created "
-				+ appData.getResult().getNewlyCreatedTasks().size()
-				+ " new tasks and "
-				+ appData.getResult().getNewlyCreatedTaskInstances().size()
-				+ " appropriate instances\n");
-
-		if ((appData.getResult().getNewlyCreatedTasks().size() > 0)
-				|| (appData.getResult().getNewlyCreatedTaskInstances().size() > 0)) {
-			appData.getResult().setRuleApplicationStatus(
-					RuleApplicationStatus.FINISHED);
-		}
-
-		return appData.getResult();
-	}
-
-	private ArrayList<NumberSequence> createNumberSequences(
-			RuleApplicationData appData) {
-		final ArrayList<NumberSequence> result = new ArrayList<NumberSequence>();
-		for (int i = 0; i < appData.getSessions().size(); i++) {
-			final IUserSession session = appData.getSessions().get(i);
-			final NumberSequence templist = new NumberSequence(session.size());
-			for (int j = 0; j < session.size(); j++) {
-				final ITaskInstance taskInstance = session.get(j);
-				templist.getSequence()[j] = taskInstance.getTask().getId();
-			}
-			// Each NumberSequence is identified by its id, beginning to count
-			// at zero
-			templist.setId(i);
-			result.add(templist);
-		}
-		return result;
-	}
-
-	/**
-	 * <p>
-	 * searches for direct iterations of single tasks in all sequences and
-	 * replaces them with {@link IIteration}s, respectively appropriate
-	 * instances. Also all single occurrences of a task that is iterated
-	 * somewhen are replaced with iterations to have again an efficient way for
-	 * task comparisons.
-	 * </p>
-	 * 
-	 * @param appData
-	 *            the rule application data combining all data used for applying
-	 *            this rule
-	 */
-	private void detectAndReplaceIterations(RuleApplicationData appData) {
-		Console.traceln(Level.FINE, "detecting iterations");
-		appData.getStopWatch().start("detecting iterations");
-
-		final List<IUserSession> sessions = appData.getSessions();
-
-		final Set<ITask> iteratedTasks = searchIteratedTasks(sessions);
-
-		if (iteratedTasks.size() > 0) {
-			replaceIterationsOf(iteratedTasks, sessions, appData);
-		}
-
-		appData.getStopWatch().stop("detecting iterations");
-		Console.traceln(Level.INFO, "replaced " + iteratedTasks.size()
-				+ " iterated tasks");
-	}
-
-	/**
-	 * 
-	 * @param appData
-	 *            the rule application data combining all data used for applying
-	 *            this rule
-	 */
-	private void detectAndReplaceTasks(RuleApplicationData appData) {
-		Console.traceln(Level.FINE, "detecting and replacing tasks");
-		appData.getStopWatch().start("detecting tasks");
-
-		// Create NumberSequences
-		appData.setNumberSequences(this.createNumberSequences(appData));
-
-		// Generate pairwise alignments
-		// appData.setMatchseqs(generatePairwiseAlignments(appData));
-		generatePairwiseAlignments(appData);
-
-		// Searching each match in all other sessions, counting its occurences
-		searchMatchesInAllSessions(appData);
-
-		// Sort results to get the most occurring results
-		Console.traceln(Level.INFO, "sorting " + appData.getMatchseqs().size()
-				+ " results");
-		final Comparator<Match> comparator = new Comparator<Match>() {
-			@Override
-			public int compare(Match m1, Match m2) {
-				return m2.occurenceCount() - m1.occurenceCount();
-
-			}
-		};
-
-		Collections.sort(appData.getMatchseqs(), comparator);
-		appData.getStopWatch().stop("detecting tasks");
-
-		// Replace matches in the sessions
-		Console.traceln(Level.INFO, "Replacing matches in sessions");
-		replaceMatches(appData);
-		appData.getStopWatch().start("replacing tasks");
-
-		// appData.setMatchseqs(null);
-		appData.getStopWatch().stop("replacing tasks");
-	}
-
-	// private LinkedList<Match> generatePairwiseAlignments(RuleApplicationData
-	// appData) {
-	private void generatePairwiseAlignments(RuleApplicationData appData) {
-		final int numberSeqSize = appData.getNumberSequences().size();
-		appData.matchseqs = new LinkedList<Match>();
-		Console.traceln(Level.INFO, "generating pairwise alignments from "
-				+ numberSeqSize + " sessions with " + nThreads + " threads");
-
-		int newThreads = nThreads;
-		if (numberSeqSize < nThreads) {
-			newThreads = numberSeqSize;
-		}
-
-		final ExecutorService executor = Executors
-				.newFixedThreadPool(newThreads);
-		final int interval = numberSeqSize / newThreads;
-		int rest = numberSeqSize % newThreads;
-
-		for (int i = 0; i < (numberSeqSize - interval); i += interval) {
-			int offset = 0;
-			if (rest != 0) {
-				offset = 1;
-				rest--;
-			}
-			final int from = i;
-			final int to = i + interval + offset;
-			System.out.println("Creating thread for sessions " + from
-					+ " till " + to);
-			final ParallelPairwiseAligner aligner = new ParallelPairwiseAligner(
-					appData, from, to);
-			executor.execute(aligner);
-		}
-		executor.shutdown();
-		try {
-			executor.awaitTermination(2, TimeUnit.HOURS);
-		} catch (final InterruptedException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-	}
-
-	/**
-	 * <p>
-	 * harmonizes the event task instances by unifying tasks. This is done, as
-	 * initially the event tasks being equal with respect to the considered task
-	 * equality are distinct objects. The comparison of these distinct objects
-	 * is more time consuming than comparing the object references.
-	 * </p>
-	 * 
-	 * @param appData
-	 *            the rule application data combining all data used for applying
-	 *            this rule
-	 * @return Returns the unique tasks symbol map
-	 */
-	private void harmonizeEventTaskInstancesModel(RuleApplicationData appData) {
-		Console.traceln(Level.INFO,
-				"harmonizing task model of event task instances");
-		appData.getStopWatch().start("harmonizing event tasks");
-		final SymbolMap<ITaskInstance, ITask> uniqueTasks = preparationTaskHandlingStrategy
-				.createSymbolMap();
-
-		final TaskInstanceComparator comparator = preparationTaskHandlingStrategy
-				.getTaskComparator();
-
-		int unifiedTasks = 0;
-		ITask task;
-		final List<IUserSession> sessions = appData.getSessions();
-		for (int j = 0; j < sessions.size(); j++) {
-			final IUserSession session = sessions.get(j);
-
-			for (int i = 0; i < session.size(); i++) {
-				final ITaskInstance taskInstance = session.get(i);
-				task = uniqueTasks.getValue(taskInstance);
-
-				if (task == null) {
-					uniqueTasks.addSymbol(taskInstance, taskInstance.getTask());
-					appData.getUniqueTasks().add(taskInstance.getTask());
-					appData.getNumber2Task().put(
-							taskInstance.getTask().getId(),
-							taskInstance.getTask());
-				} else {
-					taskBuilder.setTask(taskInstance, task);
-					unifiedTasks++;
-				}
-			}
-			comparator.clearBuffers();
-		}
-
-		appData.getStopWatch().stop("harmonizing event tasks");
-		Console.traceln(Level.INFO, "harmonized " + unifiedTasks
-				+ " task occurrences (still " + appData.getUniqueTasks().size()
-				+ " different tasks)");
-
-		appData.getStopWatch().dumpStatistics(System.out);
-		appData.getStopWatch().reset();
-	}
-
-	/**
-	 * <p>
-	 * TODO clarify why this is done
-	 * </p>
-	 */
-	private void harmonizeIterationInstancesModel(IIteration iteration,
-			List<IIterationInstance> iterationInstances) {
-		final List<ITask> iteratedTaskVariants = new LinkedList<ITask>();
-		final TaskInstanceComparator comparator = preparationTaskHandlingStrategy
-				.getTaskComparator();
-
-		// merge the lexically different variants of iterated task to a unique
-		// list
-		for (final IIterationInstance iterationInstance : iterationInstances) {
-			for (final ITaskInstance executionVariant : iterationInstance) {
-				final ITask candidate = executionVariant.getTask();
-
-				boolean found = false;
-				for (final ITask taskVariant : iteratedTaskVariants) {
-					if (comparator.areLexicallyEqual(taskVariant, candidate)) {
-						taskBuilder.setTask(executionVariant, taskVariant);
-						found = true;
-						break;
-					}
-				}
-
-				if (!found) {
-					iteratedTaskVariants.add(candidate);
-				}
-			}
-		}
-
-		// if there are more than one lexically different variant of iterated
-		// tasks, adapt the
-		// iteration model to be a selection of different variants. In this case
-		// also adapt
-		// the generated iteration instances to correctly contain selection
-		// instances. If there
-		// is only one variant of an iterated task, simply set this as the
-		// marked task of the
-		// iteration. In this case, the instances can be preserved as is
-		if (iteratedTaskVariants.size() > 1) {
-			final ISelection selection = taskFactory.createNewSelection();
-
-			for (final ITask variant : iteratedTaskVariants) {
-				taskBuilder.addChild(selection, variant);
-			}
-
-			taskBuilder.setMarkedTask(iteration, selection);
-
-			for (final IIterationInstance instance : iterationInstances) {
-				for (int i = 0; i < instance.size(); i++) {
-					final ISelectionInstance selectionInstance = taskFactory
-							.createNewTaskInstance(selection);
-					taskBuilder.setChild(selectionInstance, instance.get(i));
-					taskBuilder.setTaskInstance(instance, i, selectionInstance);
-				}
-			}
-		} else {
-			taskBuilder.setMarkedTask(iteration, iteratedTaskVariants.get(0));
-		}
-	}
-
-	public RuleApplicationData loadAppData(String name) {
-		final String objectName = name;
-		final String filename = name + ".dat";
-
-		Object data = null;
-		FileInputStream fis = null;
-		ObjectInputStream in = null;
-		try {
-			fis = new FileInputStream(filename);
-			in = new ObjectInputStream(fis);
-			data = in.readObject();
-			in.close();
-		} catch (final IOException ex) {
-			Console.logException(ex);
-		} catch (final ClassNotFoundException ex) {
-			Console.logException(ex);
-		}
-		if (GlobalDataContainer.getInstance().addData(objectName, data)) {
-			CommandHelpers.dataOverwritten(objectName);
-		}
-		return (RuleApplicationData) GlobalDataContainer.getInstance().getData(
-				name);
-	}
-
-	/**
-	 * @param appData
-	 *            , Ruleapplication Data needed to keep track of all created
-	 *            tasks
-	 * @param m
-	 *            The match to be converted into a Task
-	 * @return The task of the match with an ISequence as it's root
-	 */
-	synchronized public ISequence matchAsSequence(RuleApplicationData appData,
-			Match m) {
-		final ISequence sequence = taskFactory.createNewSequence();
-		appData.newTaskCreated(sequence);
-
-		final int[] first = m.getFirstSequence().getSequence();
-		final int[] second = m.getSecondSequence().getSequence();
-
-		// Both sequences of a match are equally long
-		for (int i = 0; i < m.getFirstSequence().size(); i++) {
-
-			// Two gaps aligned to each other: Have not seen it happening so
-			// far, just to handle it
-			if ((first[i] == -1) && (second[i] == -1)) {
-				// Do nothing here.
-			}
-			// Both events are equal, we can simply add the task referring to
-			// the number
-			else if (first[i] == second[i]) {
-				taskBuilder.addChild(sequence,
-						appData.getNumber2Task().get(first[i]));
-			}
-			// We have a gap in the first sequence, we need to add the task of
-			// the second sequence as optional
-			else if ((first[i] == -1) && (second[i] != -1)) {
-				final IOptional optional = taskFactory.createNewOptional();
-				appData.newTaskCreated(optional);
-				taskBuilder.setMarkedTask(optional, appData.getNumber2Task()
-						.get(second[i]));
-				taskBuilder.addChild(sequence, optional);
-			}
-			// We have a gap in the second sequence, we need to add the task of
-			// the first sequence as optional
-			else if ((first[i] != -1) && (second[i] == -1)) {
-				final IOptional optional = taskFactory.createNewOptional();
-				appData.newTaskCreated(optional);
-				taskBuilder.setMarkedTask(optional, appData.getNumber2Task()
-						.get(first[i]));
-				taskBuilder.addChild(sequence, optional);
-			}
-			// Both tasks are not equal, we need to insert a selection here.
-			// Check if the next position is not a selection
-			else if (i < (first.length - 1)) {
-
-				if ((first[i] != second[i])
-						&& (((first[i + 1] == second[i + 1])
-								|| (first[i + 1] == -1) || (second[i + 1] == -1)))) {
-
-					final ISelection selection = taskFactory
-							.createNewSelection();
-					appData.newTaskCreated(selection);
-					taskBuilder.addChild(selection, appData.getNumber2Task()
-							.get(first[i]));
-					taskBuilder.addChild(selection, appData.getNumber2Task()
-							.get(second[i]));
-					taskBuilder.addChild(sequence, selection);
-				} else {
-					boolean selectionfound = true;
-					final ISelection selection = taskFactory
-							.createNewSelection();
-					appData.newTaskCreated(selection);
-
-					final ISequence subsequence1 = taskFactory
-							.createNewSequence();
-					appData.newTaskCreated(subsequence1);
-
-					final ISequence subsequence2 = taskFactory
-							.createNewSequence();
-					appData.newTaskCreated(subsequence2);
-
-					taskBuilder.addChild(selection, subsequence1);
-					taskBuilder.addChild(selection, subsequence2);
-					taskBuilder.addChild(sequence, selection);
-					while ((i < (first.length - 1)) && selectionfound) {
-						selectionfound = false;
-						taskBuilder.addChild(subsequence1, appData
-								.getNumber2Task().get(first[i]));
-						taskBuilder.addChild(subsequence2, appData
-								.getNumber2Task().get(second[i]));
-						if ((first[i + 1] != second[i + 1])
-								&& (first[i + 1] != -1)
-								&& (second[i + 1] != -1)) {
-							selectionfound = true;
-						} else {
-							continue;
-						}
-						i++;
-					}
-					if ((i == (first.length - 1)) && selectionfound) {
-						taskBuilder.addChild(subsequence1, appData
-								.getNumber2Task().get(first[i]));
-						taskBuilder.addChild(subsequence2, appData
-								.getNumber2Task().get(second[i]));
-					}
-				}
-			} else {
-				if ((first[i] != second[i])) {
-
-					final ISelection selection = taskFactory
-							.createNewSelection();
-					appData.newTaskCreated(selection);
-					taskBuilder.addChild(selection, appData.getNumber2Task()
-							.get(first[i]));
-					taskBuilder.addChild(selection, appData.getNumber2Task()
-							.get(second[i]));
-					taskBuilder.addChild(sequence, selection);
-				}
-			}
-
-		}
-		return sequence;
-	}
-
-	/**
-	 * <p>
-	 * replaces all occurrences of all tasks provided in the set with iterations
-	 * </p>
-	 * 
-	 * @param iteratedTasks
-	 *            the tasks to be replaced with iterations
-	 * @param sessions
-	 *            the sessions in which the tasks are to be replaced
-	 * @param appData
-	 *            the rule application data combining all data used for applying
-	 *            this rule
-	 */
-	private void replaceIterationsOf(Set<ITask> iteratedTasks,
-			List<IUserSession> sessions, RuleApplicationData appData) {
-		final Map<ITask, IIteration> iterations = new HashMap<ITask, IIteration>();
-		final Map<IIteration, List<IIterationInstance>> iterationInstances = new HashMap<IIteration, List<IIterationInstance>>();
-
-		for (final ITask iteratedTask : iteratedTasks) {
-
-			final IIteration iteration = taskFactory.createNewIteration();
-			appData.newTaskCreated(iteration);
-			iterations.put(iteratedTask, iteration);
-			iterationInstances.put(iteration,
-					new LinkedList<IIterationInstance>());
-		}
-
-		IIterationInstance iterationInstance;
-
-		for (final IUserSession session : sessions) {
-			int index = 0;
-			iterationInstance = null;
-
-			while (index < session.size()) {
-				// we prepared the task instances to refer to unique tasks, if
-				// they are treated
-				// as equal. Therefore, we just compare the identity of the
-				// tasks of the task
-				// instances
-				final ITask currentTask = session.get(index).getTask();
-				final IIteration iteration = iterations.get(currentTask);
-				if (iteration != null) {
-					if ((iterationInstance == null)
-							|| (iterationInstance.getTask() != iteration)) {
-						iterationInstance = taskFactory
-								.createNewTaskInstance(iteration);
-						iterationInstances.get(iteration)
-								.add(iterationInstance);// TODO:: Don't create
-						// TaskInstances here,
-						// use a set of tasks
-						// instead
-						taskBuilder.addTaskInstance(session, index,
-								iterationInstance);
-						index++;
-					}
-
-					taskBuilder.addChild(iterationInstance, session.get(index));
-					taskBuilder.removeTaskInstance(session, index);
-				} else {
-					if (iterationInstance != null) {
-						iterationInstance = null;
-					}
-					index++;
-				}
-			}
-		}
-
-		for (final Map.Entry<IIteration, List<IIterationInstance>> entry : iterationInstances
-				.entrySet()) {
-			harmonizeIterationInstancesModel(entry.getKey(), entry.getValue());
-		}
-	}
-
-	private void replaceMatches(RuleApplicationData appData) {
-		appData.replacedOccurences = new HashMap<Integer, List<MatchOccurence>>();
-
-		final int matchSeqSize = appData.getMatchseqs().size();
-		int newThreads = nThreads;
-		if (matchSeqSize < nThreads) {
-			newThreads = matchSeqSize;
-		}
-		final ExecutorService executor = Executors
-				.newFixedThreadPool(newThreads);
-		final int interval = matchSeqSize / newThreads;
-		int rest = matchSeqSize % newThreads;
-
-		for (int i = 0; i < (matchSeqSize - interval); i += interval) {
-			int offset = 0;
-			if (rest != 0) {
-				offset = 1;
-				rest--;
-			}
-			final int from = i;
-			final int to = i + interval + offset;
-			System.out
-			.println("Replacement: Creating thread with matches from "
-					+ from + " to " + to);
-			// search each match in every other sequence
-			final ParallelMatchReplacer replacer = new ParallelMatchReplacer(
-					appData, from, to);
-			executor.execute(replacer);
-		}
-		executor.shutdown();
-		try {
-			executor.awaitTermination(2, TimeUnit.HOURS);
-		} catch (final InterruptedException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-	}
-
-	public void saveAppData(String name) {
-		final String objectName = name;
-		final String filename = name + ".dat";
-		final Object dataObject = GlobalDataContainer.getInstance().getData(
-				objectName);
-		if (dataObject == null) {
-			CommandHelpers.objectNotFoundMessage(objectName);
-		}
-		FileOutputStream fos = null;
-		ObjectOutputStream out = null;
-		try {
-			fos = new FileOutputStream(filename);
-			out = new ObjectOutputStream(fos);
-			out.writeObject(dataObject);
-			out.close();
-		} catch (final IOException ex) {
-			Console.logException(ex);
-		}
-	}
-
-	/**
-	 * <p>
-	 * searches the provided sessions for task iterations. If a task is
-	 * iterated, it is added to the returned set.
-	 * </p>
-	 * 
-	 * @param the
-	 *            session to search for iterations in
-	 * 
-	 * @return a set of tasks being iterated somewhere
-	 */
-	private Set<ITask> searchIteratedTasks(List<IUserSession> sessions) {
-		final Set<ITask> iteratedTasks = new HashSet<ITask>();
-		for (final IUserSession session : sessions) {
-			for (int i = 0; i < (session.size() - 1); i++) {
-				// we prepared the task instances to refer to unique tasks, if
-				// they are treated
-				// as equal. Therefore, we just compare the identity of the
-				// tasks of the task
-				// instances
-				if (session.get(i).getTask() == session.get(i + 1).getTask()) {
-					iteratedTasks.add(session.get(i).getTask());
-				}
-			}
-		}
-		return iteratedTasks;
-	}
-
-	private void searchMatchesInAllSessions(RuleApplicationData appData) {
-		Console.traceln(Level.INFO,
-				"searching for patterns occuring most with " + nThreads
-						+ " threads");
-		// Prepare parallel search of matchseqs
-
-		final int matchSeqSize = appData.getMatchseqs().size();
-		int newThreads = nThreads;
-		if (matchSeqSize < nThreads) {
-			newThreads = matchSeqSize;
-		}
-		final int interval = matchSeqSize / newThreads;
-		int rest = matchSeqSize % newThreads;
-		final ExecutorService executor = Executors.newFixedThreadPool(nThreads);
-
-		for (int i = 0; i < (matchSeqSize - interval); i += interval) {
-			int offset = 0;
-			if (rest != 0) {
-				offset = 1;
-				rest--;
-			}
-			final int from = i;
-			final int to = i + interval + offset;
-			System.out
-			.println("Match finding: Creating thread with matches from "
-					+ from + " to " + to);
-			// search each match in every other sequence
-			final ParallelMatchOcurrencesFinder finder = new ParallelMatchOcurrencesFinder(
-					appData, from, to);
-			executor.execute(finder);
-		}
-		executor.shutdown();
-		try {
-			executor.awaitTermination(2, TimeUnit.HOURS);
-		} catch (final InterruptedException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see java.lang.Object#toString()
-	 */
-	@Override
-	public String toString() {
-		return "SequenceForTaskDetectionRuleAlignment";
-	}
-
+	
 }
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskHandlingStrategy.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskHandlingStrategy.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskHandlingStrategy.java	(revision 1734)
@@ -21,4 +21,5 @@
 import de.ugoe.cs.autoquest.usageprofiles.SymbolStrategy;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -35,19 +36,11 @@
 public class TaskHandlingStrategy implements SymbolStrategy<ITaskInstance> {
 
-	/**  */
+	/** The Constant serialVersionUID. */
 	private static final long serialVersionUID = 1L;
 
-	/**
-	 * <p>
-	 * the level of task equality considered in this task handling strategy
-	 * </p>
-	 */
+	/** <p> the level of task equality considered in this task handling strategy </p>. */
 	private final TaskEquality consideredEquality;
 
-	/**
-	 * <p>
-	 * the comparator used for task comparisons
-	 * </p>
-	 */
+	/** <p> the comparator used for task comparisons </p>. */
 	private TaskInstanceComparator comparator;
 
@@ -56,8 +49,7 @@
 	 * initializes this strategy with a task equality to be considered for task
 	 * comparisons g
-	 * </p>
+	 * </p>.
 	 *
-	 * @param consideredEquality
-	 *            the task equality to be considered for task comparisons
+	 * @param consideredEquality            the task equality to be considered for task comparisons
 	 */
 	public TaskHandlingStrategy(TaskEquality consideredEquality) {
@@ -117,5 +109,7 @@
 	 * convenience method to have a correctly typed return value as alternative
 	 * to {@link #getSymbolComparator()};
-	 * </p>
+	 * </p>.
+	 *
+	 * @return the task comparator
 	 */
 	public TaskInstanceComparator getTaskComparator() {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskIdentityComparator.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskIdentityComparator.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskIdentityComparator.java	(revision 1734)
@@ -18,4 +18,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -27,5 +28,5 @@
 class TaskIdentityComparator extends TaskInstanceComparator {
 
-	/**  */
+	/** The Constant serialVersionUID. */
 	private static final long serialVersionUID = 1L;
 
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceComparator.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceComparator.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceComparator.java	(revision 1734)
@@ -25,4 +25,5 @@
 import de.ugoe.cs.autoquest.usageprofiles.SymbolComparator;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -40,5 +41,5 @@
 	 * <p>
 	 * interface for internally used comparers containing only a compare method
-	 * </p>
+	 * </p>.
 	 */
 	private static interface Comparer {
@@ -48,11 +49,8 @@
 		 * returns true, if this comparator considers the provided tasks as
 		 * equal, false else
-		 * </p>
-		 * 
-		 * @param task1
-		 *            the first task to compare
-		 * @param task2
-		 *            the second task to compare
-		 * 
+		 * </p>.
+		 *
+		 * @param task1            the first task to compare
+		 * @param task2            the second task to compare
 		 * @return as described
 		 */
@@ -63,13 +61,9 @@
 	 * <p>
 	 * comparer that performs comparisons only on the provided level
-	 * </p>
+	 * </p>.
 	 */
 	private static class DefaultComparer implements Comparer {
 
-		/**
-		 * <p>
-		 * the minimal task equality considered by this comparer
-		 * </p>
-		 */
+		/** <p> the minimal task equality considered by this comparer </p>. */
 		private final TaskEquality minimalTaskEquality;
 
@@ -77,5 +71,7 @@
 		 * <p>
 		 * initializes this comparer with the task equality to be considered
-		 * </p>
+		 * </p>.
+		 *
+		 * @param minimalTaskEquality the minimal task equality
 		 */
 		public DefaultComparer(TaskEquality minimalTaskEquality) {
@@ -98,5 +94,5 @@
 	 * <p>
 	 * comparer that performs comparisons only on the lexical level
-	 * </p>
+	 * </p>.
 	 */
 	private static class LexicalComparer implements Comparer {
@@ -117,5 +113,5 @@
 	 * <p>
 	 * comparer that performs comparisons only on the semantical level
-	 * </p>
+	 * </p>.
 	 */
 	private static class SemanticalComparer implements Comparer {
@@ -136,6 +132,5 @@
 	 * <p>
 	 * comparer that performs comparisons only on the syntactical level
-	 * </p>
-	 * 
+	 * </p>.
 	 */
 	private static class SyntacticalComparer implements Comparer {
@@ -153,37 +148,23 @@
 	}
 
-	/**  */
+	/** The Constant serialVersionUID. */
 	private static final long serialVersionUID = 1L;
 
-	/**
-	 * the maximum size of the internal buffer used for storing comparison
-	 * results
-	 */
+	/** the maximum size of the internal buffer used for storing comparison results. */
 	private static final int MAX_BUFFER_SIZE = 2 * 1024 * 1024;
 
-	/**
-	 * the considered level of task equality
-	 */
+	/** the considered level of task equality. */
 	private final TaskEquality minimalTaskEquality;
 
-	/**
-	 * the comparer used internally for comparing two tasks
-	 */
+	/** the comparer used internally for comparing two tasks. */
 	private transient Comparer comparer;
 
-	/**
-	 * the comparer used for comparing two tasks on the lexical level
-	 */
+	/** the comparer used for comparing two tasks on the lexical level. */
 	private transient Comparer lexicalComparer;
 
-	/**
-	 * internal buffer used for storing comparison results
-	 */
+	/** internal buffer used for storing comparison results. */
 	private transient HashMap<Long, Boolean> equalityBuffer = new HashMap<Long, Boolean>();
 
-	/**
-	 * internal buffer used for storing comparison results only for lexical
-	 * comparisons
-	 */
+	/** internal buffer used for storing comparison results only for lexical comparisons. */
 	private transient HashMap<Long, Boolean> lexicalEqualityBuffer;
 
@@ -191,8 +172,7 @@
 	 * <p>
 	 * initializes the comparator with a considered task equality level
-	 * </p>
-	 * 
-	 * @param minimalTaskEquality
-	 *            the considered task equality level
+	 * </p>.
+	 *
+	 * @param minimalTaskEquality            the considered task equality level
 	 */
 	public TaskInstanceComparator(TaskEquality minimalTaskEquality) {
@@ -205,11 +185,8 @@
 	 * returns true, if this comparator considers the provided tasks as
 	 * lexically equal, false else
-	 * </p>
-	 * 
-	 * @param task1
-	 *            the first task to compare
-	 * @param task2
-	 *            the second task to compare
-	 * 
+	 * </p>.
+	 *
+	 * @param task1            the first task to compare
+	 * @param task2            the second task to compare
 	 * @return as described
 	 */
@@ -239,5 +216,5 @@
 	 * <p>
 	 * can be called externally to clear the internal comparison buffers
-	 * </p>
+	 * </p>.
 	 */
 	public void clearBuffers() {
@@ -250,11 +227,8 @@
 	 * returns true, if this comparator considers the provided tasks as equal,
 	 * false else
-	 * </p>
-	 * 
-	 * @param task1
-	 *            the first task to compare
-	 * @param task2
-	 *            the second task to compare
-	 * 
+	 * </p>.
+	 *
+	 * @param task1            the first task to compare
+	 * @param task2            the second task to compare
 	 * @return as described
 	 */
@@ -329,5 +303,9 @@
 	 * <p>
 	 * deserialize this object and reinitialize the buffers
-	 * </p>
+	 * </p>.
+	 *
+	 * @param in the in
+	 * @throws IOException Signals that an I/O exception has occurred.
+	 * @throws ClassNotFoundException the class not found exception
 	 */
 	private void readObject(ObjectInputStream in) throws IOException,
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceTrie.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceTrie.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskInstanceTrie.java	(revision 1734)
@@ -27,4 +27,5 @@
 import de.ugoe.cs.autoquest.usageprofiles.TrieProcessor;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -45,9 +46,11 @@
 	 * <p>
 	 * counter object to be able to call something by the counters reference
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @author Patrick Harms
 	 */
 	private static class Counter {
+		
+		/** The count. */
 		int count = 0;
 	}
@@ -57,6 +60,6 @@
 	 * trie processor identifying the current maximum count of sequences of a
 	 * minimal length of two
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @author Patrick Harms
 	 */
@@ -64,9 +67,5 @@
 			TrieProcessor<ITaskInstance> {
 
-		/**
-		 * <p>
-		 * the current maximum count
-		 * </p>
-		 */
+		/** <p> the current maximum count </p>. */
 		private int currentCount = 0;
 
@@ -74,5 +73,7 @@
 		 * <p>
 		 * returns the current maximum count
-		 * </p>
+		 * </p>.
+		 *
+		 * @return the max count
 		 */
 		private int getMaxCount() {
@@ -102,12 +103,8 @@
 	}
 
-	/**  */
+	/** The Constant serialVersionUID. */
 	private static final long serialVersionUID = 1L;
 
-	/**
-	 * <p>
-	 * the task handling strategy to be used for comparing tasks
-	 * </p>
-	 */
+	/** <p> the task handling strategy to be used for comparing tasks </p>. */
 	private final TaskHandlingStrategy taskStrategy;
 
@@ -115,8 +112,7 @@
 	 * <p>
 	 * instantiated the trie with the task handling strategy to be used
-	 * </p>
-	 *
-	 * @param taskStrategy
-	 *            the task handling strategy to be used for comparing tasks
+	 * </p>.
+	 *
+	 * @param taskStrategy            the task handling strategy to be used for comparing tasks
 	 */
 	public TaskInstanceTrie(TaskHandlingStrategy taskStrategy) {
@@ -170,5 +166,11 @@
 	 * internally used convenience method for implementing the training
 	 * optimization
-	 * </p>
+	 * </p>.
+	 *
+	 * @param userSession the user session
+	 * @param maxOrder the max order
+	 * @param taskInstanceCountMap the task instance count map
+	 * @param processedTaskInstances the processed task instances
+	 * @param counterRecheckAt the counter recheck at
 	 */
 	private void train(IUserSession userSession, int maxOrder,
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolBucketedMap.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolBucketedMap.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolBucketedMap.java	(revision 1734)
@@ -34,4 +34,5 @@
 import de.ugoe.cs.autoquest.usageprofiles.SymbolMap;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -53,9 +54,8 @@
  * symbol returns false.
  * </p>
- * 
+ *
+ * @author Patrick Harms
+ * @param <V> the value type
  * @see SymbolComparator
- * 
- * @author Patrick Harms
- * @param <V>
  */
 class TaskSymbolBucketedMap<V> implements SymbolMap<ITaskInstance, V>,
@@ -67,6 +67,7 @@
 	 * entry, that is relevant.
 	 * </p>
-	 * 
+	 *
 	 * @author Patrick Harms
+	 * @param <T> the generic type
 	 */
 	private abstract class EntryFacade<T> {
@@ -94,17 +95,14 @@
 	 * task instances or only the values.
 	 * </p>
-	 * 
+	 *
 	 * @author Patrick Harms
+	 * @param <TYPE> the generic type
 	 */
 	private class ReadOnlyCollectionFacade<TYPE> implements Collection<TYPE> {
 
-		/**
-		 * the list facaded by this facade
-		 */
+		/** the list facaded by this facade. */
 		private final List<Map.Entry<ITaskInstance, V>> list;
 
-		/**
-		 * the facade to be used for the entries
-		 */
+		/** the facade to be used for the entries. */
 		private final EntryFacade<TYPE> entryFacade;
 
@@ -113,5 +111,8 @@
 		 * Initializes the facade with the facaded list and the facade to be
 		 * used for the entries
-		 * </p>
+		 * </p>.
+		 *
+		 * @param list the list
+		 * @param entryFacade the entry facade
 		 */
 		private ReadOnlyCollectionFacade(
@@ -299,18 +300,15 @@
 	 * of task instance entries.
 	 * </p>
-	 * 
+	 *
 	 * @author Patrick Harms
+	 * @param <TYPE> the generic type
 	 */
 	private class ReadOnlyCollectionIteratorFacade<TYPE> implements
 			Iterator<TYPE> {
 
-		/**
-		 * the facaded iterator
-		 */
+		/** the facaded iterator. */
 		private final Iterator<Map.Entry<ITaskInstance, V>> iterator;
 
-		/**
-		 * the facade for the entries provided by the facaded iterator
-		 */
+		/** the facade for the entries provided by the facaded iterator. */
 		private final EntryFacade<TYPE> entryFacade;
 
@@ -320,4 +318,7 @@
 		 * facade to be used for the entries.
 		 * </p>
+		 *
+		 * @param iterator the iterator
+		 * @param entryFacade the entry facade
 		 */
 		private ReadOnlyCollectionIteratorFacade(
@@ -385,18 +386,14 @@
 	 * <p>
 	 * Internally used data structure for storing task instance - value pairs
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @author Patrick Harms
 	 */
 	private class SymbolMapEntry implements Map.Entry<ITaskInstance, V> {
 
-		/**
-		 * the task instance to map to a value
-		 */
+		/** the task instance to map to a value. */
 		private final ITaskInstance symbol;
 
-		/**
-		 * the value associated with the symbol
-		 */
+		/** the value associated with the symbol. */
 		private V value;
 
@@ -406,4 +403,7 @@
 		 * and its associated value.
 		 * </p>
+		 *
+		 * @param symbol the symbol
+		 * @param value the value
 		 */
 		private SymbolMapEntry(ITaskInstance symbol, V value) {
@@ -507,9 +507,5 @@
 	}
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
@@ -522,16 +518,8 @@
 	private static final int MAX_LIST_SIZE = 15;
 
-	/**
-	 * <p>
-	 * Comparator to be used for comparing the task instances with each other
-	 * </p>
-	 */
+	/** <p> Comparator to be used for comparing the task instances with each other </p>. */
 	private final TaskInstanceComparator comparator;
 
-	/**
-	 * <p>
-	 * Internally maintained plain list of task instances and associated values
-	 * </p>
-	 */
+	/** <p> Internally maintained plain list of task instances and associated values </p>. */
 	private final List<Map.Entry<ITaskInstance, V>> symbolList;
 
@@ -556,11 +544,7 @@
 	 * <p>
 	 * Instantiates a task instance map with a comparator
-	 * </p>
-	 *
-	 * @param comparator
-	 *            the comparator to use for comparing task instances
-	 * 
-	 * @throws IllegalArgumentException
-	 *             if the provided comparator is null
+	 * </p>.
+	 *
+	 * @param comparator            the comparator to use for comparing task instances
 	 */
 	public TaskSymbolBucketedMap(TaskInstanceComparator comparator) {
@@ -576,11 +560,7 @@
 	 * <p>
 	 * Copy constructor
-	 * </p>
-	 * 
-	 * @param otherMap
-	 *            the other map to be copied including its comparator
-	 * 
-	 * @throws IllegalArgumentException
-	 *             if the provided other map is null
+	 * </p>.
+	 *
+	 * @param otherMap            the other map to be copied including its comparator
 	 */
 	public TaskSymbolBucketedMap(TaskSymbolBucketedMap<V> otherMap) {
@@ -608,14 +588,8 @@
 	 * should be used to ensure map behavior.
 	 * </p>
-	 * 
-	 * @param symbol
-	 *            the task instance to add to the map
-	 * @param value
-	 *            the value to associate to the task instance in this map
-	 * 
+	 *
+	 * @param symbol            the task instance to add to the map
+	 * @param value            the value to associate to the task instance in this map
 	 * @return as described
-	 * 
-	 * @throws IllegalArgumentException
-	 *             if the provided task instance is null
 	 */
 	@Override
@@ -648,4 +622,6 @@
 	 * id is shifted to another value.
 	 * </p>
+	 *
+	 * @param symbolEntry the symbol entry
 	 */
 	private void addToSymbolBucket(Map.Entry<ITaskInstance, V> symbolEntry) {
@@ -687,12 +663,7 @@
 	 * Returns true if the provided task instance was stored in this map.
 	 * </p>
-	 * 
-	 * @param symbol
-	 *            the task instance to check if it was stored in this map
-	 * 
+	 *
+	 * @param symbol            the task instance to check if it was stored in this map
 	 * @return as described
-	 * 
-	 * @throws IllegalArgumentException
-	 *             if the provided task instance is null
 	 */
 	@Override
@@ -745,5 +716,8 @@
 	 * task instances, sequence instances, selection instances, and iteration
 	 * instances
-	 * </p>
+	 * </p>.
+	 *
+	 * @param taskInstance the task instance
+	 * @return the bucket search order
 	 */
 	private int[] getBucketSearchOrder(ITaskInstance taskInstance) {
@@ -785,4 +759,7 @@
 	 * the other buckets are searched for the task instance.
 	 * </p>
+	 *
+	 * @param symbol the symbol
+	 * @return the entry
 	 */
 	private Map.Entry<ITaskInstance, V> getEntry(ITaskInstance symbol) {
@@ -844,12 +821,7 @@
 	 * instance is not stored in this map, the method returns null.
 	 * </p>
-	 * 
-	 * @param symbol
-	 *            the task instance to return the value for
-	 * 
+	 *
+	 * @param symbol            the task instance to return the value for
 	 * @return as described
-	 * 
-	 * @throws IllegalArgumentException
-	 *             if the provided task instance is null
 	 */
 	@Override
@@ -910,4 +882,8 @@
 	 * comparator.
 	 * </p>
+	 *
+	 * @param symbol the symbol
+	 * @param list the list
+	 * @return the map. entry
 	 */
 	private Map.Entry<ITaskInstance, V> lookup(ITaskInstance symbol,
@@ -928,4 +904,7 @@
 	 * possible.
 	 * </p>
+	 *
+	 * @param symbol the symbol
+	 * @return the map. entry
 	 */
 	private Map.Entry<ITaskInstance, V> removeFromSymbolBuckets(
@@ -964,12 +943,7 @@
 	 * is removed.
 	 * </p>
-	 * 
-	 * @param symbol
-	 *            the task instance to be removed from the map
-	 * 
+	 *
+	 * @param symbol            the task instance to be removed from the map
 	 * @return as described
-	 * 
-	 * @throws IllegalArgumentException
-	 *             if the provided task instance is null
 	 */
 	@Override
@@ -999,5 +973,5 @@
 	 * <p>
 	 * Updates the default bucket id to a new one
-	 * </p>
+	 * </p>.
 	 */
 	private void setNewDefaultBucketId() {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolIdentityMap.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolIdentityMap.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolIdentityMap.java	(revision 1734)
@@ -23,22 +23,20 @@
 import de.ugoe.cs.autoquest.usageprofiles.SymbolMap;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
  * symbol map implementation for task instances considering two task instances
  * as equal if their tasks are identical
- * </p>
- * 
+ * </p>.
+ *
  * @author Patrick Harms
+ * @param <V> the value type
  */
 public class TaskSymbolIdentityMap<V> implements SymbolMap<ITaskInstance, V> {
 
-	/**  */
+	/** The Constant serialVersionUID. */
 	private static final long serialVersionUID = 1L;
 
-	/**
-	 * <p>
-	 * internally used map for implementing the symbol map interface
-	 * </p>
-	 */
+	/** <p> internally used map for implementing the symbol map interface </p>. */
 	private final Map<ITask, V> delegate;
 
@@ -54,5 +52,5 @@
 	 * <p>
 	 * initializes this map
-	 * </p>
+	 * </p>.
 	 */
 	public TaskSymbolIdentityMap() {
@@ -64,8 +62,7 @@
 	 * <p>
 	 * copy constructor
-	 * </p>
+	 * </p>.
 	 *
-	 * @param other
-	 *            the map to be copied
+	 * @param other            the map to be copied
 	 */
 	public TaskSymbolIdentityMap(SymbolMap<ITaskInstance, V> other) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TemporalRelationshipRuleManager.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TemporalRelationshipRuleManager.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TemporalRelationshipRuleManager.java	(revision 1734)
@@ -29,4 +29,5 @@
 import de.ugoe.cs.util.console.Console;
 
+// TODO: Auto-generated Javadoc
 /**
  * TODO update comment
@@ -85,16 +86,8 @@
 public class TemporalRelationshipRuleManager {
 
-	/**
-	 * <p>
-	 * the task factory to be used during rule application
-	 * </p>
-	 */
+	/** <p> the task factory to be used during rule application </p>. */
 	private final ITaskFactory taskFactory;
 
-	/**
-	 * <p>
-	 * the task builder to be used during rule application
-	 * </p>
-	 */
+	/** <p> the task builder to be used during rule application </p>. */
 	private final ITaskBuilder taskBuilder;
 
@@ -120,11 +113,9 @@
 	 * <p>
 	 * initialize the manager
-	 * </p>
-	 * 
-	 * @param taskFactory
-	 *            the task factory to be used for instantiating new task tree
+	 * </p>.
+	 *
+	 * @param taskFactory            the task factory to be used for instantiating new task tree
 	 *            tasks during rule application
-	 * @param taskBuilder
-	 *            the task builder to be used for linking tasks with each other
+	 * @param taskBuilder            the task builder to be used for linking tasks with each other
 	 *            during rule application
 	 */
@@ -147,13 +138,10 @@
 	 * parameter is always true.
 	 * </p>
-	 * 
-	 * @param parent
-	 *            the parent task to apply the rules on
-	 * @param finalize
-	 *            used to indicate, if the rule application shall break up if a
-	 *            rule would be feasible if further data was available, or not.
-	 * @param logIndent
-	 *            simply used for logging purposes to indent the log messages
+	 *
+	 * @param rules the rules
+	 * @param sessions the sessions
+	 * @param logIndent            simply used for logging purposes to indent the log messages
 	 *            depending on the recursion depth of calling this method.
+	 * @return the int
 	 */
 	private int applyRules(ISessionScopeRule[] rules,
@@ -209,13 +197,10 @@
 	 * parameter is always true.
 	 * </p>
-	 * 
-	 * @param parent
-	 *            the parent task to apply the rules on
-	 * @param finalize
-	 *            used to indicate, if the rule application shall break up if a
-	 *            rule would be feasible if further data was available, or not.
-	 * @param logIndent
-	 *            simply used for logging purposes to indent the log messages
+	 *
+	 * @param rules the rules
+	 * @param taskInstance the task instance
+	 * @param logIndent            simply used for logging purposes to indent the log messages
 	 *            depending on the recursion depth of calling this method.
+	 * @return the int
 	 */
 	private int applyRules(ITaskInstanceScopeRule[] rules,
@@ -267,7 +252,6 @@
 	 * the rule application.
 	 * </p>
-	 * 
-	 * @param taskFactory
-	 *            the task factory to be used for instantiating new tasks.
+	 *
+	 * @param sessions the sessions
 	 */
 	public void applyRules(List<IUserSession> sessions) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/DefaultTaskInstanceTraversingVisitor.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/DefaultTaskInstanceTraversingVisitor.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/DefaultTaskInstanceTraversingVisitor.java	(revision 1734)
@@ -15,10 +15,11 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
  * Default implementation for a task instance visitor performing a traversal of
  * the instances
- * </p>
- * 
+ * </p>.
+ *
  * @author Patrick Harms
  */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/DefaultTaskTraversingVisitor.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/DefaultTaskTraversingVisitor.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/DefaultTaskTraversingVisitor.java	(revision 1734)
@@ -15,9 +15,10 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
  * Default implementation for a task visitor performing a traversal of the task
- * </p>
- * 
+ * </p>.
+ *
  * @author Patrick Harms
  */
@@ -49,8 +50,7 @@
 	 * <p>
 	 * common implementation for traversing a marking temporal relationship
-	 * </p>
-	 * 
-	 * @param relationship
-	 *            the marking temporal relationship to be traversed
+	 * </p>.
+	 *
+	 * @param relationship            the marking temporal relationship to be traversed
 	 */
 	public void visit(IMarkingTemporalRelationship relationship) {
@@ -94,8 +94,7 @@
 	 * <p>
 	 * common implementation for traversing a structuring temporal relationship
-	 * </p>
-	 * 
-	 * @param relationship
-	 *            the structuring temporal relationship to be traversed
+	 * </p>.
+	 *
+	 * @param relationship            the structuring temporal relationship to be traversed
 	 */
 	public void visit(IStructuringTemporalRelationship relationship) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IEventTask.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IEventTask.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IEventTask.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IEventTaskInstance.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IEventTaskInstance.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IEventTaskInstance.java	(revision 1734)
@@ -17,4 +17,5 @@
 import de.ugoe.cs.autoquest.eventcore.Event;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -41,6 +42,6 @@
 	 * <p>
 	 * returns the event represented by this event task instance
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return as described
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IIteration.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IIteration.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IIteration.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IIterationInstance.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IIterationInstance.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IIterationInstance.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -30,6 +31,6 @@
 	 * clones this task instance by creating exact clones of each contained
 	 * instance in their order
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return a clone of the task instance list
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IMarkingTemporalRelationship.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IMarkingTemporalRelationship.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IMarkingTemporalRelationship.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IOptional.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IOptional.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IOptional.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IOptionalInstance.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IOptionalInstance.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IOptionalInstance.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -31,6 +32,6 @@
 	 * clones this task instance by creating exact clones of each contained
 	 * instance
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return a clone of the task instance
 	 */
@@ -42,6 +43,6 @@
 	 * returns the child of the optional of null if the optional was not
 	 * executed
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return as described
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISelection.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISelection.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISelection.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISelectionInstance.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISelectionInstance.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISelectionInstance.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -29,6 +30,6 @@
 	 * clones this task instance by creating exact clones of the contained
 	 * instance
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return a clone of the task instance
 	 */
@@ -39,6 +40,6 @@
 	 * <p>
 	 * returns the selected child of the selection
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return as described
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISequence.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISequence.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISequence.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISequenceInstance.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISequenceInstance.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ISequenceInstance.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -29,6 +30,6 @@
 	 * clones this task instance by creating exact clones of each contained
 	 * instance in their order
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return a clone of the task instance
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IStructuringTemporalRelationship.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IStructuringTemporalRelationship.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IStructuringTemporalRelationship.java	(revision 1734)
@@ -17,4 +17,5 @@
 import java.util.List;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITask.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITask.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITask.java	(revision 1734)
@@ -18,4 +18,5 @@
 import java.util.Collection;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -63,5 +64,6 @@
 	 * of it.
 	 * </p>
-	 * 
+	 *
+	 * @param task the task
 	 * @return as described
 	 */
@@ -101,6 +103,6 @@
 	 * <p>
 	 * returns a collection of all observed instances of this task
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return as described
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskBuilder.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskBuilder.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskBuilder.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -45,10 +46,8 @@
 	 * <p>
 	 * adds a child task to a selection
-	 * </p>
-	 * 
-	 * @param parent
-	 *            the selection to add the child to
-	 * @param child
-	 *            the child to be added
+	 * </p>.
+	 *
+	 * @param parent            the selection to add the child to
+	 * @param child            the child to be added
 	 */
 	void addChild(ISelection parent, ITask child);
@@ -57,15 +56,10 @@
 	 * <p>
 	 * adds a child task to a specific index of a sequence
-	 * </p>
-	 * 
-	 * @param parent
-	 *            the sequence to add the child to
-	 * @param index
-	 *            the index to set the child at
-	 * @param child
-	 *            the child to be added
-	 * 
-	 * @throws IndexOutOfBoundsException
-	 *             if the index is invalid
+	 * </p>.
+	 *
+	 * @param parent            the sequence to add the child to
+	 * @param index            the index to set the child at
+	 * @param child            the child to be added
+	 * @throws IndexOutOfBoundsException             if the index is invalid
 	 */
 	void addChild(ISequence parent, int index, ITask child)
@@ -75,10 +69,8 @@
 	 * <p>
 	 * adds a child task to the end of a sequence
-	 * </p>
-	 * 
-	 * @param parent
-	 *            the sequence to add the child to
-	 * @param child
-	 *            the child to be added
+	 * </p>.
+	 *
+	 * @param parent            the sequence to add the child to
+	 * @param child            the child to be added
 	 */
 	void addChild(ISequence parent, ITask child);
@@ -105,10 +97,8 @@
 	 * <p>
 	 * adds a task instance to a user session
-	 * </p>
-	 *
-	 * @param session
-	 *            the session to add the task instance to
-	 * @param taskInstance
-	 *            the task instance to add
+	 * </p>.
+	 *
+	 * @param session            the session to add the task instance to
+	 * @param taskInstance            the task instance to add
 	 */
 	void addExecutedTask(IUserSession session, ITaskInstance taskInstance);
@@ -136,10 +126,8 @@
 	 * <p>
 	 * adds a task instance to a task instance list
-	 * </p>
-	 * 
-	 * @param taskInstanceList
-	 *            the list to add the task instance to
-	 * @param taskInstance
-	 *            the task instance to add
+	 * </p>.
+	 *
+	 * @param taskInstanceList            the list to add the task instance to
+	 * @param taskInstance            the task instance to add
 	 */
 	void addTaskInstance(ITaskInstanceList taskInstanceList,
@@ -162,13 +150,9 @@
 	 * <p>
 	 * removes the child of a sequence at a specific position
-	 * </p>
-	 * 
-	 * @param parent
-	 *            the sequence of which the child must be removed
-	 * @param index
-	 *            the index of the child to be removed
-	 * 
-	 * @throws IndexOutOfBoundsException
-	 *             if the index is invalid
+	 * </p>.
+	 *
+	 * @param parent            the sequence of which the child must be removed
+	 * @param index            the index of the child to be removed
+	 * @throws IndexOutOfBoundsException             if the index is invalid
 	 */
 	void removeChild(ISequence parent, int index)
@@ -178,13 +162,9 @@
 	 * <p>
 	 * removes the entry of a task instance list at a specific position
-	 * </p>
-	 * 
-	 * @param taskInstanceList
-	 *            the task instance list of which the entry must be removed
-	 * @param index
-	 *            the index of the entry to be removed
-	 * 
-	 * @throws IndexOutOfBoundsException
-	 *             if the index is invalid
+	 * </p>.
+	 *
+	 * @param taskInstanceList            the task instance list of which the entry must be removed
+	 * @param index            the index of the entry to be removed
+	 * @throws IndexOutOfBoundsException             if the index is invalid
 	 */
 	void removeTaskInstance(ITaskInstanceList taskInstanceList, int index)
@@ -196,14 +176,8 @@
 	 * the child is not found (comparison using equals).
 	 * </p>
-	 * 
-	 * @param parent
-	 *            the selection of which the child must be replace
-	 * @param oldChild
-	 *            the child to replace
-	 * @param newChild
-	 *            the replacement for the child
-	 * 
-	 * @throws as
-	 *             described
+	 *
+	 * @param parent            the selection of which the child must be replace
+	 * @param oldChild            the child to replace
+	 * @param newChild            the replacement for the child
 	 */
 	void replaceChild(ISelection parent, ITask oldChild, ITask newChild);
@@ -248,15 +222,10 @@
 	 * <p>
 	 * replaces the child task of a sequence at a specific position
-	 * </p>
-	 * 
-	 * @param parent
-	 *            the sequence to replace the child in
-	 * @param index
-	 *            the index to replace the child at
-	 * @param child
-	 *            the child to be added
-	 * 
-	 * @throws IndexOutOfBoundsException
-	 *             if the index is invalid
+	 * </p>.
+	 *
+	 * @param parent            the sequence to replace the child in
+	 * @param index            the index to replace the child at
+	 * @param child            the child to be added
+	 * @throws IndexOutOfBoundsException             if the index is invalid
 	 */
 	void setChild(ISequence parent, int index, ITask child)
@@ -266,10 +235,8 @@
 	 * <p>
 	 * sets the child task of an iteration
-	 * </p>
-	 * 
-	 * @param iteration
-	 *            the iteration to set the child of
-	 * @param child
-	 *            the child to be set
+	 * </p>.
+	 *
+	 * @param iteration            the iteration to set the child of
+	 * @param child            the child to be set
 	 */
 	void setMarkedTask(IIteration iteration, ITask child);
@@ -278,10 +245,8 @@
 	 * <p>
 	 * sets the child task of an optional
-	 * </p>
-	 * 
-	 * @param optional
-	 *            the optional to set the child of
-	 * @param child
-	 *            the child to be set
+	 * </p>.
+	 *
+	 * @param optional            the optional to set the child of
+	 * @param child            the child to be set
 	 */
 	void setMarkedTask(IOptional optional, ITask child);
@@ -290,10 +255,8 @@
 	 * <p>
 	 * sets the task model of a task instance
-	 * </p>
-	 * 
-	 * @param taskInstance
-	 *            the task instance to set the task model for
-	 * @param task
-	 *            the task model of the instance
+	 * </p>.
+	 *
+	 * @param taskInstance            the task instance to set the task model for
+	 * @param task            the task model of the instance
 	 */
 	void setTask(ITaskInstance taskInstance, ITask task);
@@ -302,15 +265,10 @@
 	 * <p>
 	 * sets a task instance in a task instance list at a specific position
-	 * </p>
-	 * 
-	 * @param taskInstanceList
-	 *            the list to set the task instance in
-	 * @param index
-	 *            the index of the task instance to replace
-	 * @param taskInstance
-	 *            the replacement for the task instance at the index
-	 * 
-	 * @throws IndexOutOfBoundsException
-	 *             if the index is invalid
+	 * </p>.
+	 *
+	 * @param taskInstanceList            the list to set the task instance in
+	 * @param index            the index of the task instance to replace
+	 * @param taskInstance            the replacement for the task instance at the index
+	 * @throws IndexOutOfBoundsException             if the index is invalid
 	 */
 	void setTaskInstance(ITaskInstanceList taskInstanceList, int index,
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskFactory.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskFactory.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskFactory.java	(revision 1734)
@@ -19,9 +19,10 @@
 import de.ugoe.cs.autoquest.eventcore.Event;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
  * factory for the different task types
- * </p>
- * 
+ * </p>.
+ *
  * @author Patrick Harms
  */
@@ -31,9 +32,7 @@
 	 * <p>
 	 * creates a new event task with the given description
-	 * </p>
-	 * 
-	 * @param description
-	 *            the description for the represented events
-	 * 
+	 * </p>.
+	 *
+	 * @param description            the description for the represented events
 	 * @return the event task
 	 */
@@ -43,6 +42,6 @@
 	 * <p>
 	 * creates a new empty iteration
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return the iteration
 	 */
@@ -52,6 +51,6 @@
 	 * <p>
 	 * creates a new empty optional
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return the optional
 	 */
@@ -61,6 +60,6 @@
 	 * <p>
 	 * creates a new empty selection
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return the selection
 	 */
@@ -70,6 +69,6 @@
 	 * <p>
 	 * creates a new empty sequence
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return the sequence
 	 */
@@ -80,11 +79,8 @@
 	 * creates a new task instance with the given task as its model representing
 	 * the provided event
-	 * </p>
-	 * 
-	 * @param task
-	 *            the model of the task instance to be created
-	 * @param event
-	 *            the event represented by the task instance
-	 * 
+	 * </p>.
+	 *
+	 * @param task            the model of the task instance to be created
+	 * @param event            the event represented by the task instance
 	 * @return the task instance
 	 */
@@ -94,9 +90,7 @@
 	 * <p>
 	 * creates a new task instance with the given iteration as its model
-	 * </p>
-	 * 
-	 * @param iteration
-	 *            the model of the task instance to be created
-	 * 
+	 * </p>.
+	 *
+	 * @param iteration            the model of the task instance to be created
 	 * @return the task instance
 	 */
@@ -106,9 +100,7 @@
 	 * <p>
 	 * creates a new task instance with the given optional as its model
-	 * </p>
-	 * 
-	 * @param optional
-	 *            the model of the task instance to be created
-	 * 
+	 * </p>.
+	 *
+	 * @param optional            the model of the task instance to be created
 	 * @return the task instance
 	 */
@@ -118,9 +110,7 @@
 	 * <p>
 	 * creates a new task instance with the given selection as its model
-	 * </p>
-	 * 
-	 * @param selection
-	 *            the model of the task instance to be created
-	 * 
+	 * </p>.
+	 *
+	 * @param selection            the model of the task instance to be created
 	 * @return the task instance
 	 */
@@ -130,9 +120,7 @@
 	 * <p>
 	 * creates a new task instance with the given sequence as its model
-	 * </p>
-	 * 
-	 * @param sequence
-	 *            the model of the task instance to be created
-	 * 
+	 * </p>.
+	 *
+	 * @param sequence            the model of the task instance to be created
 	 * @return the task instance
 	 */
@@ -142,9 +130,7 @@
 	 * <p>
 	 * creates a task model based on the provided user sessions
-	 * </p>
-	 * 
-	 * @param userSessions
-	 *            the session based on which the task model shall be created
-	 * 
+	 * </p>.
+	 *
+	 * @param userSessions            the session based on which the task model shall be created
 	 * @return the task model
 	 */
@@ -154,6 +140,6 @@
 	 * <p>
 	 * creates a new empty user session
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return the user session
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInfo.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInfo.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInfo.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -29,6 +30,6 @@
 	 * <p>
 	 * represents a measure for a specific metric
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @author Patrick Harms
 	 */
@@ -38,6 +39,6 @@
 		 * <p>
 		 * returns the metric of the measure
-		 * </p>
-		 * 
+		 * </p>.
+		 *
 		 * @return as described
 		 */
@@ -47,6 +48,6 @@
 		 * <p>
 		 * returns the value of the measure
-		 * </p>
-		 * 
+		 * </p>.
+		 *
 		 * @return as described
 		 */
@@ -58,5 +59,6 @@
 		 * specific context, i.e. parent task
 		 * </p>
-		 * 
+		 *
+		 * @param context the context
 		 * @return as described
 		 */
@@ -68,6 +70,6 @@
 	 * <p>
 	 * returns all available measures
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return as described
 	 */
@@ -77,9 +79,7 @@
 	 * <p>
 	 * returns the value of the measure identified through the given metric
-	 * </p>
+	 * </p>.
 	 *
-	 * @param metric
-	 *            the metric for which the value is to be returned
-	 * 
+	 * @param metric            the metric for which the value is to be returned
 	 * @return as described
 	 */
@@ -105,6 +105,6 @@
 	 * <p>
 	 * returns the task to which these infos belong
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return as described
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstance.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstance.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstance.java	(revision 1734)
@@ -17,4 +17,5 @@
 import java.io.Serializable;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -76,6 +77,6 @@
 	 * returns a hash code for the task instance to be able to put it into hash
 	 * maps
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return as described
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstanceList.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstanceList.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstanceList.java	(revision 1734)
@@ -17,4 +17,5 @@
 import java.io.Serializable;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstanceVisitor.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstanceVisitor.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInstanceVisitor.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskModel.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskModel.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskModel.java	(revision 1734)
@@ -19,4 +19,5 @@
 import java.util.List;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -45,5 +46,5 @@
 	 * returns a list of all metrics calculated by this model for the tasks and
 	 * stored in the respective task infos
-	 * </p>
+	 * </p>.
 	 *
 	 * @return as described
@@ -56,5 +57,6 @@
 	 * if the provided task does not belong to the model.
 	 * </p>
-	 * 
+	 *
+	 * @param task the task
 	 * @return as described
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskVisitor.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskVisitor.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskVisitor.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITemporalRelationship.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITemporalRelationship.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITemporalRelationship.java	(revision 1734)
@@ -15,4 +15,5 @@
 package de.ugoe.cs.autoquest.tasktrees.treeifc;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IUserSession.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IUserSession.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/IUserSession.java	(revision 1734)
@@ -17,4 +17,5 @@
 import java.util.List;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -33,6 +34,6 @@
 	 * clones a user session by creating exact clones of each contained instance
 	 * in their order
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return a clone of the session
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/TaskMetric.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/TaskMetric.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/TaskMetric.java	(revision 1734)
@@ -17,4 +17,5 @@
 import java.text.DecimalFormat;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -28,43 +29,35 @@
 public enum TaskMetric {
 
-	COUNT("count", "number of all occurrences of the task in the model"), DEPTH(
+	/** The count. */
+	COUNT("count", "number of all occurrences of the task in the model"), /** The depth. */
+ DEPTH(
 			"depth",
 			"the maximum depth of the task, i.e., the number of children levels including the "
-					+ "level of the task itself"), EVENT_COVERAGE(
+					+ "level of the task itself"), 
+ /** The event coverage. */
+ EVENT_COVERAGE(
 			"covered events",
-			"number of all event task instances covered by the task"), EVENT_COVERAGE_RATIO(
+			"number of all event task instances covered by the task"), 
+ /** The event coverage ratio. */
+ EVENT_COVERAGE_RATIO(
 			"event coverage ratio",
 			"the ratio of events covered by this task in relation to all events "
 					+ "covered by all tasks in their instances in per mille",
-			0.1, "%"), EVENT_COVERAGE_QUANTILE("event coverage ratio quantile",
+			0.1, "%"), 
+ /** The event coverage quantile. */
+ EVENT_COVERAGE_QUANTILE("event coverage ratio quantile",
 			"the quantile of with respect to all event coverages begining with "
 					+ "the lowest", 0.1, "%");
 
-	/**
-	 * <p>
-	 * the name of the metric
-	 * </p>
-	 */
+	/** <p> the name of the metric </p>. */
 	private String name;
 
-	/**
-	 * <p>
-	 * a human readable description of the metric
-	 * </p>
-	 */
+	/** <p> a human readable description of the metric </p>. */
 	private String description;
 
-	/**
-	 * <p>
-	 * a scale applied for the metric when formatting the value
-	 * </p>
-	 */
+	/** <p> a scale applied for the metric when formatting the value </p>. */
 	private double formatScale;
 
-	/**
-	 * <p>
-	 * the unit of the metric used when formatting the value
-	 * </p>
-	 */
+	/** <p> the unit of the metric used when formatting the value </p>. */
 	private String formatUnit;
 
@@ -72,5 +65,8 @@
 	 * <p>
 	 * initializes the metric with a name and a description
-	 * </p>
+	 * </p>.
+	 *
+	 * @param name the name
+	 * @param description the description
 	 */
 	private TaskMetric(String name, String description) {
@@ -86,4 +82,9 @@
 	 * scale and a unit for formatting it.
 	 * </p>
+	 *
+	 * @param name the name
+	 * @param description the description
+	 * @param formatScale the format scale
+	 * @param formatUnit the format unit
 	 */
 	private TaskMetric(String name, String description, double formatScale,
@@ -100,5 +101,6 @@
 	 * format scale and unit.
 	 * </p>
-	 * 
+	 *
+	 * @param value the value
 	 * @return the formatted value depending on the scale and unit of the metric
 	 */
@@ -124,6 +126,6 @@
 	 * <p>
 	 * returns the human readable description of the metric
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return the human readable description of the metric
 	 */
@@ -135,6 +137,6 @@
 	 * <p>
 	 * returns the name of the metric
-	 * </p>
-	 * 
+	 * </p>.
+	 *
 	 * @return the name of the metric
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/EventTask.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/EventTask.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/EventTask.java	(revision 1734)
@@ -18,4 +18,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -28,9 +29,5 @@
 class EventTask extends Task implements IEventTask {
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
@@ -39,8 +36,7 @@
 	 * simple constructor initializing this task with a description for the
 	 * represented events
-	 * </p>
-	 * 
-	 * @param type
-	 *            a type for the represented events
+	 * </p>.
+	 *
+	 * @param type            a type for the represented events
 	 */
 	EventTask(String type) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/EventTaskInstance.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/EventTaskInstance.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/EventTaskInstance.java	(revision 1734)
@@ -19,4 +19,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -28,16 +29,8 @@
 class EventTaskInstance extends TaskInstance implements IEventTaskInstance {
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
-	/**
-	 * <p>
-	 * the event represented by this instance
-	 * </p>
-	 */
+	/** <p> the event represented by this instance </p>. */
 	private final Event event;
 
@@ -46,10 +39,8 @@
 	 * initializes this instance with the respective task model and the
 	 * represented event
-	 * </p>
+	 * </p>.
 	 *
-	 * @param task
-	 *            the task of which this is an instance
-	 * @param event
-	 *            the event represented by this instance
+	 * @param task            the task of which this is an instance
+	 * @param event            the event represented by this instance
 	 */
 	EventTaskInstance(IEventTask task, Event event) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Iteration.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Iteration.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Iteration.java	(revision 1734)
@@ -19,4 +19,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -29,9 +30,5 @@
 class Iteration extends MarkingTemporalRelationship implements IIteration {
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
@@ -40,5 +37,5 @@
 	 * simple constructor providing the base class with a human readable name of
 	 * the type of this task
-	 * </p>
+	 * </p>.
 	 */
 	Iteration() {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/IterationInstance.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/IterationInstance.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/IterationInstance.java	(revision 1734)
@@ -24,4 +24,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -33,16 +34,8 @@
 class IterationInstance extends TaskInstance implements IIterationInstance {
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
-	/**
-	 * <p>
-	 * the children of this task instance which are task instances, as well
-	 * </p>
-	 */
+	/** <p> the children of this task instance which are task instances, as well </p>. */
 	private List<ITaskInstance> children;
 
@@ -50,8 +43,7 @@
 	 * <p>
 	 * initializes this instance with the respective task model
-	 * </p>
+	 * </p>.
 	 *
-	 * @param task
-	 *            the task of which this is an instance
+	 * @param task            the task of which this is an instance
 	 */
 	IterationInstance(IIteration task) {
@@ -62,10 +54,8 @@
 	 * <p>
 	 * used to add a child to this task instance at a specific position
-	 * </p>
-	 * 
-	 * @param index
-	 *            the position of the new child in the list of children
-	 * @param child
-	 *            the new child of this instance
+	 * </p>.
+	 *
+	 * @param index            the position of the new child in the list of children
+	 * @param child            the new child of this instance
 	 */
 	synchronized void addChild(int index, ITaskInstance child) {
@@ -80,8 +70,7 @@
 	 * <p>
 	 * used to add a child to this task instance
-	 * </p>
-	 * 
-	 * @param child
-	 *            the new child of this instance
+	 * </p>.
+	 *
+	 * @param child            the new child of this instance
 	 */
 	synchronized void addChild(ITaskInstance child) {
@@ -132,4 +121,9 @@
 	 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance#getChildren()
 	 */
+	/**
+	 * Gets the children.
+	 *
+	 * @return the children
+	 */
 	public synchronized List<ITaskInstance> getChildren() {
 		if (children == null) {
@@ -164,9 +158,7 @@
 	 * <p>
 	 * removes a child from this task instance at a specific position
-	 * </p>
-	 * 
-	 * @param index
-	 *            the position of the child to be removed
-	 * 
+	 * </p>.
+	 *
+	 * @param index            the position of the child to be removed
 	 * @return the child removed from the children of this instance
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/MarkingTemporalRelationship.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/MarkingTemporalRelationship.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/MarkingTemporalRelationship.java	(revision 1734)
@@ -18,4 +18,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -30,16 +31,8 @@
 		IMarkingTemporalRelationship {
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
-	/**
-	 * <p>
-	 * the task marked through this marking temporal relationship
-	 * </p>
-	 */
+	/** <p> the task marked through this marking temporal relationship </p>. */
 	private ITask markedTask;
 
@@ -47,8 +40,7 @@
 	 * <p>
 	 * initializes this temporal relationship with a human readable name
-	 * </p>
+	 * </p>.
 	 *
-	 * @param relationshipType
-	 *            the human readable name of this temporal relationship
+	 * @param relationshipType            the human readable name of this temporal relationship
 	 */
 	MarkingTemporalRelationship(String relationshipType) {
@@ -92,8 +84,7 @@
 	 * <p>
 	 * used to set the marked task
-	 * </p>
-	 * 
-	 * @param markedTask
-	 *            the marked task to set
+	 * </p>.
+	 *
+	 * @param markedTask            the marked task to set
 	 */
 	protected void setMarkedTask(ITask markedTask) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Optional.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Optional.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Optional.java	(revision 1734)
@@ -18,4 +18,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -28,9 +29,5 @@
 class Optional extends MarkingTemporalRelationship implements IOptional {
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
@@ -39,5 +36,5 @@
 	 * simple constructor providing the base class with a human readable name of
 	 * the type of this task
-	 * </p>
+	 * </p>.
 	 */
 	Optional() {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/OptionalInstance.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/OptionalInstance.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/OptionalInstance.java	(revision 1734)
@@ -20,4 +20,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -29,16 +30,8 @@
 class OptionalInstance extends TaskInstance implements IOptionalInstance {
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
-	/**
-	 * <p>
-	 * the child of this task instance if any
-	 * </p>
-	 */
+	/** <p> the child of this task instance if any </p>. */
 	private ITaskInstance child;
 
@@ -46,8 +39,7 @@
 	 * <p>
 	 * initializes this instance with the respective task model
-	 * </p>
+	 * </p>.
 	 *
-	 * @param task
-	 *            the task of which this is an instance
+	 * @param task            the task of which this is an instance
 	 */
 	OptionalInstance(ITask task) {
@@ -95,8 +87,7 @@
 	 * <p>
 	 * used to set the child of this task instance
-	 * </p>
-	 * 
-	 * @param child
-	 *            the new child of this instance
+	 * </p>.
+	 *
+	 * @param child            the new child of this instance
 	 */
 	void setChild(ITaskInstance child) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Selection.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Selection.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Selection.java	(revision 1734)
@@ -18,4 +18,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -28,9 +29,5 @@
 class Selection extends StructuringTemporalRelationship implements ISelection {
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
@@ -39,5 +36,5 @@
 	 * simple constructor providing the base class with a human readable name of
 	 * the type of this task
-	 * </p>
+	 * </p>.
 	 */
 	Selection() {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/SelectionInstance.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/SelectionInstance.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/SelectionInstance.java	(revision 1734)
@@ -20,4 +20,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -29,16 +30,8 @@
 class SelectionInstance extends TaskInstance implements ISelectionInstance {
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
-	/**
-	 * <p>
-	 * the child of this task instance
-	 * </p>
-	 */
+	/** <p> the child of this task instance </p>. */
 	private ITaskInstance child;
 
@@ -46,8 +39,7 @@
 	 * <p>
 	 * initializes this instance with the respective task model
-	 * </p>
+	 * </p>.
 	 *
-	 * @param task
-	 *            the task of which this is an instance
+	 * @param task            the task of which this is an instance
 	 */
 	SelectionInstance(ITask task) {
@@ -95,8 +87,7 @@
 	 * <p>
 	 * used to set the child of this task instance
-	 * </p>
-	 * 
-	 * @param child
-	 *            the new child of this instance
+	 * </p>.
+	 *
+	 * @param child            the new child of this instance
 	 */
 	void setChild(ITaskInstance child) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Sequence.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Sequence.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Sequence.java	(revision 1734)
@@ -17,4 +17,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -27,9 +28,5 @@
 class Sequence extends StructuringTemporalRelationship implements ISequence {
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
@@ -38,5 +35,5 @@
 	 * simple constructor providing the base class with a human readable name of
 	 * the type of this task
-	 * </p>
+	 * </p>.
 	 */
 	Sequence() {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/SequenceInstance.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/SequenceInstance.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/SequenceInstance.java	(revision 1734)
@@ -25,4 +25,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -34,16 +35,8 @@
 class SequenceInstance extends TaskInstance implements ISequenceInstance {
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
-	/**
-	 * <p>
-	 * the children of this task instance which are task instances, as well
-	 * </p>
-	 */
+	/** <p> the children of this task instance which are task instances, as well </p>. */
 	private List<ITaskInstance> children;
 
@@ -51,8 +44,7 @@
 	 * <p>
 	 * initializes this instance with the respective task model
-	 * </p>
+	 * </p>.
 	 *
-	 * @param task
-	 *            the task of which this is an instance
+	 * @param task            the task of which this is an instance
 	 */
 	SequenceInstance(ISequence task) {
@@ -63,10 +55,8 @@
 	 * <p>
 	 * used to add a child to this task instance at a specific position
-	 * </p>
-	 * 
-	 * @param index
-	 *            the position of the new child in the list of children
-	 * @param child
-	 *            the new child of this instance
+	 * </p>.
+	 *
+	 * @param index            the position of the new child in the list of children
+	 * @param child            the new child of this instance
 	 */
 	synchronized void addChild(int index, ITaskInstance child) {
@@ -81,8 +71,7 @@
 	 * <p>
 	 * used to add a child to this task instance
-	 * </p>
-	 * 
-	 * @param child
-	 *            the new child of this instance
+	 * </p>.
+	 *
+	 * @param child            the new child of this instance
 	 */
 	synchronized void addChild(ITaskInstance child) {
@@ -133,4 +122,9 @@
 	 * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance#getChildren()
 	 */
+	/**
+	 * Gets the children.
+	 *
+	 * @return the children
+	 */
 	public synchronized List<ITaskInstance> getChildren() {
 		if (children == null) {
@@ -165,9 +159,7 @@
 	 * <p>
 	 * removes a child from this task instance at a specific position
-	 * </p>
-	 * 
-	 * @param index
-	 *            the position of the child to be removed
-	 * 
+	 * </p>.
+	 *
+	 * @param index            the position of the child to be removed
 	 * @return the child removed from the children of this instance
 	 */
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/StructuringTemporalRelationship.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/StructuringTemporalRelationship.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/StructuringTemporalRelationship.java	(revision 1734)
@@ -21,4 +21,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -33,16 +34,8 @@
 		IStructuringTemporalRelationship {
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
-	/**
-	 * <p>
-	 * the list of children of this temporal relationship
-	 * </p>
-	 */
+	/** <p> the list of children of this temporal relationship </p>. */
 	private List<ITask> children = new LinkedList<ITask>();
 
@@ -50,8 +43,7 @@
 	 * <p>
 	 * initializes this temporal relationship with a human readable name
-	 * </p>
+	 * </p>.
 	 *
-	 * @param relationshipType
-	 *            the human readable name of this temporal relationship
+	 * @param relationshipType            the human readable name of this temporal relationship
 	 */
 	StructuringTemporalRelationship(String relationshipType) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Task.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Task.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/Task.java	(revision 1734)
@@ -30,4 +30,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -58,9 +59,5 @@
 	}
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
@@ -81,30 +78,14 @@
 	private final int id;
 
-	/**
-	 * <p>
-	 * a human readable type of the task (used for visualization purposes)
-	 * </p>
-	 */
+	/** <p> a human readable type of the task (used for visualization purposes) </p>. */
 	private final String type;
 
-	/**
-	 * <p>
-	 * a human readable description of the task
-	 * </p>
-	 */
+	/** <p> a human readable description of the task </p>. */
 	private String description;
 
-	/**
-	 * <p>
-	 * the instances of this task
-	 * </p>
-	 */
+	/** <p> the instances of this task </p>. */
 	private final Collection<ITaskInstance> instances = new HashSet<ITaskInstance>();
 
-	/**
-	 * <p>
-	 * the execution variants of this task
-	 * </p>
-	 */
+	/** <p> the execution variants of this task </p>. */
 	private Collection<Collection<ITaskInstance>> executionVariants;
 
@@ -114,10 +95,6 @@
 	 * {@link #getNewId()} method
 	 * </p>
-	 * 
-	 * @param type
-	 *            the human readable type of the task
-	 * 
-	 * @throws IllegalArgumentException
-	 *             in the case the provided type is null
+	 *
+	 * @param type            the human readable type of the task
 	 */
 	Task(String type) {
@@ -143,8 +120,7 @@
 	 * <p>
 	 * internally used to add an instance to this task
-	 * </p>
-	 * 
-	 * @param instance
-	 *            the instance belonging to this task
+	 * </p>.
+	 *
+	 * @param instance            the instance belonging to this task
 	 */
 	synchronized void addInstance(ITaskInstance instance) {
@@ -172,5 +148,7 @@
 
 	/**
-	 *
+	 * Determine execution variants.
+	 *
+	 * @param executionVariants the execution variants
 	 */
 	private void determineExecutionVariants(
@@ -273,5 +251,9 @@
 
 	/**
-	 *
+	 * Checks if is same execution.
+	 *
+	 * @param instance1 the instance1
+	 * @param instance2 the instance2
+	 * @return true, if is same execution
 	 */
 	private boolean isSameExecution(ITaskInstance instance1,
@@ -327,5 +309,9 @@
 
 	/**
-	 *
+	 * Checks if is same execution list.
+	 *
+	 * @param list1 the list1
+	 * @param list2 the list2
+	 * @return true, if is same execution list
 	 */
 	private boolean isSameExecutionList(ITaskInstanceList list1,
@@ -347,8 +333,7 @@
 	 * <p>
 	 * internally used to remove an instance from this task
-	 * </p>
-	 * 
-	 * @param instance
-	 *            the instance to be removed from this task
+	 * </p>.
+	 *
+	 * @param instance            the instance to be removed from this task
 	 */
 	synchronized void removeInstance(ITaskInstance instance) {
@@ -360,8 +345,7 @@
 	 * <p>
 	 * internally used to set the human readable description of the task
-	 * </p>
-	 * 
-	 * @param description
-	 *            the new human readable description of the task
+	 * </p>.
+	 *
+	 * @param description            the new human readable description of the task
 	 */
 	void setDescription(String description) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskBuilder.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskBuilder.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskBuilder.java	(revision 1734)
@@ -33,4 +33,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -51,4 +52,12 @@
 	 * @see ITaskBuilder#addChild(IIterationInstance, int, ITaskInstance)
 	 */
+	/**
+	 * Adds the child.
+	 *
+	 * @param instance the instance
+	 * @param index the index
+	 * @param child the child
+	 * @throws IllegalArgumentException the illegal argument exception
+	 */
 	public void addChild(IIterationInstance instance, int index,
 			ITaskInstance child) throws IllegalArgumentException {
@@ -170,4 +179,12 @@
 	 * 
 	 * @see ITaskBuilder#addChild(ISequenceInstance, int, ITaskInstance)
+	 */
+	/**
+	 * Adds the child.
+	 *
+	 * @param instance the instance
+	 * @param index the index
+	 * @param child the child
+	 * @throws IllegalArgumentException the illegal argument exception
 	 */
 	public void addChild(ISequenceInstance instance, int index,
@@ -247,4 +264,8 @@
 	 * relationship including a check for the child type.
 	 * </p>
+	 *
+	 * @param parent the parent
+	 * @param index the index
+	 * @param child the child
 	 */
 	private void addChildInternal(StructuringTemporalRelationship parent,
@@ -266,4 +287,11 @@
 	 * 
 	 * @see ITaskBuilder#addExecutedTask(IUserSession, int, ITaskInstance)
+	 */
+	/**
+	 * Adds the executed task.
+	 *
+	 * @param session the session
+	 * @param index the index
+	 * @param taskInstance the task instance
 	 */
 	public void addExecutedTask(IUserSession session, int index,
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskFactory.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskFactory.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskFactory.java	(revision 1734)
@@ -32,4 +32,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInfo.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInfo.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInfo.java	(revision 1734)
@@ -22,4 +22,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.TaskMetric;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -42,23 +43,11 @@
 	private static class Measure implements IMeasure {
 
-		/**
-		 * <p>
-		 * the metric to which the measure belongs
-		 * </p>
-		 */
+		/** <p> the metric to which the measure belongs </p>. */
 		private final TaskMetric metric;
 
-		/**
-		 * <p>
-		 * the observed values for the difference contexts of the task
-		 * </p>
-		 */
+		/** <p> the observed values for the difference contexts of the task </p>. */
 		private HashMap<ITask, Integer> values;
 
-		/**
-		 * <p>
-		 * the context free value of the measure independent of the task context
-		 * </p>
-		 */
+		/** <p> the context free value of the measure independent of the task context </p>. */
 		private int contextFreeValue = 0;
 
@@ -66,5 +55,7 @@
 		 * <p>
 		 * initializes the measure with a specific metric
-		 * </p>
+		 * </p>.
+		 *
+		 * @param metric the metric
 		 */
 		private Measure(TaskMetric metric) {
@@ -119,5 +110,8 @@
 		 * increases the value of the measure context free as well as specific
 		 * to the provided context according to the provided increment
-		 * </p>
+		 * </p>.
+		 *
+		 * @param context the context
+		 * @param increment the increment
 		 */
 		private void increase(ITask context, int increment) {
@@ -143,5 +137,8 @@
 		 * sets the value of the measure context free as well as specific to the
 		 * provided context
-		 * </p>
+		 * </p>.
+		 *
+		 * @param context the context
+		 * @param value the value
 		 */
 		private void set(ITask context, int value) {
@@ -159,16 +156,8 @@
 	}
 
-	/**
-	 * <p>
-	 * the task to which the infos belong
-	 * </p>
-	 */
+	/** <p> the task to which the infos belong </p>. */
 	private final ITask task;
 
-	/**
-	 * <p>
-	 * all available measures for the task
-	 * </p>
-	 */
+	/** <p> all available measures for the task </p>. */
 	private final ArrayList<Measure> measures = new ArrayList<Measure>();
 
@@ -177,6 +166,6 @@
 	 * initialized the task infos with the task to which they belong.
 	 * </p>
-	 * 
-	 * @param task
+	 *
+	 * @param task the task
 	 */
 	TaskInfo(ITask task) {
@@ -209,5 +198,8 @@
 	 * convenience method to internally determine the measure for a specific
 	 * metric
-	 * </p>
+	 * </p>.
+	 *
+	 * @param metric the metric
+	 * @return the measure
 	 */
 	private Measure getMeasure(TaskMetric metric) {
@@ -282,12 +274,9 @@
 	 * increases a specific value for a measure of a specific metric in the
 	 * provided context of the task
-	 * </p>
-	 * 
-	 * @param metric
-	 *            the metric to which the value belongs
-	 * @param context
-	 *            the context of the task in which the measure was recorded
-	 * @param increment
-	 *            the increment to be added to the value of the measure
+	 * </p>.
+	 *
+	 * @param metric            the metric to which the value belongs
+	 * @param context            the context of the task in which the measure was recorded
+	 * @param increment            the increment to be added to the value of the measure
 	 */
 	void increaseCount(TaskMetric metric, ITask context, int increment) {
@@ -307,12 +296,9 @@
 	 * sets a specific value for a measure of a specific metric in the provided
 	 * context of the task
-	 * </p>
-	 * 
-	 * @param metric
-	 *            the metric to which the value belongs
-	 * @param context
-	 *            the context of the task in which the measure was recorded
-	 * @param value
-	 *            the value of the measure
+	 * </p>.
+	 *
+	 * @param metric            the metric to which the value belongs
+	 * @param context            the context of the task in which the measure was recorded
+	 * @param value            the value of the measure
 	 */
 	void setCount(TaskMetric metric, ITask context, int value) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInstance.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInstance.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInstance.java	(revision 1734)
@@ -19,4 +19,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstanceVisitor;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -47,9 +48,5 @@
 	}
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
@@ -62,9 +59,5 @@
 	private static int temporalId = 0;
 
-	/**
-	 * <p>
-	 * the task instantiated by this task instance
-	 * </p>
-	 */
+	/** <p> the task instantiated by this task instance </p>. */
 	private ITask task;
 
@@ -83,4 +76,6 @@
 	 * {@link #getNewId()}.
 	 * </p>
+	 *
+	 * @param task the task
 	 */
 	TaskInstance(ITask task) {
@@ -156,8 +151,7 @@
 	 * <p>
 	 * used to update the task represented through this instance
-	 * </p>
-	 * 
-	 * @param task
-	 *            the task to set
+	 * </p>.
+	 *
+	 * @param task            the task to set
 	 */
 	void setTask(ITask task) {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskModel.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskModel.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskModel.java	(revision 1734)
@@ -40,4 +40,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.TaskMetric;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -63,10 +64,5 @@
 	private static class TaskModelIndex {
 
-		/**
-		 * <p>
-		 * the tasks contained in the user session belonging to the model as
-		 * well as statistical infos about them
-		 * </p>
-		 */
+		/** <p> the tasks contained in the user session belonging to the model as well as statistical infos about them </p>. */
 		private final Map<ITask, TaskInfo> taskMap = new HashMap<ITask, TaskInfo>();
 
@@ -75,5 +71,8 @@
 		 * internal convenience method to build the task model during
 		 * initialization
-		 * </p>
+		 * </p>.
+		 *
+		 * @param task the task
+		 * @param context the context
 		 */
 		private void ensureTaskInfo(ITask task, ITask context) {
@@ -101,4 +100,9 @@
 		 * to the parameters.
 		 * </p>
+		 *
+		 * @param task the task
+		 * @param context the context
+		 * @param eventTaskInstancesCovered the event task instances covered
+		 * @param depth the depth
 		 */
 		private void ensureTaskInfo(ITask task, ITask context,
@@ -126,5 +130,8 @@
 		 * <p>
 		 * internal convenience method to calculate the maximum depth of a task
-		 * </p>
+		 * </p>.
+		 *
+		 * @param task the task
+		 * @return the depth
 		 */
 		private int getDepth(ITask task) {
@@ -151,5 +158,9 @@
 		 * called on initialization to fill the index with infos about the given
 		 * task instance as well as to calculate the appropriate metrics
-		 * </p>
+		 * </p>.
+		 *
+		 * @param taskInstance the task instance
+		 * @param context the context
+		 * @return the int[]
 		 */
 		private int[] handleTaskInstance(ITaskInstance taskInstance,
@@ -235,33 +246,16 @@
 	}
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
-	/**
-	 * <p>
-	 * all metrics calculated by this type of task model
-	 * </p>
-	 */
+	/** <p> all metrics calculated by this type of task model </p>. */
 	private static final TaskMetric[] taskMetrics = new TaskMetric[] {
 			TaskMetric.COUNT, TaskMetric.DEPTH, TaskMetric.EVENT_COVERAGE,
 			TaskMetric.EVENT_COVERAGE_RATIO, TaskMetric.EVENT_COVERAGE_QUANTILE };
 
-	/**
-	 * <p>
-	 * the user sessions belonging to the model
-	 * </p>
-	 */
+	/** <p> the user sessions belonging to the model </p>. */
 	private final List<IUserSession> userSessions;
 
-	/**
-	 * <p>
-	 * index for effectively accessing the model and calculating statistics
-	 * about it
-	 * </p>
-	 */
+	/** <p> index for effectively accessing the model and calculating statistics about it </p>. */
 	private transient TaskModelIndex index = null;
 
@@ -270,8 +264,7 @@
 	 * initializes the task model with the user sessions out of which the tasks
 	 * are extracted
-	 * </p>
-	 * 
-	 * @param userSessions
-	 *            as described
+	 * </p>.
+	 *
+	 * @param userSessions            as described
 	 */
 	TaskModel(List<IUserSession> userSessions) {
@@ -297,5 +290,5 @@
 	 * internal convenience method that initializes the internal index and
 	 * calculates all measures for metrics available for the tasks
-	 * </p>
+	 * </p>.
 	 */
 	private synchronized void ensureInitialized() {
Index: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/UserSession.java
===================================================================
--- branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/UserSession.java	(revision 1733)
+++ branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/UserSession.java	(revision 1734)
@@ -24,4 +24,5 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession;
 
+// TODO: Auto-generated Javadoc
 /**
  * <p>
@@ -34,16 +35,8 @@
 class UserSession implements IUserSession {
 
-	/**
-	 * <p>
-	 * default serial version UID
-	 * </p>
-	 */
+	/** <p> default serial version UID </p>. */
 	private static final long serialVersionUID = 1L;
 
-	/**
-	 * <p>
-	 * the task instances belonging to the user session
-	 * </p>
-	 */
+	/** <p> the task instances belonging to the user session </p>. */
 	private List<ITaskInstance> executedTasks = new ArrayList<ITaskInstance>();
 
@@ -52,10 +45,8 @@
 	 * used internally to add a task instance to the user session at a specific
 	 * position
-	 * </p>
-	 * 
-	 * @param index
-	 *            the index the task instance shall be added to
-	 * @param taskInstance
-	 *            the task instance to be added
+	 * </p>.
+	 *
+	 * @param index            the index the task instance shall be added to
+	 * @param taskInstance            the task instance to be added
 	 */
 	void addExecutedTask(int index, ITaskInstance taskInstance) {
@@ -66,8 +57,7 @@
 	 * <p>
 	 * used internally to add a task instance to the user session
-	 * </p>
-	 * 
-	 * @param taskInstance
-	 *            the task instance to be added
+	 * </p>.
+	 *
+	 * @param taskInstance            the task instance to be added
 	 */
 	void addExecutedTask(ITaskInstance taskInstance) {
@@ -159,8 +149,7 @@
 	 * <p>
 	 * used internally to remove a task instance from the user session
-	 * </p>
-	 * 
-	 * @param index
-	 *            the index of the task instance to be removed
+	 * </p>.
+	 *
+	 * @param index            the index of the task instance to be removed
 	 */
 	void removeExecutedTask(int index) {
