Index: /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/SingleNodeSegment.java
===================================================================
--- /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/SingleNodeSegment.java	(revision 3440)
+++ /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/SingleNodeSegment.java	(revision 3441)
@@ -3,7 +3,15 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import org.openstreetmap.josm.command.Command;
-import org.openstreetmap.josm.command.DeleteCommand;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.command.*;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Segment;
+import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.data.osm.visitor.CollectBackReferencesVisitor;
+import org.openstreetmap.josm.data.osm.visitor.NameVisitor;
 import org.openstreetmap.josm.plugins.validator.Severity;
 import org.openstreetmap.josm.plugins.validator.Test;
@@ -19,4 +27,5 @@
 	/** Tags allowed in a segment */
 	public static String[] allowedTags = new String[] { "created_by" };
+	
 	/**
 	 * Constructor
@@ -40,5 +49,39 @@
 	public Command fixError(TestError testError)
 	{
-		return new DeleteCommand(testError.getPrimitives());
+		if( testError.getPrimitives().isEmpty() )
+			return null;
+		
+        Segment s = (Segment)testError.getPrimitives().get(0);
+        if( s.deleted )
+            return null;
+
+        List<Command> cmds = new ArrayList<Command>();
+        cmds.add(new DeleteCommand(testError.getPrimitives()));
+
+		CollectBackReferencesVisitor refV = new CollectBackReferencesVisitor(Main.ds);
+		s.visit(refV);
+
+		for(OsmPrimitive p : refV.data)
+        {
+            if( p.deleted )
+                continue;
+
+            Way newway = new Way((Way)p);
+            if( newway.segments.remove(s) ) // Made changes?
+            {
+                // If no segments left, delete the way
+                if( newway.segments.size() == 0 )
+                    cmds.add(new DeleteCommand(Arrays.asList(new OsmPrimitive[]{p})));
+                else
+                    cmds.add(new ChangeCommand(p, newway));
+            }
+        }
+		
+		if( cmds.size() == 1 ) // Segment wasn't in any way
+			return (Command)cmds.get(0);
+		
+		NameVisitor nameV = new NameVisitor();
+		s.visit(nameV);
+        return new SequenceCommand(tr("Delete")+" "+tr(nameV.className)+" "+nameV.name, cmds);
 	}
 	
@@ -47,4 +90,4 @@
 	{
 		return (testError.getTester() instanceof SingleNodeSegment);
-	}	
+	}
 }
