Index: /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/NodesWithSameName.java
===================================================================
--- /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/NodesWithSameName.java	(revision 18121)
+++ /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/NodesWithSameName.java	(revision 18122)
@@ -6,4 +6,5 @@
 import java.util.List;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.ArrayList;
 
@@ -26,5 +27,5 @@
 
     @Override public void startTest(ProgressMonitor monitor) {
-    	super.startTest(monitor);
+        super.startTest(monitor);
         namesToNodes = new HashMap<String, List<Node>>();
     }
@@ -47,6 +48,15 @@
         for (List<Node> nodes : namesToNodes.values()) {
             if (nodes.size() > 1) {
-                errors.add(new TestError(this, Severity.OTHER,
-                    tr("Nodes with same name"), SAME_NAME, nodes));
+                // Report the same-name nodes, unless each has a unique ref=*.
+                HashSet<String> refs = new HashSet<String>();
+
+                for (Node n : nodes) {
+                    String ref = n.get("ref");
+                    if (ref == null || !refs.add(ref)) {
+                        errors.add(new TestError(this, Severity.OTHER,
+                            tr("Nodes with same name"), SAME_NAME, nodes));
+                        break;
+                    }
+                }
             }
         }
