Revert "Bug 455656 - Error in performance results analysis, if more recent build"

This reverts commit 2afbdeb7378f9a8ddb28b2fb3358ff18d806c045.

Lost some changes, due to "crash", so reverting partial fix, and will
resubmit complete one.
diff --git a/bundles/org.eclipse.test.performance.ui/performanceui.jar b/bundles/org.eclipse.test.performance.ui/performanceui.jar
index 90d8b54..b1dd970 100644
--- a/bundles/org.eclipse.test.performance.ui/performanceui.jar
+++ b/bundles/org.eclipse.test.performance.ui/performanceui.jar
Binary files differ
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/PerformanceResults.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/PerformanceResults.java
index 702faf0..2da6cc6 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/PerformanceResults.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/PerformanceResults.java
@@ -670,10 +670,6 @@
 		if (n < buildsSize) {
 			System.arraycopy(this.allBuildNames, 0, this.allBuildNames = new String[n], 0, n);
 		}
-		// there are times when the build we want to analyze is not the "last build", 
-		// such as there may have be subsequent builds, already. 
-		// so, we only compute this "default behavior" if lastBuild has not been set yet.
-		// 
 		int idx = n-1;
 		String lastBuild = this.allBuildNames[idx--];
 		while (idx > 0 && lastBuild.startsWith(DB_Results.getDbBaselinePrefix())) {
@@ -681,7 +677,6 @@
 		}
 		this.needToUpdateLocalFile = this.name == null || Util.getBuildDate(lastBuild).compareTo(Util.getBuildDate(this.name)) > 0;
 		this.name = lastBuild;
-		
 		if (this.baselineName != null) {
 			String lastBuildDate = Util.getBuildDate(lastBuild);
 			if (Util.getBuildDate(this.baselineName).compareTo(lastBuildDate) > 0) {
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/GenerateResults.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/GenerateResults.java
index ff1214a..b658a94 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/GenerateResults.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/GenerateResults.java
@@ -999,18 +999,12 @@
 			}
 		}
 	}
-	
-	// must set our known "last build" (that we are interested in) before
-	// 'getAllBuildNames' is called, else it may set "name" to some later 
-	// build we are not interested in analyzing yet.
-    this.performanceResults.setLastBuildName(buildName);
 
 	// Verify that build is known
 	String[] builds = this.performanceResults.getAllBuildNames();
 	if (builds == null || builds.length == 0) {
 		System.err.println("Cannot connect to database to generate results build '"+buildName+"'");
-		// TODO: changed a system.exit to this exception ... but, there might be better choices?
-		throw new IllegalStateException("Cannot connect to database to generate results build '"+buildName+"'");
+		System.exit(1);
 	}
 	if (Arrays.binarySearch(builds, buildName, Util.BUILD_DATE_COMPARATOR) < 0) {
 		throw new RuntimeException("No results in database for build '"+buildName+"'");
@@ -1034,17 +1028,12 @@
 	// Init current build prefixes if not set
 	if (this.currentBuildPrefixes == null) {
 		this.currentBuildPrefixes = new ArrayList();
-		char buildType = buildName.charAt(0);
-		if (buildType == 'M') {
+		if (buildName.charAt(0) == 'M') {
 			this.currentBuildPrefixes.add("M");
-		} else if (buildType == 'N') {
-			this.currentBuildPrefixes.add("N");
-		} else if (buildType == 'I') {
-		    this.currentBuildPrefixes.add("I");
 		} else {
-		    // TODO: may want to throw error here? 
-		    this.currentBuildPrefixes.add("?");
+			this.currentBuildPrefixes.add("N");
 		}
+		this.currentBuildPrefixes.add("I");
 	}
 }