Bug 553191 - Generify o.e.test.performance.ui

Change also revealed an unlikely hash key argument in ScenarioData.

Change-Id: I41d568923cd51c4c20df01f4c0a5e932a7cc06d7
Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/AbstractResults.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/AbstractResults.java
index 79fe6d9..1db3c0d 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/AbstractResults.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/AbstractResults.java
@@ -23,7 +23,7 @@
  *
  * Each results gives access to specific children depending on model.
  */
-public abstract class AbstractResults implements Comparable {
+public abstract class AbstractResults implements Comparable<AbstractResults> {
 
 	public static final double[] INVALID_RESULTS = new double[] {2};
 	public static final double[] NO_BUILD_RESULTS = new double[0];
@@ -36,24 +36,24 @@
 	public static final int NUMBERS_LENGTH = 6;
 
 	public static final boolean DO_NOT_WRITE_DATA = false;
-	
+
 	AbstractResults parent;
 	int id = -1;
 	String name;
-	List children;
+	List<AbstractResults> children;
 	private static boolean NEW_LINE = true;
 	PrintStream printStream = null;
     protected String baselinePrefix;
 
 AbstractResults(AbstractResults parent, String name) {
 	this.parent = parent;
-	this.children = new ArrayList();
+	this.children = new ArrayList<>();
 	this.name = name;
 }
 
 AbstractResults(AbstractResults parent, int id) {
 	this.parent = parent;
-	this.children = new ArrayList();
+	this.children = new ArrayList<>();
 	this.id = id;
 }
 
@@ -61,11 +61,11 @@
  * Add a child to current results, using specific sort
  * order if specified.
  */
-void addChild(Comparable child, boolean sort) {
+void addChild(AbstractResults child, boolean sort) {
 	if (sort) {
 		int size = this.children.size();
 		for (int i=0; i<size; i++) {
-			Object results = this.children.get(i);
+		  AbstractResults results = this.children.get(i);
 			if (child.compareTo(results) < 0) {
 				this.children.add(i, child);
 				return;
@@ -81,9 +81,9 @@
  * @see java.lang.Comparable#compareTo(java.lang.Object)
  */
 @Override
-public int compareTo(Object obj) {
-	if (obj instanceof AbstractResults) {
-		AbstractResults res = (AbstractResults) obj;
+public int compareTo(AbstractResults obj) {
+	if (obj != null) {
+		AbstractResults res = obj;
 		return getName().compareTo(res.getName());
 	}
 	return -1;
@@ -163,14 +163,14 @@
  *
  * @return An iterator on the children list
  */
-public Iterator getResults() {
+public Iterator<AbstractResults> getResults() {
 	return this.children.iterator();
 }
 
 AbstractResults getResults(String resultName) {
 	int size = this.children.size();
 	for (int i=0; i<size; i++) {
-		AbstractResults searchedResults = (AbstractResults) this.children.get(i);
+		AbstractResults searchedResults =  this.children.get(i);
 		if (searchedResults.getName().equals(resultName)) {
 			return searchedResults;
 		}
@@ -181,7 +181,7 @@
 AbstractResults getResults(int searchedId) {
 	int size = this.children.size();
 	for (int i=0; i<size; i++) {
-		AbstractResults searchedResults = (AbstractResults) this.children.get(i);
+		AbstractResults searchedResults =  this.children.get(i);
 		if (searchedResults.id == searchedId) {
 			return searchedResults;
 		}
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/BuildResults.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/BuildResults.java
index 03ec5e1..502d3b1 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/BuildResults.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/BuildResults.java
@@ -98,7 +98,7 @@
      * @see Comparable#compareTo(Object)
      */
     @Override
-    public int compareTo(Object obj) {
+    public int compareTo(AbstractResults obj) {
         if (obj instanceof BuildResults) {
             BuildResults res = (BuildResults) obj;
             return getDate().compareTo(res.getDate());
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ComponentResults.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ComponentResults.java
index 48ca27a..447c0eb 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ComponentResults.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ComponentResults.java
@@ -43,12 +43,12 @@
 	this.printStream = parent.printStream;
 }
 
-Set getAllBuildNames() {
-	Set buildNames = new HashSet();
+Set<String> getAllBuildNames() {
+	Set<String> buildNames = new HashSet<>();
 	int size = size();
 	for (int i=0; i<size; i++) {
 		ScenarioResults scenarioResults = (ScenarioResults) this.children.get(i);
-		Set builds = scenarioResults.getAllBuildNames();
+		Set<String> builds = scenarioResults.getAllBuildNames();
 		buildNames.addAll(builds);
 	}
 	return buildNames;
@@ -64,7 +64,7 @@
 }
 
 String[] getAllSortedBuildNames(final boolean reverse) {
-	Set allBuildNames = getAllBuildNames();
+	Set<String> allBuildNames = getAllBuildNames();
 	String[] sortedNames = new String[allBuildNames.size()];
 	allBuildNames.toArray(sortedNames);
 	Arrays.sort(sortedNames, (o1, o2) -> {
@@ -96,14 +96,14 @@
  * 		<li>{@link #BASELINE_ERROR_INDEX}: the error made while measuring the baseline value</li>
  * 	</ul>
 */
-public List getConfigNumbers(String configName, boolean fingerprints, List differences) {
+public List<List<Object>> getConfigNumbers(String configName, boolean fingerprints, List<List<Object>> differences) {
 
 	// Initialize lists
 	AbstractResults[] scenarios = getChildren();
 	int length = scenarios.length;
 
 	// Print scenario names line
-	List firstLine = new ArrayList();
+	List<Object> firstLine = new ArrayList<>();
 	for (int i=0; i<length; i++) {
 		ScenarioResults scenarioResults = (ScenarioResults) scenarios[i];
 		if (!fingerprints || scenarioResults.hasSummary()) {
@@ -120,7 +120,7 @@
 	firstLine.add(0, Integer.valueOf(buildsLength));
 	differences.add(firstLine);
 	for (int i=0; i<buildsLength; i++) {
-		List line = new ArrayList();
+		List<Object> line = new ArrayList<>();
 		String buildName = builds[i];
 		line.add(buildName);
 		if (!buildName.startsWith(DB_Results.getDbBaselinePrefix())) {
@@ -205,10 +205,10 @@
 }
 */
 
-private ScenarioResults getScenarioResults(List scenarios, int searchedId) {
+private ScenarioResults getScenarioResults(List<ScenarioResults> scenarios, int searchedId) {
 	int size = scenarios.size();
 	for (int i=0; i<size; i++) {
-		ScenarioResults scenarioResults = (ScenarioResults) scenarios.get(i);
+		ScenarioResults scenarioResults = scenarios.get(i);
 		if (scenarioResults.id == searchedId) {
 			return scenarioResults;
 		}
@@ -223,9 +223,9 @@
  * @param config Configuration name
  * @return A list of {@link ScenarioResults scenario results} which have a summary
  */
-public List getSummaryScenarios(boolean global, String config) {
+public List<ScenarioResults> getSummaryScenarios(boolean global, String config) {
 	int size= size();
-	List scenarios = new ArrayList(size);
+	List<ScenarioResults> scenarios = new ArrayList<>(size);
 	for (int i=0; i<size; i++) {
 		ScenarioResults scenarioResults = (ScenarioResults) this.children.get(i);
 		ConfigResults configResults = scenarioResults.getConfigResults(config);
@@ -266,7 +266,7 @@
  * Read local file contents and populate the results model with the collected
  * information.
  */
-String readLocalFile(File dir, List scenarios) throws FileNotFoundException {
+String readLocalFile(File dir, List<ScenarioResults> scenarios) throws FileNotFoundException {
 //	if (!dir.exists()) return null;
 	File dataFile = new File(dir, getName()+".dat");	//$NON-NLS-1$
 	if (!dataFile.exists()) throw new FileNotFoundException();
@@ -317,7 +317,7 @@
  * The database is read only if the components does not already knows the
  * given build (i.e. if it has not been already read) or if the force arguments is set.
  */
-void updateBuild(String buildName, List scenarios, boolean force, File dataDir, SubMonitor subMonitor, PerformanceResults.RemainingTimeGuess timeGuess) {
+void updateBuild(String buildName, List<ScenarioResults> scenarios, boolean force, File dataDir, SubMonitor subMonitor, PerformanceResults.RemainingTimeGuess timeGuess) {
 
 	// Read all variations
 	println("Component '"+this.name+"':"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -350,7 +350,7 @@
 			}
 
 			// read results
-			ScenarioResults nextScenarioResults= (ScenarioResults) scenarios.get(i);
+			ScenarioResults nextScenarioResults= scenarios.get(i);
 			ScenarioResults scenarioResults = (ScenarioResults) getResults(nextScenarioResults.id);
 			if (scenarioResults == null) {
 				// Scenario is not known yet, force an update
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ConfigResults.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ConfigResults.java
index 14a0653..5d3606f 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ConfigResults.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ConfigResults.java
@@ -153,9 +153,9 @@
  * @param buildName Name of the last build (included)
  * @return The list of the builds which precedes the given build name.
  */
-public List getBuildsBefore(String buildName) {
+public List<BuildResults> getBuildsBefore(String buildName) {
 	String buildDate = Util.getBuildDate(buildName);
-	List builds = new ArrayList();
+	List<BuildResults> builds = new ArrayList<>();
 	int size = size();
 	for (int i=0; i<size; i++) {
 		BuildResults buildResults = (BuildResults) this.children.get(i);
@@ -177,7 +177,7 @@
 	int size = size();
 	int length = prefixes.size();
 	for (int i=0; i<size; i++) {
-		AbstractResults buildResults = (AbstractResults) this.children.get(i);
+		AbstractResults buildResults = this.children.get(i);
 		String buildName = buildResults.getName();
 		for (int j=0; j<length; j++) {
 			if (buildName.startsWith(prefixes.get(j))) {
@@ -402,7 +402,7 @@
  * <li>3:	coefficient of variation of these values</li>
  * </ul>
  */
-public double[] getStatistics(List prefixes) {
+public double[] getStatistics(List<String> prefixes) {
 	return getStatistics(prefixes, DB_Results.getDefaultDimension().getId());
 }
 
@@ -421,7 +421,7 @@
  * <li>3:	coefficient of variation of these values</li>
  * </ul>
  */
-public double[] getStatistics(List prefixes, int dim_id) {
+public double[] getStatistics(List<String> prefixes, int dim_id) {
 	int size = size();
 	int length = prefixes == null ? 0 : prefixes.size();
 	int count = 0;
@@ -440,7 +440,7 @@
 				count++;
 			} else {
 				for (int j=0; j<length; j++) {
-					if (buildName.startsWith((String)prefixes.get(j))) {
+					if (buildName.startsWith(prefixes.get(j))) {
 						double value = buildResults.getValue(dim_id);
 						values[count] = value;
 						mean += value;
@@ -581,8 +581,8 @@
  * @param n Number of last nightly builds to return
  * @return Last n nightly build names preceding current.
  */
-public List lastNightlyBuildNames(int n) {
-	List labels = new ArrayList();
+public List<String> lastNightlyBuildNames(int n) {
+	List<String> labels = new ArrayList<>();
 	for (int i=size()-2; i>=0; i--) {
 		BuildResults buildResults = (BuildResults) this.children.get(i);
 		if (isBuildConcerned(buildResults)) {
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/DB_Results.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/DB_Results.java
index ee4e190..fde0277 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/DB_Results.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/DB_Results.java
@@ -739,7 +739,7 @@
  *
  * @return A list of all scenario names matching the default pattern
  */
-public static Map queryAllScenarios() {
+public static Map<String, List<ScenarioResults>> queryAllScenarios() {
 	return getDefault().internalQueryBuildScenarios("%", null); //$NON-NLS-1$
 }
 
@@ -752,7 +752,7 @@
  * 	The map keys are component names and values are the scenarios list for
  * 	each component.
  */
-static Map queryAllScenarios(String scenarioPattern) {
+static Map<String, List<ScenarioResults>> queryAllScenarios(String scenarioPattern) {
 	String pattern = scenarioPattern==null ? "%" : scenarioPattern; //$NON-NLS-1$
 	return getDefault().internalQueryBuildScenarios(pattern, null);
 }
@@ -765,7 +765,7 @@
  * @param buildName The build name
  * @return A list of scenario names matching the given pattern
  */
-static Map queryAllScenarios(String scenarioPattern, String buildName) {
+static Map<String, List<ScenarioResults>> queryAllScenarios(String scenarioPattern, String buildName) {
 	return getDefault().internalQueryBuildScenarios(scenarioPattern, buildName);
 }
 
@@ -1032,7 +1032,7 @@
 	}
 }
 
-private Map internalQueryBuildScenarios(String scenarioPattern, String buildName) {
+private Map<String, List<ScenarioResults>> internalQueryBuildScenarios(String scenarioPattern, String buildName) {
 	if (this.fSQL == null) return null;
 	long start = System.currentTimeMillis();
 	if (DEBUG) {
@@ -1041,7 +1041,7 @@
 		if (buildName != null) DEBUG_WRITER.print(" for build: "+buildName); //$NON-NLS-1$
 	}
 	ResultSet result = null;
-	Map allScenarios = new HashMap();
+	Map<String, List<ScenarioResults>> allScenarios = new HashMap<>();
 	try {
 		if (buildName == null) {
 			result = this.fSQL.queryBuildAllScenarios(scenarioPattern);
@@ -1049,8 +1049,8 @@
 			result = this.fSQL.queryBuildScenarios(scenarioPattern, buildName);
 		}
 		int previousId = -1;
-		List scenarios = null;
-		List<String> scenariosNames = new ArrayList();
+		List<ScenarioResults> scenarios = null;
+		List<String> scenariosNames = new ArrayList<>();
 		while (result.next()) {
 			int id = result.getInt(1);
 			String name = result.getString(2);
@@ -1058,7 +1058,7 @@
 			String shortName = result.getString(3);
 			int component_id = storeComponent(getComponentNameFromScenario(name));
 			if (component_id != previousId) {
-				allScenarios.put(COMPONENTS[component_id], scenarios = new ArrayList());
+				allScenarios.put(COMPONENTS[component_id], scenarios = new ArrayList<>());
 				previousId = component_id;
 			}
 			if (scenarios == null) {
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 ffa6173..af43fa2 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
@@ -170,7 +170,7 @@
  * @param componentName The component name. Should not be <code>null</code>
  * @return A list of {@link ScenarioResults scenario results}
  */
-public List getComponentScenarios(String componentName) {
+public List<AbstractResults> getComponentScenarios(String componentName) {
 	ComponentResults componentResults = (ComponentResults) getResults(componentName);
 	if (componentResults == null) return null;
 	return Collections.unmodifiableList(componentResults.children);
@@ -183,10 +183,10 @@
  * @param config Configuration name
  * @return A list of {@link ScenarioResults scenario results} which have a summary
  */
-public List getComponentSummaryScenarios(String componentName, String config) {
+public List<ScenarioResults> getComponentSummaryScenarios(String componentName, String config) {
 	if (componentName == null) {
 		int size = size();
-		List scenarios = new ArrayList();
+		List<ScenarioResults> scenarios = new ArrayList<>();
 		for (int i=0; i< size; i++) {
 			ComponentResults componentResults = (ComponentResults) this.children.get(i);
 			scenarios.addAll(componentResults.getSummaryScenarios(true, config));
@@ -597,7 +597,7 @@
 		length = stream.readInt();
 		println("		+ "+length+" components");
 		this.components = new String[length];
-		this.allScenarios = new HashMap();
+		this.allScenarios = new HashMap<>();
 		for (int i = 0; i < length; i++) {
 			this.components[i] = stream.readUTF();
 			int size = stream.readInt();
@@ -627,13 +627,13 @@
 	this.allScenarios = DB_Results.queryAllScenarios(this.scenarioPattern, buildName);
 	if (this.allScenarios == null) return -1;
 	int allScenariosSize = 0;
-	List componentsSet = new ArrayList(this.allScenarios.keySet());
+	List<String> componentsSet = new ArrayList<>(this.allScenarios.keySet());
 	Collections.sort(componentsSet);
 	int componentsSize = componentsSet.size();
 	componentsSet.toArray(this.components = new String[componentsSize]);
 	for (int i=0; i<componentsSize; i++) {
 		String componentName = this.components[i];
-		List scenarios = this.allScenarios.get(componentName);
+		List<ScenarioResults> scenarios = this.allScenarios.get(componentName);
 		allScenariosSize += scenarios.size();
 	}
 	println(" -> "+allScenariosSize+" found in "+(System.currentTimeMillis()-start)+"ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -644,7 +644,7 @@
 
 void reset(File dataDir) {
 	this.allBuildNames = null;
-	this.children = new ArrayList();
+	this.children = new ArrayList<>();
 //	this.name = null;
 	this.components = null;
 	this.allScenarios = null;
@@ -657,7 +657,7 @@
 	if (size == 0) return;
 	for (int i=0; i<size; i++) {
 		ComponentResults componentResults = (ComponentResults) this.children.get(i);
-		Set names = componentResults.getAllBuildNames();
+		Set<String> names = componentResults.getAllBuildNames();
 		builds.addAll(names);
 	}
 	int buildsSize = builds.size();
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ScenarioResults.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ScenarioResults.java
index e0e6b37..52e96c0 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ScenarioResults.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/ScenarioResults.java
@@ -263,7 +263,7 @@
 	String[] buildNames = buildName == null
 		? DB_Results.getBuilds()
 		: new String[] { buildName };
-	Set scenarioBuilds = getAllBuildNames();
+	Set<String> scenarioBuilds = getAllBuildNames();
 	int length = buildNames.length;
 	for (int i=0; i<length; i++) {
 		if (!scenarioBuilds.contains(buildNames[i])) {
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/BuildResultsElement.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/BuildResultsElement.java
index 47852c0..395a872 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/BuildResultsElement.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/BuildResultsElement.java
@@ -58,8 +58,8 @@
 	private static final PropertyDescriptor BUILD_TEST_ERROR_DESCRIPTOR = new PropertyDescriptor(P_ID_BUILD_ERROR, P_STR_BUILD_ERROR);
 	private static final PropertyDescriptor BUILD_STUDENTS_TTEST_DESCRIPTOR = new PropertyDescriptor(P_ID_BUILD_TTEST, P_STR_BUILD_TTEST);
 
-    private static Vector<PropertyDescriptor> DESCRIPTORS;
-    static Vector initDescriptors(int status) {
+    private static Vector<IPropertyDescriptor> DESCRIPTORS;
+    static Vector<IPropertyDescriptor> initDescriptors(int status) {
 		DESCRIPTORS = new Vector<>();
 		// Status category
 		DESCRIPTORS.add(getInfosDescriptor(status));
@@ -131,7 +131,7 @@
 		warningDescriptor.setCategory("Status");
 		return warningDescriptor;
     }
-    static Vector getDescriptors() {
+    static Vector<IPropertyDescriptor> getDescriptors() {
     	return DESCRIPTORS;
 	}
 
@@ -150,9 +150,9 @@
 }
 
 @Override
-public int compareTo(Object o) {
+public int compareTo(ResultsElement o) {
 	if (o instanceof BuildResultsElement && getName() != null) {
-		BuildResultsElement element = (BuildResultsElement)o;
+		BuildResultsElement element = (BuildResultsElement) o;
 		if (element.getName() != null) {
 			String buildDate = Util.getBuildDate(element.name);
 			return Util.getBuildDate(this.name).compareTo(buildDate);
@@ -191,7 +191,7 @@
 
 @Override
 public IPropertyDescriptor[] getPropertyDescriptors() {
-	Vector<PropertyDescriptor> descriptors = getDescriptors();
+	Vector<IPropertyDescriptor> descriptors = getDescriptors();
 	if (descriptors == null) {
 		descriptors = initDescriptors(getStatus());
 	}
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/BuildResultsProperties.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/BuildResultsProperties.java
index 443c00f..7103c6a 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/BuildResultsProperties.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/BuildResultsProperties.java
@@ -34,9 +34,9 @@
     static final String P_STR_NOT_STABLE = "not stable"; //$NON-NLS-1$
     static final String P_STR_NOT_RELIABLE = "not reliable"; //$NON-NLS-1$
     static final String P_STR_BIG_DELTA = "delta error"; //$NON-NLS-1$
-    private static Vector descriptors;
+    private static Vector<IPropertyDescriptor> descriptors;
     static {
-        descriptors = new Vector();
+        descriptors = new Vector<>();
         descriptors.addElement(new TextPropertyDescriptor(P_ID_SMALL_VALUE, P_STR_SMALL_VALUE));
         descriptors.addElement(new TextPropertyDescriptor(P_ID_NO_BASELINE, P_STR_NO_BASELINE));
         descriptors.addElement(new TextPropertyDescriptor(P_ID_SINGLE_RUN, P_STR_SINGLE_RUN));
@@ -46,7 +46,7 @@
         descriptors.addElement(new TextPropertyDescriptor(P_ID_NOT_RELIABLE, P_STR_NOT_RELIABLE));
         descriptors.addElement(new TextPropertyDescriptor(P_ID_BIG_DELTA, P_STR_BIG_DELTA));
     }
-    static Vector getDescriptors() {
+    static Vector<IPropertyDescriptor> getDescriptors() {
         return descriptors;
 	}
 
@@ -67,7 +67,7 @@
  * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
  */
 public IPropertyDescriptor[] getPropertyDescriptors() {
-    return (IPropertyDescriptor[]) getDescriptors().toArray(
+    return getDescriptors().toArray(
             new IPropertyDescriptor[getDescriptors().size()]);
 }
 
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ComponentResultsElement.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ComponentResultsElement.java
index 0277cf7..d40d9cb 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ComponentResultsElement.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ComponentResultsElement.java
@@ -43,9 +43,9 @@
 	private static final PropertyDescriptor CURRENT_BUILD_DESCRIPTOR = new PropertyDescriptor(P_ID_CURRENT_BUILD, P_STR_CURRENT_BUILD);
 	private static final PropertyDescriptor BASELINE_BUILD_DESCRIPTOR = new PropertyDescriptor(P_ID_BASELINE_BUILD, P_STR_BASELINE_BUILD);
 
-    private static Vector DESCRIPTORS;
-    static Vector initDescriptors(int status) {
-        DESCRIPTORS = new Vector();
+    private static Vector<IPropertyDescriptor> DESCRIPTORS;
+    static Vector<IPropertyDescriptor> initDescriptors(int status) {
+        DESCRIPTORS = new Vector<>();
 		// Status category
 		DESCRIPTORS.add(getInfosDescriptor(status));
 		DESCRIPTORS.add(getWarningsDescriptor(status));
@@ -63,7 +63,7 @@
 		COMMENT_DESCRIPTOR.setCategory("Survey");
         return DESCRIPTORS;
 	}
-    static Vector getDescriptors() {
+    static Vector<IPropertyDescriptor> getDescriptors() {
     	return DESCRIPTORS;
 	}
 
@@ -98,14 +98,14 @@
  * @param fingerprints Set whether only fingerprints scenario should be taken into account
  * @return A list of lines. Each line represent a build and is a list of either strings or values.
  */
-public List getConfigNumbers(String configName, boolean fingerprints) {
+public List<List<Object>> getConfigNumbers(String configName, boolean fingerprints) {
 	if (this.results == null) return null;
-	return ((ComponentResults)this.results).getConfigNumbers(configName, fingerprints, new ArrayList());
+	return ((ComponentResults)this.results).getConfigNumbers(configName, fingerprints, new ArrayList<>());
 }
 
 @Override
 public IPropertyDescriptor[] getPropertyDescriptors() {
-	Vector descriptors = getDescriptors();
+	Vector<IPropertyDescriptor> descriptors = getDescriptors();
 	if (descriptors == null) {
 		descriptors = initDescriptors(getStatus());
 	}
@@ -114,7 +114,7 @@
 	descriptorsArray[0] = getInfosDescriptor(getStatus());
 	descriptorsArray[1] = getWarningsDescriptor(getStatus());
 	for (int i=2; i<size; i++) {
-		descriptorsArray[i] = (IPropertyDescriptor) descriptors.get(i);
+		descriptorsArray[i] = descriptors.get(i);
 	}
 	return descriptorsArray;
 }
@@ -148,15 +148,15 @@
  * @param fingerprint Tell whether only fingerprint scenarios are expected or not.
  * @return A list of {@link ScenarioResults}.
  */
-public List getScenarios(boolean fingerprint) {
+public List<AbstractResults> getScenarios(boolean fingerprint) {
 	if (!fingerprint) {
 		return Arrays.asList(this.results.getChildren());
 	}
-	List scenarios = new ArrayList();
+	List<AbstractResults> scenarios = new ArrayList<>();
 	if (this.results != null) {
-		Iterator<ScenarioResults> iterator = this.results.getResults();
+		Iterator<AbstractResults> iterator = this.results.getResults();
 		while (iterator.hasNext()) {
-			ScenarioResults scenarioResults = iterator.next();
+			ScenarioResults scenarioResults = (ScenarioResults) iterator.next();
 			if (scenarioResults.hasSummary()) {
 				scenarios.add(scenarioResults);
 			}
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ConfigResultsElement.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ConfigResultsElement.java
index 20bbb2f..30bf3a2 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ConfigResultsElement.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ConfigResultsElement.java
@@ -56,9 +56,9 @@
 	private static final PropertyDescriptor CONFIG_DELTA_DESCRIPTOR = new PropertyDescriptor(P_ID_CONFIG_DELTA, P_STR_CONFIG_DELTA);
 	private static final PropertyDescriptor CONFIG_ERROR_DESCRIPTOR = new PropertyDescriptor(P_ID_CONFIG_ERROR, P_STR_CONFIG_ERROR);
 
-    private static Vector DESCRIPTORS;
-    static Vector initDescriptors(int status) {
-		DESCRIPTORS = new Vector();
+    private static Vector<IPropertyDescriptor> DESCRIPTORS;
+    static Vector<IPropertyDescriptor> initDescriptors(int status) {
+		DESCRIPTORS = new Vector<>();
 		// Status category
 		DESCRIPTORS.add(getInfosDescriptor(status));
 		DESCRIPTORS.add(getWarningsDescriptor(status));
@@ -87,7 +87,7 @@
 		return DESCRIPTORS;
 	}
     static ComboBoxPropertyDescriptor getInfosDescriptor(int status) {
-		List list = new ArrayList();
+		List<String> list = new ArrayList<>();
 		if ((status & SMALL_VALUE) != 0) {
 			list.add("This test and/or its variation has a small value on this machine, hence it may not be necessary to spend time on fixing it if a regression occurs");
 		}
@@ -103,7 +103,7 @@
 		return infoDescriptor;
 	}
     static PropertyDescriptor getWarningsDescriptor(int status) {
-		List list = new ArrayList();
+		List<String> list = new ArrayList<>();
 		if ((status & BIG_ERROR) != 0) {
 			list.add("The error on this machine is over the 3% threshold, hence its result may not be really reliable");
 		}
@@ -130,7 +130,7 @@
 		warningDescriptor.setCategory("Status");
 		return warningDescriptor;
 	}
-    static Vector getDescriptors() {
+    static Vector<IPropertyDescriptor> getDescriptors() {
     	return DESCRIPTORS;
 	}
 
@@ -139,11 +139,6 @@
 }
 
 @Override
-public int compareTo(Object o) {
-	// TODO Auto-generated method stub
-	return super.compareTo(o);
-}
-@Override
 ResultsElement createChild(AbstractResults testResults) {
 	return new BuildResultsElement(testResults, this);
 }
@@ -188,7 +183,7 @@
 
 @Override
 public IPropertyDescriptor[] getPropertyDescriptors() {
-	Vector descriptors = getDescriptors();
+	Vector<IPropertyDescriptor> descriptors = getDescriptors();
 	if (descriptors == null) {
 		descriptors = initDescriptors(getStatus());
 	}
@@ -197,7 +192,7 @@
 	descriptorsArray[0] = getInfosDescriptor(getStatus());
 	descriptorsArray[1] = getWarningsDescriptor(getStatus());
 	for (int i=2; i<size; i++) {
-		descriptorsArray[i] = (IPropertyDescriptor) descriptors.get(i);
+		descriptorsArray[i] = descriptors.get(i);
 	}
 	return descriptorsArray;
 }
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/DimResultsElement.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/DimResultsElement.java
index 869ec4c..e517d28 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/DimResultsElement.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/DimResultsElement.java
@@ -45,9 +45,9 @@
 	private static final PropertyDescriptor DIM_ERROR_DESCRIPTOR = new PropertyDescriptor(P_ID_ERROR, P_STR_ERROR);
 	private static final PropertyDescriptor DIM_HAD_VALUES_DESCRIPTOR = new PropertyDescriptor(P_ID_HAD_VALUES, P_STR_HAD_VALUES);
 
-    private static Vector DESCRIPTORS;
-    static Vector initDescriptors(int status) {
-        DESCRIPTORS = new Vector();
+    private static Vector<IPropertyDescriptor> DESCRIPTORS;
+    static Vector<IPropertyDescriptor> initDescriptors(int status) {
+        DESCRIPTORS = new Vector<>();
 		// Status category
 		DESCRIPTORS.add(getInfosDescriptor(status));
 		DESCRIPTORS.add(getWarningsDescriptor(status));
@@ -71,7 +71,7 @@
 		COMMENT_DESCRIPTOR.setCategory("Survey");
         return DESCRIPTORS;
    	}
-    static Vector getDescriptors() {
+    static Vector<IPropertyDescriptor> getDescriptors() {
     	return DESCRIPTORS;
 	}
 
@@ -96,7 +96,7 @@
 
 @Override
 public IPropertyDescriptor[] getPropertyDescriptors() {
-	Vector descriptors = getDescriptors();
+	Vector<IPropertyDescriptor> descriptors = getDescriptors();
 	if (descriptors == null) {
 		descriptors = initDescriptors(getStatus());
 	}
@@ -105,7 +105,7 @@
 	descriptorsArray[0] = getInfosDescriptor(getStatus());
 	descriptorsArray[1] = getWarningsDescriptor(getStatus());
 	for (int i=2; i<size; i++) {
-		descriptorsArray[i] = (IPropertyDescriptor) descriptors.get(i);
+		descriptorsArray[i] = descriptors.get(i);
 	}
 	return descriptorsArray;
 }
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ResultsElement.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ResultsElement.java
index fdf3784..010bb21 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ResultsElement.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ResultsElement.java
@@ -39,7 +39,7 @@
 /**
  * An Organization Element
  */
-public abstract class ResultsElement implements IAdaptable, IPropertySource, IWorkbenchAdapter, Comparable {
+public abstract class ResultsElement implements IAdaptable, IPropertySource, IWorkbenchAdapter, Comparable<ResultsElement> {
 
 	// Image descriptors
 	private static final ISharedImages WORKBENCH_SHARED_IMAGES = PlatformUI.getWorkbench().getSharedImages();
@@ -98,11 +98,11 @@
 	static final String P_STR_STATUS_COMMENT = "comment"; //$NON-NLS-1$
 	static final String[] NO_VALUES = new String[0];
 
-	private static Vector DESCRIPTORS;
+	private static Vector<IPropertyDescriptor> DESCRIPTORS;
 	static final TextPropertyDescriptor COMMENT_DESCRIPTOR = new TextPropertyDescriptor(P_ID_STATUS_COMMENT, P_STR_STATUS_COMMENT);
 	static final TextPropertyDescriptor ERROR_DESCRIPTOR = new TextPropertyDescriptor(P_ID_STATUS_ERROR, P_STR_STATUS_ERROR);
-    static Vector initDescriptors(int status) {
-		DESCRIPTORS = new Vector();
+    static Vector<IPropertyDescriptor> initDescriptors(int status) {
+		DESCRIPTORS = new Vector<>();
 		// Status category
 		DESCRIPTORS.add(getInfosDescriptor(status));
 		DESCRIPTORS.add(getWarningsDescriptor(status));
@@ -113,11 +113,11 @@
 		COMMENT_DESCRIPTOR.setCategory("Survey");
 		return DESCRIPTORS;
 	}
-    static Vector getDescriptors() {
+    static Vector<IPropertyDescriptor> getDescriptors() {
     	return DESCRIPTORS;
 	}
     static ComboBoxPropertyDescriptor getInfosDescriptor(int status) {
-		List list = new ArrayList();
+		List<String> list = new ArrayList<>();
 		if ((status & SMALL_VALUE) != 0) {
 			list.add("Some builds have tests with small values");
 		}
@@ -133,7 +133,7 @@
 		return infoDescriptor;
 	}
     static PropertyDescriptor getWarningsDescriptor(int status) {
-		List list = new ArrayList();
+		List<String> list = new ArrayList<>();
 		if ((status & BIG_ERROR) != 0) {
 			list.add("Some builds have tests with error over 3%");
 		}
@@ -172,16 +172,16 @@
 }
 
 @Override
-public int compareTo(Object o) {
+public int compareTo(ResultsElement o) {
 	if (this.results == null) {
-		if (o instanceof ResultsElement && this.name != null) {
-			ResultsElement element = (ResultsElement) o;
+		if (o != null && this.name != null) {
+			ResultsElement element = o;
 			return this.name.compareTo(element.getName());
 		}
 		return -1;
 	}
-	if (o instanceof ResultsElement) {
-		return this.results.compareTo(((ResultsElement)o).results);
+	if (o != null) {
+		return this.results.compareTo(o.results);
 	}
 	return -1;
 }
@@ -295,7 +295,7 @@
 
 @Override
 public IPropertyDescriptor[] getPropertyDescriptors() {
-	Vector descriptors = getDescriptors();
+	Vector<IPropertyDescriptor> descriptors = getDescriptors();
 	if (descriptors == null) {
 		descriptors = initDescriptors(getStatus());
 	}
@@ -304,7 +304,7 @@
 	descriptorsArray[0] = getInfosDescriptor(getStatus());
 	descriptorsArray[1] = getWarningsDescriptor(getStatus());
 	for (int i=2; i<size; i++) {
-		descriptorsArray[i] = (IPropertyDescriptor) descriptors.get(i);
+		descriptorsArray[i] = descriptors.get(i);
 	}
 	return descriptorsArray;
 }
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ScenarioResultsElement.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ScenarioResultsElement.java
index 2527b0a..21ce9cc 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ScenarioResultsElement.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/ScenarioResultsElement.java
@@ -36,9 +36,9 @@
 	private static final TextPropertyDescriptor SCENARIO_FILE_NAME_DESCRIPTOR = new TextPropertyDescriptor(P_ID_SCENARIO_FILE_NAME, P_STR_SCENARIO_FILE_NAME);
 	private static final TextPropertyDescriptor SCENARIO_SHORT_NAME_DESCRIPTOR = new TextPropertyDescriptor(P_ID_SCENARIO_SHORT_NAME, P_STR_SCENARIO_SHORT_NAME);
 
-    private static Vector DESCRIPTORS;
-    static Vector initDescriptors(int status) {
-        DESCRIPTORS = new Vector();
+    private static Vector<IPropertyDescriptor> DESCRIPTORS;
+    static Vector<IPropertyDescriptor> initDescriptors(int status) {
+        DESCRIPTORS = new Vector<>();
 		// Status category
 		DESCRIPTORS.add(getInfosDescriptor(status));
 		DESCRIPTORS.add(getWarningsDescriptor(status));
@@ -56,7 +56,7 @@
 		COMMENT_DESCRIPTOR.setCategory("Survey");
         return DESCRIPTORS;
 	}
-    static Vector getDescriptors() {
+    static Vector<IPropertyDescriptor> getDescriptors() {
     	return DESCRIPTORS;
 	}
 
@@ -76,7 +76,7 @@
 
 @Override
 public IPropertyDescriptor[] getPropertyDescriptors() {
-	Vector descriptors = getDescriptors();
+	Vector<IPropertyDescriptor> descriptors = getDescriptors();
 	if (descriptors == null) {
 		descriptors = initDescriptors(getStatus());
 	}
@@ -85,7 +85,7 @@
 	descriptorsArray[0] = getInfosDescriptor(getStatus());
 	descriptorsArray[1] = getWarningsDescriptor(getStatus());
 	for (int i=2; i<size; i++) {
-		descriptorsArray[i] = (IPropertyDescriptor) descriptors.get(i);
+		descriptorsArray[i] = descriptors.get(i);
 	}
 	return descriptorsArray;
 }
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsComparisonTab.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsComparisonTab.java
index 13b3055..1abc3e8 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsComparisonTab.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsComparisonTab.java
@@ -71,7 +71,7 @@
 	private Font boldFont;
 	private Font italicFont;
 	private Font boldItalicFont;
-	Map toolTips;
+	Map<Point, ToolTip> toolTips;
 
 	// Information
 	String componentName;
@@ -81,7 +81,7 @@
 	// Cells management
 	Point tableOrigin, tableSize;
 	int columnsCount, rowsCount;
-	List firstLine;
+	List<List<Object>> firstLine;
 
 	// Eclipse preferences
 	private IEclipsePreferences preferences;
@@ -136,7 +136,7 @@
 	}
 
 	// Add lines to the table
-	this.toolTips = new HashMap();
+	this.toolTips = new HashMap<>();
 	boolean fingerprints = this.preferences.getBoolean(IPerformancesConstants.PRE_FILTER_ADVANCED_SCENARIOS, IPerformancesConstants.DEFAULT_FILTER_ADVANCED_SCENARIOS);
 	fillTable(results, view.currentBuild, view.referenceBuild, fingerprints);
 
@@ -160,7 +160,7 @@
 			}
 			Point cellPosition = currentCellPosition(e.x, e.y);
 			if (cellPosition != null) {
-				ToolTip tooltip = (ToolTip) BuildsComparisonTab.this.toolTips.get(cellPosition);
+				ToolTip tooltip = BuildsComparisonTab.this.toolTips.get(cellPosition);
 				if (tooltip != null) {
 					Point location = BuildsComparisonTab.this.table.toDisplay(new Point(e.x, e.y));
 					tooltip.setLocation(location);
@@ -271,9 +271,9 @@
  */
 private void disposeTable() {
 	if (this.toolTips != null) {
-		Iterator cells = this.toolTips.keySet().iterator();
+		Iterator<Point> cells = this.toolTips.keySet().iterator();
 		while (cells.hasNext()) {
-			ToolTip toolTip = (ToolTip) this.toolTips.get(cells.next());
+			ToolTip toolTip = this.toolTips.get(cells.next());
 			toolTip.dispose();
 		}
 	}
@@ -290,7 +290,7 @@
 
 	// Get all the scenario for the component
 	final PerformanceResults performanceResults = results.getPerformanceResults();
-	List scenarios = performanceResults.getComponentScenarios(this.componentName);
+	List<AbstractResults> scenarios = performanceResults.getComponentScenarios(this.componentName);
 	int size = scenarios.size();
 
 	// Get thresholds
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsComparisonTable.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsComparisonTable.java
index 440c052..21b4bd4 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsComparisonTable.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsComparisonTable.java
@@ -44,7 +44,7 @@
  */
 public void print(PerformanceResults performanceResults) {
 
-	List scenarios = performanceResults.getComponentScenarios(this.component);
+	List<AbstractResults> scenarios = performanceResults.getComponentScenarios(this.component);
 	int size = scenarios.size();
 
 	// Print titles
@@ -76,7 +76,7 @@
 	this.stream.print("</table>\n");
 }
 
-private int computeSize(List scenarios) {
+private int computeSize(List<AbstractResults> scenarios) {
 	int size = scenarios.size();
 	int n = 0;
 	for (int i=0; i<size; i++) {
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsView.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsView.java
index 0dfbf79..b87365a 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsView.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsView.java
@@ -402,8 +402,8 @@
 		// of the #compareTo(Object) in the ResultsElement hierarchy
 		@Override
     public int compare(Viewer view, Object e1, Object e2) {
-			if (e2 instanceof ResultsElement) {
-				return ((ResultsElement) e2).compareTo(e1);
+			if (e1 instanceof ResultsElement && e2 instanceof ResultsElement) {
+				return ((ResultsElement) e2).compareTo((ResultsElement) e1);
 			}
 			return super.compare(view, e1, e2);
 		}
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ComponentsView.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ComponentsView.java
index 2ba2479..5b349df 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ComponentsView.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ComponentsView.java
@@ -176,11 +176,11 @@
 			// Config and Build results are sorted in reverse order
 			if (e1 instanceof BuildResultsElement) {
 				ResultsElement element = (ResultsElement) e2;
-				return element.compareTo(e1);
+				return element.compareTo((ResultsElement) e1);
 			}
 			if (e1 instanceof ResultsElement) {
 				ResultsElement element = (ResultsElement) e1;
-				return element.compareTo(e2);
+				return element.compareTo((ResultsElement) e2);
 			}
 			return super.compare(view, e1, e2);
 		}
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ConfigTab.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ConfigTab.java
index 064f67c..828dd5c 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ConfigTab.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ConfigTab.java
@@ -71,7 +71,7 @@
 	private Font boldFont;
 	private Font italicFont;
 	private Font boldItalicFont;
-	Map toolTips;
+	Map<Point, ToolTip> toolTips;
 
 	// Information
 	String configBox, configName;
@@ -82,7 +82,7 @@
 	// Cells management
 	Point tableOrigin, tableSize;
 	int columnsCount, rowsCount;
-	List firstLine;
+	List<Object> firstLine;
 
 	// Eclipse preferences
 	private IEclipsePreferences preferences;
@@ -142,7 +142,7 @@
 	}
 
 	// Add lines to the table
-	this.toolTips = new HashMap();
+	this.toolTips = new HashMap<>();
 	fillTableLines(fingerprints);
 
 	// Updated columns
@@ -188,7 +188,7 @@
 			}
 			Point cellPosition = currentCellPosition(e.x, e.y);
 			if (cellPosition != null) {
-				ToolTip tooltip = (ToolTip) ConfigTab.this.toolTips.get(cellPosition);
+				ToolTip tooltip = ConfigTab.this.toolTips.get(cellPosition);
 				if (tooltip != null) {
 					Point location = ConfigTab.this.table.toDisplay(new Point(e.x, e.y));
 					tooltip.setLocation(location);
@@ -299,9 +299,9 @@
  */
 private void disposeTable() {
 	if (this.toolTips != null) {
-		Iterator cells = this.toolTips.keySet().iterator();
+		Iterator<Point> cells = this.toolTips.keySet().iterator();
 		while (cells.hasNext()) {
-			ToolTip toolTip = (ToolTip) this.toolTips.get(cells.next());
+			ToolTip toolTip = this.toolTips.get(cells.next());
 			toolTip.dispose();
 		}
 	}
@@ -322,19 +322,19 @@
 
 	// Get model information
 	if (this.results == null) return;
-	List differences = this.results.getConfigNumbers(this.configName, fingerprints);
+	List<List<Object>> differences = this.results.getConfigNumbers(this.configName, fingerprints);
 	if (differences == null) return;
 
 	// Store first information line which are the scenarios full names
-	Iterator lines = differences.iterator();
-	this.firstLine = (List) lines.next();
+	Iterator<List<Object>> lines = differences.iterator();
+	this.firstLine = lines.next();
 
 	// Read each information line (one line per build results)
 	Object[] scenarios = this.results.getChildren(null);
 	ConfigResultsElement[] configs = new ConfigResultsElement[scenarios.length];
 	int row = 0;
 	while (lines.hasNext()) {
-		List line = (List) lines.next();
+		List<Object> line = lines.next();
 		int size = line.size();
 
 		// The first column is the build name
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/utils/Util.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/utils/Util.java
index 1e52d0c..24de1f8 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/utils/Util.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/utils/Util.java
@@ -54,23 +54,23 @@
     public static final String LINE_SEPARATOR     = System.getProperty("line.separator");
 
     // Build prefixes
-    public static final List   ALL_BUILD_PREFIXES = new ArrayList(3);
+    public static final List<String>   ALL_BUILD_PREFIXES = new ArrayList<>(3);
     static {
         ALL_BUILD_PREFIXES.add("I");
         ALL_BUILD_PREFIXES.add("N");
         ALL_BUILD_PREFIXES.add("M");
     }
-    public static final List BUILD_PREFIXES = new ArrayList(2);
+    public static final List<String> BUILD_PREFIXES = new ArrayList<>(2);
     static {
         BUILD_PREFIXES.add("I");
         BUILD_PREFIXES.add("N");
     }
-    public static final List MAINTENANCE_BUILD_PREFIXES = new ArrayList(2);
+    public static final List<String> MAINTENANCE_BUILD_PREFIXES = new ArrayList<>(2);
     static {
         MAINTENANCE_BUILD_PREFIXES.add("I");
         MAINTENANCE_BUILD_PREFIXES.add("M");
     }
-    public static final List BASELINE_BUILD_PREFIXES = new ArrayList(1);
+    public static final List<String> BASELINE_BUILD_PREFIXES = new ArrayList<>(1);
     static {
         BASELINE_BUILD_PREFIXES.add(DB_Results.getDbBaselinePrefix());
     }
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/FingerPrint.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/FingerPrint.java
index 11fac99..9b3b6f4 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/FingerPrint.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/FingerPrint.java
@@ -106,7 +106,7 @@
 	int length = configNames.length;
 	for (int c=0; c<length; c++) {
 		String configName  = configNames[c];
-		List scenarios = performanceResults.getComponentSummaryScenarios(this.component, configName);
+		List<ScenarioResults> scenarios = performanceResults.getComponentSummaryScenarios(this.component, configName);
 		if (scenarios == null) continue;
 
 		// Create BarGraph
@@ -115,7 +115,7 @@
 		List<ConfigResults> allResults = new ArrayList<>();
 		String defaultDimName = DB_Results.getDefaultDimension().getName();
 		for (int i=0, size=scenarios.size(); i<size; i++) {
-			ScenarioResults scenarioResults = (ScenarioResults) scenarios.get(i);
+			ScenarioResults scenarioResults = scenarios.get(i);
 			ConfigResults configResults = scenarioResults.getConfigResults(configName);
 			if (configResults == null || !configResults.isValid()) continue;
 			double[] results = configResults.getCurrentBuildDeltaInfo();
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 079b6a3..d74846d 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
@@ -28,6 +28,7 @@
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.SubMonitor;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.test.internal.performance.results.db.AbstractResults;
 import org.eclipse.test.internal.performance.results.db.ConfigResults;
 import org.eclipse.test.internal.performance.results.db.DB_Results;
 import org.eclipse.test.internal.performance.results.db.PerformanceResults;
@@ -118,7 +119,7 @@
  *
  * @see #baselinePrefix
  */
-List currentBuildPrefixes;
+List<String> currentBuildPrefixes;
 
 /**
  * A list of prefixes of builds to highlight in displayed data graphs.
@@ -127,7 +128,7 @@
  * Example:
  * 	<pre>-higlight 3_2</pre>
  */
-List pointsOfInterest;
+List<String> pointsOfInterest;
 
 /**
  * Tells whether only fingerprints has to be generated.
@@ -253,7 +254,7 @@
 			}
 			buffer.append("	").append(arg).append(" = ");
 			String[] ids = idPrefixList.split(",");
-			this.currentBuildPrefixes = new ArrayList();
+			this.currentBuildPrefixes = new ArrayList<>();
 			for (int j = 0; j < ids.length; j++) {
 				this.currentBuildPrefixes.add(ids[j]);
 				buffer.append(ids[j]);
@@ -270,7 +271,7 @@
 			}
 			buffer.append("	").append(arg).append(" = ");
 			String[] ids = args[i + 1].split(",");
-			this.pointsOfInterest = new ArrayList();
+			this.pointsOfInterest = new ArrayList<>();
 			for (int j = 0; j < ids.length; j++) {
 				this.pointsOfInterest.add(ids[j]);
 				buffer.append(ids[j]);
@@ -640,10 +641,10 @@
 		int configsLength = configs.length;
 		for (int i=0; i<componentsLength; i++) {
 			String componentName = components[i];
-			List scenarioNames = this.performanceResults.getComponentScenarios(componentName);
+			List<AbstractResults> scenarioNames = this.performanceResults.getComponentScenarios(componentName);
 			int size = scenarioNames.size();
 			for (int s=0; s<size; s++) {
-				String scenarioName = ((ScenarioResults) scenarioNames.get(s)).getName();
+				String scenarioName = scenarioNames.get(s).getName();
 				if (scenarioName == null) continue;
 				ScenarioResults scenarioResults = this.performanceResults.getScenarioResults(scenarioName);
 				if (scenarioResults != null) {
@@ -736,11 +737,11 @@
 	String url = config + "/" + scenarioResults.getFileName()+".html";
 	double[] stats = null;
 	if (i==0) { // baseline results
-		List baselinePrefixes;
+		List<String> baselinePrefixes;
 		if (this.baselinePrefix == null) {
 			baselinePrefixes = Util.BASELINE_BUILD_PREFIXES;
 		} else {
-			baselinePrefixes = new ArrayList();
+			baselinePrefixes = new ArrayList<>();
 			baselinePrefixes.add(this.baselinePrefix);
 		}
 		stats = configResults.getStatistics(baselinePrefixes);
@@ -1044,7 +1045,7 @@
 
 	// Init current build prefixes if not set
 	if (this.currentBuildPrefixes == null) {
-		this.currentBuildPrefixes = new ArrayList();
+		this.currentBuildPrefixes = new ArrayList<>();
 		char buildType = buildName.charAt(0);
 		if (buildType == 'M') {
 			this.currentBuildPrefixes.add("M");
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/LineGraph.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/LineGraph.java
index f5e498e..6ebd28a 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/LineGraph.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/LineGraph.java
@@ -55,13 +55,13 @@
 
 
     String fTitle;
-    List fItems;
+    List<GraphItem> fItems;
     Dim fDimension;
 
 
     public LineGraph(String title, Dim dim) {
         this.fTitle= title;
-        this.fItems= new ArrayList();
+        this.fItems= new ArrayList<>();
         this.fDimension= dim;
     }
 
@@ -92,7 +92,7 @@
         int bottom= bounds.height - titleHeight - PADDING;
         int left= PADDING + labelWidth;
 
-        GraphItem lastItem= (GraphItem) this.fItems.get(this.fItems.size()-1);
+        GraphItem lastItem= this.fItems.get(this.fItems.size()-1);
         int right= bounds.width - lastItem.getSize(g).x - PADDING/2;
 
         // draw the title
@@ -122,7 +122,7 @@
         int xposition= left;
 
         for (int i= 0; i < n; i++) {
-            GraphItem thisItem= (GraphItem) this.fItems.get(i);
+            GraphItem thisItem= this.fItems.get(i);
 
             int yposition= (int) (bottom - (((thisItem.value-min) * (bottom-top)) / graduations));
 
@@ -170,7 +170,7 @@
     public double getMaxItem() {
         double maxItem= 0;
         for (int i= 0; i < this.fItems.size(); i++) {
-            GraphItem graphItem= (GraphItem) this.fItems.get(i);
+            GraphItem graphItem= this.fItems.get(i);
             if (graphItem.value > maxItem)
                 maxItem= graphItem.value;
         }
@@ -182,7 +182,7 @@
     public double getMinItem() {
         double minItem= getMaxItem();
         for (int i= 0; i < this.fItems.size(); i++) {
-            GraphItem graphItem= (GraphItem) this.fItems.get(i);
+            GraphItem graphItem= this.fItems.get(i);
             if (graphItem.value < minItem)
                 minItem= graphItem.value;
         }
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/RawDataTable.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/RawDataTable.java
index 14c45d2..e6654c8 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/RawDataTable.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/RawDataTable.java
@@ -16,6 +16,7 @@
 import java.util.List;
 
 import org.eclipse.test.internal.performance.data.Dim;
+import org.eclipse.test.internal.performance.results.db.AbstractResults;
 import org.eclipse.test.internal.performance.results.db.BuildResults;
 import org.eclipse.test.internal.performance.results.db.ConfigResults;
 import org.eclipse.test.internal.performance.results.db.DB_Results;
@@ -28,7 +29,7 @@
 public class RawDataTable {
 
 	private ConfigResults configResults;
-	private List buildPrefixes;
+	private List<String> buildPrefixes;
 	private PrintStream stream;
 	private Dim[] dimensions = DB_Results.getResultsDimensions();
 	private boolean debug = false;
@@ -44,7 +45,7 @@
 }
 public RawDataTable(ConfigResults results, String baselinePrefix, PrintStream ps) {
 	this(results, ps);
-	this.buildPrefixes = new ArrayList();
+	this.buildPrefixes = new ArrayList<>();
 	this.buildPrefixes.add(baselinePrefix);
 }
 
@@ -80,11 +81,11 @@
 	printColumnHeaders();
 	this.stream.print("</tr>\n");
 
-	List<BuildResults> builds = this.configResults.getBuildsMatchingPrefixes(this.buildPrefixes);
+	List<AbstractResults> builds = this.configResults.getBuildsMatchingPrefixes(this.buildPrefixes);
 	Collections.reverse(builds);
 	int size = builds.size();
 	for (int i=0; i<size; i++) {
-		BuildResults buildResults = builds.get(i);
+		BuildResults buildResults = (BuildResults) builds.get(i);
 		this.stream.print("<tr><td>");
 		this.stream.print(buildResults.getName());
 		this.stream.print("</td>");
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/ScenarioData.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/ScenarioData.java
index 9639411..72c8cef 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/ScenarioData.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/ScenarioData.java
@@ -30,6 +30,7 @@
 import org.eclipse.swt.graphics.ImageLoader;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.test.internal.performance.data.Dim;
+import org.eclipse.test.internal.performance.results.db.AbstractResults;
 import org.eclipse.test.internal.performance.results.db.BuildResults;
 import org.eclipse.test.internal.performance.results.db.ComponentResults;
 import org.eclipse.test.internal.performance.results.db.ConfigResults;
@@ -46,7 +47,7 @@
 public class ScenarioData {
 	private String baselinePrefix = null;
 	private List<String> pointsOfInterest;
-	private List buildIDStreamPatterns;
+	private List<String> buildIDStreamPatterns;
 	private File rootDir;
 	private static final int GRAPH_WIDTH = 600;
 	private static final int GRAPH_HEIGHT = 200;
@@ -87,7 +88,7 @@
 /*
  * Returns a LineGraph object representing measurements for a scenario over builds.
  */
-private TimeLineGraph getLineGraph(ScenarioResults scenarioResults, ConfigResults configResults, Dim dim, List highlightedPoints, List currentBuildIdPrefixes) {
+private TimeLineGraph getLineGraph(ScenarioResults scenarioResults, ConfigResults configResults, Dim dim, List<BuildResults> highlightedPoints, List<String> currentBuildIdPrefixes) {
 	Display display = Display.getDefault();
 
 	Color black = display.getSystemColor(SWT.COLOR_BLACK);
@@ -100,10 +101,10 @@
 	String current = configResults.getCurrentBuildName();
 
 	final String defaultBaselinePrefix = DB_Results.getDbBaselinePrefix();
-	Iterator<BuildResults> builds = configResults.getResults();
-	List lastSevenNightlyBuilds = configResults.lastNightlyBuildNames(7);
+	Iterator<AbstractResults> builds = configResults.getResults();
+	List<String> lastSevenNightlyBuilds = configResults.lastNightlyBuildNames(7);
 	buildLoop: while (builds.hasNext()) {
-		BuildResults buildResults = builds.next();
+		BuildResults buildResults = (BuildResults) builds.next();
 		String buildID = buildResults.getName();
 		int underscoreIndex = buildID.indexOf('-');
 		String label = (underscoreIndex != -1 && buildID.equals(current)) ? buildID.substring(0, underscoreIndex) : buildID;
@@ -121,7 +122,7 @@
 			graph.addItem("main", label, dim.getDisplayValue(value), value, color, true, Utils.getDateFromBuildID(buildID), true);
 			continue;
 		}
-		if (highlightedPoints.contains(buildID)) {
+		if (highlightedPoints.contains(buildResults)) {
 			graph.addItem("main", label, dim.getDisplayValue(value), value, black, false, Utils.getDateFromBuildID(buildID, false), true);
 			continue;
 		}
@@ -179,10 +180,10 @@
 		if (printStream != null) printStream.print("		+ "+configName);
 		final File outputDir = new File(this.rootDir, configName);
 		outputDir.mkdir();
-		Iterator<ComponentResults> components = performanceResults.getResults();
+		Iterator<AbstractResults> components = performanceResults.getResults();
 		while (components.hasNext()) {
 			if (printStream != null) printStream.print(".");
-			final ComponentResults componentResults = components.next();
+			final ComponentResults componentResults = (ComponentResults) components.next();
 
 			// Manage monitor
 			int percentage = (int) ((progress++ / total) * 100);
@@ -211,10 +212,10 @@
  * Print the summary file of the builds data.
  */
 void printSummary(String configName, String configBox, ComponentResults componentResults, File outputDir, SubMonitor subMonitor) {
-	Iterator<ScenarioResults> scenarios = componentResults.getResults();
+	Iterator<AbstractResults> scenarios = componentResults.getResults();
 	while (scenarios.hasNext()) {
-		List highlightedPoints = new ArrayList();
-		ScenarioResults scenarioResults = scenarios.next();
+		List<BuildResults> highlightedPoints = new ArrayList<>();
+		ScenarioResults scenarioResults = (ScenarioResults) scenarios.next();
 		ConfigResults configResults = scenarioResults.getConfigResults(configName);
 		if (configResults == null || !configResults.isValid()) continue;
 
@@ -223,7 +224,7 @@
 			Iterator<String> buildPrefixes = this.pointsOfInterest.iterator();
 			while (buildPrefixes.hasNext()) {
 				String buildPrefix = buildPrefixes.next();
-				List builds = configResults.getBuilds(buildPrefix);
+				List<BuildResults> builds = configResults.getBuilds(buildPrefix);
 				if (buildPrefix.indexOf('*') <0 && buildPrefix.indexOf('?') < 0) {
 					if (builds.size() > 0) {
 						highlightedPoints.add(builds.get(builds.size()-1));
@@ -400,9 +401,9 @@
  * Print details file of the scenario builds data.
  */
 private void printDetails(String configName, String configBox, ComponentResults componentResults, File outputDir) {
-	Iterator<ScenarioResults> scenarios = componentResults.getResults();
+	Iterator<AbstractResults> scenarios = componentResults.getResults();
 	while (scenarios.hasNext()) {
-		ScenarioResults scenarioResults = scenarios.next();
+		ScenarioResults scenarioResults = (ScenarioResults) scenarios.next();
 		ConfigResults configResults = scenarioResults.getConfigResults(configName);
 		if (configResults == null || !configResults.isValid()) continue;
 		String scenarioName= scenarioResults.getName();
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/ScenarioStatusTable.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/ScenarioStatusTable.java
index c08a3dc..93f56a2 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/ScenarioStatusTable.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/ScenarioStatusTable.java
@@ -14,6 +14,7 @@
 import java.util.List;
 import java.util.StringTokenizer;
 
+import org.eclipse.test.internal.performance.results.db.AbstractResults;
 import org.eclipse.test.internal.performance.results.db.BuildResults;
 import org.eclipse.test.internal.performance.results.db.ConfigResults;
 import org.eclipse.test.internal.performance.results.db.PerformanceResults;
@@ -43,7 +44,7 @@
 public void print(PerformanceResults performanceResults) {
 
 	String baselineName = performanceResults.getBaselineName();
-	List scenarios = performanceResults.getComponentScenarios(this.component);
+	List<AbstractResults> scenarios = performanceResults.getComponentScenarios(this.component);
 	int size = scenarios.size();
 
 	// Print titles
@@ -86,7 +87,7 @@
 	this.stream.print("</table>\n");
 }
 
-private int computeSize(List scenarios) {
+private int computeSize(List<AbstractResults> scenarios) {
 	int size = scenarios.size();
 	int n = 0;
 	for (int i=0; i<size; i++) {
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Utils.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Utils.java
index 8b3858a..b8eb443 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Utils.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Utils.java
@@ -119,9 +119,9 @@
    * Copy all bundle files contained in the given path
    */
   public static void copyBundleFiles(Bundle bundle, String path, String pattern, File output) {
-    Enumeration imageFiles = bundle.findEntries(path, pattern, false);
+    Enumeration<URL> imageFiles = bundle.findEntries(path, pattern, false);
     while (imageFiles.hasMoreElements()) {
-      URL url = (URL) imageFiles.nextElement();
+      URL url = imageFiles.nextElement();
       try {
         File outputFile = new File(output, url.getFile());
         if (!outputFile.getParentFile().exists()) {
@@ -174,7 +174,7 @@
       return data;
 
     // compute a histogram of color frequencies
-    HashMap freq = new HashMap();
+    HashMap<RGB, ColorCounter> freq = new HashMap<>();
     int width = data.width;
     int[] pixels = new int[width];
     int[] maskPixels = new int[width];
@@ -182,7 +182,7 @@
       data.getPixels(0, y, width, pixels, 0);
       for (int x = 0; x < width; ++x) {
         RGB rgb = data.palette.getRGB(pixels[x]);
-        ColorCounter counter = (ColorCounter) freq.get(rgb);
+        ColorCounter counter = freq.get(rgb);
         if (counter == null) {
           counter = new ColorCounter();
           counter.rgb = rgb;