Index: /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java
===================================================================
--- /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java	(revision 12278)
+++ /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java	(revision 12279)
@@ -4,4 +4,5 @@
 
 import java.io.BufferedReader;
+import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileReader;
@@ -101,4 +102,5 @@
     public OSMValidatorPlugin() {
         plugin = this;
+        checkPluginDir();
         initializeGridDetail();
         initializeTests(getTests());
@@ -106,4 +108,17 @@
     }
 
+    /**
+     * Check if plugin directory exists (store ignored errors file)
+     */
+    private void checkPluginDir() {
+        try {
+        File pathDir = new File(Util.getPluginDir());
+        if (!pathDir.exists())
+            pathDir.mkdirs();
+        } catch (Exception e){
+            e.printStackTrace();
+        }
+    }
+    
     private void loadIgnoredErrors() {
         ignoredErrors.clear();
Index: /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateNode.java
===================================================================
--- /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateNode.java	(revision 12278)
+++ /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateNode.java	(revision 12279)
@@ -5,7 +5,5 @@
 import java.util.*;
 
-import javax.swing.JOptionPane;
-
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.MergeNodesAction;
 import org.openstreetmap.josm.command.*;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -72,73 +70,27 @@
 	{
 		Collection<? extends OsmPrimitive> sel = testError.getPrimitives();
-		Collection<OsmPrimitive> nodes = new ArrayList<OsmPrimitive>();
+		LinkedList<Node> nodes = new LinkedList<Node>();
 
-		Node target = null;
-		for (OsmPrimitive osm : sel)
-			nodes.add(osm);
+        for (OsmPrimitive osm : sel)
+            if (osm instanceof Node)
+                nodes.add((Node)osm);
 
-		if( nodes.size() < 2 )
-			return null;
+        if( nodes.size() < 2 )
+            return null;
 
-		for ( OsmPrimitive o : nodes )
-		{
-			Node n = (Node)o;
-			if( target == null || target.id == 0 )
-			{
-				target = n;
-				continue;
-			}
-			if( n.id == 0 )
-				continue;
-			if( n.id < target.id )
-				target = n;
-		}
-		if( target == null )
-			return null;
+        Node target = null;
+		// select the target node in the same way as in the core action MergeNodesAction, rev.1084
+        for (Node n: nodes) {
+            if (n.id > 0) {
+                target = n;
+                break;
+            }
+        }
+        if (target == null)
+            target = nodes.iterator().next();
 
-		// target is what we're merging into
-		// nodes is the list of nodes to be removed
-		nodes.remove(target);
+        MergeNodesAction.mergeNodes(nodes, target);
 
-		// Merge all properties
-		Node newtarget = new Node(target);
-		for (final OsmPrimitive o : nodes)
-		{
-			Node n = (Node)o;
-			for ( String key : n.keySet() )
-			{
-				if( newtarget.keySet().contains(key) && !newtarget.get(key).equals(n.get(key)) )
-				{
-					JOptionPane.showMessageDialog(Main.parent, tr("Nodes have conflicting key: {0} [{1}, {2}]",
-					key, newtarget.get(key), n.get(key)));
-					return null;
-				}
-				newtarget.put( key, n.get(key) );
-			}
-		}
-
-		Collection<Command> cmds = new LinkedList<Command>();
-
-		// Now search the ways for occurences of the nodes we are about to
-		// merge and replace them with the 'target' node
-		for (Way w : Main.ds.ways) {
-			if (w.deleted || w.incomplete) continue;
-			// FIXME: use some fancy method from java.util.Collections and
-			// List.replace
-			Way wnew = null;
-			int len = w.nodes.size();
-			for (int i = 0; i < len; i++) {
-				if (!nodes.contains(w.nodes.get(i))) continue;
-				if (wnew == null) wnew = new Way(w);
-				wnew.nodes.set(i, target);
-			}
-			if (wnew != null) {
-				cmds.add(new ChangeCommand(w, wnew));
-			}
-		}
-
-		cmds.add(DeleteCommand.delete(nodes));
-		cmds.add(new ChangeCommand(target, newtarget));
-		return new SequenceCommand(tr("Merge Nodes"), cmds);
+        return null; // undoRedo handling done in mergeNodes
 	}
 
