From 2872596eddc25f2b1b2852f94f105ebbbdc4a515 Mon Sep 17 00:00:00 2001
From: Nils Christian Ehmke <nie@informatik.uni-kiel.de>
Date: Fri, 1 Jun 2012 18:35:58 +0200
Subject: [PATCH] Modified code for checkstyle & PMD

---
 .../.settings/org.eclipse.jdt.ui.prefs        |   4 +
 .../config/quality-config/cs-conf.xml         |   2 +-
 .../beans/application/ProjectsBean.java       |  10 +-
 .../webgui/beans/request/StringBean.java      |   6 +-
 .../CurrentAnalysisCockpitProjectBean.java    |  25 ++++-
 .../CurrentAnalysisControllerProjectBean.java |  26 ++++-
 ...rrentAnalysisViewWorkSpaceProjectBean.java |   6 +-
 .../beans/session/CurrentThemeBean.java       |   2 -
 .../session/CurrentWorkSpaceProjectBean.java  | 100 ++++++++++++++++--
 .../view/CurrentProjectOverviewBean.java      |  19 ++++
 .../java/kieker/webgui/common/ACManager.java  |  13 ++-
 .../common/ConnectionFilterToRepository.java  |   2 +-
 .../java/kieker/webgui/common/FSManager.java  |  88 ++++++++++++---
 .../AnalysisNotInstantiatedException.java     |   3 +
 .../AnalysisNotRunningException.java          |   4 +-
 .../LibraryAlreadyExistingException.java      |   4 +-
 .../exception/NewerProjectException.java      |   4 +-
 .../ProjectAlreadyExistingException.java      |   4 +-
 .../ProjectAlreadyStartedException.java       |   4 +-
 .../ProjectStillRunningException.java         |   4 +-
 20 files changed, 278 insertions(+), 52 deletions(-)

diff --git a/Kieker.WebGUI/.settings/org.eclipse.jdt.ui.prefs b/Kieker.WebGUI/.settings/org.eclipse.jdt.ui.prefs
index a7532b33..efbc0c39 100644
--- a/Kieker.WebGUI/.settings/org.eclipse.jdt.ui.prefs
+++ b/Kieker.WebGUI/.settings/org.eclipse.jdt.ui.prefs
@@ -57,8 +57,12 @@ formatter_profile=_Kieker - Profile
 formatter_settings_version=12
 org.eclipse.jdt.ui.exception.name=e
 org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;junit;org;com;kieker;org.primefaces;org.eclipse;
 org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=99
 org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=99
 sp_cleanup.add_default_serial_version_id=true
 sp_cleanup.add_generated_serial_version_id=false
 sp_cleanup.add_missing_annotations=true
diff --git a/Kieker.WebGUI/config/quality-config/cs-conf.xml b/Kieker.WebGUI/config/quality-config/cs-conf.xml
index ab764d91..8fea6526 100644
--- a/Kieker.WebGUI/config/quality-config/cs-conf.xml
+++ b/Kieker.WebGUI/config/quality-config/cs-conf.xml
@@ -630,7 +630,7 @@
         <!-- See http://checkstyle.sf.net/config_import.html !-->
         <module name="ImportOrder">
             <property name="option"        value="under"/>
-            <property name="groups"        value="java,javax,junit,org,com,kieker"/>
+            <property name="groups"        value="java,javax,junit,org,com,kieker,org.primefaces,org.eclipse"/>
             <property name="ordered"       value="true"/>
             <property name="separated"     value="true"/>
             <property name="caseSensitive" value="true"/>
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java
index a4bb6c5b..f523af34 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java
@@ -33,7 +33,6 @@ import javax.faces.bean.ApplicationScoped;
 import javax.faces.bean.ManagedBean;
 import javax.faces.context.FacesContext;
 
-import kieker.analysis.AnalysisController;
 import kieker.analysis.model.analysisMetaModel.MIProject;
 import kieker.webgui.common.ACManager;
 import kieker.webgui.common.FSManager;
@@ -111,6 +110,15 @@ public final class ProjectsBean {
 		}
 	}
 
+	/**
+	 * This method renames the given project. For other threads active on this project it looks like the project has been removed in the meantime. If something goes
+	 * wrong, the user will be informed via the growl-component.
+	 * 
+	 * @param projectName
+	 *            The old name of the project.
+	 * @param newName
+	 *            The new name of the project.
+	 */
 	public void renameProject(final String projectName, final String newName) {
 		try {
 			FSManager.getInstance().renameProject(projectName, newName);
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/request/StringBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/request/StringBean.java
index babc86bb..668ebf87 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/request/StringBean.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/request/StringBean.java
@@ -80,11 +80,11 @@ public class StringBean {
 	 * Modifies the given string so that it can be used as an ID. In other words: It removes all space characters. It is usually used to convert the 'address' of an
 	 * object into an unique ID. It is not guaranteed that the result will be a valid ID in other cases.
 	 * 
-	 * @param string
+	 * @param str
 	 *            The string to be modified.
 	 * @return The given string without space characters.
 	 */
-	public String stringToID(final String string) {
-		return string.replace(" ", "");
+	public String stringToID(final String str) {
+		return str.replace(" ", "");
 	}
 }
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisCockpitProjectBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisCockpitProjectBean.java
index 03a616b0..6cdbd5f2 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisCockpitProjectBean.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisCockpitProjectBean.java
@@ -54,6 +54,9 @@ public class CurrentAnalysisCockpitProjectBean {
 	 * This is the name of the stored project. It can be used as an identifier within the FS-Manager
 	 */
 	private String projectName;
+	/**
+	 * The model containing the information about the dashboard itself.
+	 */
 	private DashboardModel model;
 
 	/**
@@ -72,10 +75,21 @@ public class CurrentAnalysisCockpitProjectBean {
 		this.model.addColumn(column1);
 	}
 
+	/**
+	 * Delivers the model for the dashboard.
+	 * 
+	 * @return The stored instance of {@link DashboardModel}.
+	 */
 	public DashboardModel getModel() {
 		return this.model;
 	}
 
+	/**
+	 * Sets the new model for the dashboard.
+	 * 
+	 * @param model
+	 *            The new dashboard model to be stored in this bean.
+	 */
 	public void setModel(final DashboardModel model) {
 		this.model = model;
 	}
@@ -83,12 +97,12 @@ public class CurrentAnalysisCockpitProjectBean {
 	/**
 	 * This method sets the project stored within this bean and returns the new page for the navigation.
 	 * 
-	 * @param projectName
+	 * @param name
 	 *            The name of the project.
 	 * @return The name of the page for the analysis cockpit.
 	 */
-	public String setProject(final String projectName) {
-		this.projectName = projectName;
+	public String setProject(final String name) {
+		this.projectName = name;
 
 		return CurrentAnalysisCockpitProjectBean.PAGE_ANALYSIS_COCKPIT;
 	}
@@ -113,6 +127,11 @@ public class CurrentAnalysisCockpitProjectBean {
 		return CurrentAnalysisCockpitProjectBean.PAGE_PROJECT_OVERVIEW;
 	}
 
+	/**
+	 * Delivers a list containing all available views by name.
+	 * 
+	 * @return All available views.
+	 */
 	public List<String> getViews() {
 		return FSManager.getInstance().getAllViews(this.projectName);
 	}
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisControllerProjectBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisControllerProjectBean.java
index 68983019..6dffa03f 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisControllerProjectBean.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisControllerProjectBean.java
@@ -69,12 +69,12 @@ public class CurrentAnalysisControllerProjectBean {
 	/**
 	 * This method sets the project stored within this bean and returns the new page for the navigation.
 	 * 
-	 * @param projectName
+	 * @param name
 	 *            The name of the project.
 	 * @return The name of the page for the analysis controller.
 	 */
-	public String setProject(final String projectName) {
-		this.projectName = projectName;
+	public String setProject(final String name) {
+		this.projectName = name;
 
 		return CurrentAnalysisControllerProjectBean.PAGE_ANALYSIS_CONTROLLER;
 	}
@@ -151,18 +151,38 @@ public class CurrentAnalysisControllerProjectBean {
 		return ACManager.getInstance().getAnalysisControllerState(this.projectName) == AnalysisController.STATE.RUNNING;
 	}
 
+	/**
+	 * Checks whether the analysis is currently in the ready state.
+	 * 
+	 * @return true if and only if the analysis is ready to be started.
+	 */
 	public boolean isAnalysisReady() {
 		return ACManager.getInstance().getAnalysisControllerState(this.projectName) == AnalysisController.STATE.READY;
 	}
 
+	/**
+	 * Checks whether the analysis is not available.
+	 * 
+	 * @return true if and only if the analysis is <b>not</b> available.
+	 */
 	public boolean isAnalysisNotAvailable() {
 		return ACManager.getInstance().getAnalysisControllerState(this.projectName) == null;
 	}
 
+	/**
+	 * Checks whether the analysis is currently terminated.
+	 * 
+	 * @return true if and only if the analysis has been terminated.
+	 */
 	public boolean isAnalysisTerminated() {
 		return ACManager.getInstance().getAnalysisControllerState(this.projectName) == AnalysisController.STATE.TERMINATED;
 	}
 
+	/**
+	 * Checks whether the analysis is currently in the failed state.
+	 * 
+	 * @return true if and only if the analysis has failed.
+	 */
 	public boolean isAnalysisFailed() {
 		return ACManager.getInstance().getAnalysisControllerState(this.projectName) == AnalysisController.STATE.FAILED;
 	}
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisViewWorkSpaceProjectBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisViewWorkSpaceProjectBean.java
index 0c00c4ef..b739d7b9 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisViewWorkSpaceProjectBean.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentAnalysisViewWorkSpaceProjectBean.java
@@ -56,12 +56,12 @@ public class CurrentAnalysisViewWorkSpaceProjectBean {
 	/**
 	 * This method sets the project stored within this bean and returns the new page for the navigation.
 	 * 
-	 * @param projectName
+	 * @param name
 	 *            The name of the project.
 	 * @return The name of the page for the analysis view work space.
 	 */
-	public String setProject(final String projectName) {
-		this.projectName = projectName;
+	public String setProject(final String name) {
+		this.projectName = name;
 
 		return CurrentAnalysisViewWorkSpaceProjectBean.PAGE_ANALYSIS_VIEW_WORK_SPACE;
 	}
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentThemeBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentThemeBean.java
index 827a0966..694976cf 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentThemeBean.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentThemeBean.java
@@ -28,8 +28,6 @@ import javax.faces.context.FacesContext;
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletResponse;
 
-import kieker.webgui.beans.application.ThemeSwitcherBean;
-
 /**
  * This bean can be used for a single session of a user and stores the currently used theme (look and feel) for this user. Currently the default value being used is
  * the "glass-x"-theme, if none other value can be find within the
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentWorkSpaceProjectBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentWorkSpaceProjectBean.java
index a746fd28..df40ff44 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentWorkSpaceProjectBean.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentWorkSpaceProjectBean.java
@@ -63,11 +63,12 @@ import kieker.webgui.common.PluginFinder;
 import kieker.webgui.common.exception.LibraryAlreadyExistingException;
 import kieker.webgui.common.exception.NewerProjectException;
 
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
 import org.primefaces.event.FileUploadEvent;
 import org.primefaces.model.UploadedFile;
 
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
 /**
  * This bean contains the project of the current (session) user for the project work space.
  * 
@@ -119,14 +120,34 @@ public final class CurrentWorkSpaceProjectBean {
 	 * This list contains the available readers for the current project.
 	 */
 	private final List<Class<AbstractReaderPlugin>> availableReaders = Collections.synchronizedList(new ArrayList<Class<AbstractReaderPlugin>>());
-
+	/**
+	 * This map contains the mapping between the plugins and the result of their toString-method.
+	 */
 	private final ConcurrentHashMap<String, MIPlugin> pluginMap = new ConcurrentHashMap<String, MIPlugin>();
+	/**
+	 * This map contains the mapping between the ports and the result of their toString-method.
+	 */
 	private final ConcurrentHashMap<String, MIPort> portMap = new ConcurrentHashMap<String, MIPort>();
+	/**
+	 * This map contains the mapping between the repositories and the result of their toString-method.
+	 */
 	private final ConcurrentHashMap<String, MIRepository> repositoryMap = new ConcurrentHashMap<String, MIRepository>();
+	/**
+	 * This field contains the currently selected plugin.
+	 */
 	private MIPlugin selectedPlugin;
+	/**
+	 * The currently selected repository.
+	 */
+	private MIRepository selectedRepository;
+	/**
+	 * This list contains the currently available connections between filters.
+	 */
 	private final List<ConnectionFilterToFilter> filter2filterConnections = new ArrayList<ConnectionFilterToFilter>();
+	/**
+	 * This list contains the currently available connections between filters and repositories.
+	 */
 	private final List<ConnectionFilterToRepository> filter2repositoryConnections = new ArrayList<ConnectionFilterToRepository>();
-	private MIRepository selectedRepository;
 
 	/**
 	 * Creates a new instance of this class.
@@ -147,16 +168,16 @@ public final class CurrentWorkSpaceProjectBean {
 	/**
 	 * This method sets the project stored within this bean and returns the new page for the navigation - depending on the given values.
 	 * 
-	 * @param project
+	 * @param newProject
 	 *            The project to be stored within this bean.
-	 * @param projectName
+	 * @param newName
 	 *            The name of the project.
 	 * @return The name of the page for the project work space, if the project has been accepted, '' if it is null.
 	 */
-	public String setProject(final MIProject project, final String projectName) {
+	public String setProject(final MIProject newProject, final String newName) {
 		// Remember the given parameters
-		this.project = project;
-		this.projectName = projectName;
+		this.project = newProject;
+		this.projectName = newName;
 		this.getConnectionsFromProject();
 
 		if (this.project != null) {
@@ -182,13 +203,19 @@ public final class CurrentWorkSpaceProjectBean {
 		return navigationPage;
 	}
 
+	/**
+	 * This method initializes the hash maps of the plugins, the ports and the repositories. The maps are cleaned beforehand.
+	 */
 	private void intializeHashMaps() {
+		// Clear all maps
 		this.pluginMap.clear();
 		this.portMap.clear();
 		this.repositoryMap.clear();
 
+		// Initialize the plugin map...
 		for (final MIPlugin plugin : this.project.getPlugins()) {
 			this.pluginMap.put(plugin.toString(), plugin);
+			// ..and the port map
 			for (final MIPort port : plugin.getOutputPorts()) {
 				this.portMap.put(port.toString(), port);
 			}
@@ -198,6 +225,7 @@ public final class CurrentWorkSpaceProjectBean {
 				}
 			}
 		}
+		// Now initialize the repository map
 		for (final MIRepository repository : this.project.getRepositories()) {
 			this.repositoryMap.put(repository.toString(), repository);
 		}
@@ -600,15 +628,36 @@ public final class CurrentWorkSpaceProjectBean {
 		}
 	}
 
+	/**
+	 * This method delivers the currently selected plugin (or the currently selected repository). If nothing has been selected, null will be returned.
+	 * 
+	 * @return The currently selected plugin or repository.
+	 */
 	public EObject getSelectedPlugin() {
-		return (this.selectedPlugin != null) ? this.selectedPlugin : this.selectedRepository;
+		if (this.selectedPlugin != null) {
+			return this.selectedPlugin;
+		} else {
+			return this.selectedRepository;
+		}
 	}
 
+	/**
+	 * This method sets the currently selected plugin. The selected repository is set automatically to null.
+	 * 
+	 * @param selectedPlugin
+	 *            The new selection.
+	 */
 	public void setSelectedPlugin(final MIPlugin selectedPlugin) {
 		this.selectedPlugin = selectedPlugin;
 		this.selectedRepository = null;
 	}
 
+	/**
+	 * This method sets the currently selected repository. The selected plugin is set automatically to null.
+	 * 
+	 * @param selectedRepository
+	 *            The new selection.
+	 */
 	public void setSelectedRepository(final MIRepository selectedRepository) {
 		this.selectedRepository = selectedRepository;
 		this.selectedPlugin = null;
@@ -689,10 +738,20 @@ public final class CurrentWorkSpaceProjectBean {
 		return this.filter2filterConnections;
 	}
 
+	/**
+	 * Delivers the connections (between filters and repositories) within the current main project.
+	 * 
+	 * @return A list containing all available connections.
+	 */
 	public List<ConnectionFilterToRepository> getRepoConnections() {
 		return this.filter2repositoryConnections;
 	}
 
+	/**
+	 * Delivers all available repositories.
+	 * 
+	 * @return A list with all repositories within the model.
+	 */
 	public EList<MIRepository> getRepositories() {
 		return this.project.getRepositories();
 	}
@@ -751,14 +810,35 @@ public final class CurrentWorkSpaceProjectBean {
 		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(severity, "", msg));
 	}
 
+	/**
+	 * This method searches a plugin by name (the name should be delivered using the toString-method of the object).
+	 * 
+	 * @param string
+	 *            The name of the plugin.
+	 * @return The plugin with the given name if it exists, null otherwise.
+	 */
 	public MIPlugin getPluginByName(final String string) {
 		return this.pluginMap.get(string);
 	}
 
+	/**
+	 * This method searches a port by name (the name should be delivered using the toString-method of the object).
+	 * 
+	 * @param string
+	 *            The name of the port.
+	 * @return The port with the given name if it exists, null otherwise.
+	 */
 	public MIPort getPortByName(final String string) {
 		return this.portMap.get(string);
 	}
 
+	/**
+	 * This method searches a repository by name (the name should be delivered using the toString-method of the object).
+	 * 
+	 * @param string
+	 *            The name of the repository.
+	 * @return The plugin with the given name if it exists, null otherwise.
+	 */
 	public MIRepository getRepositoryByName(final String string) {
 		return this.repositoryMap.get(string);
 	}
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentProjectOverviewBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentProjectOverviewBean.java
index f05209e2..4a7be8dc 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentProjectOverviewBean.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentProjectOverviewBean.java
@@ -24,23 +24,42 @@ import javax.faces.bean.ManagedBean;
 import javax.faces.bean.ViewScoped;
 
 /**
+ * This bean is used in the context of the project overview page.
  * 
  * @author Nils Christian Ehmke
+ * @version 1.0
  */
 @ManagedBean
 @ViewScoped
 public class CurrentProjectOverviewBean {
 
+	/**
+	 * The name of the "selected" project.
+	 */
 	private String projectName;
 
+	/**
+	 * Default constructor.
+	 */
 	public CurrentProjectOverviewBean() {
 		// No code necessary
 	}
 
+	/**
+	 * Delivers the currently "selected" project name.
+	 * 
+	 * @return The name of the project.
+	 */
 	public String getProjectName() {
 		return this.projectName;
 	}
 
+	/**
+	 * Sets the currently "selected" project name.
+	 * 
+	 * @param projectName
+	 *            The name of the project.
+	 */
 	public void setProjectName(final String projectName) {
 		this.projectName = projectName;
 	}
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java
index 73ffcaba..1052932a 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java
@@ -39,20 +39,20 @@ import kieker.webgui.common.exception.ProjectStillRunningException;
  * @author Nils Christian Ehmke
  * @version 1.0
  */
-public class ACManager {
+public final class ACManager {
 	/**
 	 * This is the maximal time the application will wait for an analysis thread to be terminated.
 	 */
 	private static final long MAX_THREAD_WAIT_TIME_MS = 1000;
+	/**
+	 * This is the singleton instance of this class.
+	 */
+	private static final ACManager INSTANCE = new ACManager();
 	/**
 	 * This list contains the current analysis controllers and their corresponding threads. Not every project does have a controller, but every project can have
 	 * maximal one.
 	 */
 	private final ConcurrentHashMap<String, Pair<AnalysisController, Thread>> analysisController = new ConcurrentHashMap<String, Pair<AnalysisController, Thread>>();
-	/**
-	 * This is the singleton instance of this class.
-	 */
-	private static final ACManager INSTANCE = new ACManager();
 
 	/**
 	 * Creates a new instance of this class.
@@ -168,6 +168,9 @@ public class ACManager {
 					break;
 				case RUNNING:
 					throw new ProjectStillRunningException("The project with the name '" + project + "' is still running.");
+				default:
+					// No code necessary
+					break;
 				}
 			}
 		}
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ConnectionFilterToRepository.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ConnectionFilterToRepository.java
index 604a813f..1b499a84 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ConnectionFilterToRepository.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ConnectionFilterToRepository.java
@@ -52,7 +52,7 @@ public class ConnectionFilterToRepository {
 	 *            The source filter.
 	 * @param destination
 	 *            The destination repository.
-	 * @param repositoryPort
+	 * @param outputPort
 	 *            The repository port which will be used from the source.
 	 */
 	public ConnectionFilterToRepository(final MIPlugin source, final MIRepository destination, final MIRepositoryConnector outputPort) {
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/FSManager.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/FSManager.java
index 76d8cc66..8855545f 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/FSManager.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/FSManager.java
@@ -87,14 +87,6 @@ public final class FSManager {
 	 * This is the buffer (in bytes) used to copy files.
 	 */
 	private static final int BUF_SIZE_BYTES = 1024;
-	/**
-	 * This is the factory we will use to create the elements for the projects.
-	 */
-	private final MIAnalysisMetaModelFactory factory = new MAnalysisMetaModelFactory();
-	/**
-	 * This map contains one lock-object for every project (by name). This works at every project name may exist only once.
-	 */
-	private final ConcurrentHashMap<String, Object> projectLocksMap = new ConcurrentHashMap<String, Object>();
 	/**
 	 * This is the log object used to log messages, warnings etc.
 	 */
@@ -103,6 +95,14 @@ public final class FSManager {
 	 * This is the singleton instance of this class.
 	 */
 	private static final FSManager INSTANCE = new FSManager();
+	/**
+	 * This is the factory we will use to create the elements for the projects.
+	 */
+	private final MIAnalysisMetaModelFactory factory = new MAnalysisMetaModelFactory();
+	/**
+	 * This map contains one lock-object for every project (by name). This works at every project name may exist only once.
+	 */
+	private final ConcurrentHashMap<String, Object> projectLocksMap = new ConcurrentHashMap<String, Object>();
 
 	/**
 	 * Creates a new instance of this class.
@@ -205,7 +205,7 @@ public final class FSManager {
 
 		// Load it atomically
 		synchronized (lock) {
-			return AnalysisController.loadFromFile(kaxFile.getAbsoluteFile());// /kaxFile);
+			return AnalysisController.loadFromFile(kaxFile.getAbsoluteFile()); // /kaxFile);
 		}
 	}
 
@@ -245,6 +245,18 @@ public final class FSManager {
 		}
 	}
 
+	/**
+	 * This method renames a project. In other words: The whole project will be copied and the old one removed (but atomically in respect to both project names).
+	 * 
+	 * @param projectName
+	 *            The name of the old project.
+	 * @param newName
+	 *            The new name of the project.
+	 * @throws IOException
+	 *             If something goes wrong during the rename-procedure.
+	 * @throws ProjectAlreadyExistingException
+	 *             If a project with the given new name exists already.
+	 */
 	public void renameProject(final String projectName, final String newName) throws IOException, ProjectAlreadyExistingException {
 		if (projectName.equals(newName)) {
 			throw new ProjectAlreadyExistingException("A project with the name '" + newName + "' exists already.");
@@ -256,8 +268,15 @@ public final class FSManager {
 		// We cannot risk just using two synchronized-blocks as such a thing could block the application. We therefore have to sort the locks by name in order to
 		// make sure that two methods would use the same order to access (if project A has to be renamed to B and B has to be renamed to A, we would always
 		// synchronize on A before synchronizing on B).
-		final Object lockFst = (projectName.compareTo(newName)) < 0 ? lockOld : lockNew;
-		final Object lockSnd = (projectName.compareTo(newName)) < 0 ? lockNew : lockOld;
+		final Object lockFst;
+		final Object lockSnd;
+		if (projectName.compareTo(newName) < 0) {
+			lockFst = lockOld;
+			lockSnd = lockNew;
+		} else {
+			lockFst = lockNew;
+			lockSnd = lockOld;
+		}
 
 		// Access the projects atomically
 		synchronized (lockFst) {
@@ -274,10 +293,28 @@ public final class FSManager {
 		}
 	}
 
+	/**
+	 * This method deletes the project with the given name.
+	 * 
+	 * @param projectName
+	 *            The name of the project to be removed.
+	 */
 	private void deleteProject(final String projectName) {
 		// TODO Delete
 	}
 
+	/**
+	 * This method copies the given project and saves it under the given name.
+	 * 
+	 * @param projectName
+	 *            The name of the project to be copied.
+	 * @param newName
+	 *            The name of the new project.
+	 * @throws ProjectAlreadyExistingException
+	 *             If a project with the given name exists already.
+	 * @throws IOException
+	 *             If something goes wrong during the copy procedure.
+	 */
 	private void copyProject(final String projectName, final String newName) throws ProjectAlreadyExistingException, IOException {
 		if (projectName.equals(newName)) {
 			throw new ProjectAlreadyExistingException("A project with the name '" + newName + "' exists already.");
@@ -288,8 +325,15 @@ public final class FSManager {
 
 		// We cannot risk just using two synchronized-blocks as such a thing could block the application. We therefore have to sort the locks by name in order to
 		// make sure that two methods would use the same order to access.
-		final Object lockFst = (projectName.compareTo(newName)) < 0 ? lockOld : lockNew;
-		final Object lockSnd = (projectName.compareTo(newName)) < 0 ? lockNew : lockOld;
+		final Object lockFst;
+		final Object lockSnd;
+		if (projectName.compareTo(newName) < 0) {
+			lockFst = lockOld;
+			lockSnd = lockNew;
+		} else {
+			lockFst = lockNew;
+			lockSnd = lockOld;
+		}
 
 		// Access the projects atomically
 		synchronized (lockFst) {
@@ -304,6 +348,13 @@ public final class FSManager {
 		}
 	}
 
+	/**
+	 * Delivers a list with all available views of the given project.
+	 * 
+	 * @param project
+	 *            The name of the project.
+	 * @return A list with the names of the available views.
+	 */
 	public List<String> getAllViews(final String project) {
 		final List<String> result = new ArrayList<String>();
 
@@ -318,6 +369,13 @@ public final class FSManager {
 		return result;
 	}
 
+	/**
+	 * Checks whether a project with the name exists on the file system.
+	 * 
+	 * @param project
+	 *            The name of the project.
+	 * @return true if and only if a directory with the name of the project exists in the root dir.
+	 */
 	private boolean projectExists(final String project) {
 		// Assemble the path to the given project
 		final String fileName = FSManager.ROOT_DIRECTORY + File.separator + project;
@@ -429,8 +487,10 @@ public final class FSManager {
 				int count;
 
 				// Transfer the file.
-				while ((count = in.read(buf)) != -1) {
+				count = in.read(buf);
+				while (count != -1) {
 					out.write(buf, 0, count);
+					count = in.read(buf);
 				}
 			} finally {
 				// Try to make sure that the streams will be closed.
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisNotInstantiatedException.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisNotInstantiatedException.java
index 6f789155..931a4a28 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisNotInstantiatedException.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisNotInstantiatedException.java
@@ -28,6 +28,9 @@ package kieker.webgui.common.exception;
  */
 public class AnalysisNotInstantiatedException extends Exception {
 
+	/**
+	 * The serial version UID.
+	 */
 	private static final long serialVersionUID = 1L;
 
 	/**
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisNotRunningException.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisNotRunningException.java
index ff9a3823..78c162ad 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisNotRunningException.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisNotRunningException.java
@@ -27,7 +27,9 @@ package kieker.webgui.common.exception;
  * @version 1.0
  */
 public class AnalysisNotRunningException extends Exception {
-
+	/**
+	 * The serial version UID.
+	 */
 	private static final long serialVersionUID = 1L;
 
 	/**
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/LibraryAlreadyExistingException.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/LibraryAlreadyExistingException.java
index 0c9ba7a1..64e2d7cb 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/LibraryAlreadyExistingException.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/LibraryAlreadyExistingException.java
@@ -27,7 +27,9 @@ package kieker.webgui.common.exception;
  * @version 1.0
  */
 public class LibraryAlreadyExistingException extends Exception {
-
+	/**
+	 * The serial version UID.
+	 */
 	private static final long serialVersionUID = 1L;
 
 	/**
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/NewerProjectException.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/NewerProjectException.java
index 552be8bd..4b1280be 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/NewerProjectException.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/NewerProjectException.java
@@ -28,7 +28,9 @@ package kieker.webgui.common.exception;
  * @version 1.0
  */
 public class NewerProjectException extends Exception {
-
+	/**
+	 * The serial version UID.
+	 */
 	private static final long serialVersionUID = 1L;
 
 	/**
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectAlreadyExistingException.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectAlreadyExistingException.java
index 785740ce..02c28596 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectAlreadyExistingException.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectAlreadyExistingException.java
@@ -27,7 +27,9 @@ package kieker.webgui.common.exception;
  * @version 1.0
  */
 public class ProjectAlreadyExistingException extends Exception {
-
+	/**
+	 * The serial version UID.
+	 */
 	private static final long serialVersionUID = 1L;
 
 	/**
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectAlreadyStartedException.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectAlreadyStartedException.java
index 3a76cba6..24206556 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectAlreadyStartedException.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectAlreadyStartedException.java
@@ -27,7 +27,9 @@ package kieker.webgui.common.exception;
  * @version 1.0
  */
 public class ProjectAlreadyStartedException extends Exception {
-
+	/**
+	 * The serial version UID.
+	 */
 	private static final long serialVersionUID = 1L;
 
 	/**
diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectStillRunningException.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectStillRunningException.java
index cbd66f2e..a29d9468 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectStillRunningException.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectStillRunningException.java
@@ -27,7 +27,9 @@ package kieker.webgui.common.exception;
  * @version 1.0
  */
 public class ProjectStillRunningException extends Exception {
-
+	/**
+	 * The serial version UID.
+	 */
 	private static final long serialVersionUID = 1L;
 
 	/**
-- 
GitLab