More improvements on code style and compiler warnings
diff --git a/plugins/org.eclipse.libra.facet.ui/src/org/eclipse/libra/facet/ui/popup/actions/ConvertProjectsToBundlesAction.java b/plugins/org.eclipse.libra.facet.ui/src/org/eclipse/libra/facet/ui/popup/actions/ConvertProjectsToBundlesAction.java
index 4901c92..88e1b88 100644
--- a/plugins/org.eclipse.libra.facet.ui/src/org/eclipse/libra/facet/ui/popup/actions/ConvertProjectsToBundlesAction.java
+++ b/plugins/org.eclipse.libra.facet.ui/src/org/eclipse/libra/facet/ui/popup/actions/ConvertProjectsToBundlesAction.java
@@ -100,7 +100,7 @@
 		return display;

 	}

 	

-	private IProject[] getUnconvertedProjects() {

+	private static IProject[] getUnconvertedProjects() {

 		List<IProject> unconverted = new ArrayList<IProject>();

 		IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();

 		for (IProject project : projects) {

@@ -129,10 +129,10 @@
 				if (obj instanceof IProject) {

 					project = (IProject) obj;

 				} else if (obj instanceof IAdaptable) {

-					project = (IProject) ((IAdaptable) obj).getAdapter(IProject.class);

+					project = ((IAdaptable) obj).getAdapter(IProject.class);

 				} else {

 					IAdapterManager manager = Platform.getAdapterManager();

-					project = (IProject) manager.getAdapter(obj, IProject.class);

+					project = manager.getAdapter(obj, IProject.class);

 				}

 				

 				if (project != null) {

diff --git a/plugins/org.eclipse.libra.facet.ui/src/org/eclipse/libra/facet/ui/wizards/ConvertProjectsToBundlesWizardPage.java b/plugins/org.eclipse.libra.facet.ui/src/org/eclipse/libra/facet/ui/wizards/ConvertProjectsToBundlesWizardPage.java
index cf2a2e9..64d4699 100644
--- a/plugins/org.eclipse.libra.facet.ui/src/org/eclipse/libra/facet/ui/wizards/ConvertProjectsToBundlesWizardPage.java
+++ b/plugins/org.eclipse.libra.facet.ui/src/org/eclipse/libra/facet/ui/wizards/ConvertProjectsToBundlesWizardPage.java
@@ -49,7 +49,7 @@
 

 public class ConvertProjectsToBundlesWizardPage extends WizardPage {

 	

-	private class SelectionValidator extends MultiValidator {

+	class SelectionValidator extends MultiValidator {

 		

 		@Override

 		protected IStatus validate() {

@@ -82,14 +82,13 @@
 						}

 					}

 				}

-			};

+			}

 			return false;

 		}

-		

-	};

+	}

 

-	private IObservableSet fUnconverted;

-	private IObservableSet fSelected;

+	IObservableSet fUnconverted;

+	IObservableSet fSelected;

 

 	public ConvertProjectsToBundlesWizardPage(IProject[] unconverted, IProject[] selected) {

 		super("converToWAB"); //$NON-NLS-1$

@@ -176,7 +175,7 @@
 		});

 	}

 	

-	private void selectReferences() {

+	void selectReferences() {

 		IProject[] selectedProjects = getProjects();

 		for (IProject project : selectedProjects) {

 			IVirtualComponent component = ComponentCore.createComponent(project);

diff --git a/plugins/org.eclipse.libra.facet/src/org/eclipse/libra/facet/OSGiBundleFacetInstallDelegate.java b/plugins/org.eclipse.libra.facet/src/org/eclipse/libra/facet/OSGiBundleFacetInstallDelegate.java
index eabc343..bd51949 100644
--- a/plugins/org.eclipse.libra.facet/src/org/eclipse/libra/facet/OSGiBundleFacetInstallDelegate.java
+++ b/plugins/org.eclipse.libra.facet/src/org/eclipse/libra/facet/OSGiBundleFacetInstallDelegate.java
@@ -92,7 +92,7 @@
 		}

 	}

 

-	private void setBundleRoot(IProject project) throws CoreException {

+	private static void setBundleRoot(IProject project) throws CoreException {

 		IPath bundleRoot = null;

 		if (isWebProject(project)) {

 			bundleRoot = getWebContentPath(project);

@@ -140,7 +140,7 @@
 		bundleProjectDescription.apply(monitor);

 	}

 	

-	private String[] getNatureIds(IBundleProjectDescription bundleProjectDescription) throws CoreException {

+	private static String[] getNatureIds(IBundleProjectDescription bundleProjectDescription) {

 		String[] natureIds = bundleProjectDescription.getNatureIds();

 		String[] newNatureIds = new String[natureIds.length + 1];

 		for (int i = 0; i < natureIds.length; i++) {

@@ -151,7 +151,7 @@
 		return newNatureIds;

 	}

 

-	private String[] getLaunchShortcuts(IProject project) throws CoreException {

+	private static String[] getLaunchShortcuts(IProject project) throws CoreException {

 		if (isWebProject(project)) {

 			return new String[] {

 					"org.eclipse.pde.ui.EquinoxLaunchShortcut",  //$NON-NLS-1$

@@ -162,7 +162,7 @@
 		return null;

 	}

 	

-	private Map<String, String> getAdditionalHeaders(OSGiBundleFacetInstallConfig config, IProject project) throws CoreException {

+	private static Map<String, String> getAdditionalHeaders(OSGiBundleFacetInstallConfig config, IProject project) throws CoreException {

 		Map<String, String> headers = new HashMap<String, String>();

 		

 		if (isWebProject(project)) {

@@ -183,7 +183,7 @@
 		return headers;

 	}

 

-	private IPackageExportDescription[] getPackageExports(IProject project) throws CoreException {

+	private static IPackageExportDescription[] getPackageExports(IProject project) throws CoreException {

 		IBundleProjectService bundleProjectService = LibraFacetPlugin.getDefault().getBundleProjectService();

 		List<IPackageExportDescription> list = new ArrayList<IPackageExportDescription>();

 		

@@ -206,7 +206,7 @@
 		return list.toArray(new IPackageExportDescription[list.size()]);

 	}

 

-	private IPackageImportDescription[] getPackageImports(IBundleProjectDescription bundleProjectDescription) throws CoreException {

+	private static IPackageImportDescription[] getPackageImports(IBundleProjectDescription bundleProjectDescription) throws CoreException {

 		IProject project = bundleProjectDescription.getProject();

 		Map<String, IPackageImportDescription> packages = new TreeMap<String, IPackageImportDescription>();

 		

@@ -252,7 +252,7 @@
 		return packages.values().toArray(new IPackageImportDescription[packages.size()]);

 	}

 	

-	private void addPackageImport(Map<String, IPackageImportDescription> packages, String importName, VersionRange range, boolean optional) {

+	private static void addPackageImport(Map<String, IPackageImportDescription> packages, String importName, VersionRange range, boolean optional) {

 		IBundleProjectService bundleProjectService = LibraFacetPlugin.getDefault().getBundleProjectService();

 		if (!packages.containsKey(importName)) {

 			IPackageImportDescription imp = bundleProjectService.newPackageImport(importName, range, optional);

@@ -260,7 +260,7 @@
 		}

 	}

 	

-	private IPath[] getBinIncludes(IBundleProjectDescription bundleProjectDescription) throws CoreException {

+	private static IPath[] getBinIncludes(IBundleProjectDescription bundleProjectDescription) throws CoreException {

 		IProject project = bundleProjectDescription.getProject();

 		IVirtualComponent component = ComponentCore.createComponent(project);

 		

@@ -281,13 +281,13 @@
 			}

 			

 			return binPaths.toArray(new IPath[binPaths.size()]);

-		} else {

-			// don't modify bin.includes by default

-			return bundleProjectDescription.getBinIncludes();

-		}

+		} 

+

+		// don't modify bin.includes by default

+		return bundleProjectDescription.getBinIncludes();

 	}

 

-	private IBundleClasspathEntry[] getBundleClasspath(IBundleProjectDescription bundleProjectDescription) throws CoreException {

+	private static IBundleClasspathEntry[] getBundleClasspath(IBundleProjectDescription bundleProjectDescription) throws CoreException {

 		IProject project = bundleProjectDescription.getProject();

 		IBundleClasspathEntry[] bundleClasspath = bundleProjectDescription.getBundleClasspath(); 

 		

@@ -311,7 +311,7 @@
 						bundleClasspathList.add(bundleProjectService.newBundleClasspathEntry(

 								getRelativePath(project, iPath), binary, library));

 					}

-					bundleClasspath = bundleClasspathList.toArray(new IBundleClasspathEntry[] { });;

+					bundleClasspath = bundleClasspathList.toArray(new IBundleClasspathEntry[] { });

 				}

 			} else {

 				// TODO

@@ -322,7 +322,7 @@
 		return bundleClasspath;

 	}

 	

-	private void addRequiredPluginsClasspathContainer(IProject project, IProgressMonitor monitor) throws CoreException {

+	private static void addRequiredPluginsClasspathContainer(IProject project, IProgressMonitor monitor) throws CoreException {

 		if (isJavaProject(project)) {

 			IJavaProject javaProject = JavaCore.create(project);

 			IClasspathEntry[] entries = javaProject.getRawClasspath();

@@ -335,7 +335,7 @@
 		}

 	}

 

-	private IPath[] getJavaSourceFolderPaths(IJavaProject javaProject) throws JavaModelException {

+	private static IPath[] getJavaSourceFolderPaths(IJavaProject javaProject) throws JavaModelException {

 		List<IPath> paths = new ArrayList<IPath>();

 		

 		IPackageFragmentRoot[] fragmentRoots = javaProject.getAllPackageFragmentRoots();

@@ -348,11 +348,11 @@
 		return paths.toArray(new IPath[paths.size()]);

 	}

 	

-	private IPath getRelativePath(IProject project, IPath path) {

+	private static IPath getRelativePath(IProject project, IPath path) {

 		return path.makeRelativeTo(project.getFullPath()).addTrailingSeparator();

 	}

 	

-	private void setExecutionEnvironments(IBundleProjectDescription bundleProjectDescription) {

+	private static void setExecutionEnvironments(IBundleProjectDescription bundleProjectDescription) {

 		IProject project = bundleProjectDescription.getProject();

 		IProjectFacetVersion javaProjectFacetVersion = FacetedProjectUtilities.getProjectFacetVersion(project, JAVA_FACET);

 		if (javaProjectFacetVersion != null) {

@@ -371,7 +371,7 @@
 		}

 	}

 	

-	private void moveMetaInfToRoot(IProject project, IProgressMonitor monitor) throws CoreException {
+	private static void moveMetaInfToRoot(IProject project, IProgressMonitor monitor) throws CoreException {
 		// find the first META-INF folder as a second-level folder
 		IFolder folder = null;
 		IResource[] resources = project.members();
diff --git a/plugins/org.eclipse.libra.facet/src/org/eclipse/libra/facet/OSGiBundleFacetRealm.java b/plugins/org.eclipse.libra.facet/src/org/eclipse/libra/facet/OSGiBundleFacetRealm.java
index 66610ff..5951438 100644
--- a/plugins/org.eclipse.libra.facet/src/org/eclipse/libra/facet/OSGiBundleFacetRealm.java
+++ b/plugins/org.eclipse.libra.facet/src/org/eclipse/libra/facet/OSGiBundleFacetRealm.java
@@ -23,7 +23,7 @@
 		return realm;

 	}

 	

-	private static class SimpleRealm extends Realm {

+	static class SimpleRealm extends Realm {

 

 		@Override

 		public boolean isCurrent() {

diff --git a/plugins/org.eclipse.libra.facet/src/org/eclipse/libra/facet/internal/LibraFacetPlugin.java b/plugins/org.eclipse.libra.facet/src/org/eclipse/libra/facet/internal/LibraFacetPlugin.java
index 5f4b4ca..ee4ac0a 100644
--- a/plugins/org.eclipse.libra.facet/src/org/eclipse/libra/facet/internal/LibraFacetPlugin.java
+++ b/plugins/org.eclipse.libra.facet/src/org/eclipse/libra/facet/internal/LibraFacetPlugin.java
@@ -49,7 +49,7 @@
 		plugin = this;

 		

 		this.ref = context.getServiceReference(IBundleProjectService.class);

-		this.service = (IBundleProjectService) context.getService(ref);

+		this.service = context.getService(ref);

 		

 		webContextRootListener = new WebContextRootSynchonizer();

 		ResourcesPlugin.getWorkspace().addResourceChangeListener(webContextRootListener, IResourceChangeEvent.POST_CHANGE);

diff --git a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/OSGIFrameworkInstanceBehaviorDelegate.java b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/OSGIFrameworkInstanceBehaviorDelegate.java
index 1f07e34..ac0f5a0 100644
--- a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/OSGIFrameworkInstanceBehaviorDelegate.java
+++ b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/OSGIFrameworkInstanceBehaviorDelegate.java
@@ -111,18 +111,19 @@
 	 *            &quot;start&quot;.
 	 * @return merged argument string
 	 */
-	public static String mergeArguments(String originalArg, String[] vmArgs,
+	public static String mergeArguments(final String originalArg, String[] vmArgs,
 			String[] excludeArgs, boolean keepActionLast) {
 		if (vmArgs == null)
 			return originalArg;
 
-		if (originalArg == null)
-			originalArg = "";
+		String arg = originalArg;
+		if (arg == null)
+			arg = "";
 
-		originalArg = concatArgs(originalArg,  vmArgs, keepActionLast) ;
-		originalArg =excludeArgs(originalArg, excludeArgs);
+		arg = concatArgs(originalArg,  vmArgs, keepActionLast) ;
+		arg = excludeArgs(originalArg, excludeArgs);
 	
-		return originalArg;
+		return arg;
 	}
 	
 	
@@ -181,11 +182,10 @@
 	 * @param cp
 	 * @param entry
 	 */
-	@SuppressWarnings({ "rawtypes", "unchecked" })
-	public static void replaceJREContainer(List cp, IRuntimeClasspathEntry entry) {
+	public static void replaceJREContainer(List<IRuntimeClasspathEntry> cp, IRuntimeClasspathEntry entry) {
 		int size = cp.size();
 		for (int i = 0; i < size; i++) {
-			IRuntimeClasspathEntry entry2 = (IRuntimeClasspathEntry) cp.get(i);
+			IRuntimeClasspathEntry entry2 = cp.get(i);
 			if (entry2.getPath().uptoSegment(2).isPrefixOf(entry.getPath())) {
 				cp.set(i, entry);
 				return;
@@ -201,12 +201,10 @@
 	 * @param cp
 	 * @param entry
 	 */
-	@SuppressWarnings({ "rawtypes", "unchecked" })
-	public static void mergeClasspath(List cp, IRuntimeClasspathEntry entry) {
-		Iterator iterator = cp.iterator();
+	public static void mergeClasspath(List<IRuntimeClasspathEntry> cp, IRuntimeClasspathEntry entry) {
+		Iterator<IRuntimeClasspathEntry> iterator = cp.iterator();
 		while (iterator.hasNext()) {
-			IRuntimeClasspathEntry entry2 = (IRuntimeClasspathEntry) iterator
-					.next();
+			IRuntimeClasspathEntry entry2 = iterator.next();
 
 			if (entry2.getPath().equals(entry.getPath()))
 				return;
@@ -313,8 +311,7 @@
 		if (instancePathStr != null) {
 			IPath instanceDir = new Path(getFrameworkInstance()
 					.getInstanceDirectory());
-			if (instanceDir != null)
-				confDir = instanceDir;
+			confDir = instanceDir;
 		}
 
 		return confDir;
@@ -346,7 +343,7 @@
 				if (events != null) {
 					int size = events.length;
 					for (int i = 0; i < size; i++) {
-						if (newProcess != null
+						if (true
 								&& newProcess.equals(events[i].getSource())
 								&& events[i].getKind() == DebugEvent.TERMINATE) {
 							stopImpl();
@@ -443,14 +440,15 @@
 		IRuntimeClasspathEntry[] originalClasspath = JavaRuntime
 				.computeUnresolvedRuntimeClasspath(workingCopy);
 		int size = originalClasspath.length;
-		List oldCp = new ArrayList(originalClasspath.length + 2);
+		List<IRuntimeClasspathEntry> oldCp = new ArrayList<IRuntimeClasspathEntry>(originalClasspath.length + 2);
 		for (int i = 0; i < size; i++)
 			oldCp.add(originalClasspath[i]);
 
-		List cp2 = runtime.getFrameworkClasspath(null);
-		Iterator iterator = cp2.iterator();
+		@SuppressWarnings("unchecked")
+		List<IRuntimeClasspathEntry> cp2 = runtime.getFrameworkClasspath(null);
+		Iterator<IRuntimeClasspathEntry> iterator = cp2.iterator();
 		while (iterator.hasNext()) {
-			IRuntimeClasspathEntry entry = (IRuntimeClasspathEntry) iterator
+			IRuntimeClasspathEntry entry = iterator
 					.next();
 			mergeClasspath(oldCp, entry);
 		}
@@ -467,9 +465,8 @@
 				// ignore
 			}
 
-			IPath jrePath = new Path(vmInstall.getInstallLocation()
-					.getAbsolutePath());
-			if (jrePath != null) {
+			IPath jrePath = new Path(vmInstall.getInstallLocation().getAbsolutePath());
+			if (jrePath.toFile().exists()){
 				IPath toolsPath = jrePath.append("lib").append("tools.jar");
 				if (toolsPath.toFile().exists()) {
 					IRuntimeClasspathEntry toolsJar = JavaRuntime
@@ -477,7 +474,7 @@
 					// Search for index to any existing tools.jar entry
 					int toolsIndex;
 					for (toolsIndex = 0; toolsIndex < oldCp.size(); toolsIndex++) {
-						IRuntimeClasspathEntry entry = (IRuntimeClasspathEntry) oldCp
+						IRuntimeClasspathEntry entry = oldCp
 								.get(toolsIndex);
 						if (entry.getType() == IRuntimeClasspathEntry.ARCHIVE
 								&& entry.getPath().lastSegment()
@@ -496,9 +493,9 @@
 		}
 
 		iterator = oldCp.iterator();
-		List list = new ArrayList();
+		List<String> list = new ArrayList<String>();
 		while (iterator.hasNext()) {
-			IRuntimeClasspathEntry entry = (IRuntimeClasspathEntry) iterator
+			IRuntimeClasspathEntry entry = iterator
 					.next();
 			try {
 				list.add(entry.getMemento());
@@ -531,9 +528,8 @@
 		if (getServer().getServerRestartState())
 			return;
 
-		Iterator iterator = getAllModules().iterator();
-		while (iterator.hasNext()) {
-			IModule[] module = (IModule[]) iterator.next();
+		List<IModule[]> modules = getAllModules();
+		for(IModule[] module: modules) {
 			IModuleResourceDelta[] delta = getPublishedResourceDelta(module);
 			if (delta == null || delta.length == 0)
 				continue;
@@ -636,7 +632,7 @@
 			// ignore
 		} finally {
 			try {
-				fin.close();
+				if (fin!=null) fin.close();
 			} catch (Exception ex) {
 				// ignore
 			}
@@ -654,7 +650,7 @@
 			// ignore
 		} finally {
 			try {
-				fout.close();
+				if (fout!=null) fout.close();
 			} catch (Exception ex) {
 				// ignore
 			}
diff --git a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/internal/debug/OSGIRuntimeSourcePathComputerDelegate.java b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/internal/debug/OSGIRuntimeSourcePathComputerDelegate.java
index dcef9f1..33044c8 100644
--- a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/internal/debug/OSGIRuntimeSourcePathComputerDelegate.java
+++ b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/internal/debug/OSGIRuntimeSourcePathComputerDelegate.java
@@ -68,7 +68,7 @@
 		/**
 		 * List<IRuntimeClasspathEntry> of unresolved IRuntimeClasspathEntries
 		 */
-		List runtimeClasspath = new ArrayList();
+		List<IRuntimeClasspathEntry> runtimeClasspath = new ArrayList<IRuntimeClasspathEntry>();
 
 		SourcePathComputerVisitor(ILaunchConfiguration configuration) {
 			this.configuration = configuration;
@@ -141,6 +141,8 @@
 
 		/**
 		 * {@inheritDoc}
+		 * @param rtFolder 
+		 * @param entry 
 		 */
 		public void visitClasspathEntry(IPath rtFolder, IClasspathEntry entry) {
 			// do nothing
@@ -149,7 +151,7 @@
 		ISourceContainer[] getSourceContainers() throws CoreException {
 			runtimeClasspath.addAll(Arrays.asList(JavaRuntime
 					.computeUnresolvedSourceLookupPath(configuration)));
-			IRuntimeClasspathEntry[] entries = (IRuntimeClasspathEntry[]) runtimeClasspath
+			IRuntimeClasspathEntry[] entries = runtimeClasspath
 					.toArray(new IRuntimeClasspathEntry[runtimeClasspath.size()]);
 			IRuntimeClasspathEntry[] resolved = JavaRuntime
 					.resolveSourceLookupPath(entries, configuration);
diff --git a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/launching/LaunchConfigurationDelegate.java b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/launching/LaunchConfigurationDelegate.java
index 1702230..7bcb4c3 100644
--- a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/launching/LaunchConfigurationDelegate.java
+++ b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/launching/LaunchConfigurationDelegate.java
@@ -32,7 +32,6 @@
 import org.eclipse.libra.framework.core.OSGIFrameworkInstanceBehaviorDelegate;
 import org.eclipse.libra.framework.core.Trace;
 import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerCore;
 import org.eclipse.wst.server.core.ServerUtil;
 
 
@@ -80,7 +79,7 @@
 		ExecutionArguments execArgs = new ExecutionArguments(vmArgs, pgmArgs);
 
 		// VM-specific attributes
-		Map vmAttributesMap = getVMSpecificAttributesMap(configuration);
+		Map<String,Object> vmAttributesMap = getVMSpecificAttributesMap(configuration);
 
 		// Classpath
 		String[] classpath = getClasspath(configuration);
diff --git a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/publish/PublishTask.java b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/publish/PublishTask.java
index 93c8ffb..51fb1b5 100644
--- a/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/publish/PublishTask.java
+++ b/plugins/org.eclipse.libra.framework.core/src/org/eclipse/libra/framework/core/publish/PublishTask.java
@@ -29,6 +29,6 @@
 
 		List<PublishOperation> tasks = new ArrayList<PublishOperation>();
 		
-		return (PublishOperation[]) tasks.toArray(new PublishOperation[tasks.size()]);
+		return tasks.toArray(new PublishOperation[tasks.size()]);
 	}
 }
\ No newline at end of file
diff --git a/plugins/org.eclipse.libra.framework.editor.integration/src/org/eclipse/libra/framework/editor/integration/internal/admin/osgijmx/ServicesData.java b/plugins/org.eclipse.libra.framework.editor.integration/src/org/eclipse/libra/framework/editor/integration/internal/admin/osgijmx/ServicesData.java
index adf8431..18e3f1d 100644
--- a/plugins/org.eclipse.libra.framework.editor.integration/src/org/eclipse/libra/framework/editor/integration/internal/admin/osgijmx/ServicesData.java
+++ b/plugins/org.eclipse.libra.framework.editor.integration/src/org/eclipse/libra/framework/editor/integration/internal/admin/osgijmx/ServicesData.java
@@ -11,7 +11,6 @@
 package org.eclipse.libra.framework.editor.integration.internal.admin.osgijmx;
 
 import java.io.IOException;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
diff --git a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/dependencies/BundleDependencyEditorPage.java b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/dependencies/BundleDependencyEditorPage.java
index 719c10a..841313b 100644
--- a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/dependencies/BundleDependencyEditorPage.java
+++ b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/dependencies/BundleDependencyEditorPage.java
@@ -90,25 +90,25 @@
 @SuppressWarnings("restriction")
 public class BundleDependencyEditorPage extends AbstractBundleEditorPage implements IZoomableWorkbenchPart {
 
-	private GraphViewer viewer;
+	GraphViewer viewer;
 
-	private BundleDependencyContentProvider contentProvider;
+	BundleDependencyContentProvider contentProvider;
 
 	private BundleDependencyLabelProvider labelProvider;
 
 	private ZoomContributionViewItem zoomContributionItem;
 
-	private SearchControl searchControl;
+	SearchControl searchControl;
 
 	private Action refreshAction;
 
-	private IToolBarManager toolBarManager;
+	IToolBarManager toolBarManager;
 
-	private final SearchTextHistory history = new SearchTextHistory();
+	final SearchTextHistory history = new SearchTextHistory();
 
-	private Action forwardAction;
+	Action forwardAction;
 
-	private Action backAction;
+	Action backAction;
 
 	private ServerResourceCommandManager commandManager;
 
@@ -172,7 +172,7 @@
 		});
 		packagesButton.setSelection(true);
 
-		new Label(composite, SWT.NONE);
+		toolkit.createLabel(composite, "", SWT.NONE);
 		Label dependenciesLabel = toolkit.createLabel(composite, "Dependencies");
 		dependenciesLabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
 
@@ -375,7 +375,7 @@
 
 	}
 	
-	private void setSelection(IBundle bundle) {
+	void setSelection(IBundle bundle) {
 		setSelection(bundle.getSymbolicName(), bundle.getVersion());
 	}
 	
@@ -474,7 +474,7 @@
 
 	class BundleDependencyUpdateJob extends Job {
 
-		private final boolean deleteSelection;
+		final boolean deleteSelection;
 
 		public BundleDependencyUpdateJob(boolean deleteSelection) {
 			super("Updating Bundle Dependency Graph");
diff --git a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/SearchTextHistory.java b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/SearchTextHistory.java
index 3c7850c..cc1b0e4 100644
--- a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/SearchTextHistory.java
+++ b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/SearchTextHistory.java
@@ -30,7 +30,7 @@
 		int found = -1;
         int size = history.size();
         for (int i = 0; i < size; i++) {
-            String s = (String) history.get(i);
+            String s = history.get(i);
             if (s.equals(text)) {
                 found = i;
                 break;
diff --git a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/dependencies/BundleDependencyLabelProvider.java b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/dependencies/BundleDependencyLabelProvider.java
index fc9aa96..14e1a67 100644
--- a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/dependencies/BundleDependencyLabelProvider.java
+++ b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/dependencies/BundleDependencyLabelProvider.java
@@ -52,11 +52,15 @@
 
 	private final Color grayColor = Display.getCurrent().getSystemColor(SWT.COLOR_GRAY);
 
+	/**
+	 * @param formToolkit  
+	 */
 	public BundleDependencyLabelProvider(BundleDependencyContentProvider contentProvider, FormToolkit formToolkit) {
 		this.contentProvider = contentProvider;
 	}
 
 	public void addListener(ILabelProviderListener listener) {
+		// nothing
 	}
 
 	public void dispose() {
@@ -98,9 +102,7 @@
 			if (contentProvider.isSelected((BundleDependency) rel)) {
 				return blackColor;
 			}
-			else {
-				return grayColor;
-			}
+			return grayColor;
 		}
 		return colorRel;
 	}
@@ -151,10 +153,11 @@
 	}
 
 	public void removeListener(ILabelProviderListener listener) {
-
+		// nothing
 	}
 
 	public void selectionChanged(SelectionChangedEvent event) {
+		// nothing
 	}
 
 }
diff --git a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/dependencies/FocusedBundleDependencyLayoutAlgorithm.java b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/dependencies/FocusedBundleDependencyLayoutAlgorithm.java
index c68cffa..8fc50d7 100644
--- a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/dependencies/FocusedBundleDependencyLayoutAlgorithm.java
+++ b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/dependencies/FocusedBundleDependencyLayoutAlgorithm.java
@@ -94,13 +94,11 @@
 		focusedLayoutAlgorithm.removeRelationship(relationship);
 	}
 
-	@SuppressWarnings("unchecked")
 	public void removeRelationships(List relationships) {
 		layoutAlgorithm.removeRelationships(relationships);
 		focusedLayoutAlgorithm.removeRelationships(relationships);
 	}
 
-	@SuppressWarnings("unchecked")
 	public void setComparator(Comparator comparator) {
 		layoutAlgorithm.setComparator(comparator);
 		focusedLayoutAlgorithm.setComparator(comparator);
diff --git a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/dependencies/ServiceReferenceBundleDependency.java b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/dependencies/ServiceReferenceBundleDependency.java
index 6f435b0..261ee54 100644
--- a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/dependencies/ServiceReferenceBundleDependency.java
+++ b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/dependencies/ServiceReferenceBundleDependency.java
@@ -23,7 +23,7 @@
  */
 public class ServiceReferenceBundleDependency extends BundleDependency {
 
-	private final Set<IServiceReference> serviceReference = new HashSet<IServiceReference>();;
+	private final Set<IServiceReference> serviceReference = new HashSet<IServiceReference>();
 
 	public ServiceReferenceBundleDependency(IBundle exportingBundle, IBundle importingBundle) {
 		super(exportingBundle, importingBundle);
diff --git a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/overview/BundleInformationDetailsPart.java b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/overview/BundleInformationDetailsPart.java
index de29272..810cc16 100644
--- a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/overview/BundleInformationDetailsPart.java
+++ b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/overview/BundleInformationDetailsPart.java
@@ -99,35 +99,35 @@
 
 	class PackageExportContentProvider implements ITreeContentProvider {
 
-		private IBundle bundle;
+		private IBundle cpBundle;
 
 		public void dispose() {
-
+			// empty
 		}
 
 		public Object[] getChildren(Object parentElement) {
 			if (parentElement instanceof IPackageExport) {
-				Set<IBundle> bundles = new HashSet<IBundle>();
+				Set<IBundle> returnBundles = new HashSet<IBundle>();
 				String name = ((IPackageExport) parentElement).getName();
 				String version = ((IPackageExport) parentElement).getVersion();
-				String id = bundle.getId();
+				String id = cpBundle.getId();
 
-				for (IBundle bundle : BundleInformationDetailsPart.this.bundles.values()) {
-					for (IPackageImport pi : bundle.getPackageImports()) {
+				for (IBundle loopBundle : BundleInformationDetailsPart.this.bundles.values()) {
+					for (IPackageImport pi : loopBundle.getPackageImports()) {
 						if (pi.getSupplierId().equals(id) && pi.getName().equals(name)
 								&& pi.getVersion().equals(version)) {
-							bundles.add(bundle);
+							returnBundles.add(loopBundle);
 						}
 					}
 				}
-				return bundles.toArray(new IBundle[bundles.size()]);
+				return returnBundles.toArray(new IBundle[returnBundles.size()]);
 			}
 			return new Object[0];
 		}
 
 		public Object[] getElements(Object inputElement) {
-			if (bundle.getPackageExports().size() > 0) {
-				return bundle.getPackageExports().toArray();
+			if (cpBundle.getPackageExports().size() > 0) {
+				return cpBundle.getPackageExports().toArray();
 			}
 			return new Object[] { "<no exported packages>" };
 		}
@@ -141,7 +141,7 @@
 		}
 
 		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-			bundle = (IBundle) newInput;
+			cpBundle = (IBundle) newInput;
 		}
 	}
 
@@ -389,37 +389,37 @@
 		}
 	}
 
-	private IBundle bundle;
+	IBundle bundle;
 
-	private Map<Long, IBundle> bundles;
+	Map<Long, IBundle> bundles;
 
 	private Text bundleSymbolicNameText;
 
 	private FilteredTree exportsTable;
 
-	private TreeViewer exportsTableViewer;
+	TreeViewer exportsTableViewer;
 
 	private Text idText;
 
 	private FilteredTree importsTable;
 
-	private TreeViewer importsTableViewer;
+	TreeViewer importsTableViewer;
 
 	private Text locationText;
 
 	private Text manifestText;
 
-	private final BundleInformationMasterDetailsBlock masterDetailsBlock;
+	final BundleInformationMasterDetailsBlock masterDetailsBlock;
 
 	private Text providerText;
 
 	private Table servicePropertiesTable;
 
-	private TableViewer servicePropertiesTableViewer;
+	TableViewer servicePropertiesTableViewer;
 
 	private FilteredTree servicesTable;
 
-	private TreeViewer servicesTableViewer;
+	TreeViewer servicesTableViewer;
 
 	private Text stateText;
 
@@ -681,8 +681,8 @@
 
 	}
 
-	public void refresh(Map<Long, IBundle> bundles) {
-		this.bundles = bundles;
+	public void refresh(Map<Long, IBundle> newBundles) {
+		this.bundles = newBundles;
 	}
 
 	public void selectionChanged(IFormPart part, ISelection selection) {
@@ -713,7 +713,10 @@
 
 	}
 
-	private void createSectionToolbar(Section section, FormToolkit toolkit, Action... actions) {
+	/**
+	 * @param toolkit  
+	 */
+	private static void createSectionToolbar(Section section, FormToolkit toolkit, Action... actions) {
 		ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
 		ToolBar toolbar = toolBarManager.createControl(section);
 		final Cursor handCursor = new Cursor(Display.getCurrent(), SWT.CURSOR_HAND);
@@ -721,7 +724,7 @@
 		// Cursor needs to be explicitly disposed
 		toolbar.addDisposeListener(new DisposeListener() {
 			public void widgetDisposed(DisposeEvent e) {
-				if ((handCursor != null) && (handCursor.isDisposed() == false)) {
+				if (! handCursor.isDisposed()) {
 					handCursor.dispose();
 				}
 			}
@@ -738,10 +741,10 @@
 	
 
 	
-	private void openBundleEditor(IBundle bundle) {
+	void openBundleEditor(IBundle openBundle) {
 		try {
 			String fileName = "META-INF/MANIFEST.MF";
-			IEditorInput input = getEditorInput(getBundleRoot(bundle), fileName);
+			IEditorInput input = getEditorInput(getBundleRoot(openBundle), fileName);
 			IEditorDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(fileName, getContentType());
 			IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); 
 			page.openEditor(input, desc.getId());
@@ -750,7 +753,7 @@
 		}
 	}
 	
-	private File getBundleRoot(IBundle bundle) throws URISyntaxException {
+	private static File getBundleRoot(IBundle bundle) throws URISyntaxException {
 		String location = bundle.getLocation();
 		
 		// if location URI starts with "reference:" then remove it
@@ -773,7 +776,7 @@
 		return bundleRoot;
 	}
 	
-	private IEditorInput getEditorInput(File bundleRoot, String filename) {
+	private static IEditorInput getEditorInput(File bundleRoot, String filename) {
 		IEditorInput input = null;
 		if (bundleRoot.isFile()) {
 			try {
@@ -783,6 +786,7 @@
 				}
 			}
 			catch (IOException e) {
+				e.printStackTrace();
 			}
 		}
 		else {
@@ -794,13 +798,14 @@
 					input = new FileStoreEditorInput(store);
 				}
 				catch (CoreException e) {
+					e.printStackTrace();
 				}
 			}
 		}
 		return input;
 	}
 	
-	private IContentType getContentType() {
+	private static IContentType getContentType() {
 		// first check if an add-on (like Virgo Tooling) has registered a specialized content type
 		IContentType type = Platform.getContentTypeManager().findContentTypeFor("META-INF/MANIFEST.MF");
 		if (type == null) {
diff --git a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/overview/BundleInformationMasterPart.java b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/overview/BundleInformationMasterPart.java
index 331adb5..0fc4842 100644
--- a/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/overview/BundleInformationMasterPart.java
+++ b/plugins/org.eclipse.libra.framework.editor.ui/src/org/eclipse/libra/framework/editor/ui/internal/overview/BundleInformationMasterPart.java
@@ -81,9 +81,9 @@
 
 	private final FormToolkit toolkit;
 
-	private StructuredViewer bundleTableViewer;
+	StructuredViewer bundleTableViewer;
 
-	private Table bundleTable;
+	Table bundleTable;
 
 	private Button startButton;
 
@@ -93,15 +93,11 @@
 
 	private Button updateButton;
 
-	private Text filterText;
+	Text filterText;
 
-	private TableColumn idColumn;
+	TableColumn idColumn, symbolicNameColumn, statusColumn;
 
-	private TableColumn symbolicNameColumn;
-
-	private TableColumn statusColumn;
-
-	private final BundleInformationMasterDetailsBlock masterDetailsBlock;
+	final BundleInformationMasterDetailsBlock masterDetailsBlock;
 
 	public BundleInformationMasterPart(Composite parent, FormToolkit toolkit, int style,
 			BundleInformationMasterDetailsBlock masterDetailsBlock) {
@@ -115,7 +111,7 @@
 		section.setText("Bundle Status");
 		section.setDescription("Information about installed bundles on server.");
 		section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING));
-		createSectionToolbar(section, toolkit);
+		createSectionToolbar(section);
 
 		Composite composite = toolkit.createComposite(section);
 		GridLayout layout = new GridLayout();
@@ -257,7 +253,7 @@
 		return null;
 	}
 
-	private void executeServerCommand(final String command) {
+	void executeServerCommand(final String command) {
 		IBundle bundle = getSelectedBundle();
 		if (bundle != null) {
 			final long bundleId = Long.parseLong(bundle.getId());
@@ -299,7 +295,7 @@
 		}
 	}
 
-	private void createSectionToolbar(Section section, FormToolkit toolkit) {
+	private void createSectionToolbar(Section section) {
 		ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
 		ToolBar toolbar = toolBarManager.createControl(section);
 		final Cursor handCursor = new Cursor(Display.getCurrent(), SWT.CURSOR_HAND);
@@ -307,7 +303,7 @@
 		// Cursor needs to be explicitly disposed
 		toolbar.addDisposeListener(new DisposeListener() {
 			public void widgetDisposed(DisposeEvent e) {
-				if ((handCursor != null) && (handCursor.isDisposed() == false)) {
+				if (! handCursor.isDisposed()) {
 					handCursor.dispose();
 				}
 			}
@@ -353,8 +349,10 @@
 					context.run(true, true, runnable);
 				}
 				catch (InvocationTargetException e1) {
+					// nothing
 				}
 				catch (InterruptedException e2) {
+					// nothing
 				}
 
 			}
@@ -391,6 +389,7 @@
 		}
 
 		public void dispose() {
+			// nothing
 		}
 
 		@SuppressWarnings("unchecked")
diff --git a/plugins/org.eclipse.libra.framework.equinox.ui/src/org/eclipse/libra/framework/equinox/ui/internal/JavaProfileEditorSection.java b/plugins/org.eclipse.libra.framework.equinox.ui/src/org/eclipse/libra/framework/equinox/ui/internal/JavaProfileEditorSection.java
index 830a493..2ef6a6c 100644
--- a/plugins/org.eclipse.libra.framework.equinox.ui/src/org/eclipse/libra/framework/equinox/ui/internal/JavaProfileEditorSection.java
+++ b/plugins/org.eclipse.libra.framework.equinox.ui/src/org/eclipse/libra/framework/equinox/ui/internal/JavaProfileEditorSection.java
@@ -26,7 +26,6 @@
 import org.eclipse.libra.framework.ui.Trace;
 import org.eclipse.pde.core.target.ITargetDefinition;
 import org.eclipse.pde.core.target.ITargetPlatformService;
-
 import org.eclipse.pde.internal.ui.SWTFactory;
 import org.eclipse.pde.internal.ui.wizards.target.EditTargetDefinitionWizard;
 import org.eclipse.swt.SWT;
@@ -45,7 +44,6 @@
 import org.eclipse.ui.forms.widgets.FormToolkit;
 import org.eclipse.ui.forms.widgets.Section;
 import org.eclipse.ui.help.IWorkbenchHelpSystem;
-import org.eclipse.wst.server.core.IRuntime;
 import org.eclipse.wst.server.ui.editor.ServerEditorSection;
 
 @SuppressWarnings("restriction")
@@ -54,7 +52,7 @@
 	protected IEquinoxFrameworkInstance frameworkInstance;
 
 	protected PropertyChangeListener listener;
-	private Combo javaProfileCombo;
+	Combo javaProfileCombo;
 
 	// Avoid hardcoding this at some point
 	// private final static String METADATADIR = ".metadata";
@@ -146,7 +144,7 @@
 	 * @see ServerEditorSection#dispose()
 	 */
 	public void dispose() {
-
+		super.dispose();
 	}
 
 	/**
@@ -172,7 +170,7 @@
 			return;
 		updating = true;
 
-		IRuntime runtime = server.getRuntime();
+//		IRuntime runtime = server.getRuntime();
 		String id = frameworkInstance.getJavaPofile();
 
 		if (javaProfileCombo != null) {
diff --git a/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/EquinoxHandler.java b/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/EquinoxHandler.java
index 4580839..4db20fe 100644
--- a/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/EquinoxHandler.java
+++ b/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/EquinoxHandler.java
@@ -104,7 +104,7 @@
 		programArgs.add("-consoleLog"); //$NON-NLS-1$
 		programArgs.add("-console"); //$NON-NLS-1$
 		 
-		return (String[]) programArgs.toArray(new String[programArgs.size()]);
+		return programArgs.toArray(new String[programArgs.size()]);
 	}
 
 	public String[] getExcludedFrameworkProgramArguments(boolean debug,
diff --git a/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/Messages.java b/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/Messages.java
index ef9cda8..1e9d3c8 100644
--- a/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/Messages.java
+++ b/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/Messages.java
@@ -10,8 +10,6 @@
  *******************************************************************************/
 package org.eclipse.libra.framework.equinox;
 
-import java.io.File;
-
 import org.eclipse.osgi.util.NLS;
 /**
  * Translated messages.
diff --git a/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/internal/EquinoxFrameworkClasspathProvider.java b/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/internal/EquinoxFrameworkClasspathProvider.java
index bf6b058..e56991a 100644
--- a/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/internal/EquinoxFrameworkClasspathProvider.java
+++ b/plugins/org.eclipse.libra.framework.equinox/src/org/eclipse/libra/framework/equinox/internal/EquinoxFrameworkClasspathProvider.java
@@ -38,7 +38,7 @@
 		IPath path = installPath.append("bundle");
 		addLibraryEntries(list, path.toFile(), true);
 
-		return (IClasspathEntry[]) list
+		return list
 				.toArray(new IClasspathEntry[list.size()]);
 	}
 }
diff --git a/plugins/org.eclipse.libra.framework.felix/src/org/eclipse/libra/framework/felix/internal/FelixRuntimeClasspathProvider.java b/plugins/org.eclipse.libra.framework.felix/src/org/eclipse/libra/framework/felix/internal/FelixRuntimeClasspathProvider.java
index c46678d..0a3aa12 100644
--- a/plugins/org.eclipse.libra.framework.felix/src/org/eclipse/libra/framework/felix/internal/FelixRuntimeClasspathProvider.java
+++ b/plugins/org.eclipse.libra.framework.felix/src/org/eclipse/libra/framework/felix/internal/FelixRuntimeClasspathProvider.java
@@ -38,7 +38,7 @@
 		IPath path = installPath.append("osgi");
 		addLibraryEntries(list, path.toFile(), true);
 
-		return (IClasspathEntry[]) list
+		return list
 				.toArray(new IClasspathEntry[list.size()]);
 	}
 }
diff --git a/plugins/org.eclipse.libra.framework.jonas/src/org/eclipse/libra/framework/jonas/JonasFrameworkInstance.java b/plugins/org.eclipse.libra.framework.jonas/src/org/eclipse/libra/framework/jonas/JonasFrameworkInstance.java
index 06584fe..46bbf82 100644
--- a/plugins/org.eclipse.libra.framework.jonas/src/org/eclipse/libra/framework/jonas/JonasFrameworkInstance.java
+++ b/plugins/org.eclipse.libra.framework.jonas/src/org/eclipse/libra/framework/jonas/JonasFrameworkInstance.java
@@ -117,8 +117,7 @@
 
 	}
 
-	@SuppressWarnings("restriction")
-	private ITargetLocation[] getDefaultBundleContainers(IPath installPath) {
+	private static ITargetLocation[] getDefaultBundleContainers(IPath installPath) {
 		try {
 			DirectoryScanner scanner = new DirectoryScanner();
 			String baseDir = installPath.append("repositories/maven2-internal").toOSString();
diff --git a/plugins/org.eclipse.libra.framework.jonas/src/org/eclipse/libra/framework/jonas/internal/JonasFrameworkClasspathProvider.java b/plugins/org.eclipse.libra.framework.jonas/src/org/eclipse/libra/framework/jonas/internal/JonasFrameworkClasspathProvider.java
index 36b67af..4075bc5 100644
--- a/plugins/org.eclipse.libra.framework.jonas/src/org/eclipse/libra/framework/jonas/internal/JonasFrameworkClasspathProvider.java
+++ b/plugins/org.eclipse.libra.framework.jonas/src/org/eclipse/libra/framework/jonas/internal/JonasFrameworkClasspathProvider.java
@@ -38,7 +38,7 @@
 		IPath path = installPath.append("osgi");
 		addLibraryEntries(list, path.toFile(), true);
 
-		return (IClasspathEntry[]) list
+		return list
 				.toArray(new IClasspathEntry[list.size()]);
 	}
 }
diff --git a/plugins/org.eclipse.libra.framework.knopflerfish/src/org/eclipse/libra/framework/knopflerfish/KnopflerfishFrameworkInstance.java b/plugins/org.eclipse.libra.framework.knopflerfish/src/org/eclipse/libra/framework/knopflerfish/KnopflerfishFrameworkInstance.java
index e7b817e..dc171c1 100644
--- a/plugins/org.eclipse.libra.framework.knopflerfish/src/org/eclipse/libra/framework/knopflerfish/KnopflerfishFrameworkInstance.java
+++ b/plugins/org.eclipse.libra.framework.knopflerfish/src/org/eclipse/libra/framework/knopflerfish/KnopflerfishFrameworkInstance.java
@@ -123,7 +123,6 @@
 
 	}
 
-	@SuppressWarnings("restriction")
 	@Override
 	public ITargetDefinition createDefaultTarget() throws CoreException {
 		
@@ -164,7 +163,7 @@
 		return targetDefinition;
 	}
 
-	private boolean shouldInclude(BundleInfo bundleInfo) {
+	private static boolean shouldInclude(BundleInfo bundleInfo) {
 		String bundles[] = {"log_api-3.0.5.jar",
 				"console_api-3.0.1.jar",
 				"cm_api-3.0.1.jar",
@@ -182,7 +181,7 @@
 		return false;
 	}
 
-	private ITargetLocation[] getDefaultBundleContainers(IPath installPath) {
+	private static ITargetLocation[] getDefaultBundleContainers(IPath installPath) {
 		ITargetLocation[] containers = new ITargetLocation[8];
 		ITargetPlatformService service = TargetDefinitionUtil.getTargetPlatformService();
 		containers[0] =  service.newDirectoryLocation(
diff --git a/plugins/org.eclipse.libra.framework.knopflerfish/src/org/eclipse/libra/framework/knopflerfish/internal/KnopflerfishFrameworkClasspathProvider.java b/plugins/org.eclipse.libra.framework.knopflerfish/src/org/eclipse/libra/framework/knopflerfish/internal/KnopflerfishFrameworkClasspathProvider.java
index 341a6e9..f8a0ec9 100644
--- a/plugins/org.eclipse.libra.framework.knopflerfish/src/org/eclipse/libra/framework/knopflerfish/internal/KnopflerfishFrameworkClasspathProvider.java
+++ b/plugins/org.eclipse.libra.framework.knopflerfish/src/org/eclipse/libra/framework/knopflerfish/internal/KnopflerfishFrameworkClasspathProvider.java
@@ -38,7 +38,7 @@
 		IPath path = installPath.append("bundle");
 		addLibraryEntries(list, path.toFile(), true);
 
-		return (IClasspathEntry[]) list
+		return list
 				.toArray(new IClasspathEntry[list.size()]);
 	}
 }
diff --git a/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/ModulePublisherDelegate.java b/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/ModulePublisherDelegate.java
index b9cd128..5a5af1a 100644
--- a/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/ModulePublisherDelegate.java
+++ b/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/ModulePublisherDelegate.java
@@ -37,7 +37,7 @@
 		if (info == null)
 			return Status.OK_STATUS;
 		
-		final Shell shell = (Shell) info.getAdapter(Shell.class);
+		final Shell shell = info.getAdapter(Shell.class);
 		if (shell == null)
 			return Status.OK_STATUS;
 		
diff --git a/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/editor/TargetDefinitionEditorPart.java b/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/editor/TargetDefinitionEditorPart.java
index 2c5b984..d5bc941 100644
--- a/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/editor/TargetDefinitionEditorPart.java
+++ b/plugins/org.eclipse.libra.framework.ui/src/org/eclipse/libra/framework/ui/internal/editor/TargetDefinitionEditorPart.java
@@ -94,22 +94,22 @@
 	protected PropertyChangeListener listener;
 	private Button fDefaultJREButton;
 	private Button fNamedJREButton;
-	private Combo fNamedJREsCombo;
+	Combo fNamedJREsCombo;
 	private Button fExecEnvButton;
-	private TreeSet fExecEnvChoices;
-	private Combo fExecEnvsCombo;
-	private TreeSet fOSChoices;
-	private Combo fOSCombo;
-	private Combo fWSCombo;
-	private TreeSet fArchChoices;
-	private Combo fArchCombo;
-	private Combo fNLCombo;
-	private Text fProgramArgs;
-	private Text fVMArgs;
+	private TreeSet<String> fExecEnvChoices;
+	Combo fExecEnvsCombo;
+	private TreeSet<String> fOSChoices;
+	Combo fOSCombo;
+	Combo fWSCombo;
+	private TreeSet<String> fArchChoices;
+	Combo fArchCombo;
+	Combo fNLCombo;
+	Text fProgramArgs;
+	Text fVMArgs;
 
-	private TreeSet fWSChoices;
+	private TreeSet<String> fWSChoices;
 
-	private TreeSet fNLChoices;
+	private TreeSet<String> fNLChoices;
 
 	public TargetDefinitionEditorPart() {
 		super();
@@ -397,7 +397,7 @@
 			}
 		});
 
-		fExecEnvsCombo = SWTFactory.createCombo(group, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY, 1, (String[]) fExecEnvChoices.toArray(new String[fExecEnvChoices.size()]));
+		fExecEnvsCombo = SWTFactory.createCombo(group, SWT.SINGLE | SWT.BORDER | SWT.READ_ONLY, 1, fExecEnvChoices.toArray(new String[fExecEnvChoices.size()]));
 		fExecEnvsCombo.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
 				getTargetDefinition().setJREContainer(JavaRuntime.newJREContainerPath(VMUtil.getExecutionEnvironment(fExecEnvsCombo.getText())));
@@ -412,7 +412,7 @@
 	 * Initializes the combo with possible execution environments
 	 */
 	protected void initializeJREValues() {
-		fExecEnvChoices = new TreeSet();
+		fExecEnvChoices = new TreeSet<String>();
 		IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
 		IExecutionEnvironment[] envs = manager.getExecutionEnvironments();
 		for (int i = 0; i < envs.length; i++)
@@ -432,7 +432,7 @@
 
 		SWTFactory.createLabel(group, PDEUIMessages.Preferences_TargetEnvironmentPage_os, 1);
 
-		fOSCombo = SWTFactory.createCombo(group, SWT.SINGLE | SWT.BORDER, 1, (String[]) fOSChoices.toArray(new String[fOSChoices.size()]));
+		fOSCombo = SWTFactory.createCombo(group, SWT.SINGLE | SWT.BORDER, 1, fOSChoices.toArray(new String[fOSChoices.size()]));
 		fOSCombo.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
 				String val = getModelValue(fOSCombo.getText());
@@ -445,7 +445,7 @@
 
 		SWTFactory.createLabel(group, PDEUIMessages.Preferences_TargetEnvironmentPage_ws, 1);
 
-		fWSCombo = SWTFactory.createCombo(group, SWT.SINGLE | SWT.BORDER, 1, (String[]) fWSChoices.toArray(new String[fWSChoices.size()]));
+		fWSCombo = SWTFactory.createCombo(group, SWT.SINGLE | SWT.BORDER, 1, fWSChoices.toArray(new String[fWSChoices.size()]));
 		fWSCombo.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
 				String val = getModelValue(fWSCombo.getText());
@@ -457,7 +457,7 @@
 
 		SWTFactory.createLabel(group, PDEUIMessages.Preferences_TargetEnvironmentPage_arch, 1);
 
-		fArchCombo = SWTFactory.createCombo(group, SWT.SINGLE | SWT.BORDER, 1, (String[]) fArchChoices.toArray(new String[fArchChoices.size()]));
+		fArchCombo = SWTFactory.createCombo(group, SWT.SINGLE | SWT.BORDER, 1, fArchChoices.toArray(new String[fArchChoices.size()]));
 		fArchCombo.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
 				String val = getModelValue(fArchCombo.getText());
@@ -469,7 +469,7 @@
 
 		SWTFactory.createLabel(group, PDEUIMessages.Preferences_TargetEnvironmentPage_nl, 1);
 
-		fNLCombo = SWTFactory.createCombo(group, SWT.SINGLE | SWT.BORDER, 1, (String[]) fNLChoices.toArray(new String[fNLChoices.size()]));
+		fNLCombo = SWTFactory.createCombo(group, SWT.SINGLE | SWT.BORDER, 1, fNLChoices.toArray(new String[fNLChoices.size()]));
 		fNLCombo.addModifyListener(new ModifyListener() {
 			public void modifyText(ModifyEvent e) {
 				String value = fNLCombo.getText();
@@ -491,7 +491,7 @@
 	 * @param value
 	 * @return trimmed value or <code>null</code>
 	 */
-	private String getModelValue(String value) {
+	String getModelValue(String value) {
 		if (value != null) {
 			value = value.trim();
 			if (value.length() == 0) {
@@ -506,7 +506,7 @@
 	* @param set
 	* @param preference
 	*/
-	private void addExtraChoices(Set set, String preference) {
+	private static void addExtraChoices(Set<String> set, String preference) {
 		StringTokenizer tokenizer = new StringTokenizer(preference, ","); //$NON-NLS-1$
 		while (tokenizer.hasMoreTokens()) {
 			set.add(tokenizer.nextToken().trim());
@@ -518,7 +518,7 @@
 	private void initializeChoices() {
 		IEclipsePreferences node = new InstanceScope().getNode(PDECore.PLUGIN_ID);
 
-		fOSChoices = new TreeSet();
+		fOSChoices = new TreeSet<String>();
 		String[] os = Platform.knownOSValues();
 		for (int i = 0; i < os.length; i++) {
 			fOSChoices.add(os[i]);
@@ -528,7 +528,7 @@
 			addExtraChoices(fOSChoices, pref);
 		}
 
-		fWSChoices = new TreeSet();
+		fWSChoices = new TreeSet<String>();
 		String[] ws = Platform.knownWSValues();
 		for (int i = 0; i < ws.length; i++) {
 			fWSChoices.add(ws[i]);
@@ -538,7 +538,7 @@
 			addExtraChoices(fWSChoices, pref);
 		}
 
-		fArchChoices = new TreeSet();
+		fArchChoices = new TreeSet<String>();
 		String[] arch = Platform.knownOSArchValues();
 		for (int i = 0; i < arch.length; i++) {
 			fArchChoices.add(arch[i]);
@@ -548,7 +548,7 @@
 			addExtraChoices(fArchChoices, pref);
 		}
 
-		fNLChoices = new TreeSet();
+		fNLChoices = new TreeSet<String>();
 		String[] nl = LocaleUtil.getLocales();
 		for (int i = 0; i < nl.length; i++) {
 			fNLChoices.add(nl[i]);
@@ -707,7 +707,7 @@
 	 * @see IWorkbenchPart#setFocus()
 	 */
 	public void setFocus() {
-
+		// nothing
 	}
 
 	@Override