Index: trunk/src/org/openstreetmap/josm/actions/relation/DuplicateRelationAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/DuplicateRelationAction.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/actions/relation/DuplicateRelationAction.java	(revision 6881)
@@ -11,5 +11,4 @@
 import org.openstreetmap.josm.tools.ImageProvider;
 
-
 /**
  * Creates a new relation with a copy of the current editor state
@@ -17,7 +16,7 @@
  */
 public class DuplicateRelationAction extends AbstractRelationAction {
-    
+
     /**
-     * Constructs a new {@code DuplicateRelationAction}. 
+     * Constructs a new {@code DuplicateRelationAction}.
      */
     public DuplicateRelationAction() {
@@ -27,4 +26,8 @@
     }
 
+    /**
+     * Duplicates the given relation and launches the relation editor for the created copy.
+     * @param original The relation to duplicate
+     */
     public static void duplicateRelationAndLaunchEditor(Relation original) {
         Relation copy = new Relation(original, true);
@@ -50,4 +53,4 @@
         // only one selected relation can be edited
         setEnabled( relations.size()==1 );
-    }        
+    }
 }
Index: trunk/src/org/openstreetmap/josm/command/AddCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/AddCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/AddCommand.java	(revision 6881)
@@ -17,6 +17,5 @@
 
 /**
- * A command that adds an osm primitive to a dataset. Keys cannot be added this
- * way.
+ * A command that adds an osm primitive to a dataset. Keys cannot be added this way.
  *
  * See {@link ChangeCommand} for comments on relation back references.
@@ -32,13 +31,15 @@
 
     /**
-     * Create the command and specify the element to add.
+     * Creates the command and specify the element to add in the context of the current edit layer, if any.
+     * @param osm The primitive to add
      */
     public AddCommand(OsmPrimitive osm) {
-        super();
         this.osm = osm;
     }
 
     /**
-     * Create the command and specify the element to add.
+     * Creates the command and specify the element to add in the context of the given data layer.
+     * @param layer The data layer. Must not be {@code null}
+     * @param osm The primitive to add
      */
     public AddCommand(OsmDataLayer layer, OsmPrimitive osm) {
@@ -47,5 +48,6 @@
     }
 
-    @Override public boolean executeCommand() {
+    @Override
+    public boolean executeCommand() {
         getLayer().data.addPrimitive(osm);
         osm.setModified(true);
@@ -53,9 +55,11 @@
     }
 
-    @Override public void undoCommand() {
+    @Override
+    public void undoCommand() {
         getLayer().data.removePrimitive(osm);
     }
 
-    @Override public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
+    @Override
+    public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
         added.add(osm);
     }
Index: trunk/src/org/openstreetmap/josm/command/ChangeCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/ChangeCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/ChangeCommand.java	(revision 6881)
@@ -27,6 +27,10 @@
     private final OsmPrimitive newOsm;
 
+    /**
+     * Constructs a new {@code ChangeCommand} in the context of the current edit layer, if any.
+     * @param osm The existing primitive to modify
+     * @param newOsm The new primitive
+     */
     public ChangeCommand(OsmPrimitive osm, OsmPrimitive newOsm) {
-        super();
         this.osm = osm;
         this.newOsm = newOsm;
@@ -34,4 +38,10 @@
     }
 
+    /**
+     * Constructs a new {@code ChangeCommand} in the context of a given data layer.
+     * @param layer The data layer
+     * @param osm The existing primitive to modify
+     * @param newOsm The new primitive
+     */
     public ChangeCommand(OsmDataLayer layer, OsmPrimitive osm, OsmPrimitive newOsm) {
         super(layer);
@@ -40,5 +50,5 @@
         sanityChecks();
     }
-    
+
     private void sanityChecks() {
         CheckParameterUtil.ensureParameterNotNull(osm, "osm");
Index: trunk/src/org/openstreetmap/josm/command/ChangeNodesCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/ChangeNodesCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/ChangeNodesCommand.java	(revision 6881)
@@ -6,10 +6,11 @@
 import java.util.Collection;
 import java.util.List;
+
 import javax.swing.Icon;
 
 import org.openstreetmap.josm.data.osm.Node;
-import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
+import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.gui.DefaultNameFormatter;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -28,11 +29,16 @@
     private final List<Node> newNodes;
 
+    /**
+     * Constructs a new {@code ChangeNodesCommand}.
+     * @param way The way to modify
+     * @param newNodes The new list of nodes for the given way
+     */
     public ChangeNodesCommand(Way way, List<Node> newNodes) {
-        super();
         this.way = way;
         this.newNodes = newNodes;
     }
 
-    @Override public boolean executeCommand() {
+    @Override
+    public boolean executeCommand() {
         super.executeCommand();
         way.setNodes(newNodes);
@@ -41,5 +47,6 @@
     }
 
-    @Override public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
+    @Override
+    public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
         modified.add(way);
     }
Index: trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java	(revision 6881)
@@ -49,5 +49,4 @@
      */
     public ChangePropertyCommand(Collection<? extends OsmPrimitive> objects, AbstractMap<String, String> tags) {
-        super();
         this.objects = new LinkedList<OsmPrimitive>();
         this.tags = tags;
@@ -184,5 +183,5 @@
 
             if (allnull) {
-                /* I18n: plural form detected for objects only (but value < 2 not possible!), try to do your best for tags */ 
+                /* I18n: plural form detected for objects only (but value < 2 not possible!), try to do your best for tags */
                 text = trn("Deleted {0} tags for {1} object", "Deleted {0} tags for {1} objects", objects.size(), tags.size(), objects.size());
             } else {
@@ -222,4 +221,8 @@
     }
 
+    /**
+     * Returns the tags to set (key/value pairs).
+     * @return the tags to set (key/value pairs)
+     */
     public Map<String, String> getTags() {
         return Collections.unmodifiableMap(tags);
Index: trunk/src/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/ChangeRelationMemberRoleCommand.java	(revision 6881)
@@ -33,6 +33,11 @@
     private Boolean oldModified;
 
+    /**
+     * Constructs a new {@code ChangeRelationMemberRoleCommand}.
+     * @param relation The relation to be changed
+     * @param position Member position
+     * @param newRole New role
+     */
     public ChangeRelationMemberRoleCommand(Relation relation, int position, String newRole) {
-        super();
         this.relation = relation;
         this.position = position;
@@ -40,5 +45,6 @@
     }
 
-    @Override public boolean executeCommand() {
+    @Override
+    public boolean executeCommand() {
         if (position < 0 || position >= relation.getMembersCount())
             return false;
@@ -53,10 +59,12 @@
     }
 
-    @Override public void undoCommand() {
+    @Override
+    public void undoCommand() {
         relation.setMember(position, new RelationMember(oldRole, relation.getMember(position).getMember()));
         relation.setModified(oldModified);
     }
 
-    @Override public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
+    @Override
+    public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
         modified.add(relation);
     }
Index: trunk/src/org/openstreetmap/josm/command/Command.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/Command.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/Command.java	(revision 6881)
@@ -3,5 +3,4 @@
 
 import java.awt.GridBagLayout;
-import java.awt.geom.Area;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -160,5 +159,5 @@
      *
      */
-    protected  OsmDataLayer getLayer() {
+    protected OsmDataLayer getLayer() {
         return layer;
     }
Index: trunk/src/org/openstreetmap/josm/command/ConflictResolveCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/ConflictResolveCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/ConflictResolveCommand.java	(revision 6881)
@@ -21,4 +21,7 @@
     private ConflictCollection resolvedConflicts;
 
+    /**
+     * Constructs a new {@code ConflictResolveCommand} in the context of the current edit layer, if any.
+     */
     public ConflictResolveCommand() {
         super();
@@ -26,4 +29,8 @@
     }
 
+    /**
+     * Constructs a new {@code ConflictResolveCommand} in the context of a given data layer.
+     * @param layer the data layer. Must not be null.
+     */
     public ConflictResolveCommand(OsmDataLayer layer) {
         super(layer);
Index: trunk/src/org/openstreetmap/josm/command/CoordinateConflictResolveCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/CoordinateConflictResolveCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/CoordinateConflictResolveCommand.java	(revision 6881)
@@ -5,4 +5,5 @@
 
 import java.util.Collection;
+
 import javax.swing.Icon;
 
@@ -14,5 +15,5 @@
 
 /**
- * Represents a the resolution of a conflict between the coordinates of two {@link Node}s
+ * Represents the resolution of a conflict between the coordinates of two {@link Node}s.
  *
  */
Index: trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 6881)
@@ -348,6 +348,5 @@
 
         if (alsoDeleteNodesInWay) {
-            // delete untagged nodes only referenced by primitives in primitivesToDelete,
-            // too
+            // delete untagged nodes only referenced by primitives in primitivesToDelete, too
             Collection<Node> nodesToDelete = computeNodesToDelete(layer, primitivesToDelete);
             primitivesToDelete.addAll(nodesToDelete);
@@ -371,6 +370,5 @@
         }
 
-        // get a confirmation that the objects to delete can be removed from their parent
-        // relations
+        // get a confirmation that the objects to delete can be removed from their parent relations
         //
         if (!silent) {
Index: trunk/src/org/openstreetmap/josm/command/DeletedStateConflictResolveCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/DeletedStateConflictResolveCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/DeletedStateConflictResolveCommand.java	(revision 6881)
@@ -9,5 +9,4 @@
 
 import org.openstreetmap.josm.data.conflict.Conflict;
-import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType;
@@ -16,5 +15,5 @@
 
 /**
- * Represents a the resolution of a conflict between the coordinates of two {@link Node}s
+ * Represents the resolution of a conflict between the deleted flag of two {@link OsmPrimitive}s.
  *
  */
Index: trunk/src/org/openstreetmap/josm/command/ModifiedConflictResolveCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/ModifiedConflictResolveCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/ModifiedConflictResolveCommand.java	(revision 6881)
@@ -15,5 +15,5 @@
 
 /**
- * Represents a command for to set the modified flag {@link OsmPrimitive}
+ * Represents the resolution of a conflict between the modified flag of two {@link OsmPrimitive}s.
  *
  *
Index: trunk/src/org/openstreetmap/josm/command/MoveCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/MoveCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/MoveCommand.java	(revision 6881)
@@ -53,12 +53,27 @@
     private List<OldNodeState> oldState = new LinkedList<OldNodeState>();
 
+    /**
+     * Constructs a new {@code MoveCommand} to move a primitive.
+     * @param osm The primitive to move
+     * @param x X difference movement. Coordinates are in northern/eastern
+     * @param y Y difference movement. Coordinates are in northern/eastern
+     */
     public MoveCommand(OsmPrimitive osm, double x, double y) {
         this(Collections.singleton(osm), x, y);
     }
 
+    /**
+     * Constructs a new {@code MoveCommand} to move a node.
+     * @param node The node to move
+     */
     public MoveCommand(Node node, LatLon position) {
         this(Collections.singleton((OsmPrimitive) node), node.getEastNorth().sub(Projections.project(position)));
     }
 
+    /**
+     * Constructs a new {@code MoveCommand} to move a collection of primitives.
+     * @param objects The primitives to move
+     * @param offset The movement vector
+     */
     public MoveCommand(Collection<OsmPrimitive> objects, EastNorth offset) {
         this(objects, offset.getX(), offset.getY());
@@ -66,8 +81,10 @@
 
     /**
-     * Create a MoveCommand and assign the initial object set and movement vector.
+     * Constructs a new {@code MoveCommand} and assign the initial object set and movement vector.
+     * @param objects The primitives to move
+     * @param x X difference movement. Coordinates are in northern/eastern
+     * @param y Y difference movement. Coordinates are in northern/eastern
      */
     public MoveCommand(Collection<OsmPrimitive> objects, double x, double y) {
-        super();
         startEN = null;
         saveCheckpoint(); // (0,0) displacement will be saved
@@ -97,4 +114,7 @@
      * The move is immediately executed and any undo will undo both vectors to
      * the original position the objects had before first moving.
+     *
+     * @param x X difference movement. Coordinates are in northern/eastern
+     * @param y Y difference movement. Coordinates are in northern/eastern
      */
     public void moveAgain(double x, double y) {
@@ -157,5 +177,6 @@
     }
 
-    @Override public boolean executeCommand() {
+    @Override
+    public boolean executeCommand() {
         for (Node n : nodes) {
             // in case #3892 happens again
@@ -171,5 +192,6 @@
     }
 
-    @Override public void undoCommand() {
+    @Override
+    public void undoCommand() {
         Iterator<OldNodeState> it = oldState.iterator();
         for (Node n : nodes) {
@@ -180,5 +202,6 @@
     }
 
-    @Override public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
+    @Override
+    public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
         for (OsmPrimitive osm : nodes) {
             modified.add(osm);
Index: trunk/src/org/openstreetmap/josm/command/RelationMemberConflictResolverCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/RelationMemberConflictResolverCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/RelationMemberConflictResolverCommand.java	(revision 6881)
@@ -17,9 +17,8 @@
 
 /**
- * Represent a command for resolving conflicts in the member lists of two
- * {@link Relation}s.
+ * Represents the resolution of conflicts in the member list of two {@link Relation}s.
  *
  */
-public class RelationMemberConflictResolverCommand extends Command {
+public class RelationMemberConflictResolverCommand extends ConflictResolveCommand {
     /** my relation */
     private final Relation my;
@@ -30,7 +29,4 @@
      */
     private final List<RelationMember> mergedMembers;
-
-    /** the layer this conflict is resolved in */
-    private OsmDataLayer layer;
 
     /**
@@ -62,11 +58,8 @@
         super.executeCommand();
 
-        // replace the list of members of 'my' relation by the list of merged
-        // members
+        // replace the list of members of 'my' relation by the list of merged members
         //
         my.setMembers(mergedMembers);
 
-        // remember the layer
-        layer = Main.main.getEditLayer();
         return true;
     }
@@ -80,4 +73,5 @@
     @Override
     public void undoCommand() {
+        OsmDataLayer layer = getLayer();
         if (! Main.map.mapView.hasLayer(layer)) {
             Main.warn(tr("Cannot undo command ''{0}'' because layer ''{1}'' is not present any more",
Index: trunk/src/org/openstreetmap/josm/command/RemoveNodesCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/RemoveNodesCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/RemoveNodesCommand.java	(revision 6881)
@@ -12,7 +12,7 @@
 
 import org.openstreetmap.josm.data.osm.Node;
-import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
+import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.gui.DefaultNameFormatter;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -30,11 +30,16 @@
     private final Set<Node> rmNodes;
 
+    /**
+     * Constructs a new {@code RemoveNodesCommand}.
+     * @param way The way to modify
+     * @param rmNodes The list of nodes to remove
+     */
     public RemoveNodesCommand(Way way, List<Node> rmNodes) {
-        super();
         this.way = way;
         this.rmNodes = new HashSet<Node>(rmNodes);
     }
 
-    @Override public boolean executeCommand() {
+    @Override
+    public boolean executeCommand() {
         super.executeCommand();
         way.removeNodes(rmNodes);
@@ -43,5 +48,6 @@
     }
 
-    @Override public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
+    @Override
+    public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
         modified.add(way);
     }
Index: trunk/src/org/openstreetmap/josm/command/TagConflictResolveCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/TagConflictResolveCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/TagConflictResolveCommand.java	(revision 6881)
@@ -2,12 +2,10 @@
 package org.openstreetmap.josm.command;
 
-import static org.openstreetmap.josm.tools.I18n.marktr;
-import static org.openstreetmap.josm.tools.I18n.tr;
 import static org.openstreetmap.josm.tools.I18n.trn;
 
 import java.util.Collection;
 import java.util.List;
+
 import javax.swing.Icon;
-
 
 import org.openstreetmap.josm.data.conflict.Conflict;
@@ -19,5 +17,5 @@
 
 /**
- * Represents a the resolution of a tag conflict in an {@link OsmPrimitive}
+ * Represents the resolution of a tag conflict in an {@link OsmPrimitive}.
  *
  */
Index: trunk/src/org/openstreetmap/josm/command/VersionConflictResolveCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/VersionConflictResolveCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/VersionConflictResolveCommand.java	(revision 6881)
@@ -6,4 +6,5 @@
 
 import java.util.Collection;
+
 import javax.swing.Icon;
 
@@ -14,5 +15,5 @@
 
 /**
- * Represents a command for resolving a version conflict between two {@link OsmPrimitive}
+ * Represents the resolution of a version conflict between two {@link OsmPrimitive}s.
  *
  *
Index: trunk/src/org/openstreetmap/josm/command/WayNodesConflictResolverCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/WayNodesConflictResolverCommand.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/command/WayNodesConflictResolverCommand.java	(revision 6881)
@@ -17,6 +17,5 @@
 
 /**
- * Represent a command for resolving conflicts in the node list of two
- * {@link Way}s.
+ * Represents the resolution of conflicts in the node list of two {@link Way}s.
  *
  */
@@ -39,4 +38,5 @@
         this.mergedNodeList = mergedNodeList;
     }
+
     @Override
     public String getDescriptionText() {
Index: trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 6881)
@@ -393,4 +393,5 @@
      *
      * See {@link #getConflicts()} for a map of conflicts after the merge operation.
+     * @param progressMonitor The progress monitor
      */
     public void merge(ProgressMonitor progressMonitor) {
Index: trunk/src/org/openstreetmap/josm/io/OsmChangeReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmChangeReader.java	(revision 6875)
+++ trunk/src/org/openstreetmap/josm/io/OsmChangeReader.java	(revision 6881)
@@ -14,8 +14,14 @@
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 
+/**
+ * Reader for <a href="http://wiki.openstreetmap.org/wiki/OsmChange">OsmChange</a> file format.
+ */
 public class OsmChangeReader extends OsmReader {
 
+    /**
+     * List of possible actions.
+     */
     public static final String[] ACTIONS = {"create", "modify", "delete"};
-    
+
     /**
      * constructor (for private and subclasses use only)
@@ -25,8 +31,5 @@
     protected OsmChangeReader() {
     }
-    
-    /* (non-Javadoc)
-     * @see org.openstreetmap.josm.io.OsmReader#parseRoot()
-     */
+
     @Override
     protected void parseRoot() throws XMLStreamException {
@@ -43,5 +46,5 @@
             throwException(tr("Missing mandatory attribute ''{0}''.", "version"));
         }
-        if (!v.equals("0.6")) {
+        if (!"0.6".equals(v)) {
             throwException(tr("Unsupported version: {0}", v));
         }
@@ -87,5 +90,5 @@
         }
     }
-    
+
     /**
      * Parse the given input source and return the dataset.
