Bug 510678 - Cleanup o.e.test.performance.ui

* Add override annotations.
* Move away of new *Scope to *Scope.INSTANCE.
* Convert to lambdas.
* Use try-with-resources.
* Enable more warnings

Change-Id: I770e6f4d37de85ee80274b1abd4456ee392e3214
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/bundles/org.eclipse.test.performance.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.test.performance.ui/.settings/org.eclipse.jdt.core.prefs
index 919aca7..f34b72e 100644
--- a/bundles/org.eclipse.test.performance.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.test.performance.ui/.settings/org.eclipse.jdt.core.prefs
@@ -12,8 +12,11 @@
 org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
 org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
 org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
 org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
 org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
 org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
@@ -28,13 +31,13 @@
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
 org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
 org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=ignore
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
 org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
@@ -45,14 +48,14 @@
 org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
 org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
 org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
 org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
 org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
 org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
@@ -60,20 +63,22 @@
 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
 org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
 org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
 org.eclipse.jdt.core.compiler.problem.nullReference=error
 org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
 org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
 org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
 org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
 org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
 org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
 org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
 org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
 org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
@@ -89,12 +94,13 @@
 org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedImport=warning
 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
 org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
diff --git a/bundles/org.eclipse.test.performance.ui/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.test.performance.ui/.settings/org.eclipse.jdt.ui.prefs
index 75aabbe..b265bfc 100644
--- a/bundles/org.eclipse.test.performance.ui/.settings/org.eclipse.jdt.ui.prefs
+++ b/bundles/org.eclipse.test.performance.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -58,6 +58,7 @@
 cleanup_profile=_Eclipse Releng
 cleanup_settings_version=2
 eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
 formatter_profile=_Eclipse Releng
 formatter_settings_version=12
 org.eclipse.jdt.ui.exception.name=e
@@ -70,3 +71,60 @@
 org.eclipse.jdt.ui.overrideannotation=true
 org.eclipse.jdt.ui.staticondemandthreshold=99
 org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
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 e0a65b6..79fe6d9 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -80,6 +80,7 @@
  *
  * @see java.lang.Comparable#compareTo(java.lang.Object)
  */
+@Override
 public int compareTo(Object obj) {
 	if (obj instanceof AbstractResults) {
 		AbstractResults res = (AbstractResults) obj;
@@ -97,6 +98,7 @@
  * 	<code>false</code> otherwise
  * @see java.lang.Comparable#compareTo(java.lang.Object)
  */
+@Override
 public boolean equals(Object obj) {
 	if (obj instanceof AbstractResults) {
 		return this.name.equals(((AbstractResults)obj).getName());
@@ -187,6 +189,7 @@
 	return null;
 }
 
+@Override
 public int hashCode() {
 	return this.name.hashCode();
 }
@@ -251,6 +254,7 @@
 	return this.children == null ? 0 : this.children.size();
 }
 
+@Override
 public String toString() {
 	return getPath();
 }
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 ff6788b..2be34da 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -97,6 +97,7 @@
      *
      * @see Comparable#compareTo(Object)
      */
+    @Override
     public int compareTo(Object obj) {
         if (obj instanceof BuildResults) {
             BuildResults res = (BuildResults) obj;
@@ -519,9 +520,7 @@
         }
     }
 
-/* (non-Javadoc)
- * @see org.eclipse.test.internal.performance.results.AbstractResults#toString()
-     */
+    @Override
     public String toString() {
         StringBuffer buffer = new StringBuffer(this.name);
         buffer.append(": "); //$NON-NLS-1$
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 8754b76..8994351 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,7 +21,6 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Comparator;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -68,16 +67,15 @@
 	Set allBuildNames = getAllBuildNames();
 	String[] sortedNames = new String[allBuildNames.size()];
 	allBuildNames.toArray(sortedNames);
-	Arrays.sort(sortedNames, new Comparator() {
-		public int compare(Object o1, Object o2) {
-			String s1 = (String) (reverse ? o2 : o1);
-			String s2 = (String) (reverse ? o1 : o2);
-			return Util.getBuildDate(s1).compareTo(Util.getBuildDate(s2));
-	    }
-	});
+	Arrays.sort(sortedNames, (o1, o2) -> {
+  	String s1 = reverse ? o2 : o1;
+  	String s2 = reverse ? o1 : o2;
+  	return Util.getBuildDate(s1).compareTo(Util.getBuildDate(s2));
+    });
 	return sortedNames;
 }
 
+@Override
 ComponentResults getComponentResults() {
 	return this;
 }
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 e70b599..41e5459 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -43,7 +43,7 @@
 
     // This doesn't seem good (was just R-, instead of using what we pass in)
 	private static final String DEFAULT_DB_BASELINE_PREFIX = "R-4.6";
-	
+
 	private static final Dim[] NO_DIMENSION = new Dim[0];
 	private static final String[] EMPTY_LIST = new String[0];
 	static final boolean DEBUG = true;
@@ -328,7 +328,8 @@
 			this.times = new long[10];
     		this.buffers = new StringBuffer[10];
     	}
-		public String toString() {
+		@Override
+    public String toString() {
 	        return LOG_STR_WRITER.toString();
         }
     }
@@ -356,7 +357,8 @@
             	// not started as plugin
 	            Runtime.getRuntime().addShutdownHook(
 	                new Thread() {
-	                    public void run() {
+	                    @Override
+                      public void run() {
 	                    	shutdown();
 	                    }
 	                }
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 e9f47f7..3fe2ec5 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -122,7 +122,7 @@
  * @return The names list of all currently known builds
  */
 public String[] getAllBuildNames() {
-    
+
 	if (this.allBuildNames == null) {
 		setAllBuildNames();
 	}
@@ -299,6 +299,7 @@
 	return this.name;
 }
 
+@Override
 public String getName() {
 	if (this.name == null) {
 		setAllBuildNames();
@@ -306,10 +307,7 @@
 	return this.name;
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.test.internal.performance.results.AbstractResults#getPerformance()
- */
+@Override
 PerformanceResults getPerformance() {
 	return this;
 }
@@ -688,13 +686,13 @@
         // 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" of finding last build, 
+        // so, we only compute this "default behavior" of finding last build,
 		// and equating it to "name", only if lastBuildName has not been set yet.
-		// For the case where "-current" is passed as an argument, in GenerateResults, we do 
+		// For the case where "-current" is passed as an argument, in GenerateResults, we do
 		// "setLastBuildName" to "current". See bug 455656.
 		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=455656
 		String lastBuild = null;
-		// Note: we can not call "getLastBuildName()" because it has the side effects we are 
+		// Note: we can not call "getLastBuildName()" because it has the side effects we are
 		// trying to avoid.
         if (this.lastBuildName == null) {
             int idx = n - 1;
@@ -759,7 +757,7 @@
 		int index = this.baselineName.lastIndexOf('-');
 		if (index > 0) {
 			this.baselinePrefix = this.baselineName.substring(0, index);
-		} else { 
+		} else {
 		    // use hard coded value (currently R-4.5)
 		    this.baselinePrefix = DB_Results.getDbBaselinePrefix();
 		}
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/SQL_Results.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/SQL_Results.java
index a360207..26ab852 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/SQL_Results.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/db/SQL_Results.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,6 +41,7 @@
 	    // TODO Auto-generated constructor stub
     }
 
+@Override
 protected void dispose() throws SQLException {
 	super.dispose();
 	if (this.queryBuildScenarios != null)
@@ -183,11 +184,11 @@
 		this.queryScenarioTimestampDataPoints = this.fConnection.prepareStatement(statement);
 	}
 	this.queryScenarioTimestampDataPoints.setInt(1, scenarioID);
-	// 10/29/2015, dw. Not sure why this timestamp was set 5 hours in future. 
-	// UTC? Location of previous performance machines? 
-	// But, should not be required, AFAIK. 
+	// 10/29/2015, dw. Not sure why this timestamp was set 5 hours in future.
+	// UTC? Location of previous performance machines?
+	// But, should not be required, AFAIK.
 	// Timestamp timestamp = new Timestamp(lastBuildTime+(5*3600L*1000)); // create a time-stamp 5h after the given build time
-	Timestamp timestamp = new Timestamp(lastBuildTime); 
+	Timestamp timestamp = new Timestamp(lastBuildTime);
 	this.queryScenarioTimestampDataPoints.setTimestamp(2, timestamp);
 	ResultSet resultSet =  this.queryScenarioTimestampDataPoints.executeQuery();
 	if (DB_Results.LOG) DB_Results.LOG_WRITER.ends(")"); //$NON-NLS-1$
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 63e1072..1bc51d4 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
@@ -47,10 +47,9 @@
  */
 void completeResults(String lastBuildName) {
 	String[] builds = DB_Results.getBuilds();
-	class BuildDateComparator implements Comparator {
-		public int compare(Object o1, Object o2) {
-	        String s1 = (String) o1;
-	        String s2 = (String) o2;
+	class BuildDateComparator implements Comparator<String> {
+		@Override
+    public int compare(String s1, String s2) {
 	        return Util.getBuildDate(s1).compareTo(Util.getBuildDate(s2));
 	    }
 	}
@@ -219,6 +218,7 @@
 /* (non-Javadoc)
  * @see org.eclipse.test.internal.performance.results.AbstractResults#hashCode()
  */
+@Override
 public int hashCode() {
 	return this.id;
 }
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 1892e75..056eb63 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -149,6 +149,7 @@
 	initInfo();
 }
 
+@Override
 public int compareTo(Object o) {
 	if (o instanceof BuildResultsElement && getName() != null) {
 		BuildResultsElement element = (BuildResultsElement)o;
@@ -160,6 +161,7 @@
 	return super.compareTo(o);
 }
 
+@Override
 ResultsElement createChild(AbstractResults testResults) {
 	return null;
 }
@@ -168,6 +170,7 @@
 	return (BuildResults) this.results;
 }
 
+@Override
 public Object[] getChildren(Object o) {
 	if (this.results == null) {
 		return new Object[0];
@@ -178,6 +181,7 @@
 	return this.children;
 }
 
+@Override
 public Object getEditableValue() {
 	if (this.results == null)  {
 		return "Build "+this.name;
@@ -185,9 +189,7 @@
 	return this.results.toString();
 }
 
-/* (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
- */
+@Override
 public IPropertyDescriptor[] getPropertyDescriptors() {
 	Vector descriptors = getDescriptors();
 	if (descriptors == null) {
@@ -203,9 +205,7 @@
 	return descriptorsArray;
 }
 
-/* (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
- */
+@Override
 public Object getPropertyValue(Object propKey) {
 	BuildResults buildResults = getBuildResults();
 	if (buildResults != null) {
@@ -287,6 +287,7 @@
  * <li>3:	coefficient of variation of these values</li>
  * </ul>
  */
+@Override
 double[] getStatistics() {
 	if (this.statistics  == null) {
 		this.statistics = ((ConfigResults)getBuildResults().getParent()).getStatistics(Util.BASELINE_BUILD_PREFIXES);
@@ -294,6 +295,7 @@
 	return this.statistics;
 }
 
+@Override
 void initChildren() {
 	BuildResults buildResults = (BuildResults) this.results;
 	Dim[] dimensions = buildResults.getDimensions();
@@ -312,6 +314,7 @@
 	this.important = this.milestone || Util.getNextMilestone(this.name) == null;
 }
 
+@Override
 void initStatus() {
 	if (this.results == null) {
 		if (this.parent.isInitialized()) {
@@ -358,9 +361,7 @@
 	return (getStatus()  & STATE_MASK) == UNKNOWN;
 }
 
-/* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
+@Override
 public String toString() {
 	return getName();
 }
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 d72c0f4..3beee24 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -80,6 +80,7 @@
  *
  * @see org.eclipse.test.internal.performance.results.model.ResultsElement#createChild(org.eclipse.test.internal.performance.results.db.AbstractResults)
  */
+@Override
 ResultsElement createChild(AbstractResults testResults) {
 //	if (onlyFingerprints()) {
 //		ScenarioResults scenarioResults = (ScenarioResults) testResults;
@@ -102,9 +103,7 @@
 	return ((ComponentResults)this.results).getConfigNumbers(configName, fingerprints, new ArrayList());
 }
 
-/* (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
- */
+@Override
 public IPropertyDescriptor[] getPropertyDescriptors() {
 	Vector descriptors = getDescriptors();
 	if (descriptors == null) {
@@ -120,9 +119,7 @@
 	return descriptorsArray;
 }
 
-/* (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
- */
+@Override
 public Object getPropertyValue(Object propKey) {
 	if (propKey.equals(P_ID_NAME)) {
 		return getName();
@@ -189,10 +186,7 @@
 	return labels;
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.test.internal.performance.results.model.ResultsElement#initStatus()
- */
+@Override
 void initStatus() {
 	if (this.results == null) {
 		this.status = UNREAD;
@@ -201,6 +195,7 @@
 	}
 }
 
+@Override
 StringBuffer getFailures(StringBuffer buffer, int kind, StringBuffer excluded) {
 	// Write status for scenarios having error
 	if ((getStatus() & ERROR_MASK) != 0) {
@@ -211,7 +206,7 @@
 		// Write status on file if not excluded
 		if (childrenBuffer.length() > 0) {
 			buffer.append(getName());
-			IEclipsePreferences preferences = new InstanceScope().getNode(IPerformancesConstants.PLUGIN_ID);
+			IEclipsePreferences preferences = InstanceScope.INSTANCE.getNode(IPerformancesConstants.PLUGIN_ID);
 			String comment = preferences.get(getId(), null);
 			if (comment != null) {
 				if ((kind & IPerformancesConstants.STATUS_VALUES) != 0) {
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 7ff902a..12e5d49 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -138,10 +138,12 @@
 	super(results, parent);
 }
 
+@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);
 }
@@ -174,6 +176,7 @@
 	return this.currentBuild;
 }
 
+@Override
 public String getLabel(Object o) {
 	String description = getConfigResults().getDescription();
 	int index = description.indexOf(" (");
@@ -183,11 +186,7 @@
 	return description.substring(0, index);
 }
 
-/*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
- */
+@Override
 public IPropertyDescriptor[] getPropertyDescriptors() {
 	Vector descriptors = getDescriptors();
 	if (descriptors == null) {
@@ -203,13 +202,7 @@
 	return descriptorsArray;
 }
 
-/*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang
- * .Object)
- */
+@Override
 public Object getPropertyValue(Object propKey) {
 	ConfigResults configResults = getConfigResults();
 	if (propKey.equals(P_ID_CONFIG_NAME)) {
@@ -259,6 +252,7 @@
  * <li>3:	coefficient of variation of these values</li>
  * </ul>
  */
+@Override
 public double[] getStatistics() {
 	if (this.statistics  == null) {
 		this.statistics = getConfigResults().getStatistics(Util.BASELINE_BUILD_PREFIXES);
@@ -266,6 +260,7 @@
 	return this.statistics;
 }
 
+@Override
 void initStatus() {
 	ConfigResults configResults = getConfigResults();
 	if (configResults.isValid()) {
@@ -278,6 +273,7 @@
 /*
  * Write the element status in the given stream
  */
+@Override
 StringBuffer getFailures(StringBuffer buffer, int kind, StringBuffer excluded) {
 	if ((this.status & BIG_DELTA) != 0) { // there's a failure on this config
 
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 219e0b0..1859c12 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -80,6 +80,7 @@
 	this.dim = d;
 }
 
+@Override
 ResultsElement createChild(AbstractResults testResults) {
 	return null;
 }
@@ -88,13 +89,12 @@
 	return (BuildResults) this.results;
 }
 
+@Override
 public String getLabel(Object o) {
 	return this.dim.getName();
 }
 
-/* (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
- */
+@Override
 public IPropertyDescriptor[] getPropertyDescriptors() {
 	Vector descriptors = getDescriptors();
 	if (descriptors == null) {
@@ -110,9 +110,7 @@
 	return descriptorsArray;
 }
 
-/* (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
- */
+@Override
 public Object getPropertyValue(Object propKey) {
 	BuildResults buildResults = getBuildResults();
     if (propKey.equals(P_ID_DIMENSION)) {
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/PerformanceResultsElement.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/PerformanceResultsElement.java
index f671edc..33e592e 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/PerformanceResultsElement.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/model/PerformanceResultsElement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,6 +41,7 @@
 	super();
 }
 
+@Override
 ResultsElement createChild(AbstractResults testResults) {
 	return new ComponentResultsElement(testResults, this);
 }
@@ -159,6 +160,7 @@
 	return true;
 }
 
+@Override
 public boolean isInitialized() {
 	return super.isInitialized() && this.results.size() > 0;
 }
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 ecd5aac..691dfb6 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -171,6 +171,7 @@
 	this.name = name;
 }
 
+@Override
 public int compareTo(Object o) {
 	if (this.results == null) {
 		if (o instanceof ResultsElement && this.name != null) {
@@ -187,15 +188,13 @@
 
 abstract ResultsElement createChild(AbstractResults testResults);
 
-/* (non-Javadoc)
- * Method declared on IAdaptable
- */
-public Object getAdapter(Class adapter) {
+@Override
+public <T> T getAdapter(Class<T> adapter) {
     if (adapter == IPropertySource.class) {
-        return this;
+        return (T) this;
     }
     if (adapter == IWorkbenchAdapter.class) {
-        return this;
+        return (T) this;
     }
     return null;
 }
@@ -213,9 +212,7 @@
     return this.children;
 }
 
-/* (non-Javadoc)
- * Method declared on IWorkbenchAdapter
- */
+@Override
 public Object[] getChildren(Object o) {
 	if (this.results == null) {
 		return new Object[0];
@@ -226,9 +223,7 @@
     return this.children;
 }
 
-/* (non-Javadoc)
- * Method declared on IPropertySource
- */
+@Override
 public Object getEditableValue() {
     return this;
 }
@@ -244,9 +239,7 @@
 	return buffer.append(DB_Results.getDbName());
 }
 
-/* (non-Javadoc)
- * Method declared on IWorkbenchAdapter
- */
+@Override
 public ImageDescriptor getImageDescriptor(Object object) {
 	if (object instanceof ResultsElement) {
 		ResultsElement resultsElement = (ResultsElement) object;
@@ -277,9 +270,7 @@
 	return null;
 }
 
-/* (non-Javadoc)
- * Method declared on IWorkbenchAdapter
- */
+@Override
 public String getLabel(Object o) {
     return getName();
 }
@@ -297,13 +288,12 @@
 /**
  * Returns the parent
  */
+@Override
 public Object getParent(Object o) {
     return this.parent;
 }
 
-/* (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
- */
+@Override
 public IPropertyDescriptor[] getPropertyDescriptors() {
 	Vector descriptors = getDescriptors();
 	if (descriptors == null) {
@@ -319,9 +309,7 @@
 	return descriptorsArray;
 }
 
-/* (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
- */
+@Override
 public Object getPropertyValue(Object propKey) {
 	if (propKey.equals(P_ID_STATUS_INFO)) {
 		if ((getStatus() & INFO_MASK) != 0) {
@@ -339,7 +327,7 @@
 		}
 	}
 	if (propKey.equals(P_ID_STATUS_COMMENT)) {
-		IEclipsePreferences preferences = new InstanceScope().getNode(IPerformancesConstants.PLUGIN_ID);
+		IEclipsePreferences preferences = InstanceScope.INSTANCE.getNode(IPerformancesConstants.PLUGIN_ID);
 		return preferences.get(getId(), "");
 	}
 	return null;
@@ -527,9 +515,7 @@
 	return this.results != null;
 }
 
-/* (non-Javadoc)
- * Method declared on IPropertySource
- */
+@Override
 public boolean isPropertySet(Object property) {
     return false;
 }
@@ -541,9 +527,7 @@
 	return ((PerformanceResultsElement)this).fingerprints;
 }
 
-/* (non-Javadoc)
- * Method declared on IPropertySource
- */
+@Override
 public void resetPropertyValue(Object property) {
 }
 
@@ -558,9 +542,10 @@
 	}
 }
 
+@Override
 public void setPropertyValue(Object name, Object value) {
 	if (name.equals(P_ID_STATUS_COMMENT)) {
-		IEclipsePreferences preferences = new InstanceScope().getNode(IPerformancesConstants.PLUGIN_ID);
+		IEclipsePreferences preferences = InstanceScope.INSTANCE.getNode(IPerformancesConstants.PLUGIN_ID);
 		preferences.put(getId(), (String) value);
 		try {
 			preferences.flush();
@@ -577,6 +562,7 @@
 //    this.imageDescriptor = desc;
 }
 
+@Override
 public String toString() {
 	if (this.results == null) {
 		return getName();
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 0efd5cd..2527b0a 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -64,17 +64,17 @@
     super(results, parent);
 }
 
+@Override
 ResultsElement createChild(AbstractResults testResults) {
 	return new ConfigResultsElement(testResults, this);
 }
 
+@Override
 public String getLabel(Object o) {
 	return ((ScenarioResults) this.results).getShortName();
 }
 
-/* (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
- */
+@Override
 public IPropertyDescriptor[] getPropertyDescriptors() {
 	Vector descriptors = getDescriptors();
 	if (descriptors == null) {
@@ -90,9 +90,7 @@
 	return descriptorsArray;
 }
 
-/* (non-Javadoc)
- * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
- */
+@Override
 public Object getPropertyValue(Object propKey) {
 	ScenarioResults scenarioResults = (ScenarioResults) this.results;
     if (propKey.equals(P_ID_SCENARIO_LABEL))
@@ -115,6 +113,7 @@
 	return ((ScenarioResults)this.results).hasSummary();
 }
 
+@Override
 void initStatus() {
 	if (onlyFingerprints()) {
 		if (hasSummary()) {
@@ -127,6 +126,7 @@
 	}
 }
 
+@Override
 StringBuffer getFailures(StringBuffer buffer, int kind, StringBuffer excluded) {
 	// Write status for scenarios having error
 	if ((getStatus() & ERROR_MASK) != 0) {
@@ -138,7 +138,7 @@
 		if (childrenBuffer.length() > 0) {
 			buffer.append("	");
 			buffer.append(getLabel(null));
-			IEclipsePreferences preferences = new InstanceScope().getNode(IPerformancesConstants.PLUGIN_ID);
+			IEclipsePreferences preferences = InstanceScope.INSTANCE.getNode(IPerformancesConstants.PLUGIN_ID);
 			String comment = preferences.get(getId(), null);
 			if (comment != null) {
 				if ((kind & IPerformancesConstants.STATUS_VALUES) != 0) {
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 5615b23..13b3055 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -91,7 +91,7 @@
  */
 public BuildsComparisonTab(String name) {
     this.componentName = name;
-	this.preferences = new InstanceScope().getNode(IPerformancesConstants.PLUGIN_ID);
+	this.preferences = InstanceScope.INSTANCE.getNode(IPerformancesConstants.PLUGIN_ID);
 }
 
 /**
@@ -152,7 +152,8 @@
 	// Listen to mouse track events to display the table cell corresponding tooltip.
 	MouseTrackListener mouseTrackListener = new MouseTrackListener() {
 		ToolTip currentTooltip;
-		public void mouseHover(MouseEvent e) {
+		@Override
+    public void mouseHover(MouseEvent e) {
 			if (this.currentTooltip != null) {
 				this.currentTooltip.setVisible(false);
 				this.currentTooltip = null;
@@ -168,9 +169,11 @@
 				}
 			}
 		}
-		public void mouseEnter(MouseEvent e) {
+		@Override
+    public void mouseEnter(MouseEvent e) {
 		}
-		public void mouseExit(MouseEvent e) {
+		@Override
+    public void mouseExit(MouseEvent e) {
 		}
 	};
 	this.table.addMouseTrackListener(mouseTrackListener);
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsComparisonView.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsComparisonView.java
index 975c268..a911c44 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsComparisonView.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsComparisonView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -93,7 +93,7 @@
  * 	- register the view as a properties listener
  */
 public BuildsComparisonView() {
-	this.preferences = new InstanceScope().getNode(IPerformancesConstants.PLUGIN_ID);
+	this.preferences = InstanceScope.INSTANCE.getNode(IPerformancesConstants.PLUGIN_ID);
 	this.preferences.addPreferenceChangeListener(this);
 	// TODO should be done only once!
 	Util.initMilestones(this.preferences);
@@ -108,10 +108,7 @@
 	fillLocalToolBar(bars.getToolBarManager());
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
+@Override
 public void createPartControl(Composite parent) {
 
 	// Create the tab folder
@@ -119,14 +116,12 @@
 	this.tabFolder = new CTabFolder(parent, SWT.BORDER);
 
 	// Add results view as listener to viewer selection changes
-	Display.getDefault().asyncExec(new Runnable() {
-		public void run() {
-			PerformancesView performancesView = (PerformancesView) PerformancesView.getWorkbenchView("org.eclipse.test.internal.performance.results.ui.ComponentsView");
-			if (performancesView != null) {
-				performancesView.viewer.addSelectionChangedListener(BuildsComparisonView.this);
-			}
-		}
-	});
+	Display.getDefault().asyncExec(() -> {
+  	PerformancesView performancesView = (PerformancesView) PerformancesView.getWorkbenchView("org.eclipse.test.internal.performance.results.ui.ComponentsView");
+  	if (performancesView != null) {
+  		performancesView.viewer.addSelectionChangedListener(BuildsComparisonView.this);
+  	}
+  });
 
 	// Set actions
 	PlatformUI.getWorkbench().getHelpSystem().setHelp(this.tabFolder, "org.eclipse.test.performance.ui.results");
@@ -165,10 +160,7 @@
 	this.tabFolder.setSelection(0);
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#dispose()
- */
+@Override
 public void dispose() {
 	this.tabFolder.dispose();
 	int length = this.tabs==null ? 0 : this.tabs.length;
@@ -225,10 +217,7 @@
 	return this.buildsView;
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.ViewPart#init(org.eclipse.ui.IViewSite, org.eclipse.ui.IMemento)
- */
+@Override
 public void init(IViewSite site, IMemento memento) throws PartInitException {
 	super.init(site, memento);
 	this.viewState = memento;
@@ -245,7 +234,8 @@
 
 	// Filter non-fingerprints action
 	this.filterAdvancedScenarios = new Action("Advanced &Scenarios", IAction.AS_CHECK_BOX) {
-		public void run() {
+		@Override
+    public void run() {
 			BuildsComparisonView.this.preferences.putBoolean(IPerformancesConstants.PRE_FILTER_ADVANCED_SCENARIOS, isChecked());
 			resetTabFolders(false/*refresh*/);
         }
@@ -255,7 +245,8 @@
 
 	// Write comparison
 	this.writeComparison = new Action("Write comparison") {
-		public void run() {
+		@Override
+    public void run() {
 
 			// Get write directory
 			BuildsView bView = getBuildsView();
@@ -270,9 +261,7 @@
 	this.writeComparison.setToolTipText("Write comparison between two builds");
 }
 
-/* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener#preferenceChange(org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent)
- */
+@Override
 public void preferenceChange(PreferenceChangeEvent event) {
 	String propertyName = event.getKey();
 	Object newValue = event.getNewValue();
@@ -328,18 +317,12 @@
 	this.filterAdvancedScenarios.setChecked(checked);
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.ViewPart#saveState(org.eclipse.ui.IMemento)
- */
+@Override
 public void saveState(IMemento memento) {
 	super.saveState(memento);
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
+@Override
 public void selectionChanged(SelectionChangedEvent event) {
 	final Object[] selection = ((TreeSelection) event.getSelection()).toArray();
 	String firstBuildResults = null;
@@ -364,10 +347,7 @@
 	}
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
- */
+@Override
 public void setFocus() {
 	// do nothing
 }
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 7559e97..705a42f 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -72,7 +72,8 @@
 	final class GenerateAction extends Action {
 		IStatus status;
 
-		public void run() {
+		@Override
+    public void run() {
 
 			// Ask for output directory
 			String resultGenerationDir = BuildsView.this.preferences.get(IPerformancesConstants.PRE_RESULTS_GENERATION_DIR, "");
@@ -119,17 +120,15 @@
 			final boolean fingerprints = MessageDialog.openQuestion(BuildsView.this.shell, getTitleToolTip(), "Generate only fingerprints?");
 
 			// Generate all selected builds
-			IRunnableWithProgress runnable = new IRunnableWithProgress() {
-				public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-					try {
-						monitor.beginTask("Generate performance results", BuildsView.this.buildsResults.length*2);
-						generate(baselineName, fingerprints, monitor);
-						monitor.done();
-					} catch (Exception e) {
-						e.printStackTrace();
-					}
-				}
-			};
+			IRunnableWithProgress runnable = monitor -> {
+      	try {
+      		monitor.beginTask("Generate performance results", BuildsView.this.buildsResults.length*2);
+      		generate(baselineName, fingerprints, monitor);
+      		monitor.done();
+      	} catch (Exception e) {
+      		e.printStackTrace();
+      	}
+      };
 			ProgressMonitorDialog readProgress = new ProgressMonitorDialog(getSite().getShell());
 			try {
 				readProgress.run(true, true, runnable);
@@ -223,7 +222,8 @@
 			this.force = force;
 		}
 
-		public void run() {
+		@Override
+    public void run() {
 
 			// Verify that directories are set
 			if (BuildsView.this.dataDir == null) {
@@ -235,16 +235,13 @@
 			}
 
 			// Progress dialog
-			IRunnableWithProgress runnable = new IRunnableWithProgress() {
-
-				public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-					try {
-						updateBuilds(monitor);
-					} catch (Exception e) {
-						e.printStackTrace();
-					}
-				}
-			};
+			IRunnableWithProgress runnable = monitor -> {
+      	try {
+      		updateBuilds(monitor);
+      	} catch (Exception e) {
+      		e.printStackTrace();
+      	}
+      };
 			ProgressMonitorDialog readProgress = new ProgressMonitorDialog(getSite().getShell());
 			try {
 				readProgress.run(true, true, runnable);
@@ -281,7 +278,8 @@
 //			return elements != null;
 //		}
 
-		void updateBuilds(IProgressMonitor monitor) {
+		@Override
+    void updateBuilds(IProgressMonitor monitor) {
 			BuildsView.this.updateAllBuilds(monitor, this.force);
 		}
 	}
@@ -291,10 +289,9 @@
 	 *
 	 * @see Util#getBuildDate(String)
 	 */
-	class BuildDateComparator implements Comparator {
-		public int compare(Object o1, Object o2) {
-	        String s1 = (String) o1;
-	        String s2 = (String) o2;
+	class BuildDateComparator implements Comparator<String> {
+		@Override
+    public int compare(String s1, String s2) {
 	        return Util.getBuildDate(s1).compareTo(Util.getBuildDate(s2));
 	    }
 	}
@@ -323,7 +320,7 @@
  * Default constructor.
  */
 public BuildsView() {
-	this.preferences = new InstanceScope().getNode(IPerformancesConstants.PLUGIN_ID);
+	this.preferences = InstanceScope.INSTANCE.getNode(IPerformancesConstants.PLUGIN_ID);
 	this.preferences.addPreferenceChangeListener(this);
 }
 
@@ -348,9 +345,7 @@
 	return buildsToUpdate;
 }
 
-/* (non-Javadoc)
- * @see org.eclipse.test.internal.performance.results.ui.PerformancesView#createPartControl(org.eclipse.swt.widgets.Composite)
- */
+@Override
 public void createPartControl(Composite parent) {
 	super.createPartControl(parent);
 
@@ -359,7 +354,8 @@
 
 	// Set the content provider: first level is builds list
 	WorkbenchContentProvider contentProvider = new WorkbenchContentProvider() {
-		public Object[] getElements(Object o) {
+		@Override
+    public Object[] getElements(Object o) {
 			return getBuilds();
 		}
 	};
@@ -369,7 +365,8 @@
 	WorkbenchLabelProvider labelProvider = new WorkbenchLabelProvider() {
 
 		// Set an italic font when no local data have been read
-		public Font getFont(Object element) {
+		@Override
+    public Font getFont(Object element) {
 			Font font = super.getFont(element);
 			if (element instanceof BuildResultsElement) {
 				if (((BuildResultsElement) element).isUnknown()) {
@@ -385,7 +382,8 @@
 		}
 
 		// Set font in gray when no local data is available (i.e. local data needs to be updated)
-		public Color getForeground(Object element) {
+		@Override
+    public Color getForeground(Object element) {
 			Color color = super.getForeground(element);
 			if (element instanceof BuildResultsElement) {
 				if (!((BuildResultsElement) element).isRead()) {
@@ -402,7 +400,8 @@
 
 		// Sort children using specific comparison (see the implementation
 		// of the #compareTo(Object) in the ResultsElement hierarchy
-		public int compare(Viewer view, Object e1, Object e2) {
+		@Override
+    public int compare(Viewer view, Object e1, Object e2) {
 			if (e2 instanceof ResultsElement) {
 				return ((ResultsElement) e2).compareTo(e1);
 			}
@@ -412,23 +411,19 @@
 	this.viewer.setSorter(nameSorter);
 
 	// Add results view as listener to viewer selection changes
-	Display.getDefault().asyncExec(new Runnable() {
-		public void run() {
-			ISelectionChangedListener listener = getComparisonView();
-			if (listener != null) {
-				BuildsView.this.viewer.addSelectionChangedListener(listener);
-			}
-		}
-	});
+	Display.getDefault().asyncExec(() -> {
+  	ISelectionChangedListener listener = getComparisonView();
+  	if (listener != null) {
+  		BuildsView.this.viewer.addSelectionChangedListener(listener);
+  	}
+  });
 
 	// Finalize viewer initialization
 	PlatformUI.getWorkbench().getHelpSystem().setHelp(this.viewer.getControl(), "org.eclipse.test.performance.ui.builds");
 	finalizeViewerCreation();
 }
 
-/* (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#dispose()
- */
+@Override
 public void dispose() {
 	if (this.italicFont != null) {
 		this.italicFont.dispose();
@@ -436,10 +431,7 @@
 	super.dispose();
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.test.internal.performance.results.ui.PerformancesView#fillContextMenu(org.eclipse.jface.action.IMenuManager)
- */
+@Override
 void fillContextMenu(IMenuManager manager) {
 	super.fillContextMenu(manager);
 	manager.add(this.generate);
@@ -452,6 +444,7 @@
 /*
  * Fill the local data drop-down menu
  */
+@Override
 void fillLocalDataDropDown(IMenuManager manager) {
 	super.fillLocalDataDropDown(manager);
 	manager.add(new Separator());
@@ -483,6 +476,7 @@
 /*
  * Return the components view.
  */
+@Override
 PerformancesView getSiblingView() {
 	if (this.componentsView == null) {
 		this.componentsView = (ComponentsView) getWorkbenchView("org.eclipse.test.internal.performance.results.ui.ComponentsView");
@@ -490,10 +484,7 @@
 	return this.componentsView;
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.test.internal.performance.results.ui.PerformancesView#makeActions()
- */
+@Override
 void makeActions() {
 
 	super.makeActions();
@@ -519,24 +510,22 @@
 
 	// Write status
 	this.writeBuildsFailures = new Action("Write failures") {
-		public void run() {
+		@Override
+    public void run() {
 			String filter = (BuildsView.this.resultsDir == null) ? null : BuildsView.this.resultsDir.getPath();
 			final File writeDir = changeDir(filter, "Select a directory to write the files");
 			if (writeDir != null) {
 
 				// Create runnable
-				IRunnableWithProgress runnable = new IRunnableWithProgress() {
-
-					public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
-						try {
-							monitor.beginTask("Write failures", BuildsView.this.buildsResults.length*2);
-							writeBuildsFailures(writeDir, monitor);
-							monitor.done();
-						} catch (Exception e) {
-							e.printStackTrace();
-						}
-					}
-				};
+				IRunnableWithProgress runnable = monitor -> {
+        	try {
+        		monitor.beginTask("Write failures", BuildsView.this.buildsResults.length*2);
+        		writeBuildsFailures(writeDir, monitor);
+        		monitor.done();
+        	} catch (Exception e) {
+        		e.printStackTrace();
+        	}
+        };
 
 				// Run with progress monitor
 				ProgressMonitorDialog readProgress = new ProgressMonitorDialog(getSite().getShell());
@@ -637,10 +626,7 @@
 	this.updateAllBuilds.setEnabled(connected);
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.test.internal.performance.results.ui.PerformancesView#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
+@Override
 public void selectionChanged(SelectionChangedEvent event) {
 	super.selectionChanged(event);
 
@@ -814,17 +800,11 @@
 	}
 
 	// Write exclusion file
-	try {
-		DataOutputStream stream = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(exclusionFile)));
-		try {
-		    if (excluded == null) {
-		        throw new RuntimeException("excluded was unexpected null. Program error?");
-		    }
-			stream.write(excluded.toString().getBytes());
-		}
-		finally {
-			stream.close();
-		}
+	try (DataOutputStream stream = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(exclusionFile)))){
+    if (excluded == null) {
+      throw new RuntimeException("excluded was unexpected null. Program error?");
+    }
+		stream.write(excluded.toString().getBytes());
 	} catch (FileNotFoundException e) {
 		System.err.println("Can't create exclusion file"+exclusionFile); //$NON-NLS-1$
 	} catch (IOException e) {
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ComponentResultsView.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ComponentResultsView.java
index f5275a2..64d19f0 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ComponentResultsView.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/ComponentResultsView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -106,7 +106,7 @@
  */
 public ComponentResultsView() {
 	this.fullSelectionImageDescriptor = ImageDescriptor.createFromFile(getClass(), "icallout_obj.gif");
-	this.preferences = new InstanceScope().getNode(IPerformancesConstants.PLUGIN_ID);
+	this.preferences = InstanceScope.INSTANCE.getNode(IPerformancesConstants.PLUGIN_ID);
 	this.preferences.addPreferenceChangeListener(this);
 	Util.initMilestones(this.preferences);
 }
@@ -120,24 +120,19 @@
 	fillLocalToolBar(bars.getToolBarManager());
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
+@Override
 public void createPartControl(Composite parent) {
 
 	// Create the tab folder
 	this.tabFolder = new CTabFolder(parent, SWT.BORDER);
 
 	// Add results view as listener to viewer selection changes
-	Display.getDefault().asyncExec(new Runnable() {
-		public void run() {
-			PerformancesView performancesView = (PerformancesView) PerformancesView.getWorkbenchView("org.eclipse.test.internal.performance.results.ui.ComponentsView");
-			if (performancesView != null) {
-				performancesView.viewer.addSelectionChangedListener(ComponentResultsView.this);
-			}
-		}
-	});
+	Display.getDefault().asyncExec(() -> {
+  	PerformancesView performancesView = (PerformancesView) PerformancesView.getWorkbenchView("org.eclipse.test.internal.performance.results.ui.ComponentsView");
+  	if (performancesView != null) {
+  		performancesView.viewer.addSelectionChangedListener(ComponentResultsView.this);
+  	}
+  });
 
 	// Set actions
 	PlatformUI.getWorkbench().getHelpSystem().setHelp(this.tabFolder, "org.eclipse.test.performance.ui.results");
@@ -177,10 +172,7 @@
 	this.tabFolder.setSelection(0);
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#dispose()
- */
+@Override
 public void dispose() {
 	this.tabFolder.dispose();
 	int length = this.tabs==null ? 0 : this.tabs.length;
@@ -221,10 +213,7 @@
 	manager.add(this.fullLineSelection);
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.ViewPart#init(org.eclipse.ui.IViewSite, org.eclipse.ui.IMemento)
- */
+@Override
 public void init(IViewSite site, IMemento memento) throws PartInitException {
 	super.init(site, memento);
 	this.viewState = memento;
@@ -241,7 +230,8 @@
 
 	// Full line selection action
 	this.fullLineSelection = new Action("", IAction.AS_CHECK_BOX) {
-		public void run() {
+		@Override
+    public void run() {
 			resetTabFolders(false/*refresh*/);
 		}
 	};
@@ -251,7 +241,8 @@
 
 	// Filter non-fingerprints action
 	this.filterAdvancedScenarios = new Action("Advanced &Scenarios", IAction.AS_CHECK_BOX) {
-		public void run() {
+		@Override
+    public void run() {
 			ComponentResultsView.this.preferences.putBoolean(IPerformancesConstants.PRE_FILTER_ADVANCED_SCENARIOS, isChecked());
 			resetTabFolders(false/*refresh*/);
         }
@@ -261,7 +252,8 @@
 
 	// Filter non-important builds action
 	this.filterOldBuilds = new Action("&Old Builds", IAction.AS_CHECK_BOX) {
-		public void run() {
+		@Override
+    public void run() {
 			ComponentResultsView.this.preferences.putBoolean(IPerformancesConstants.PRE_FILTER_OLD_BUILDS, isChecked());
 			resetTabFolders(false/*refresh*/);
 		}
@@ -271,7 +263,8 @@
 
 	// Filter nightly action
 	this.filterNightlyBuilds = new Action("&Nightly", IAction.AS_CHECK_BOX) {
-		public void run() {
+		@Override
+    public void run() {
 			ComponentResultsView.this.preferences.putBoolean(IPerformancesConstants.PRE_FILTER_NIGHTLY_BUILDS, isChecked());
 			resetTabFolders(false/*refresh*/);
 		}
@@ -279,9 +272,7 @@
 	this.filterNightlyBuilds.setToolTipText("Filter nightly builds");
 }
 
-/* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener#preferenceChange(org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent)
- */
+@Override
 public void preferenceChange(PreferenceChangeEvent event) {
 	String propertyName = event.getKey();
 	Object newValue = event.getNewValue();
@@ -392,19 +383,13 @@
 	this.filterOldBuilds.setChecked(checked);
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.ViewPart#saveState(org.eclipse.ui.IMemento)
- */
+@Override
 public void saveState(IMemento memento) {
 	super.saveState(memento);
 	memento.putBoolean(IPerformancesConstants.PRE_FULL_LINE_SELECTION, this.fullLineSelection.isChecked());
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
+@Override
 public void selectionChanged(SelectionChangedEvent event) {
 	ResultsElement selectedElement = (ResultsElement) ((TreeSelection) event.getSelection()).getFirstElement();
 	ComponentResultsElement componentElement = null;
@@ -454,10 +439,7 @@
 	}
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
- */
+@Override
 public void setFocus() {
 	// do nothing
 }
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 cd1f798..72f3908 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -79,7 +79,8 @@
 
 	// Viewer filters
 	final static ViewerFilter FILTER_ADVANCED_SCENARIOS = new ViewerFilter() {
-		public boolean select(Viewer v, Object parentElement, Object element) {
+		@Override
+    public boolean select(Viewer v, Object parentElement, Object element) {
 			if (element instanceof ScenarioResultsElement) {
 				ScenarioResultsElement scenarioElement = (ScenarioResultsElement) element;
 				return scenarioElement.hasSummary();
@@ -108,13 +109,10 @@
 	super();
 
 	// Get preferences
-	this.preferences = new InstanceScope().getNode(IPerformancesConstants.PLUGIN_ID);
+	this.preferences = InstanceScope.INSTANCE.getNode(IPerformancesConstants.PLUGIN_ID);
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.test.internal.performance.results.ui.PerformancesView#createPartControl(org.eclipse.swt.widgets.Composite)
- */
+@Override
 public void createPartControl(Composite parent) {
 	super.createPartControl(parent);
 
@@ -123,7 +121,8 @@
 
 	// Set the content provider: first level is components list
 	WorkbenchContentProvider contentProvider = new WorkbenchContentProvider() {
-		public Object[] getElements(Object o) {
+		@Override
+    public Object[] getElements(Object o) {
 			return ComponentsView.this.getElements();
 		}
 	};
@@ -132,7 +131,8 @@
 	// Set the label provider
 	WorkbenchLabelProvider labelProvider = new WorkbenchLabelProvider() {
 
-		protected String decorateText(String input, Object element) {
+		@Override
+    protected String decorateText(String input, Object element) {
 			String text = super.decorateText(input, element);
 			if (element instanceof BuildResultsElement) {
 				BuildResultsElement buildElement = (BuildResultsElement) element;
@@ -144,7 +144,8 @@
 		}
 
 		// When all scenarios are displayed, then set fingerprints one in bold.
-		public Font getFont(Object element) {
+		@Override
+    public Font getFont(Object element) {
 			Font font = super.getFont(element);
 			if (element instanceof ScenarioResultsElement) {
 				boolean fingerprints = ComponentsView.this.preferences.getBoolean(IPerformancesConstants.PRE_FILTER_ADVANCED_SCENARIOS, IPerformancesConstants.DEFAULT_FILTER_ADVANCED_SCENARIOS);
@@ -171,7 +172,8 @@
 
 		// Sort children using specific comparison (see the implementation
 		// of the #compareTo(Object) in the ResultsElement hierarchy
-		public int compare(Viewer view, Object e1, Object e2) {
+		@Override
+    public int compare(Viewer view, Object e1, Object e2) {
 			// Config and Build results are sorted in reverse order
 			if (e1 instanceof BuildResultsElement) {
 				ResultsElement element = (ResultsElement) e2;
@@ -187,24 +189,19 @@
 	this.viewer.setSorter(nameSorter);
 
 	// Add results view as listener to viewer selection changes
-	Display.getDefault().asyncExec(new Runnable() {
-		public void run() {
-			ISelectionChangedListener listener = getResultsView();
-			if (listener != null) {
-				ComponentsView.this.viewer.addSelectionChangedListener(listener);
-			}
-		}
-	});
+	Display.getDefault().asyncExec(() -> {
+  	ISelectionChangedListener listener = getResultsView();
+  	if (listener != null) {
+  		ComponentsView.this.viewer.addSelectionChangedListener(listener);
+  	}
+  });
 
 	// Finalize viewer initialization
 	PlatformUI.getWorkbench().getHelpSystem().setHelp(this.viewer.getControl(), "org.eclipse.test.performance.ui.components");
 	finalizeViewerCreation();
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#dispose()
- */
+@Override
 public void dispose() {
 	if (this.boldFont != null) {
 		this.boldFont.dispose();
@@ -212,10 +209,7 @@
 	super.dispose();
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.test.internal.performance.results.ui.PerformancesView#fillLocalPullDown(org.eclipse.jface.action.IMenuManager)
- */
+@Override
 void fillFiltersDropDown(IMenuManager manager) {
 	super.fillFiltersDropDown(manager);
 	manager.add(this.filterOldBuilds);
@@ -275,6 +269,7 @@
 /*
  * Return the builds view.
  */
+@Override
 PerformancesView getSiblingView() {
 	if (this.buildsView == null) {
 		this.buildsView = (BuildsView) getWorkbenchView("org.eclipse.test.internal.performance.results.ui.BuildsView");
@@ -282,17 +277,15 @@
 	return this.buildsView;
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.test.internal.performance.results.ui.PerformancesView#makeActions()
- */
+@Override
 void makeActions() {
 
 	super.makeActions();
 
 	// Filter non-fingerprints action
 	this.filterAdvancedScenarios = new Action("Advanced &Scenarios", IAction.AS_CHECK_BOX) {
-		public void run() {
+		@Override
+    public void run() {
 			filterAdvancedScenarios(isChecked(), true/*update preference*/);
         }
 	};
@@ -304,9 +297,7 @@
 	this.filterNightlyBuilds.setChecked(false);
 }
 
-/* (non-Javadoc)
- * @see org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener#preferenceChange(org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent)
- */
+@Override
 public void preferenceChange(PreferenceChangeEvent event) {
 	String propertyName = event.getKey();
 	Object newValue = event.getNewValue();
@@ -328,6 +319,7 @@
 	super.preferenceChange(event);
 }
 
+@Override
 void restoreState() {
 	super.restoreState();
 
@@ -345,6 +337,7 @@
 	}
 }
 
+@Override
 public void saveState(IMemento memento) {
 	super.saveState(memento);
 }
@@ -377,10 +370,7 @@
 	}
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.test.internal.performance.results.ui.PerformancesView#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
+@Override
 public void selectionChanged(SelectionChangedEvent event) {
 	super.selectionChanged(event);
 	ResultsElement eventResultsElement = (ResultsElement) ((StructuredSelection)event.getSelection()).getFirstElement();
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 6b50a04..3ce2dd1 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -94,7 +94,7 @@
     this.configName = name;
     int idx = box.indexOf(" (");
 	this.configBox = idx > 0 ? box.substring(0, idx) : box;
-	this.preferences = new InstanceScope().getNode(IPerformancesConstants.PLUGIN_ID);
+	this.preferences = InstanceScope.INSTANCE.getNode(IPerformancesConstants.PLUGIN_ID);
 }
 
 /**
@@ -162,14 +162,17 @@
 	// when a click is done in the table cell.
 	final ComponentsView componentsView = (ComponentsView) PerformancesView.getWorkbenchView("org.eclipse.test.internal.performance.results.ui.ComponentsView");
 	MouseListener mouseListener = new MouseListener() {
-		public void mouseUp(MouseEvent e) {
+		@Override
+    public void mouseUp(MouseEvent e) {
 		}
-		public void mouseDown(MouseEvent e) {
+		@Override
+    public void mouseDown(MouseEvent e) {
 			Point cellPosition = currentCellPosition(e.x, e.y);
 			Table tabTable = ConfigTab.this.table;
 			componentsView.select(ConfigTab.this.results, ConfigTab.this.configName, (String) ConfigTab.this.firstLine.get(cellPosition.x), tabTable.getItem(cellPosition.y).getText());
 		}
-		public void mouseDoubleClick(MouseEvent e) {
+		@Override
+    public void mouseDoubleClick(MouseEvent e) {
 		}
 	};
 	this.table.addMouseListener(mouseListener);
@@ -177,7 +180,8 @@
 	// Listen to mouse track events to display the table cell corresponding tooltip.
 	MouseTrackListener mouseTrackListener = new MouseTrackListener() {
 		ToolTip currentTooltip;
-		public void mouseHover(MouseEvent e) {
+		@Override
+    public void mouseHover(MouseEvent e) {
 			if (this.currentTooltip != null) {
 				this.currentTooltip.setVisible(false);
 				this.currentTooltip = null;
@@ -193,9 +197,11 @@
 				}
 			}
 		}
-		public void mouseEnter(MouseEvent e) {
+		@Override
+    public void mouseEnter(MouseEvent e) {
 		}
-		public void mouseExit(MouseEvent e) {
+		@Override
+    public void mouseExit(MouseEvent e) {
 		}
 	};
 	this.table.addMouseTrackListener(mouseTrackListener);
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPerspective.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPerspective.java
index 193489b..7f7d2cd 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPerspective.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPerspective.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -21,10 +21,7 @@
 
 	private IPageLayout factory;
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
- */
+@Override
 public void createInitialLayout(IPageLayout layout) {
 	this.factory = layout;
 	addViews();
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPreferenceInitializer.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPreferenceInitializer.java
index d40edc3..09773cf 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPreferenceInitializer.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPreferenceInitializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,7 +13,6 @@
 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
 import org.eclipse.core.runtime.preferences.DefaultScope;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IScopeContext;
 import org.eclipse.test.internal.performance.PerformanceTestPlugin;
 import org.eclipse.test.internal.performance.data.Dim;
 import org.eclipse.test.internal.performance.results.utils.IPerformancesConstants;
@@ -24,13 +23,9 @@
  */
 public class PerformanceResultsPreferenceInitializer extends AbstractPreferenceInitializer implements IPerformancesConstants {
 
-/*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
+@Override
 public void initializeDefaultPreferences() {
-	IEclipsePreferences defaultPreferences = ((IScopeContext) new DefaultScope()).getNode(PLUGIN_ID);
+	IEclipsePreferences defaultPreferences = DefaultScope.INSTANCE.getNode(PLUGIN_ID);
 
 	// Eclipse version
 	defaultPreferences.putInt(PRE_ECLIPSE_VERSION, IPerformancesConstants.DEFAULT_ECLIPSE_VERSION);
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPreferencePage.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPreferencePage.java
index 9fd1964..8a02a55 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPreferencePage.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformanceResultsPreferencePage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -154,9 +154,7 @@
 	return composite;
 }
 
-/**
- * (non-Javadoc) Method declared on PreferencePage
- */
+@Override
 protected Control createContents(Composite parent) {
 
 	this.buildsView = (BuildsView) PerformancesView.getWorkbenchView("org.eclipse.test.internal.performance.results.ui.BuildsView");
@@ -427,6 +425,7 @@
  * the our plugin. This is important because we want to store our preferences
  * separately from the workbench.
  */
+@Override
 protected IPreferenceStore doGetPreferenceStore() {
 	return UiPlugin.getDefault().getPreferenceStore();
 }
@@ -464,9 +463,7 @@
 	return null;
 }
 
-/*
- * (non-Javadoc) Method declared on IWorkbenchPreferencePage
- */
+@Override
 public void init(IWorkbench workbench) {
 	// do nothing
 }
@@ -686,9 +683,7 @@
 	this.statusBuildsToConfirm.setText(String.valueOf(writeStatus & STATUS_BUILDS_NUMBER_MASK));
 }
 
-/**
- * (non-Javadoc) Method declared on ModifyListener
- */
+@Override
 public void modifyText(ModifyEvent event) {
 
 	// Add default dimension to results if necessary
@@ -858,23 +853,19 @@
 	MessageDialog.openError(getShell(), getDialogTitle(), milestone+" is an invalid milestone date. Only 'yyyymmddHHMM' format is accepted!");
 }
 
-/*
- * (non-Javadoc) Method declared on PreferencePage
- */
+@Override
 protected void performDefaults() {
 	super.performDefaults();
 	initializeDefaults();
 }
 
-/*
- * (non-Javadoc) Method declared on PreferencePage
- */
+@Override
 public boolean performOk() {
 	final boolean hasBuildsView = this.buildsView != null;
 	if (hasBuildsView) {
 		storeValues();
 		try {
-			IEclipsePreferences preferences = new InstanceScope().getNode(PLUGIN_ID);
+			IEclipsePreferences preferences = InstanceScope.INSTANCE.getNode(PLUGIN_ID);
 			preferences.flush();
 			this.buildsView.resetView();
 		} catch (BackingStoreException e) {
@@ -1019,15 +1010,11 @@
 	*/
 }
 
-/**
- * (non-Javadoc) Method declared on SelectionListener
- */
+@Override
 public void widgetDefaultSelected(SelectionEvent event) {
 }
 
-/**
- * (non-Javadoc) Method declared on SelectionListener
- */
+@Override
 public void widgetSelected(SelectionEvent event) {
 
 	// As for directory when 'Local' button is pushed
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformancesView.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformancesView.java
index 82e9f07..db39711 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformancesView.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/PerformancesView.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -89,7 +89,8 @@
 	// Viewer filters
 	static final ViewerFilter[] NO_FILTER = new ViewerFilter[0];
 	final static ViewerFilter FILTER_BASELINE_BUILDS = new ViewerFilter() {
-		public boolean select(Viewer v, Object parentElement, Object element) {
+		@Override
+    public boolean select(Viewer v, Object parentElement, Object element) {
 			if (element instanceof BuildResultsElement) {
 				BuildResultsElement buildElement = (BuildResultsElement) element;
 				return !buildElement.getName().startsWith(DB_Results.getDbBaselinePrefix());
@@ -98,7 +99,8 @@
 		}
 	};
 	public final static ViewerFilter FILTER_NIGHTLY_BUILDS = new ViewerFilter() {
-		public boolean select(Viewer v, Object parentElement, Object element) {
+		@Override
+    public boolean select(Viewer v, Object parentElement, Object element) {
 			if (element instanceof BuildResultsElement) {
 				BuildResultsElement buildElement = (BuildResultsElement) element;
 				return buildElement.getName().charAt(0) != 'N';
@@ -107,7 +109,8 @@
 		}
 	};
 	final static ViewerFilter FILTER_OLD_BUILDS = new ViewerFilter() {
-		public boolean select(Viewer v, Object parentElement, Object element) {
+		@Override
+    public boolean select(Viewer v, Object parentElement, Object element) {
 			if (element instanceof BuildResultsElement) {
 				BuildResultsElement buildElement = (BuildResultsElement) element;
 				return buildElement.isImportant();
@@ -174,7 +177,7 @@
 public PerformancesView() {
 
 	// Get preferences
-	this.preferences = new InstanceScope().getNode(IPerformancesConstants.PLUGIN_ID);
+	this.preferences = InstanceScope.INSTANCE.getNode(IPerformancesConstants.PLUGIN_ID);
 
 	// Init db constants
 	int eclipseVersion = this.preferences.getInt(IPerformancesConstants.PRE_ECLIPSE_VERSION, IPerformancesConstants.DEFAULT_ECLIPSE_VERSION);
@@ -246,10 +249,7 @@
 	fillLocalToolBar(bars.getToolBarManager());
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
- */
+@Override
 public void createPartControl(Composite parent) {
 	// Cache the shell and display.
 	this.shell = parent.getShell ();
@@ -340,12 +340,10 @@
 	this.viewer.addSelectionChangedListener(this);
 }
 
-/* (non-Javadoc)
- * Method declared on IAdaptable
- */
-public Object getAdapter(Class adapter) {
+@Override
+public <T> T getAdapter(Class<T> adapter) {
     if (adapter.equals(IPropertySheetPage.class)) {
-        return getPropertySheet();
+        return (T) getPropertySheet();
     }
     return super.getAdapter(adapter);
 }
@@ -372,7 +370,8 @@
 	MenuManager menuMgr = new MenuManager("#PopupMenu");
 	menuMgr.setRemoveAllWhenShown(true);
 	menuMgr.addMenuListener(new IMenuListener() {
-		public void menuAboutToShow(IMenuManager manager) {
+		@Override
+    public void menuAboutToShow(IMenuManager manager) {
 			fillContextMenu(manager);
 		}
 	});
@@ -385,6 +384,7 @@
  * (non-Javadoc)
  * @see org.eclipse.ui.part.ViewPart#init(org.eclipse.ui.IViewSite, org.eclipse.ui.IMemento)
  */
+@Override
 public void init(IViewSite site, IMemento memento) throws PartInitException {
 	super.init(site, memento);
 	this.viewState = memento;
@@ -416,7 +416,8 @@
 
 	// Change data dir action
 	this.changeDataDir = new Action("&Read...") {
-		public void run() {
+		@Override
+    public void run() {
 			changeDataDir(null);
 		}
 	};
@@ -425,7 +426,8 @@
 
 	// Filter baselines action
 	this.filterBaselineBuilds = new Action("&Baselines", IAction.AS_CHECK_BOX) {
-		public void run() {
+		@Override
+    public void run() {
 			if (isChecked()) {
 				PerformancesView.this.viewFilters.add(FILTER_BASELINE_BUILDS);
 			} else {
@@ -438,7 +440,8 @@
 
 	// Filter baselines action
 	this.filterNightlyBuilds = new Action("&Nightly", IAction.AS_CHECK_BOX) {
-		public void run() {
+		@Override
+    public void run() {
 			filterNightlyBuilds(isChecked(), true/*update preference*/);
 		}
 	};
@@ -446,7 +449,8 @@
 
 	// Filter non-important builds action
 	this.filterOldBuilds = new Action("&Old Builds", IAction.AS_CHECK_BOX) {
-		public void run() {
+		@Override
+    public void run() {
 			filterOldBuilds(isChecked(), true/*update preference*/);
 		}
 	};
@@ -457,6 +461,7 @@
 /* (non-Javadoc)
  * @see org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener#preferenceChange(org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent)
  */
+@Override
 public void preferenceChange(PreferenceChangeEvent event) {
 	// do nothing
 }
@@ -468,7 +473,8 @@
 
 	// Create runnable to read local files
 	IRunnableWithProgress runnable = new IRunnableWithProgress() {
-		public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+		@Override
+    public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
 			try {
 				monitor.beginTask("Read local files", 1000);
 				PerformancesView.this.results.readLocal(PerformancesView.this.dataDir, monitor, lastBuild);
@@ -554,6 +560,7 @@
 	}
 }
 
+@Override
 public void saveState(IMemento memento) {
 	super.saveState(memento);
 	memento.putBoolean(IPerformancesConstants.PRE_FILTER_BASELINE_BUILDS, this.filterBaselineBuilds.isChecked());
@@ -567,10 +574,7 @@
 	}
 }
 
-/*
- * (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
+@Override
 public void selectionChanged(SelectionChangedEvent event) {
 	if (this.propertyPage != null) {
 		this.propertyPage.selectionChanged(this, event.getSelection());
@@ -580,6 +584,7 @@
 /**
  * Passing the focus request to the viewer's control.
  */
+@Override
 public void setFocus() {
 	this.viewer.getControl().setFocus();
 }
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 8eb62eb..e5c64dd 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -82,15 +82,14 @@
     // Components constants
     public static final String              ORG_ECLIPSE           = "org.eclipse.";
 
-    static class BuildDateComparator implements Comparator {
+    static class BuildDateComparator implements Comparator<String> {
 
-        public int compare(Object o1, Object o2) {
-            String s1 = (String) o1;
-            String s2 = (String) o2;
+        @Override
+        public int compare(String s1, String s2) {
             String buildDate1 = getBuildDate(s1);
             String buildDate2 = getBuildDate(s2);
-		// Not the greatest sanity check, found some cases, when "getting started" 
-		// where buildname was "4.1.1" or "${buildid}, which would cause a NPE. 
+		// Not the greatest sanity check, found some cases, when "getting started"
+		// where buildname was "4.1.1" or "${buildid}, which would cause a NPE.
             // So, simple attempt to provide a more helpful message.
             if (buildDate1 == null) {
                 throw new IllegalArgumentException("Buildname did not have a date, as expected: " + s1);
@@ -260,20 +259,18 @@
      */
     public static boolean copyFile(File src, File dest) {
 
-        try {
-            InputStream in = new FileInputStream(src);
-            OutputStream out = new FileOutputStream(dest);
+        try (InputStream in = new FileInputStream(src);
+            OutputStream out = new FileOutputStream(dest)){
+
             byte[] buf = new byte[1024];
             int len;
             while ((len = in.read(buf)) > 0) {
                 out.write(buf, 0, len);
             }
-            in.close();
-            out.close();
-	} catch (FileNotFoundException e) {
+        } catch (FileNotFoundException e) {
             e.printStackTrace();
             return false;
-	} catch (IOException e) {
+        } catch (IOException e) {
             e.printStackTrace();
             return false;
         }
@@ -290,19 +287,18 @@
      */
     public static boolean copyStream(InputStream in, File dest) {
 
-        try {
-            OutputStream out = new FileOutputStream(dest);
+        try (OutputStream out = new FileOutputStream(dest)){
+
             byte[] buf = new byte[1024];
             int len;
             while ((len = in.read(buf)) > 0) {
                 out.write(buf, 0, len);
             }
             in.close();
-            out.close();
-	} catch (FileNotFoundException e) {
+        } catch (FileNotFoundException e) {
             e.printStackTrace();
             return false;
-	} catch (IOException e) {
+        } catch (IOException e) {
             e.printStackTrace();
             return false;
         }
@@ -341,7 +337,7 @@
                 result = buildName.substring(1, 9) + buildName.substring(10, 14);
             } else {
                 //System.err.println("\n\tERROR: buildName did not have expected format. buildName: " + buildName);
-                // 2015/10/30 (dw) following too complicated (and, unsure if correct, so should be removed or simplified greatly bullet proofed)  
+                // 2015/10/30 (dw) following too complicated (and, unsure if correct, so should be removed or simplified greatly bullet proofed)
                 // Try with date format, to handle old release baselines
                 int length = buildName.length() - 12 /* length of date */;
                 for (int i = 0; i <= length; i++) {
@@ -460,6 +456,7 @@
     /**
      * @deprecated
      */
+    @Deprecated
     public static boolean matchPattern(String name, String pattern) {
         if (pattern.equals("*")) //$NON-NLS-1$
             return true;
@@ -498,6 +495,7 @@
     /**
      * @deprecated
      */
+    @Deprecated
     public static double round(double value) {
         return Math.round(value * 10000) / 10000.0;
     }
@@ -505,6 +503,7 @@
     /**
      * @deprecated
      */
+    @Deprecated
     public static double round(double value, int precision) {
         if (precision < 0) {
             throw new IllegalArgumentException("Should have a precision at least greater than 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 47eb87f..5a62299 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
@@ -480,7 +480,7 @@
 			i++;
 			continue;
 		}
-		// To get to hear mean "matched none". 
+		// To get to hear mean "matched none".
         System.err.println("ERROR: Unrecognized argument (arg) found, with value of >" + arg + "<");
         i++;
         continue;
@@ -554,17 +554,13 @@
 	Display display = Display.getDefault();
 	if (this.genFingerPrints || this.genAll) {
 		final FingerPrint fingerprint = new FingerPrint(component, stream, this.outputDir);
-		display.syncExec(
-			new Runnable() {
-				public void run(){
-					try {
-						fingerprint.print(GenerateResults.this.performanceResults);
-					} catch (Exception ex) {
-						ex.printStackTrace();
-					}
-				}
-			}
-		);
+      display.syncExec(() -> {
+        try {
+          fingerprint.print(GenerateResults.this.performanceResults);
+        } catch (Exception ex) {
+          ex.printStackTrace();
+        }
+      });
 	}
 //	FingerPrint fingerprint = new FingerPrint(component, stream, this.outputDir);
 //	fingerprint.print(performanceResults);
@@ -574,15 +570,13 @@
 		// print the component scenario status table beneath the fingerprint
 		final ScenarioStatusTable sst = new ScenarioStatusTable(component, stream);
 		display.syncExec(
-			new Runnable() {
-				public void run(){
-					try {
-						sst.print(GenerateResults.this.performanceResults);
-					} catch (Exception ex) {
-						ex.printStackTrace();
-					}
-				}
-			}
+			() -> {
+      	try {
+      		sst.print(GenerateResults.this.performanceResults);
+      	} catch (Exception ex) {
+      		ex.printStackTrace();
+      	}
+      }
 		);
 //		ScenarioStatusTable sst = new ScenarioStatusTable(component, stream);
 //		sst.print(performanceResults);
@@ -1024,7 +1018,7 @@
 	}
 
 	// must set our known "last build" (that we are interested in) before
-	// 'getAllBuildNames' is called, else it may set "name" to some later 
+	// 'getAllBuildNames' is called, else it may set "name" to some later
 	// build we are not interested in analyzing yet.
     this.performanceResults.setLastBuildName(buildName);
 
@@ -1064,7 +1058,7 @@
 		} else if (buildType == 'I') {
 		this.currentBuildPrefixes.add("I");
 		} else {
-		    // TODO: may want to throw error here? 
+		    // TODO: may want to throw error here?
 		    this.currentBuildPrefixes.add("?");
 		}
 	}
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Main.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Main.java
index 43cb18e..db1bd2c 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Main.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/Main.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2017 IBM Corporation and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -35,9 +35,10 @@
      * <li>A data HTML file for each config of each scenario included in status
      * table</li>
      * </ul>
-     * 
+     *
      * @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
      */
+    @Override
     public Object start(IApplicationContext context) throws Exception {
         DB_Results.DB_CONNECTION = true; // force DB connection while running
                                          // the application
@@ -53,11 +54,7 @@
         return exitStatus;
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.eclipse.equinox.app.IApplication#stop()
-     */
+    @Override
     public void stop() {
         // Do nothing
     }
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 787e1e1..f23ef8b 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -192,11 +192,7 @@
 
 			Display display = Display.getDefault();
 		     display.syncExec(
-				new Runnable() {
-					public void run(){
-						printSummary(configName, configBox, componentResults, outputDir, subMonitor);
-					}
-				}
+				() -> printSummary(configName, configBox, componentResults, outputDir, subMonitor)
 			);
 //			printSummary(configName, configBox, componentResults, outputDir, monitor);
 			printDetails(configName, configBoxes[i], componentResults, outputDir);
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/TimeLineGraph.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/TimeLineGraph.java
index 8b2f9e5..4ecf316 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/TimeLineGraph.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/TimeLineGraph.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -33,6 +33,7 @@
         this.fItemGroups=new Hashtable();
     }
 
+    @Override
     public void paint(Image im) {
 
         Rectangle bounds= im.getBounds();
@@ -169,6 +170,7 @@
   				timestamp,isSpecial,drawBaseline));
     }
 
+    @Override
     public double getMaxItem() {
     	Enumeration _enum=this.fItemGroups.elements();
         double maxItem= 0;
@@ -185,6 +187,7 @@
         return maxItem;
     }
 
+    @Override
     public double getMinItem() {
        	Enumeration _enum = this.fItemGroups.elements();
 		double minItem = getMaxItem();
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/TimeLineGraphItem.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/TimeLineGraphItem.java
index c52d0a9..d132967 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/TimeLineGraphItem.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/TimeLineGraphItem.java
@@ -59,10 +59,11 @@
         return new Point(Math.max(e1.x, e2.x), e1.y+e2.y);
     }
 
-    public static class GraphItemComparator implements Comparator{
-		public int compare(Object o1, Object o2) {
-			long ts1=((TimeLineGraphItem)o1).timestamp;
-			long ts2=((TimeLineGraphItem)o2).timestamp;
+    public static class GraphItemComparator implements Comparator<TimeLineGraphItem>{
+		@Override
+    public int compare(TimeLineGraphItem o1, TimeLineGraphItem o2) {
+			long ts1=o1.timestamp;
+			long ts2=o2.timestamp;
 
 			if (ts1>ts2)
 				return 1;
diff --git a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/UiPlugin.java b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/UiPlugin.java
index 58462dd..fc615c9 100644
--- a/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/UiPlugin.java
+++ b/bundles/org.eclipse.test.performance.ui/src/org/eclipse/test/performance/ui/UiPlugin.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,14 +37,16 @@
 	/**
 	 * This method is called upon plug-in activation
 	 */
-	public void start(BundleContext context) throws Exception {
+	@Override
+  public void start(BundleContext context) throws Exception {
 		super.start(context);
 	}
 
 	/**
 	 * This method is called when the plug-in is stopped
 	 */
-	public void stop(BundleContext context) throws Exception {
+	@Override
+  public void stop(BundleContext context) throws Exception {
 		super.stop(context);
 		plugin = null;
 	}
@@ -58,7 +60,7 @@
 
 	public IPreferenceStore getPreferenceStore() {
 		if (this.preferenceStore == null) {
-			this.preferenceStore = new ScopedPreferenceStore(new InstanceScope(), getBundle().getSymbolicName());
+			this.preferenceStore = new ScopedPreferenceStore(InstanceScope.INSTANCE, getBundle().getSymbolicName());
 
 		}
 		return this.preferenceStore;
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 7d54acc..8b3858a 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
@@ -1,5 +1,6 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made
  * available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
@@ -10,7 +11,6 @@
 
 import java.io.BufferedOutputStream;
 import java.io.File;
-import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
@@ -156,14 +156,15 @@
     return minIndex;
   }
 
-  static class ColorCounter implements Comparable {
+  static class ColorCounter implements Comparable<ColorCounter> {
 
     RGB rgb;
 
     int count;
 
-    public int compareTo(Object o) {
-      return ((ColorCounter) o).count - this.count;
+    @Override
+    public int compareTo(ColorCounter o) {
+      return o.count - this.count;
     }
   }
 
@@ -445,22 +446,14 @@
     ImageLoader imageLoader = new ImageLoader();
     imageLoader.data = new ImageData[] { data };
 
-    OutputStream out = null;
-    try {
-      out = new BufferedOutputStream(new FileOutputStream(outputFile));
+    try (OutputStream out = new BufferedOutputStream(new FileOutputStream(outputFile))){
+
       imageLoader.save(out, SWT.IMAGE_GIF);
-    } catch (FileNotFoundException e) {
+    } catch (IOException e) {
       e.printStackTrace();
     }
     finally {
       image.dispose();
-      if (out != null) {
-        try {
-          out.close();
-        } catch (IOException e1) {
-          // silently ignored
-        }
-      }
     }
   }