Happy checkstyle
diff --git a/plugins/org.eclipse.emf.compare.git.pgm/.project b/plugins/org.eclipse.emf.compare.git.pgm/.project
index 0ec80cf..228235c 100644
--- a/plugins/org.eclipse.emf.compare.git.pgm/.project
+++ b/plugins/org.eclipse.emf.compare.git.pgm/.project
@@ -20,9 +20,15 @@
 			<arguments>
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
 	</natures>
 </projectDescription>
diff --git a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/LogicalApp.java b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/LogicalApp.java
index 749e27d..15a1921 100644
--- a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/LogicalApp.java
+++ b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/LogicalApp.java
@@ -79,6 +79,9 @@
 	@Argument(index = 1, metaVar = "args")
 	private List<String> arguments = new ArrayList<String>();
 
+	/**
+	 * The URI of the setup file that contains the environment used to execute the logical commands.
+	 */
 	private final URI environmentSetupURI;
 
 	/**
@@ -90,6 +93,9 @@
 
 	/**
 	 * Constructor used for tests.
+	 * 
+	 * @param environmentURI
+	 *            URI of the setup file that contains the environment used to execute the logical commands.
 	 */
 	public LogicalApp(URI environmentURI) {
 		environmentSetupURI = environmentURI;
@@ -146,7 +152,9 @@
 	 *            application arguments.
 	 * @return {@link Returns}
 	 * @throws Die
+	 *             e
 	 * @throws IOException
+	 *             e
 	 */
 	private Object execute(final String[] argv) throws Die, IOException {
 		final CmdLineParser clp = new CmdLineParser(this);
diff --git a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/Returns.java b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/Returns.java
index 7ca5003..5958594 100644
--- a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/Returns.java
+++ b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/Returns.java
@@ -31,16 +31,35 @@
 	 */
 	ERROR(Integer.valueOf(128));
 
+	/** The return code. */
 	private final Integer code;
 
+	/**
+	 * Internal constructor.
+	 * 
+	 * @param code
+	 *            the return code.
+	 */
 	private Returns(Integer code) {
 		this.code = code;
 	}
 
+	/**
+	 * Get the return code.
+	 * 
+	 * @return the return code.
+	 */
 	public final Integer code() {
 		return code;
 	}
 
+	/**
+	 * Converts an int into a Returns code.
+	 * 
+	 * @param code
+	 *            the code represented as an int.
+	 * @return the Returns code.
+	 */
 	public static Returns valueOf(int code) {
 		for (Returns r : Returns.values()) {
 			if (r.code().equals(Integer.valueOf(code))) {
diff --git a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/Options.java b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/Options.java
index d9caf7d..745d41c 100644
--- a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/Options.java
+++ b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/Options.java
@@ -11,16 +11,24 @@
 package org.eclipse.emf.compare.git.pgm.internal;
 
 /**
+ * Options available from commands.
+ * 
  * @author <a href="mailto:arthur.daussy@obeo.fr">Arthur Daussy</a>
  */
-public class Options {
+public final class Options {
 
-	private Options() {
-	}
-
+	/** Display help for the command. */
 	public static final String HELP_OPT = "--help"; //$NON-NLS-1$
 
+	/** Show stack trace. */
 	public static final String SHOW_STACK_TRACE_OPT = "--show-stack-trace"; //$NON-NLS-1$
 
+	/** Apply the command on a specific git repository. */
 	public static final String GIT_DIR_OPT = "--git-dir"; //$NON-NLS-1$
+
+	/**
+	 * Internal constructor.
+	 */
+	private Options() {
+	}
 }
diff --git a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/ProgressPageLog.java b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/ProgressPageLog.java
index d88626f..dc03695 100644
--- a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/ProgressPageLog.java
+++ b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/ProgressPageLog.java
@@ -24,8 +24,15 @@
  */
 public class ProgressPageLog implements ProgressLog {
 
+	/** The print stream where to log. */
 	private final PrintStream out;
 
+	/**
+	 * Constructor.
+	 * 
+	 * @param out
+	 *            the print stream where to log.
+	 */
 	public ProgressPageLog(PrintStream out) {
 		super();
 		this.out = out;
@@ -82,6 +89,9 @@
 	public void task(SetupTask setupTask) {
 	}
 
+	/**
+	 * {@inheritDoc}.
+	 */
 	public void setTerminating() {
 
 	}
diff --git a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/app/AbstractLogicalApplication.java b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/app/AbstractLogicalApplication.java
index cfd63c5..ea98ce7 100644
--- a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/app/AbstractLogicalApplication.java
+++ b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/app/AbstractLogicalApplication.java
@@ -99,6 +99,16 @@
 public abstract class AbstractLogicalApplication implements IApplication {
 
 	/**
+	 * Logs any message from oomph.
+	 */
+	protected ProgressPageLog progressPageLog;
+
+	/**
+	 * Git repository for this command to be executed in.
+	 */
+	protected Repository repo;
+
+	/**
 	 * Holds git directory location.
 	 */
 	@Argument(index = 0, metaVar = "gitFolderPath", usage = "Path to the .git folder of your repository.", handler = GitDirHandler.class)
@@ -117,19 +127,11 @@
 	private boolean showStackTrace;
 
 	/**
-	 * Logs any message from oomph.
-	 */
-	protected ProgressPageLog progressPageLog;
-
-	/**
-	 * Git repository for this command to be executed in.
-	 */
-	protected Repository repo;
-
-	/**
 	 * {@inheritDoc}.
 	 */
+	@Override
 	public Object start(IApplicationContext context) throws Exception {
+		Integer code;
 		// Prevents VM args if the application exits on something different that 0
 		System.setProperty(IApplicationContext.EXIT_DATA_PROPERTY, EMPTY_STRING);
 		final Map<?, ?> args = context.getArguments();
@@ -150,14 +152,14 @@
 		}
 		try {
 			performStartup();
-			return performGitCommand();
+			code = performGitCommand();
 		} catch (Die e) {
-			Integer returnCode = EMFCompareGitPGMUtil.handleDieError(e, showStackTrace);
-			return returnCode;
+			code = EMFCompareGitPGMUtil.handleDieError(e, showStackTrace);
 		} finally {
 			dispose();
 		}
 
+		return code;
 	}
 
 	/**
@@ -171,6 +173,8 @@
 	 * Performs the logical git command (diff or merge).
 	 * 
 	 * @return a {@link org.eclipse.emf.compare.git.pgm.Returns}.
+	 * @throws Die
+	 *             e
 	 */
 	protected abstract Integer performGitCommand() throws Die;
 
@@ -178,9 +182,8 @@
 	 * Creates and configure the setup task performer to execute the imports of projects referenced in the
 	 * user setup model. Then call the {@link #performGitCommand()}.
 	 * 
-	 * @return a {@link org.eclipse.emf.compare.git.pgm.Returns}.
-	 * @throws IOException
 	 * @throws Die
+	 *             e
 	 */
 	protected void performStartup() throws Die {
 		ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(BaseEditUtil
@@ -246,7 +249,11 @@
 	}
 
 	/**
+	 * Check if the file to test is EMFCompare compliant.
+	 * 
 	 * @see org.eclipse.egit.ui.internal.CompareUtils#canDirectlyOpenInCompare(IFile)
+	 * @param mergeContext
+	 *            a resource mapping context.
 	 * @param file
 	 *            the file to test.
 	 * @return true if the file to test is EMFCompare compliant, false otherwise.
@@ -275,6 +282,7 @@
 	 *            the id for which we want the tree iterator.
 	 * @return the tree iterator of the id located in the repository.
 	 * @throws IOException
+	 *             e
 	 */
 	protected AbstractTreeIterator getTreeIterator(Repository repository, ObjectId id) throws IOException {
 		final CanonicalTreeParser p = new CanonicalTreeParser();
@@ -291,6 +299,8 @@
 	 * Simulate a comparison between the two given references and returns back the subscriber that can provide
 	 * all computed synchronization information.
 	 * 
+	 * @param repository
+	 *            the current repository.
 	 * @param sourceRef
 	 *            Source reference (i.e. "left" side of the comparison).
 	 * @param targetRef
@@ -298,6 +308,8 @@
 	 * @param comparedFile
 	 *            The file we are comparing (that would be the file right-clicked into the workspace).
 	 * @return The created subscriber.
+	 * @throws IOException
+	 *             e
 	 */
 	protected RemoteResourceMappingContext createSubscriberForComparison(Repository repository,
 			ObjectId sourceRef, ObjectId targetRef, IFile comparedFile) throws IOException {
@@ -313,6 +325,8 @@
 	 * This will query all model providers for those that are enabled on the given file and list all mappings
 	 * available for that file.
 	 * 
+	 * @param mergeContext
+	 *            a resource mapping context.
 	 * @param file
 	 *            The file for which we need the associated resource mappings.
 	 * @return All mappings available for that file.
@@ -356,8 +370,13 @@
 	}
 
 	/**
+	 * Validate that the perform operation has been successfully executed for the given
+	 * {@link SetupTaskPerformer}.
+	 * 
 	 * @param performerStartup
+	 *            the given {@link SetupTaskPerformer}.
 	 * @throws Die
+	 *             e
 	 */
 	private void validatePerform(SetupTaskPerformer performerStartup) throws Die {
 		if (!performerStartup.hasSuccessfullyPerformed()) {
@@ -375,7 +394,10 @@
 	}
 
 	/**
-	 * @throws CoreException
+	 * Clean the workspace.
+	 * 
+	 * @throws Die
+	 *             e
 	 */
 	private void cleanWorkspace() throws Die {
 		final IWorkspace workspace = org.eclipse.core.resources.ResourcesPlugin.getWorkspace();
@@ -386,7 +408,6 @@
 					for (IProject project : root.getProjects()) {
 						project.delete(false, true, monitor);
 					}
-
 					for (File file : root.getLocation().toFile().listFiles()) {
 						if (file.isDirectory()) {
 							// Hack waiting for a response on
@@ -461,6 +482,7 @@
 	 * </p>
 	 * 
 	 * @throws InterruptedException
+	 *             e
 	 */
 	private void waitEgitJobs() throws InterruptedException {
 		IJobManager jobMan = Job.getJobManager();
diff --git a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/app/LogicalDiffApplication.java b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/app/LogicalDiffApplication.java
index 56cb1e5..199aed7 100644
--- a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/app/LogicalDiffApplication.java
+++ b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/app/LogicalDiffApplication.java
@@ -160,14 +160,14 @@
 
 							ByteArrayOutputStream baos = new ByteArrayOutputStream();
 							resource.save(baos, null);
-							System.out.println(baos.toString("UTF-8"));//$NON-NLS-1$
+							System.out.println(baos.toString("UTF-8")); //$NON-NLS-1$
 						}
 					}
 				}
 			}
 		} catch (Exception e) {
 			System.err.println(e.getMessage());
-			e.printStackTrace();
+			progressPageLog.log(e);
 		}
 
 		return Returns.COMPLETE.code();
diff --git a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/args/CmdLineParserRepositoryBuilder.java b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/args/CmdLineParserRepositoryBuilder.java
index 7222b76..da0c00c 100644
--- a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/args/CmdLineParserRepositoryBuilder.java
+++ b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/args/CmdLineParserRepositoryBuilder.java
@@ -18,7 +18,6 @@
 import java.io.File;
 import java.io.IOException;
 
-import org.eclipse.egit.core.RepositoryCache;
 import org.eclipse.emf.compare.git.pgm.internal.exception.Die;
 import org.eclipse.emf.compare.git.pgm.internal.exception.Die.DeathType;
 import org.eclipse.emf.compare.git.pgm.internal.exception.Die.DiesOn;
@@ -33,7 +32,7 @@
  * 
  * @author <a href="mailto:arthur.daussy@obeo.fr">Arthur Daussy</a>
  */
-public class CmdLineParserRepositoryBuilder extends CmdLineParser {
+public final class CmdLineParserRepositoryBuilder extends CmdLineParser {
 
 	/**
 	 * Functional interface used to build a {@link Repository}.
@@ -42,52 +41,58 @@
 	 */
 	public interface RepoBuilder {
 
+		/**
+		 * Build the repository represented by the given directory.
+		 * 
+		 * @param gitDir
+		 *            the repository to build.
+		 * @return a {@link Repository}.
+		 * @throws Die
+		 *             e
+		 */
 		Repository buildRepository(String gitDir) throws Die;
 	}
 
 	/**
 	 * {@link Repository} builder that uses pure JGit code.
 	 */
-	private static RepoBuilder JGIT_REPO_BUILDER = new RepoBuilder() {
-
+	private static RepoBuilder jgitRepoBuilder = new RepoBuilder() {
 		/**
-		 * {@inheritDoc}
-		 * 
-		 * @see org.eclipse.emf.compare.git.pgm.internal.args.CmdLineParserRepositoryBuilder.RepoBuilder#buildRepository(java.lang.String)
+		 * {@inheritDoc}.
 		 */
 		public Repository buildRepository(String aGitdir) throws Die {
-			final File gitDir;
+			/** The current repository directory. */
+			final File myGitDir;
+			/** The current repository. */
+			final Repository myRepo;
 			if (aGitdir == null) {
-				gitDir = null;
+				myGitDir = null;
 			} else {
-				gitDir = new File(aGitdir);
+				myGitDir = new File(aGitdir);
 			}
-			RepositoryBuilder rb = new RepositoryBuilder().setGitDir(gitDir).readEnvironment().setMustExist(
-					true).findGitDir();
+			RepositoryBuilder rb = new RepositoryBuilder().setGitDir(myGitDir).readEnvironment()
+					.setMustExist(true).findGitDir();
 			if (rb.getGitDir() == null) {
 				throw new DiesOn(FATAL).displaying(CAN_T_FIND_GIT_REPOSITORY_MESSAGE).ready();
 			}
-			Repository repo;
 			try {
-				repo = rb.build();
+				myRepo = rb.build();
 			} catch (RepositoryNotFoundException e) {
 				throw new DiesOn(FATAL).displaying(CAN_T_FIND_GIT_REPOSITORY_MESSAGE).ready();
 			} catch (IOException e) {
 				throw new DiesOn(FATAL).duedTo(e).displaying("Cannot build the git repository").ready();
 			}
-			return repo;
+			return myRepo;
 		}
-
 	};
 
 	/**
 	 * {@link Repository} builder that uses pure EGit code.
 	 * <p>
-	 * This builder creates the repository and add it the {@link RepositoryCache} of EGit
+	 * This builder creates the repository and add it the RepositoryCache of EGit
 	 * </p>
 	 */
-	private static RepoBuilder EGIT_REPO_BUILDER = new RepoBuilder() {
-
+	private static RepoBuilder egitRepoBuilder = new RepoBuilder() {
 		/**
 		 * {@inheritDoc}
 		 * 
@@ -95,36 +100,34 @@
 		 */
 		public Repository buildRepository(String aGitdir) throws Die {
 			Preconditions.checkNotNull(aGitdir);
-			File gitDir = new File(aGitdir);
-			if (!gitDir.exists()) {
+			File myGitDir = new File(aGitdir);
+			if (!myGitDir.exists()) {
 				throw new DiesOn(DeathType.FATAL).displaying(
-						"Can not build git reposutory: " + aGitdir + "does not exist").ready();
+						"Can't build git repository: " + aGitdir + "does not exist").ready();
 			}
-
 			try {
-				Repository repository = org.eclipse.egit.core.Activator.getDefault().getRepositoryCache()
-						.lookupRepository(gitDir);
-				if (repository == null) {
-					throw new DiesOn(DeathType.FATAL).displaying("Can build repository " + aGitdir).ready();
+				Repository myRepo = org.eclipse.egit.core.Activator.getDefault().getRepositoryCache()
+						.lookupRepository(myGitDir);
+				if (myRepo == null) {
+					throw new DiesOn(DeathType.FATAL).displaying("Can't build repository " + aGitdir).ready();
 				}
-				return repository;
+				return myRepo;
 			} catch (IOException e1) {
-				throw new DiesOn(DeathType.FATAL).duedTo(e1).displaying("Can build repository " + aGitdir)
+				throw new DiesOn(DeathType.FATAL).duedTo(e1).displaying("Can't build repository " + aGitdir)
 						.ready();
 			}
 		}
-
 	};
 
 	/**
 	 * Git directory.
 	 */
-	private String gitDir = null;
+	private String gitDir;
 
 	/**
 	 * Git repository.
 	 */
-	private Repository repo = null;
+	private Repository repository;
 
 	/**
 	 * {@link Repository} builder.
@@ -132,16 +135,33 @@
 	private final RepoBuilder builder;
 
 	/**
+	 * Constructor.
+	 * <p>
+	 * The git repository will be buit during argument parsing
+	 * </p>
+	 * 
+	 * @param bean
+	 *            instance of a class annotated by Option and Argument.
+	 * @param builder
+	 *            the Repository builder.
+	 */
+	private CmdLineParserRepositoryBuilder(Object bean, RepoBuilder builder) {
+		super(bean);
+		this.builder = builder;
+	}
+
+	/**
 	 * Creates a new {@link CmdLineParser} that will build the {@link Repository} using pure JGit methods.
 	 * <p>
 	 * Using this method calling {@link #setGitDir(String)} is optional.
 	 * </p>
 	 * 
 	 * @param bean
-	 * @return
+	 *            instance of a class annotated by Option and Argument.
+	 * @return a new {@link CmdLineParser}.
 	 */
 	public static CmdLineParserRepositoryBuilder newJGitRepoBuilderCmdParser(Object bean) {
-		return new CmdLineParserRepositoryBuilder(bean, JGIT_REPO_BUILDER);
+		return new CmdLineParserRepositoryBuilder(bean, jgitRepoBuilder);
 	}
 
 	/**
@@ -153,23 +173,11 @@
 	 * </p>
 	 * 
 	 * @param bean
-	 * @return
+	 *            instance of a class annotated by Option and Argument.
+	 * @return a new {@link CmdLineParser}.
 	 */
 	public static CmdLineParserRepositoryBuilder newEGitRepoBuilderCmdParser(Object bean) {
-		return new CmdLineParserRepositoryBuilder(bean, EGIT_REPO_BUILDER);
-	}
-
-	/**
-	 * Constructor.
-	 * <p>
-	 * The git repository will be buit during argument parsing
-	 * </p>
-	 * 
-	 * @param bean
-	 */
-	private CmdLineParserRepositoryBuilder(Object bean, RepoBuilder builder) {
-		super(bean);
-		this.builder = builder;
+		return new CmdLineParserRepositoryBuilder(bean, egitRepoBuilder);
 	}
 
 	/**
@@ -178,14 +186,15 @@
 	 * The first time this method is called it may build the repository and so laucn a {@link Die} exception
 	 * <p>
 	 * 
-	 * @return
+	 * @return the git {@link Repository}.
 	 * @throws Die
+	 *             e
 	 */
 	public Repository getRepo() throws Die {
-		if (repo == null) {
-			repo = builder.buildRepository(gitDir);
+		if (repository == null) {
+			repository = builder.buildRepository(gitDir);
 		}
-		return repo;
+		return repository;
 	}
 
 	/**
@@ -196,11 +205,11 @@
 	 * </p>
 	 * 
 	 * @param gitDir
+	 *            the path to the git dir repository.
 	 */
 	public void setGitDir(String gitDir) {
 		// The gitDir argument should be provided before the repository is built
-		Preconditions.checkArgument(repo == null);
+		Preconditions.checkArgument(repository == null);
 		this.gitDir = gitDir;
 	}
-
 }
diff --git a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/args/GitDirHandler.java b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/args/GitDirHandler.java
index 9dd70e6..721ed87 100644
--- a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/args/GitDirHandler.java
+++ b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/args/GitDirHandler.java
@@ -16,7 +16,6 @@
 import org.kohsuke.args4j.CmdLineException;
 import org.kohsuke.args4j.CmdLineParser;
 import org.kohsuke.args4j.OptionDef;
-import org.kohsuke.args4j.spi.OptionHandler;
 import org.kohsuke.args4j.spi.Parameters;
 import org.kohsuke.args4j.spi.Setter;
 import org.kohsuke.args4j.spi.StringOptionHandler;
@@ -33,11 +32,11 @@
 	 * Constructor.
 	 * 
 	 * @param parser
-	 *            {@link OptionHandler#owner}
+	 *            {@link org.kohsuke.args4j.spi.OptionHandler#owner}
 	 * @param option
-	 *            {@link OptionHandler#option}
+	 *            {@link org.kohsuke.args4j.spi.OptionHandler#option}
 	 * @param setter
-	 *            {@link OptionHandler#setter}
+	 *            {@link org.kohsuke.args4j.spi.OptionHandler#setter}
 	 */
 	public GitDirHandler(CmdLineParser parser, OptionDef option, Setter<? super String> setter) {
 		super(parser, option, setter);
diff --git a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/AbstractLogicalCommand.java b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/AbstractLogicalCommand.java
index f5227dc..b43e0b1 100644
--- a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/AbstractLogicalCommand.java
+++ b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/AbstractLogicalCommand.java
@@ -88,12 +88,21 @@
 @SuppressWarnings("restriction")
 public abstract class AbstractLogicalCommand {
 
+	/** Oomph option. */
 	protected static final String PROP_SETUP_CONFIRM_SKIP = "oomph.setup.confirm.skip"; //$NON-NLS-1$
 
+	/** Oomph option. */
 	protected static final String PROP_SETUP_OFFLINE_STARTUP = "oomph.setup.offline.startup"; //$NON-NLS-1$
 
+	/** Oomph option. */
 	protected static final String PROP_SETUP_MIRRORS_STARTUP = "oomph.setup.mirrors.startup"; //$NON-NLS-1$
 
+	/** VM Args option. */
+	protected static final String VMARGS_OPTION = "-D"; //$NON-NLS-1$
+
+	/** Eclipse string. */
+	private static final String ECLIPSE = "eclipse"; //$NON-NLS-1$
+
 	/**
 	 * Holds true if a user has set the help option to true.
 	 */
@@ -183,6 +192,7 @@
 	 * @throws Die
 	 *             exception on error.
 	 * @throws IOException
+	 *             e
 	 */
 	public void build(Collection<String> args, URI environmentSetupURI) throws Die, IOException {
 
@@ -258,7 +268,9 @@
 	 * Runs the command.
 	 * 
 	 * @return Return code.
-	 * @throws Exception
+	 * @throws Die
+	 *             e
+	 * @throws IOException
 	 *             exception on error.
 	 */
 	protected abstract Integer internalRun() throws Die, IOException;
@@ -275,7 +287,7 @@
 	/**
 	 * Gets the SetupTaskPerformer.
 	 * 
-	 * @return
+	 * @return the SetupTaskPerformer.
 	 */
 	protected SetupTaskPerformer getPerformer() {
 		return performer;
@@ -284,12 +296,13 @@
 	/**
 	 * Parses the arguments related to this command. It also in charge of building the git repository.
 	 * <p>
-	 * Since the --git-dir option can be passed throught the command line, the parser is also in charge of
+	 * Since the --git-dir option can be passed through the command line, the parser is also in charge of
 	 * building the repository
 	 * </p>
 	 * 
 	 * @param args
 	 *            arguments.
+	 * @return the Repository.
 	 * @throws Die
 	 *             if the program exits prematurely.
 	 */
@@ -377,10 +390,13 @@
 	 * 
 	 * @param userSetupFilePath
 	 *            the path of the user setup model.
+	 * @param environmentSetupURI
+	 *            URI of the setup file that contains the environment used to execute the logical commands.
 	 * @return a SetupTaskPerformer.
 	 * @throws Die
+	 *             e
 	 * @throws IOException
-	 * @throws Exception
+	 *             e
 	 */
 	private SetupTaskPerformer createSetupTaskPerformer(String userSetupFilePath, URI environmentSetupURI)
 			throws IOException, Die {
@@ -480,15 +496,15 @@
 			if (file.exists()) {
 				String[] eclipseFolder = file.list(new FilenameFilter() {
 					public boolean accept(File dir, String name) {
-						return "eclipse".equals(name); //$NON-NLS-1$
+						return ECLIPSE.equals(name);
 					}
 				});
 				if (eclipseFolder.length == 1) {
-					File eclipse = new File(installationPath + SEP + "eclipse"); //$NON-NLS-1$
+					File eclipse = new File(installationPath + SEP + ECLIPSE);
 					if (eclipse.exists()) {
 						String[] eclipseExe = eclipse.list(new FilenameFilter() {
 							public boolean accept(File dir, String name) {
-								return "eclipse".equals(name) || "eclipse.exe".equals(name); //$NON-NLS-1$ //$NON-NLS-2$
+								return ECLIPSE.equals(name) || "eclipse.exe".equals(name); //$NON-NLS-1$ 
 							}
 						});
 						if (eclipseExe.length == 1) {
@@ -509,7 +525,9 @@
 	 * @param index
 	 *            the root object of the environment model.
 	 * @throws IOException
+	 *             e
 	 * @throws Die
+	 *             e
 	 */
 	private void handleWorkspace(Project project, Index index) throws IOException, Die {
 		final String workspaceLocation;
@@ -537,7 +555,9 @@
 	 * @param index
 	 *            the root object of the environment model.
 	 * @throws IOException
+	 *             e
 	 * @throws Die
+	 *             e
 	 */
 	private void handleInstallation(Project project, Index index) throws IOException, Die {
 		final String installationLocation;
@@ -560,7 +580,7 @@
 	/**
 	 * Returns true if the given Project contains a variable task with a non null workspace location.
 	 * 
-	 * @param index
+	 * @param project
 	 *            the given Project.
 	 * @return true if the given Project contains a variable task with a non null workspace location, false
 	 *         otherwise.
@@ -631,10 +651,10 @@
 	}
 
 	/**
-	 * Search an installation task in the given Index. If found, return his location attribute value.
+	 * Search an installation task in the given Project. If found, return his location attribute value.
 	 * 
-	 * @param index
-	 *            the given Index.
+	 * @param project
+	 *            the given Project.
 	 * @return the location attribute value of the installation task if found, null otherwise.
 	 */
 	private String getInstallationPath(Project project) {
@@ -658,7 +678,9 @@
 	 *            the given Project.
 	 * @return the location of the workspace.
 	 * @throws IOException
+	 *             e
 	 * @throws Die
+	 *             e
 	 */
 	private String genWorkspacePath(Project project) throws IOException, Die {
 		String id = generateIDForSetup(project.eResource().getURI().toFileString());
@@ -674,7 +696,9 @@
 	 *            the given Project.
 	 * @return the location of the workspace.
 	 * @throws IOException
+	 *             e
 	 * @throws Die
+	 *             e
 	 */
 	private String genInstallationPath(Project project) throws IOException, Die {
 		String id = generateIDForSetup(project.eResource().getURI().toFileString());
@@ -685,6 +709,8 @@
 	/**
 	 * Creates a temporary directory in the system temp directory.
 	 * 
+	 * @param name
+	 *            the name of the temp directory to create.
 	 * @return the new created directory.
 	 */
 	private static File createOrGetTempDir(String name) {
@@ -711,6 +737,7 @@
 	 *            the absolute path of the given file.
 	 * @return a unique ID for the a given file.
 	 * @throws IOException
+	 *             e
 	 * @throws Die
 	 *             On any other program error.
 	 */
@@ -718,7 +745,7 @@
 		File f = new File(setupFilePath);
 		MessageDigest digest;
 		try {
-			digest = MessageDigest.getInstance("SHA-1");
+			digest = MessageDigest.getInstance("SHA-1"); //$NON-NLS-1$
 		} catch (NoSuchAlgorithmException e) {
 			throw new DiesOn(DeathType.ERROR).duedTo(e).ready();
 		}
@@ -752,16 +779,27 @@
 	}
 
 	/**
+	 * Stream goobler.
+	 * 
 	 * @author <a href="mailto:axel.richard@obeo.fr">Axel Richard</a>
 	 */
 	class StreamGobbler implements Runnable {
+		/** The stream. */
 		private InputStream is;
 
-		// reads everything from is until empty.
+		/**
+		 * Reads everything from is until empty.
+		 * 
+		 * @param is
+		 *            the stream to read.
+		 */
 		StreamGobbler(InputStream is) {
 			this.is = is;
 		}
 
+		/**
+		 * {@inheritDoc}.
+		 */
 		public void run() {
 			try {
 				InputStreamReader isr = new InputStreamReader(is);
diff --git a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/LogicalDiffCommand.java b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/LogicalDiffCommand.java
index 7ae979e..2c1c332 100644
--- a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/LogicalDiffCommand.java
+++ b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/LogicalDiffCommand.java
@@ -145,9 +145,9 @@
 		}
 
 		command.add("-vmargs"); //$NON-NLS-1$
-		command.add("-D" + PROP_SETUP_CONFIRM_SKIP + "=true"); //$NON-NLS-1$ //$NON-NLS-2$
-		command.add("-D" + PROP_SETUP_OFFLINE_STARTUP + "=" + false); //$NON-NLS-1$ //$NON-NLS-2$
-		command.add("-D" + PROP_SETUP_MIRRORS_STARTUP + "=" + true); //$NON-NLS-1$ //$NON-NLS-2$
+		command.add(VMARGS_OPTION + PROP_SETUP_CONFIRM_SKIP + "=true"); //$NON-NLS-1$ 
+		command.add(VMARGS_OPTION + PROP_SETUP_OFFLINE_STARTUP + "=" + false); //$NON-NLS-1$ 
+		command.add(VMARGS_OPTION + PROP_SETUP_MIRRORS_STARTUP + "=" + true); //$NON-NLS-1$ 
 		//command.add("-Xdebug"); //$NON-NLS-1$
 		//command.add("-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8123"); //$NON-NLS-1$
 
diff --git a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/LogicalMergeCommand.java b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/LogicalMergeCommand.java
index da31393..aafcf26 100644
--- a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/LogicalMergeCommand.java
+++ b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/LogicalMergeCommand.java
@@ -69,6 +69,9 @@
 	@Option(name = "-m", metaVar = "message", required = false, usage = "Set the commit message to be used for the merge commit (in case one is created).")
 	private String message;
 
+	/**
+	 * Option debug.
+	 */
 	@Option(name = "--debug", usage = "Launched the provisonned eclipse in debug mode.", aliases = {"-d" })
 	private boolean debug;
 
@@ -82,13 +85,13 @@
 		// Checks we are not already in a conflict state
 		// Checks that the repository is in conflict state
 		if (getRepository().getRepositoryState() == RepositoryState.MERGING) {
-			StringBuilder message = new StringBuilder(
+			StringBuilder msg = new StringBuilder(
 					"error: 'merge' is not possible because you have unmerged files.").append(EOL);
-			message.append("hint: Use the logicalmergetool command to fix them up un the work tree").append(
+			msg.append("hint: Use the logicalmergetool command to fix them up un the work tree").append(
 					EOL);
-			message.append("hint: and then use the 'git add/rm <file>' as").append(EOL);
-			message.append("hint: appropriate to mark resolution").append(EOL);
-			System.out.println(message);
+			msg.append("hint: and then use the 'git add/rm <file>' as").append(EOL);
+			msg.append("hint: appropriate to mark resolution").append(EOL);
+			System.out.println(msg);
 			throw new DiesOn(DeathType.FATAL).displaying("Exiting because of an unresolved conflict.")
 					.ready();
 		}
@@ -148,9 +151,9 @@
 		}
 
 		command.add("-vmargs"); //$NON-NLS-1$
-		command.add("-D" + PROP_SETUP_CONFIRM_SKIP + "=true"); //$NON-NLS-1$ //$NON-NLS-2$
-		command.add("-D" + PROP_SETUP_OFFLINE_STARTUP + "=" + false); //$NON-NLS-1$ //$NON-NLS-2$
-		command.add("-D" + PROP_SETUP_MIRRORS_STARTUP + "=" + true); //$NON-NLS-1$ //$NON-NLS-2$
+		command.add(VMARGS_OPTION + PROP_SETUP_CONFIRM_SKIP + "=true"); //$NON-NLS-1$ 
+		command.add(VMARGS_OPTION + PROP_SETUP_OFFLINE_STARTUP + "=" + false); //$NON-NLS-1$ 
+		command.add(VMARGS_OPTION + PROP_SETUP_MIRRORS_STARTUP + "=" + true); //$NON-NLS-1$ 
 		if (debug) {
 			command.add("-Xdebug"); //$NON-NLS-1$
 			command.add("-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8123"); //$NON-NLS-1$
diff --git a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/LogicalMergeToolCommand.java b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/LogicalMergeToolCommand.java
index fdcb640..75ef996 100644
--- a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/LogicalMergeToolCommand.java
+++ b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/cmd/LogicalMergeToolCommand.java
@@ -89,9 +89,9 @@
 		}
 
 		command.add("-vmargs"); //$NON-NLS-1$
-		command.add("-D" + PROP_SETUP_CONFIRM_SKIP + "=true"); //$NON-NLS-1$ //$NON-NLS-2$
-		command.add("-D" + PROP_SETUP_OFFLINE_STARTUP + "=" + false); //$NON-NLS-1$ //$NON-NLS-2$
-		command.add("-D" + PROP_SETUP_MIRRORS_STARTUP + "=" + true); //$NON-NLS-1$ //$NON-NLS-2$
+		command.add(VMARGS_OPTION + PROP_SETUP_CONFIRM_SKIP + "=true"); //$NON-NLS-1$ 
+		command.add(VMARGS_OPTION + PROP_SETUP_OFFLINE_STARTUP + "=" + false); //$NON-NLS-1$ 
+		command.add(VMARGS_OPTION + PROP_SETUP_MIRRORS_STARTUP + "=" + true); //$NON-NLS-1$ 
 
 		ProcessBuilder builder = new ProcessBuilder(command);
 		Process process;
diff --git a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/util/EMFCompareGitPGMUtil.java b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/util/EMFCompareGitPGMUtil.java
index 8bdac9b..ae25783 100644
--- a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/util/EMFCompareGitPGMUtil.java
+++ b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/util/EMFCompareGitPGMUtil.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Obeo.
+ * 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
+ * 
+ * Contributors:
+ *     Obeo - initial API and implementation
+ *******************************************************************************/
 package org.eclipse.emf.compare.git.pgm.internal.util;
 
 import com.google.common.base.Strings;
@@ -11,7 +21,12 @@
 import org.eclipse.emf.compare.git.pgm.Returns;
 import org.eclipse.emf.compare.git.pgm.internal.exception.Die;
 
-public class EMFCompareGitPGMUtil {
+/**
+ * Utils methods.
+ * 
+ * @author <a href="mailto:axel.richard@obeo.fr">Axel Richard</a>
+ */
+public final class EMFCompareGitPGMUtil {
 
 	/**
 	 * File separator.
@@ -39,6 +54,12 @@
 	public static final String PARENT = ".."; //$NON-NLS-1$
 
 	/**
+	 * Internal constructor.
+	 */
+	private EMFCompareGitPGMUtil() {
+	}
+
+	/**
 	 * Displays the error message to the user and return matching {@link Returns}.
 	 * 
 	 * @param error
@@ -78,9 +99,8 @@
 	}
 
 	/**
-	 * Upstream, based on branch 'master' of git@github.com:adaussy/EMFCompareGitPGM.git Returns, from a
-	 * relative path, the corresponding file with an absolute path. This absolute path is computed against
-	 * 'user.dir' system property.
+	 * Returns, from a relative path, the corresponding file with an absolute path. This absolute path is
+	 * computed against 'user.dir' system property.
 	 * 
 	 * @param relativePath
 	 *            the relative path for which we want the corresponding file.
@@ -94,8 +114,11 @@
 	 * Returns, from a relative path, the corresponding file with an absolute path. This absolute path is
 	 * computed against the given base path.
 	 * 
+	 * @param basePath
+	 *            teh basePath to construct the full path.
 	 * @param relativePath
-	 *            the relative path for which we want the corresponding file.
+	 *            the relative path for which we want the corresponding file. the relative path for which we
+	 *            want the corresponding file.
 	 * @return the corresponding file with an absolute path.
 	 */
 	public static File toFileWithAbsolutePath(String basePath, String relativePath) {
@@ -113,7 +136,8 @@
 	 * Get a nice message from a IStatus.
 	 * 
 	 * @param status
-	 * @return
+	 *            the IStatus.
+	 * @return a nice message from a IStatus.
 	 */
 	public static String getStatusMessage(IStatus status) {
 		StringBuilder statusMessage = new StringBuilder(status.getMessage());
@@ -123,6 +147,16 @@
 		return statusMessage.toString();
 	}
 
+	/**
+	 * Append a new message to the status.
+	 * 
+	 * @param status
+	 *            the IStatus.
+	 * @param builder
+	 *            the message.
+	 * @param depth
+	 *            the depth of the new message.
+	 */
 	private static void appendChildrenStatus(IStatus status, StringBuilder builder, int depth) {
 		for (IStatus child : status.getChildren()) {
 			builder.append(Strings.repeat(" ", depth)).append(child.getMessage()).append(EOL); //$NON-NLS-1$
diff --git a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/util/FunctionCatalog.java b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/util/FunctionCatalog.java
index d855560..9e0e291 100644
--- a/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/util/FunctionCatalog.java
+++ b/plugins/org.eclipse.emf.compare.git.pgm/src/org/eclipse/emf/compare/git/pgm/internal/util/FunctionCatalog.java
@@ -22,11 +22,11 @@
  * 
  * @author <a href="mailto:arthur.daussy@obeo.fr">Arthur Daussy</a>
  */
-public class FunctionCatalog {
+public final class FunctionCatalog {
 
-	private FunctionCatalog() {
-	}
-
+	/**
+	 * Get the absolute path of a given File.
+	 */
 	public static final Function<File, String> FILE_TO_PATH = new Function<File, String>() {
 
 		public String apply(File input) {
@@ -34,16 +34,27 @@
 		}
 	};
 
+	/**
+	 * Get the File for a given IProject.
+	 */
 	public static final Function<IProject, File> IPROJECT_TO_FILE = new Function<IProject, File>() {
 		public File apply(IProject input) {
 			return new File(input.getLocation().toString());
 		}
 	};
 
+	/**
+	 * Get the File for a given SourceLocator.
+	 */
 	public static final Function<SourceLocator, File> SOURCELOCATOR_TO_FILE = new Function<SourceLocator, File>() {
 		public File apply(SourceLocator input) {
 			return new File(input.getRootFolder());
 		}
 	};
 
+	/**
+	 * Internal constructor.
+	 */
+	private FunctionCatalog() {
+	}
 }