Index: trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java	(revision 3712)
+++ trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java	(revision 3713)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.actions;
 
+import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
 import static org.openstreetmap.josm.tools.I18n.tr;
-import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
 
 import java.awt.event.ActionEvent;
@@ -12,5 +12,4 @@
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
@@ -43,5 +42,7 @@
 
         for (OsmPrimitive osm : sel) {
-            if (!(osm instanceof Node)) continue;
+            if (!(osm instanceof Node)) {
+                continue;
+            }
             Node node = (Node) osm;
 
@@ -66,6 +67,7 @@
             for (Map.Entry<Way, List<Integer>> insertPoint : insertPoints.entrySet()) {
                 List<Integer> is = insertPoint.getValue();
-                if (is.size() == 0)
+                if (is.size() == 0) {
                     continue;
+                }
 
                 Way w = insertPoint.getKey();
Index: trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 3712)
+++ trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 3713)
@@ -13,5 +13,4 @@
 import java.util.Collection;
 import java.util.HashSet;
-import java.util.LinkedHashSet;
 import java.util.LinkedList;
 import java.util.List;
@@ -62,13 +61,19 @@
             return;
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
-        LinkedHashSet<Node> selectedNodes = OsmPrimitive.getFilteredSet(selection, Node.class);
-        if (selectedNodes.size() < 2) {
-            JOptionPane.showMessageDialog(
-                    Main.parent,
-                    tr("Please select at least two nodes to merge."),
-                    tr("Warning"),
-                    JOptionPane.WARNING_MESSAGE
-            );
-            return;
+        List<Node> selectedNodes = OsmPrimitive.getFilteredList(selection, Node.class);
+
+        if (selectedNodes.size() == 1) {
+            List<Node> nearestNodes = Main.map.mapView.getNearestNodes(Main.map.mapView.getPoint(selectedNodes.get(0)), selectedNodes, OsmPrimitive.isUsablePredicate);
+            if (nearestNodes.isEmpty()) {
+                JOptionPane.showMessageDialog(
+                        Main.parent,
+                        tr("Please select at least two nodes to merge or node that is close to another node."),
+                        tr("Warning"),
+                        JOptionPane.WARNING_MESSAGE
+                );
+
+                return;
+            }
+            selectedNodes.addAll(nearestNodes);
         }
 
@@ -88,5 +93,5 @@
      * @return the coordinates of this node are later used for the target node
      */
-    public static Node selectTargetLocationNode(LinkedHashSet<Node> candidates) {
+    public static Node selectTargetLocationNode(List<Node> candidates) {
         if (! Main.pref.getBoolean("merge-nodes.average-location", false)) {
             Node targetNode = null;
@@ -112,5 +117,5 @@
      * @return the selected target node
      */
-    public static Node selectTargetNode(LinkedHashSet<Node> candidates) {
+    public static Node selectTargetNode(List<Node> candidates) {
         Node targetNode = null;
         Node lastNode = null;
@@ -298,8 +303,4 @@
         }
         boolean ok = true;
-        if (selection.size() < 2) {
-            setEnabled(false);
-            return;
-        }
         for (OsmPrimitive osm : selection) {
             if (!(osm instanceof Node)) {
