Index: /applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/data/PTStop.java
===================================================================
--- /applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/data/PTStop.java	(revision 32714)
+++ /applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/data/PTStop.java	(revision 32715)
@@ -79,5 +79,6 @@
 		if (member.getMember().hasTag("highway", "bus_stop")
 				|| member.getMember().hasTag("public_transport", "platform")
-				|| member.getMember().hasTag("highway", "platform") || member.getMember().hasTag("railway", "platform")) {
+				|| member.getMember().hasTag("highway", "platform")
+				|| member.getMember().hasTag("railway", "platform")) {
 			if (platform == null) {
 				platform = member.getMember();
@@ -146,5 +147,6 @@
 		BBox platformBBox = new BBox(ax, ay, bx, by);
 
-//		Collection<Node> allNodes = Main.getLayerManager().getEditDataSet().getNodes();
+		// Collection<Node> allNodes =
+		// Main.getLayerManager().getEditDataSet().getNodes();
 		Collection<Node> allNodes = platform.getDataSet().getNodes();
 		for (Node currentNode : allNodes) {
@@ -157,3 +159,27 @@
 	}
 
+	/**
+	 * Checks if this stop equals to other by comparing if they have the same
+	 * stop_position or a platform
+	 * 
+	 * @param other PTStop to be compared
+	 * @return true if equal, false otherwise
+	 */
+	public boolean equalsStop(PTStop other) {
+
+		if (other == null) {
+			return false;
+		}
+
+		if (this.stopPosition != null && (this.stopPosition == other.getStopPosition() || this.stopPosition == other.getPlatform())) {
+			return true;
+		}
+		
+		if (this.platform != null && (this.platform == other.getPlatform() || this.platform == other.getStopPosition())) {
+			return true;
+		}
+
+		return false;
+	}
+	
 }
Index: /applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/PTAssistantValidatorTest.java
===================================================================
--- /applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/PTAssistantValidatorTest.java	(revision 32714)
+++ /applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/PTAssistantValidatorTest.java	(revision 32715)
@@ -348,4 +348,9 @@
 			return true;
 		}
+		
+		if (testError.getCode() == ERROR_CODE_STOP_BY_STOP && SegmentChecker.isFixable(testError)) {
+			return true;
+		}
+		
 		return false;
 	}
@@ -372,4 +377,8 @@
 				|| testError.getCode() == ERROR_CODE_PLATFORM_PART_OF_HIGHWAY) {
 			commands.add(NodeChecker.fixError(testError));
+		}
+		
+		if (testError.getCode() == ERROR_CODE_STOP_BY_STOP) {
+			commands.add(SegmentChecker.fixError(testError));
 		}
 
Index: /applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/SegmentChecker.java
===================================================================
--- /applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/SegmentChecker.java	(revision 32714)
+++ /applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/SegmentChecker.java	(revision 32715)
@@ -4,10 +4,13 @@
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 
+import org.openstreetmap.josm.command.ChangeCommand;
 import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.RelationMember;
@@ -20,4 +23,5 @@
 import org.openstreetmap.josm.plugins.pt_assistant.data.PTStop;
 import org.openstreetmap.josm.plugins.pt_assistant.data.PTWay;
+import org.openstreetmap.josm.plugins.pt_assistant.utils.RouteUtils;
 import org.openstreetmap.josm.plugins.pt_assistant.utils.StopToWayAssigner;
 
@@ -33,4 +37,7 @@
 	/* PTRouteSegments that have been validated and are correct */
 	private static List<PTRouteSegment> correctSegments = new ArrayList<PTRouteSegment>();
+
+	/* PTRouteSegments that are wrong, stored in case the user calls the fix */
+	private static HashMap<TestError, PTRouteSegment> wrongSegments = new HashMap<TestError, PTRouteSegment>();
 
 	/* Manager of the PTStops and PTWays of the current route */
@@ -213,5 +220,5 @@
 
 	public void performStopByStopTest() {
-
+		
 		if (manager.getPTStopCount() < 2) {
 			return;
@@ -228,12 +235,17 @@
 			if (startWay == null) {
 				this.firstNodeOfRouteSegmentInDirectionOfTravel = null;
+				if (i == 0) {
+					createStopError(startStop);
+				}
 				continue;
 			}
 			if (endWay == null) {
 				this.firstNodeOfRouteSegmentInDirectionOfTravel = null;
+				if (i != 0) {
+					createStopError(endStop);
+				}
 				continue;
 			}
-			// FIXME: throw error if cannot find the corresponding way (which
-			// means that the stop is too far away from way)
+
 			List<PTWay> segmentWays = manager.getPTWaysBetween(startWay, endWay);
 
@@ -245,5 +257,4 @@
 						segmentWays.get(0));
 				if (this.firstNodeOfRouteSegmentInDirectionOfTravel == null) {
-					// TODO: throw error
 					continue;
 				}
@@ -255,7 +266,30 @@
 				PTRouteSegment routeSegment = new PTRouteSegment(startStop, endStop, segmentWays);
 				correctSegments.add(routeSegment);
-			}
-		}
-
+			} else {
+				PTRouteSegment routeSegment = new PTRouteSegment(startStop, endStop, segmentWays);
+				TestError error = this.errors.get(this.errors.size() - 1);
+				wrongSegments.put(error, routeSegment);
+			}
+		}
+	}
+
+	/**
+	 * Creates a TestError and adds it to the list of errors for a stop that is
+	 * not served.
+	 * 
+	 * @param stop
+	 */
+	private void createStopError(PTStop stop) {
+		List<Relation> primitives = new ArrayList<>(1);
+		primitives.add(relation);
+		List<OsmPrimitive> highlighted = new ArrayList<>();
+		OsmPrimitive stopPrimitive = stop.getPlatform();
+		if (stopPrimitive == null) {
+			stopPrimitive = stop.getStopPosition();
+		}
+		highlighted.add(stopPrimitive);
+		TestError e = new TestError(this.test, Severity.WARNING, tr("PT: Stop not served"),
+				PTAssistantValidatorTest.ERROR_CODE_STOP_NOT_SERVED, primitives, highlighted);
+		this.errors.add(e);
 	}
 
@@ -395,4 +429,5 @@
 	/**
 	 * Will return the same node if the way is an unsplit roundabout
+	 * 
 	 * @param way
 	 * @param node
@@ -414,4 +449,5 @@
 	/**
 	 * Does not work correctly for unsplit roundabouts
+	 * 
 	 * @param ptway
 	 * @param node
@@ -457,5 +493,5 @@
 
 			if (ptway != currentWay) {
-				for (Way way: ptway.getWays()) {
+				for (Way way : ptway.getWays()) {
 					if (way.containsNode(nextNodeInDirectionOfTravel)) {
 						nextPtways.add(ptway);
@@ -469,7 +505,94 @@
 	}
 
+	protected static boolean isFixable(TestError testError) {
+
+		if (testError.getCode() == PTAssistantValidatorTest.ERROR_CODE_STOP_BY_STOP) {
+
+			PTRouteSegment wrongSegment = wrongSegments.get(testError);
+			PTRouteSegment correctSegment = null;
+			// TODO: now just the first correctSegment is taken over. Change
+			// that
+			// the segment is selected.
+			for (PTRouteSegment segment : correctSegments) {
+				if (wrongSegment.getFirstStop().equalsStop(segment.getFirstStop())
+						&& wrongSegment.getLastStop().equalsStop(segment.getLastStop())) {
+					correctSegment = segment;
+					// System.out.println("correct segment found: " +
+					// correctSegment.getFirstStop().getPlatform().getId());
+					break;
+				}
+			}
+
+			return correctSegment != null;
+		}
+
+		return false;
+
+	}
+
 	protected static Command fixError(TestError testError) {
 
-		// FIXME
+		PTRouteSegment wrongSegment = wrongSegments.get(testError);
+		PTRouteSegment correctSegment = null;
+		// TODO: now just the first correctSegment is taken over. Change that
+		// the segment is selected.
+		for (PTRouteSegment segment : correctSegments) {
+			if (wrongSegment.getFirstStop().equalsStop(segment.getFirstStop())
+					&& wrongSegment.getLastStop().equalsStop(segment.getLastStop())) {
+				correctSegment = segment;
+				break;
+			}
+		}
+
+		if (correctSegment != null) {
+			// TODO: ask user if the change should be undertaken
+			Relation originalRelation = (Relation) testError.getPrimitives().iterator().next();
+			Relation modifiedRelation = new Relation(originalRelation);
+			List<RelationMember> originalRelationMembers = originalRelation.getMembers();
+			List<RelationMember> modifiedRelationMembers = new ArrayList<>();
+			
+			// copy stops first:
+			for (RelationMember rm: originalRelationMembers) {
+				if (RouteUtils.isPTStop(rm)) {
+					if (rm.getRole().equals("stop_position")) {
+						if (rm.getType().equals(OsmPrimitiveType.NODE)) {
+							RelationMember newMember = new RelationMember("stop", rm.getNode());
+							modifiedRelationMembers.add(newMember);
+						} else { // if it is a way:
+							RelationMember newMember = new RelationMember("stop", rm.getWay());
+							modifiedRelationMembers.add(newMember);
+						}
+					} else {
+						// if the relation member does not have the role
+						// "stop_position":
+						modifiedRelationMembers.add(rm);
+					}
+				} 
+			}
+			
+			// copy PTWays next:
+			List<RelationMember> waysOfOriginalRelation = new ArrayList<>();
+			for (RelationMember rm: originalRelation.getMembers()) {
+				if (RouteUtils.isPTWay(rm)) {
+					waysOfOriginalRelation.add(rm);
+				}
+			}
+			
+			for (int i = 0; i < waysOfOriginalRelation.size(); i++) {
+				if (waysOfOriginalRelation.get(i).getWay() == wrongSegment.getPTWays().get(0).getWays().get(0)) {
+//				if (waysOfOriginalRelation.get(i) == wrongSegment.getPTWays().get(0)) {
+					modifiedRelationMembers.addAll(correctSegment.getPTWays());
+					i = i + wrongSegment.getPTWays().size() - 1;
+				} else {
+					modifiedRelationMembers.add(waysOfOriginalRelation.get(i));
+				}
+			}
+
+
+			modifiedRelation.setMembers(modifiedRelationMembers);
+			// TODO: change the data model too
+			ChangeCommand changeCommand = new ChangeCommand(originalRelation, modifiedRelation);
+			return changeCommand;
+		}
 
 		return null;
