Index: trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 7859)
@@ -34,11 +34,14 @@
 import org.openstreetmap.josm.tools.ImageProvider;
 
+/**
+ * Adjust the position of an imagery layer.
+ * @since 3715
+ */
 public class ImageryAdjustAction extends MapMode implements MouseListener, MouseMotionListener, AWTEventListener{
-    static ImageryOffsetDialog offsetDialog;
-    static Cursor cursor = ImageProvider.getCursor("normal", "move");
-
-    double oldDx, oldDy;
-    boolean mouseDown;
-    EastNorth prevEastNorth;
+    private static ImageryOffsetDialog offsetDialog;
+    private static Cursor cursor = ImageProvider.getCursor("normal", "move");
+
+    private double oldDx, oldDy;
+    private EastNorth prevEastNorth;
     private ImageryLayer layer;
     private MapMode oldMapMode;
@@ -108,10 +111,12 @@
     @Override
     public void eventDispatched(AWTEvent event) {
-        if (!(event instanceof KeyEvent)) return;
-        if (event.getID() != KeyEvent.KEY_PRESSED) return;
-        if (layer == null) return;
-        if (offsetDialog != null && offsetDialog.areFieldsInFocus()) return;
+        if (!(event instanceof KeyEvent)
+          || (event.getID() != KeyEvent.KEY_PRESSED)
+          || (layer == null)
+          || (offsetDialog != null && offsetDialog.areFieldsInFocus())) {
+            return;
+        }
         KeyEvent kev = (KeyEvent)event;
-        double dx = 0, dy = 0;
+        int dx = 0, dy = 0;
         switch (kev.getKeyCode()) {
         case KeyEvent.VK_UP : dy = +1; break;
@@ -173,8 +178,12 @@
     }
 
-    class ImageryOffsetDialog extends ExtendedDialog implements FocusListener {
-        public final JosmTextField tOffset = new JosmTextField();
-        JosmTextField tBookmarkName = new JosmTextField();
+    private class ImageryOffsetDialog extends ExtendedDialog implements FocusListener {
+        private final JosmTextField tOffset = new JosmTextField();
+        private final JosmTextField tBookmarkName = new JosmTextField();
         private boolean ignoreListener;
+
+        /**
+         * Constructs a new {@code ImageryOffsetDialog}.
+         */
         public ImageryOffsetDialog() {
             super(Main.parent,
@@ -187,5 +196,6 @@
             pnl.add(new JMultilineLabel(tr("Use arrow keys or drag the imagery layer with mouse to adjust the imagery offset.\n" +
                     "You can also enter east and north offset in the {0} coordinates.\n" +
-                    "If you want to save the offset as bookmark, enter the bookmark name below",Main.getProjection().toString())), GBC.eop());
+                    "If you want to save the offset as bookmark, enter the bookmark name below",
+                    Main.getProjection().toString())), GBC.eop());
             pnl.add(new JLabel(tr("Offset: ")),GBC.std());
             pnl.add(tOffset,GBC.eol().fill(GBC.HORIZONTAL).insets(0,0,0,5));
@@ -199,5 +209,5 @@
         }
 
-        public boolean areFieldsInFocus() {
+        private boolean areFieldsInFocus() {
             return tOffset.hasFocus();
         }
@@ -205,4 +215,5 @@
         @Override
         public void focusGained(FocusEvent e) {
+            // Do nothing
         }
 
@@ -230,5 +241,5 @@
         }
 
-        public final void updateOffset() {
+        private final void updateOffset() {
             ignoreListener = true;
             updateOffsetIntl();
@@ -236,5 +247,5 @@
         }
 
-        public final void updateOffsetIntl() {
+        private final void updateOffsetIntl() {
             // Support projections with very small numbers (e.g. 4326)
             int precision = Main.getProjection().getDefaultZoomInPPD() >= 1.0 ? 2 : 7;
@@ -265,6 +276,7 @@
         protected void buttonAction(int buttonIndex, ActionEvent evt) {
             if (buttonIndex == 0 && tBookmarkName.getText() != null && !tBookmarkName.getText().isEmpty() &&
-                    OffsetBookmark.getBookmarkByName(layer, tBookmarkName.getText()) != null) {
-                if (!confirmOverwriteBookmark()) return;
+                    OffsetBookmark.getBookmarkByName(layer, tBookmarkName.getText()) != null &&
+                    !confirmOverwriteBookmark()) {
+                return;
             }
             super.buttonAction(buttonIndex, evt);
Index: trunk/src/org/openstreetmap/josm/actions/InfoAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/InfoAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/InfoAction.java	(revision 7859)
@@ -2,11 +2,11 @@
 package org.openstreetmap.josm.actions;
 
+import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
+import static org.openstreetmap.josm.tools.I18n.tr;
+
 import java.awt.event.ActionEvent;
-import static org.openstreetmap.josm.tools.I18n.tr;
-import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
+import java.awt.event.KeyEvent;
+import java.util.Collection;
 
-import java.awt.event.KeyEvent;
-
-import java.util.Collection;
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -15,4 +15,8 @@
 import org.openstreetmap.josm.tools.Shortcut;
 
+/**
+ * Display advanced object information about OSM nodes, ways, or relations.
+ * @since 1697
+ */
 public class InfoAction extends JosmAction {
 
Index: trunk/src/org/openstreetmap/josm/actions/InfoWebAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/InfoWebAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/InfoWebAction.java	(revision 7859)
@@ -12,6 +12,13 @@
 import org.openstreetmap.josm.tools.Shortcut;
 
+/**
+ * Display object information about OSM nodes, ways, or relations in web browser.
+ * @since 4408
+ */
 public class InfoWebAction extends AbstractInfoAction {
 
+    /**
+     * Constructs a new {@code InfoWebAction}.
+     */
     public InfoWebAction() {
         super(tr("Advanced info (web)"), "info",
Index: trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java	(revision 7859)
@@ -38,4 +38,5 @@
  * <li><b>Move Node onto Way</b>: Move the node onto the nearest way segments and include it</li>
  * </ul>
+ * @since 466
  */
 public class JoinNodeWayAction extends JosmAction {
@@ -43,5 +44,6 @@
     protected final boolean joinWayToNode;
 
-    protected JoinNodeWayAction(boolean joinWayToNode, String name, String iconName, String tooltip, Shortcut shortcut, boolean registerInToolbar) {
+    protected JoinNodeWayAction(boolean joinWayToNode, String name, String iconName, String tooltip,
+            Shortcut shortcut, boolean registerInToolbar) {
         super(name, iconName, tooltip, shortcut, registerInToolbar);
         this.joinWayToNode = joinWayToNode;
@@ -54,6 +56,8 @@
     public static JoinNodeWayAction createJoinNodeToWayAction() {
         JoinNodeWayAction action = new JoinNodeWayAction(false,
-                tr("Join Node to Way"), /* ICON */ "joinnodeway", tr("Include a node into the nearest way segments"),
-                Shortcut.registerShortcut("tools:joinnodeway", tr("Tool: {0}", tr("Join Node to Way")), KeyEvent.VK_J, Shortcut.DIRECT), true);
+                tr("Join Node to Way"), /* ICON */ "joinnodeway",
+                tr("Include a node into the nearest way segments"),
+                Shortcut.registerShortcut("tools:joinnodeway", tr("Tool: {0}", tr("Join Node to Way")),
+                        KeyEvent.VK_J, Shortcut.DIRECT), true);
         action.putValue("help", ht("/Action/JoinNodeWay"));
         return action;
@@ -66,6 +70,9 @@
     public static JoinNodeWayAction createMoveNodeOntoWayAction() {
         JoinNodeWayAction action = new JoinNodeWayAction(true,
-                tr("Move Node onto Way"), /* ICON*/ "movenodeontoway", tr("Move the node onto the nearest way segments and include it"),
-                Shortcut.registerShortcut("tools:movenodeontoway", tr("Tool: {0}", tr("Move Node onto Way")), KeyEvent.VK_N, Shortcut.DIRECT), true);
+                tr("Move Node onto Way"), /* ICON*/ "movenodeontoway",
+                tr("Move the node onto the nearest way segments and include it"),
+                Shortcut.registerShortcut("tools:movenodeontoway", tr("Tool: {0}", tr("Move Node onto Way")),
+                        KeyEvent.VK_N, Shortcut.DIRECT), true);
+        action.putValue("help", ht("/Action/MoveNodeWay"));
         return action;
     }
@@ -95,5 +102,5 @@
                 }
 
-                if (ws.getFirstNode() != node && ws.getSecondNode() != node) {
+                if (!ws.getFirstNode().equals(node) && !ws.getSecondNode().equals(node)) {
                     insertPoints.put(ws.way, ws.lowerIndex);
                 }
@@ -137,5 +144,6 @@
                 List<Node> nodesToAdd = new LinkedList<>();
                 nodesToAdd.addAll(nodesInSegment);
-                Collections.sort(nodesToAdd, new NodeDistanceToRefNodeComparator(w.getNode(segmentIndex), w.getNode(segmentIndex+1), !joinWayToNode));
+                Collections.sort(nodesToAdd, new NodeDistanceToRefNodeComparator(
+                        w.getNode(segmentIndex), w.getNode(segmentIndex+1), !joinWayToNode));
                 wayNodes.addAll(segmentIndex + 1, nodesToAdd);
             }
Index: trunk/src/org/openstreetmap/josm/actions/JosmAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 7859)
@@ -335,5 +335,4 @@
     /**
      * Adapter for selection change events
-     *
      */
     private class SelectionChangeAdapter implements SelectionChangedListener {
Index: trunk/src/org/openstreetmap/josm/actions/LassoModeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/LassoModeAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/LassoModeAction.java	(revision 7859)
@@ -9,6 +9,13 @@
 import org.openstreetmap.josm.tools.ImageProvider;
 
+/**
+ * Lasso selection mode: select objects within a hand-drawn region.
+ * @since 5152
+ */
 public class LassoModeAction extends MapMode {
 
+    /**
+     * Constructs a new {@code LassoModeAction}.
+     */
     public LassoModeAction() {
         super(tr("Lasso Mode"),
Index: trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java	(revision 7859)
@@ -24,11 +24,16 @@
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.layer.WMSLayer;
+import org.openstreetmap.josm.gui.widgets.JosmTextField;
+import org.openstreetmap.josm.gui.widgets.UrlLabel;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.Shortcut;
 import org.openstreetmap.josm.tools.Utils;
-import org.openstreetmap.josm.gui.widgets.JosmTextField;
-import org.openstreetmap.josm.gui.widgets.UrlLabel;
-
+
+/**
+ * Download rectified images from various services.
+ * @since 3715
+ */
 public class MapRectifierWMSmenuAction extends JosmAction {
+
     /**
      * Class that bundles all required information of a rectifier service
@@ -40,5 +45,5 @@
         private final Pattern urlRegEx;
         private final Pattern idValidator;
-        public JRadioButton btn;
+        private JRadioButton btn;
 
         /**
@@ -57,5 +62,5 @@
         }
 
-        public boolean isSelected() {
+        private boolean isSelected() {
             return btn.isSelected();
         }
@@ -63,8 +68,11 @@
 
     /**
-     * List of available rectifier services. May be extended from the outside
-     */
-    public List<RectifierService> services = new ArrayList<>();
-
+     * List of available rectifier services.
+     */
+    private final List<RectifierService> services = new ArrayList<>();
+
+    /**
+     * Constructs a new {@code MapRectifierWMSmenuAction}.
+     */
     public MapRectifierWMSmenuAction() {
         super(tr("Rectified Image..."),
Index: trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java	(revision 7859)
@@ -46,5 +46,5 @@
                 boolean layerMerged = false;
                 for (final Layer sourceLayer: sourceLayers) {
-                    if (sourceLayer != null && sourceLayer != targetLayer) {
+                    if (sourceLayer != null && !sourceLayer.equals(targetLayer)) {
                         if (sourceLayer instanceof OsmDataLayer && targetLayer instanceof OsmDataLayer
                                 && ((OsmDataLayer)sourceLayer).isUploadDiscouraged() != ((OsmDataLayer)targetLayer).isUploadDiscouraged()) {
Index: trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 7859)
@@ -72,5 +72,6 @@
 
         if (selectedNodes.size() == 1) {
-            List<Node> nearestNodes = Main.map.mapView.getNearestNodes(Main.map.mapView.getPoint(selectedNodes.get(0)), selectedNodes, OsmPrimitive.isUsablePredicate);
+            List<Node> nearestNodes = Main.map.mapView.getNearestNodes(
+                    Main.map.mapView.getPoint(selectedNodes.get(0)), selectedNodes, OsmPrimitive.isUsablePredicate);
             if (nearestNodes.isEmpty()) {
                 new Notification(
@@ -142,7 +143,6 @@
             return new Node(new EastNorth(east2 / weight, north2 / weight));
         default:
-            throw new RuntimeException("unacceptable merge-nodes.mode");
-        }
-
+            throw new IllegalStateException("unacceptable merge-nodes.mode");
+        }
     }
 
@@ -198,12 +198,11 @@
             List<Node> newNodes = new ArrayList<>(w.getNodesCount());
             for (Node n: w.getNodes()) {
-                if (! nodesToDelete.contains(n) && n != targetNode) {
+                if (! nodesToDelete.contains(n) && !n.equals(targetNode)) {
                     newNodes.add(n);
                 } else if (newNodes.isEmpty()) {
                     newNodes.add(targetNode);
-                } else if (newNodes.get(newNodes.size()-1) != targetNode) {
+                } else if (!newNodes.get(newNodes.size()-1).equals(targetNode)) {
                     // make sure we collapse a sequence of deleted nodes
                     // to exactly one occurrence of the merged target node
-                    //
                     newNodes.add(targetNode);
                 } else {
@@ -317,5 +316,5 @@
             TagCollection nodeTags = TagCollection.unionOfAllPrimitives(nodes);
             List<Command> resultion = CombinePrimitiveResolverDialog.launchIfNecessary(nodeTags, nodes, Collections.singleton(targetNode));
-            LinkedList<Command> cmds = new LinkedList<>();
+            List<Command> cmds = new LinkedList<>();
 
             // the nodes we will have to delete
@@ -337,5 +336,5 @@
             // build the commands
             //
-            if (targetNode != targetLocationNode) {
+            if (!targetNode.equals(targetLocationNode)) {
                 LatLon targetLocationCoor = targetLocationNode.getCoor();
                 if (!targetNode.getCoor().equals(targetLocationCoor)) {
Index: trunk/src/org/openstreetmap/josm/actions/MergeSelectionAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MergeSelectionAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/MergeSelectionAction.java	(revision 7859)
@@ -10,5 +10,4 @@
 import java.util.List;
 
-import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.visitor.MergeSourceBuildingVisitor;
@@ -20,5 +19,13 @@
 import org.openstreetmap.josm.tools.Shortcut;
 
+/**
+ * Merge the currently selected objects into another layer.
+ * @since 1890
+ */
 public class MergeSelectionAction extends AbstractMergeAction {
+
+    /**
+     * Constructs a new {@code MergeSelectionAction}.
+     */
     public MergeSelectionAction() {
         super(tr("Merge selection"), "dialogs/mergedown", tr("Merge the currently selected objects into another layer"),
@@ -30,5 +37,8 @@
     }
 
-    public void mergeSelected(DataSet source) {
+    /**
+     * Merge the currently selected objects into another layer.
+     */
+    public void mergeSelected() {
         List<Layer> targetLayers = LayerListDialog.getInstance().getModel().getPossibleMergeTargets(getEditLayer());
         if (targetLayers.isEmpty()) {
@@ -39,9 +49,9 @@
         if (targetLayer == null)
             return;
-        if (getEditLayer().isUploadDiscouraged() && targetLayer instanceof OsmDataLayer && !((OsmDataLayer)targetLayer).isUploadDiscouraged()
-                && getEditLayer().data.getAllSelected().size() > 1) {
-            if (warnMergingUploadDiscouragedObjects(targetLayer)) {
-                return;
-            }
+        if (getEditLayer().isUploadDiscouraged() && targetLayer instanceof OsmDataLayer
+                && !((OsmDataLayer)targetLayer).isUploadDiscouraged()
+                && getEditLayer().data.getAllSelected().size() > 1
+                && warnMergingUploadDiscouragedObjects(targetLayer)) {
+            return;
         }
         MergeSourceBuildingVisitor builder = new MergeSourceBuildingVisitor(getEditLayer().data);
@@ -53,5 +63,5 @@
         if (getEditLayer() == null || getEditLayer().data.getAllSelected().isEmpty())
             return;
-        mergeSelected(getEditLayer().data);
+        mergeSelected();
     }
 
@@ -71,5 +81,7 @@
 
     /**
-     * returns true if the user wants to cancel, false if they want to continue
+     * Warns the user about merging too many objects with different upload policies.
+     * @param targetLayer Target layer
+     * @return true if the user wants to cancel, false if they want to continue
      */
     public static final boolean warnMergingUploadDiscouragedObjects(Layer targetLayer) {
@@ -79,5 +91,6 @@
                         "<b>This is not the recommended way of merging such data</b>.<br />"+
                         "You should instead check and merge each object, <b>one by one</b>.<br /><br />"+
-                        "Are you sure you want to continue?", getEditLayer().getName(), targetLayer.getName(), targetLayer.getName())+
+                        "Are you sure you want to continue?",
+                        getEditLayer().getName(), targetLayer.getName(), targetLayer.getName())+
                 "</html>",
                 ImageProvider.get("dialogs", "mergedown"), tr("Ignore this hint and merge anyway"));
Index: trunk/src/org/openstreetmap/josm/actions/MirrorAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MirrorAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/MirrorAction.java	(revision 7859)
@@ -10,4 +10,5 @@
 import java.util.HashSet;
 import java.util.LinkedList;
+import java.util.Set;
 
 import javax.swing.JOptionPane;
@@ -45,5 +46,5 @@
     public void actionPerformed(ActionEvent e) {
         Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
-        HashSet<Node> nodes = new HashSet<>();
+        Set<Node> nodes = new HashSet<>();
 
         for (OsmPrimitive osm : sel) {
Index: trunk/src/org/openstreetmap/josm/actions/MoveAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MoveAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/MoveAction.java	(revision 7859)
@@ -32,5 +32,5 @@
 
     // any better idea?
-    private static String calltosupermustbefirststatementinconstructor_text(Direction dir) {
+    private static String calltosupermustbefirststatementinconstructortext(Direction dir) {
         String directiontext;
         if        (dir == Direction.UP)   {
@@ -61,7 +61,11 @@
     }
 
+    /**
+     * Constructs a new {@code MoveAction}.
+     * @param dir direction
+     */
     public MoveAction(Direction dir) {
-        super(tr("Move {0}", calltosupermustbefirststatementinconstructor_text(dir)), null,
-                tr("Moves Objects {0}", calltosupermustbefirststatementinconstructor_text(dir)),
+        super(tr("Move {0}", calltosupermustbefirststatementinconstructortext(dir)), null,
+                tr("Moves Objects {0}", calltosupermustbefirststatementinconstructortext(dir)),
                 calltosupermustbefirststatementinconstructor(dir), false);
         myDirection = dir;
@@ -120,6 +124,6 @@
             ((MoveCommand)c).moveAgain(distx, disty);
         } else {
-            Main.main.undoRedo.add(
-                    c = new MoveCommand(selection, distx, disty));
+            c = new MoveCommand(selection, distx, disty);
+            Main.main.undoRedo.add(c);
         }
         getCurrentDataSet().endUpdate();
Index: trunk/src/org/openstreetmap/josm/actions/MoveNodeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MoveNodeAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/MoveNodeAction.java	(revision 7859)
@@ -21,4 +21,7 @@
 public final class MoveNodeAction extends JosmAction {
 
+    /**
+     * Constructs a new {@code MoveNodeAction}.
+     */
     public MoveNodeAction() {
         super(tr("Move Node..."), "movenode", tr("Edit latitude and longitude of a node."),
Index: trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 7859)
@@ -52,5 +52,5 @@
      * The {@link ExtensionFileFilter} matching .url files
      */
-    public static final ExtensionFileFilter urlFileFilter = new ExtensionFileFilter("url", "url", tr("URL Files") + " (*.url)");
+    public static final ExtensionFileFilter URL_FILE_FILTER = new ExtensionFileFilter("url", "url", tr("URL Files") + " (*.url)");
 
     /**
@@ -200,5 +200,5 @@
             FileImporter chosenImporter = null;
             for (FileImporter importer : ExtensionFileFilter.importers) {
-                if (fileFilter == importer.filter) {
+                if (fileFilter.equals(importer.filter)) {
                     chosenImporter = importer;
                 }
@@ -258,5 +258,5 @@
                         }
                     }
-                    if (urlFileFilter.accept(f)) {
+                    if (URL_FILE_FILTER.accept(f)) {
                         urlFiles.add(f);
                     } else {
Index: trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java	(revision 7859)
@@ -55,5 +55,6 @@
         /* I18N: Command to download a specific location/URL */
         super(tr("Open Location..."), "openlocation", tr("Open an URL."),
-                Shortcut.registerShortcut("system:open_location", tr("File: {0}", tr("Open Location...")), KeyEvent.VK_L, Shortcut.CTRL), true);
+                Shortcut.registerShortcut("system:open_location", tr("File: {0}", tr("Open Location...")),
+                        KeyEvent.VK_L, Shortcut.CTRL), true);
         putValue("help", ht("/Action/OpenLocation"));
         this.downloadTasks = new ArrayList<>();
@@ -74,5 +75,6 @@
      */
     protected void restoreUploadAddressHistory(HistoryComboBox cbHistory) {
-        List<String> cmtHistory = new LinkedList<>(Main.pref.getCollection(getClass().getName() + ".uploadAddressHistory", new LinkedList<String>()));
+        List<String> cmtHistory = new LinkedList<>(Main.pref.getCollection(getClass().getName() + ".uploadAddressHistory",
+                new LinkedList<String>()));
         // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement()
         //
@@ -175,8 +177,8 @@
     /**
      * Open the given URL.
-     * @param new_layer true if the URL needs to be opened in a new layer, false otherwise
+     * @param newLayer true if the URL needs to be opened in a new layer, false otherwise
      * @param url The URL to open
      */
-    public void openUrl(boolean new_layer, final String url) {
+    public void openUrl(boolean newLayer, final String url) {
         PleaseWaitProgressMonitor monitor = new PleaseWaitProgressMonitor(tr("Download Data"));
         Collection<DownloadTask> tasks = findDownloadTasks(url, false);
@@ -187,5 +189,5 @@
             try {
                 task = tasks.iterator().next();
-                future = task.loadUrl(new_layer, url, monitor);
+                future = task.loadUrl(newLayer, url, monitor);
             } catch (IllegalArgumentException e) {
                 Main.error(e);
Index: trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 7856)
+++ trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 7859)
@@ -304,5 +304,5 @@
         // rotate
         for (Node n: allNodes) {
-            EastNorth tmp = EN.rotate_cc(pivot, n.getEastNorth(), - headingAll);
+            EastNorth tmp = EN.rotateCC(pivot, n.getEastNorth(), - headingAll);
             nX.put(n, tmp.east());
             nY.put(n, tmp.north());
@@ -384,5 +384,5 @@
         for (Node n: allNodes) {
             EastNorth tmp = new EastNorth(nX.get(n), nY.get(n));
-            tmp = EN.rotate_cc(pivot, tmp, headingAll);
+            tmp = EN.rotateCC(pivot, tmp, headingAll);
             final double dx = tmp.east()  - n.getEastNorth().east();
             final double dy = tmp.north() - n.getEastNorth().north();
@@ -418,4 +418,5 @@
             nSeg = nNode - 1;
         }
+
         /**
          * Estimate the direction of the segments, given the first segment points in the
@@ -423,4 +424,5 @@
          * Then sum up all horizontal / vertical segments to have a good guess for the
          * heading of the entire way.
+         * @param pInitialDirection initial direction
          * @throws InvalidUserInputException
          */
@@ -522,6 +524,8 @@
             // Hide implicit public constructor for utility class
         }
-        // rotate counter-clock-wise
-        public static EastNorth rotate_cc(EastNorth pivot, EastNorth en, double angle) {
+        /**
+         * Rotate counter-clock-wise.
+         */
+        public static EastNorth rotateCC(EastNorth pivot, EastNorth en, double angle) {
             double cosPhi = Math.cos(angle);
             double sinPhi = Math.sin(angle);
