Index: branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/PairwiseAlignmentGenerator.java
===================================================================
--- branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/PairwiseAlignmentGenerator.java	(revision 1615)
+++ branches/ralph/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/matrix/PairwiseAlignmentGenerator.java	(revision 1617)
@@ -10,73 +10,63 @@
 public class PairwiseAlignmentGenerator {
 
+	public static PairwiseAlignmentStorage generate(
+			ArrayList<NumberSequence> numberseqs,
+			ObjectDistanceSubstitionMatrix submat) {
+		PairwiseAlignmentStorage alignments = new PairwiseAlignmentStorage(
+				numberseqs.size(), numberseqs.size());
 
-	public static PairwiseAlignmentStorage generate(ArrayList<NumberSequence> numberseqs,ObjectDistanceSubstitionMatrix submat) {
-		PairwiseAlignmentStorage alignments = new PairwiseAlignmentStorage(numberseqs.size(),numberseqs.size());
-		
-    		for (int i = 0; i < numberseqs.size(); i++) {
-    			NumberSequence ns1 = numberseqs.get(i);
-    			for (int j = 0; j < numberseqs.size(); j++) {
-    				NumberSequence ns2 = numberseqs.get(j);
+		for (int i = 0; i < numberseqs.size(); i++) {
+			NumberSequence ns1 = numberseqs.get(i);
+			for (int j = 0; j < numberseqs.size(); j++) {
+				NumberSequence ns2 = numberseqs.get(j);
 
-    				if (i != j) {
-    					int smithWatermanThreshold = 10;
-    					AlignmentAlgorithm aa = AlignmentAlgorithmFactory.create();
-    					aa.align(ns1.getSequence(), ns2.getSequence(), submat,
-    							smithWatermanThreshold);
-    					alignments.set(i,j,aa);
-    				
-    					
-    					AlignmentAlgorithm sameSequence1 = AlignmentAlgorithmFactory.create();
-    							sameSequence1.align(
-    							ns1.getSequence(), ns1.getSequence(), submat,
-    							smithWatermanThreshold);
-    					AlignmentAlgorithm sameSequence2 = AlignmentAlgorithmFactory.create();
-    							sameSequence2.align(ns2.getSequence(), ns2.getSequence(), submat,
-    							smithWatermanThreshold);
-    					AlignmentAlgorithm randomSequence = AlignmentAlgorithmFactory.create();
-    							randomSequence.align(ns1.shuffle().getSequence(),ns2.shuffle().getSequence(),submat,smithWatermanThreshold);
-    					
-    					// Score of the aligmnment
-    					double score = alignments.get(i,j).getAlignmentScore();
-    					/*
-    					if(score > 0) {
-    						System.out.println("Alignment: " + i + " " + j);
-    						alignments.get(i, j).printAlignment();
-    						ArrayList<ArrayList<NumberSequence>> matches = alignments.get(i, j).getMatches();
-    						int count = 0;
-    						for(Iterator<ArrayList<NumberSequence>> it = matches.iterator();it.hasNext();) {
-    							System.out.println("Match number " + count); 
-    							ArrayList<NumberSequence> tmp = it.next();
-    							tmp.get(0).printSequence();
-    							tmp.get(1).printSequence();
-    							System.out.println();
-    							count++;
-    						}
-    						System.out.println();
-    					}
-    					*/
-    					// Scores of the sequence being aligned to itself (maximum score)
-    					double sSelf1 = sameSequence1.getAlignmentScore();
-    					double sSelf2 = sameSequence2.getAlignmentScore();
-    					// Score of sequences shuffled before aligned  
-    					double sRand = randomSequence.getAlignmentScore();
+				if (i != j) {
+					int smithWatermanThreshold = 10;
+					AlignmentAlgorithm aa = AlignmentAlgorithmFactory.create();
+					aa.align(ns1.getSequence(), ns2.getSequence(), submat,
+							smithWatermanThreshold);
+					alignments.set(i, j, aa);
 
-    					double sMax = (sSelf1 + sSelf2) / 2;
-    					double sEff = (score - sRand)/ (sMax - sRand);
-    					if(sEff < 0) {
-    						sEff = 0;
-    					}
-    					double distance = -Math.log(sEff);
-    					
-    					
-    					if(!Double.isInfinite(distance) && !Double.isNaN(distance)) {
-    						if(distance < alignments.getDistance(i, j)) {	
-    							alignments.setDistance(i,j,distance );
-    						}
-    					}
-    				}
-    			}
-    		}
-		return alignments;  	
-    }
+					AlignmentAlgorithm sameSequence1 = AlignmentAlgorithmFactory
+							.create();
+					sameSequence1.align(ns1.getSequence(), ns1.getSequence(),
+							submat, smithWatermanThreshold);
+					AlignmentAlgorithm sameSequence2 = AlignmentAlgorithmFactory
+							.create();
+					sameSequence2.align(ns2.getSequence(), ns2.getSequence(),
+							submat, smithWatermanThreshold);
+					AlignmentAlgorithm randomSequence = AlignmentAlgorithmFactory
+							.create();
+					randomSequence.align(ns1.shuffle().getSequence(), ns2
+							.shuffle().getSequence(), submat,
+							smithWatermanThreshold);
+
+					// Score of the aligmnment
+					double score = alignments.get(i, j).getAlignmentScore();
+
+					
+					// Scores of the sequence being aligned to itself (maximum
+					// score)
+					double sSelf1 = sameSequence1.getAlignmentScore();
+					double sSelf2 = sameSequence2.getAlignmentScore();
+					// Score of sequences shuffled before aligned
+					double sRand = randomSequence.getAlignmentScore();
+
+					double sMax = (sSelf1 + sSelf2) / 2;
+					double sEff = (score - sRand) / (sMax - sRand);
+					if (sEff < 0) {
+						sEff = 0;
+					}
+					double distance = -Math.log(sEff);
+
+					if (!Double.isInfinite(distance) && !Double.isNaN(distance)) {
+						if (distance < alignments.getDistance(i, j)) {
+							alignments.setDistance(i, j, distance);
+						}
+					}
+				}
+			}
+		}
+		return alignments;
+	}
 }
