Index: applications/editors/josm/plugins/simplifyarea/src/sk/zdila/josm/plugin/simplify/SimplifyAreaAction.java
===================================================================
--- applications/editors/josm/plugins/simplifyarea/src/sk/zdila/josm/plugin/simplify/SimplifyAreaAction.java	(revision 25007)
+++ applications/editors/josm/plugins/simplifyarea/src/sk/zdila/josm/plugin/simplify/SimplifyAreaAction.java	(revision 25030)
@@ -76,5 +76,5 @@
                 Main.parent,
                 "<html>" + trn("The selected way has nodes outside of the downloaded data region.", "The selected ways have nodes outside of the downloaded data region.", getCurrentDataSet().getSelectedWays().size())
-                        + "<br>" + tr("This can lead to nodes being deleted accidentally.") + "<br>" + tr("Do you want to delete them anyway?") + "</html>",
+                + "<br>" + tr("This can lead to nodes being deleted accidentally.") + "<br>" + tr("Do you want to delete them anyway?") + "</html>",
                 tr("Delete nodes outside of data regions?"), JOptionPane.WARNING_MESSAGE, null, // no special icon
                 options, options[0], null);
@@ -168,5 +168,5 @@
      *            the way to simplify
      */
-	private SequenceCommand simplifyWay(final Way w) {
+    private SequenceCommand simplifyWay(final Way w) {
         final double angleThreshold = Main.pref.getDouble("simplify-area.angle.threshold", 10);
         final double angleFactor = Main.pref.getDouble("simplify-area.angle.factor", 1.0);
@@ -193,41 +193,41 @@
 
         while (true) {
-        	Node prevNode = null;
-        	LatLon coord1 = null;
-        	LatLon coord2 = null;
-
-        	double minWeight = Double.MAX_VALUE;
-        	Node bestMatch = null;
-
-	        for (int i = 0, len = nodes.size() + (closed ? 2 : 1); i < len; i++) {
-	            final Node n = nodes.get(i % nodes.size());
-	            final LatLon coord3 = n.getCoor();
-
-	            if (coord1 != null) {
-	            	final double angleWeight = computeConvectAngle(coord1, coord2, coord3) / angleThreshold;
-	            	final double areaWeight = computeArea(coord1, coord2, coord3) / areaThreshold;
-	            	final double distanceWeight = Math.abs(crossTrackError(coord1, coord2, coord3)) / distanceThreshold;
-
-	            	final double weight = isRequiredNode(w, prevNode) ||
-	            		!closed && i == len - 1 || // don't remove last node of the not closed way
-	            		angleWeight > 1.0 || areaWeight > 1.0 || distanceWeight > 1.0 ? Double.MAX_VALUE :
-	            		angleWeight * angleFactor + areaWeight * areaFactor + distanceWeight * distanceFactor;
-
-	            	if (weight < minWeight) {
-	            		minWeight = weight;
-	            		bestMatch = prevNode;
-	            	}
-	            }
-
-	            coord1 = coord2;
-	            coord2 = coord3;
-	            prevNode = n;
-	        }
-
-	        if (bestMatch == null) {
-	        	break;
-	        }
-
-	        nodes.remove(bestMatch);
+            Node prevNode = null;
+            LatLon coord1 = null;
+            LatLon coord2 = null;
+
+            double minWeight = Double.MAX_VALUE;
+            Node bestMatch = null;
+
+            for (int i = 0, len = nodes.size() + (closed ? 2 : 1); i < len; i++) {
+                final Node n = nodes.get(i % nodes.size());
+                final LatLon coord3 = n.getCoor();
+
+                if (coord1 != null) {
+                    final double angleWeight = computeConvectAngle(coord1, coord2, coord3) / angleThreshold;
+                    final double areaWeight = computeArea(coord1, coord2, coord3) / areaThreshold;
+                    final double distanceWeight = Math.abs(crossTrackError(coord1, coord2, coord3)) / distanceThreshold;
+
+                    final double weight = isRequiredNode(w, prevNode) ||
+                    !closed && i == len - 1 || // don't remove last node of the not closed way
+                    angleWeight > 1.0 || areaWeight > 1.0 || distanceWeight > 1.0 ? Double.MAX_VALUE :
+                        angleWeight * angleFactor + areaWeight * areaFactor + distanceWeight * distanceFactor;
+
+                    if (weight < minWeight) {
+                        minWeight = weight;
+                        bestMatch = prevNode;
+                    }
+                }
+
+                coord1 = coord2;
+                coord2 = coord3;
+                prevNode = n;
+            }
+
+            if (bestMatch == null) {
+                break;
+            }
+
+            nodes.remove(bestMatch);
         }
 
@@ -237,5 +237,5 @@
         final Map<Node, LatLon> coordMap = new HashMap<Node, LatLon>();
         for (final Node n : nodes) {
-        	coordMap.put(n, n.getCoor());
+            coordMap.put(n, n.getCoor());
         }
 
@@ -243,36 +243,36 @@
 
         while (true) {
-        	double minDist = Double.MAX_VALUE;
-        	Node node1 = null;
-        	Node node2 = null;
-
-        	for (int i = 0, len = nodes.size() + (closed ? 2 : 1); i < len; i++) {
-	            final Node n1 = nodes.get(i % nodes.size());
-	            final Node n2 = nodes.get((i + 1) % nodes.size());
-
-	            if (isRequiredNode(w, n1) || isRequiredNode(w, n2)) {
-	            	continue;
-	            }
-
-	            final double dist = coordMap.get(n1).greatCircleDistance(coordMap.get(n2));
-	            if (dist < minDist && dist < mergeThreshold) {
-	            	minDist = dist;
-	            	node1 = n1;
-	            	node2 = n2;
-	            }
-        	}
-
-        	if (node1 == null || node2 == null) {
-        		break;
-        	}
-
-
-        	final LatLon coord = coordMap.get(node1).getCenter(coordMap.get(node2));
-        	coordMap.put(node1, coord);
-			moveCommandList.put(node1, new MoveCommand(node1, coord));
-
-			nodes.remove(node2);
-        	coordMap.remove(node2);
-        	moveCommandList.remove(node2);
+            double minDist = Double.MAX_VALUE;
+            Node node1 = null;
+            Node node2 = null;
+
+            for (int i = 0, len = nodes.size() + (closed ? 2 : 1); i < len; i++) {
+                final Node n1 = nodes.get(i % nodes.size());
+                final Node n2 = nodes.get((i + 1) % nodes.size());
+
+                if (isRequiredNode(w, n1) || isRequiredNode(w, n2)) {
+                    continue;
+                }
+
+                final double dist = coordMap.get(n1).greatCircleDistance(coordMap.get(n2));
+                if (dist < minDist && dist < mergeThreshold) {
+                    minDist = dist;
+                    node1 = n1;
+                    node2 = n2;
+                }
+            }
+
+            if (node1 == null || node2 == null) {
+                break;
+            }
+
+
+            final LatLon coord = coordMap.get(node1).getCenter(coordMap.get(node2));
+            coordMap.put(node1, coord);
+            moveCommandList.put(node1, new MoveCommand(node1, coord));
+
+            nodes.remove(node2);
+            coordMap.remove(node2);
+            moveCommandList.remove(node2);
         }
 
@@ -301,6 +301,6 @@
 
     public static double computeConvectAngle(final LatLon coord1, final LatLon coord2, final LatLon coord3) {
-    	final double angle =  Math.abs(heading(coord2, coord3) - heading(coord1, coord2));
-    	return Math.toDegrees(angle < Math.PI ? angle : 2 * Math.PI - angle);
+        final double angle =  Math.abs(heading(coord2, coord3) - heading(coord1, coord2));
+        return Math.toDegrees(angle < Math.PI ? angle : 2 * Math.PI - angle);
     }
 
@@ -314,5 +314,5 @@
 
         final double q = p * (p - a) * (p - b) * (p - c); // I found this negative in one case (:-o) when nodes were in line on a small area
-		return q < 0.0 ? 0.0 : Math.sqrt(q);
+        return q < 0.0 ? 0.0 : Math.sqrt(q);
     }
 
@@ -327,6 +327,6 @@
     public static double heading(final LatLon a, final LatLon b) {
         double hd = Math.atan2(sin(toRadians(a.lon() - b.lon())) * cos(toRadians(b.lat())),
-        		cos(toRadians(a.lat())) * sin(toRadians(b.lat())) -
-        		sin(toRadians(a.lat())) * cos(toRadians(b.lat())) * cos(toRadians(a.lon() - b.lon())));
+                cos(toRadians(a.lat())) * sin(toRadians(b.lat())) -
+                sin(toRadians(a.lat())) * cos(toRadians(b.lat())) * cos(toRadians(a.lon() - b.lon())));
         hd %= 2 * Math.PI;
         if (hd < 0) {
