Index: applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputDialog.java
===================================================================
--- applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputDialog.java	(revision 22018)
+++ applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputDialog.java	(revision 23191)
@@ -75,5 +75,5 @@
     JCheckBox deleteOutlineCheckBox;
 
-	HouseNumberInputHandler inputHandler;
+    HouseNumberInputHandler inputHandler;
 
     /**
@@ -102,5 +102,5 @@
     }
 
-	/**
+    /**
      * This method initializes this
      *
@@ -111,5 +111,5 @@
         this.hi.addFocusListener(this.inputHandler);
         this.segments.addFocusListener(this.inputHandler);
-		this.interpolation.addItemListener(this.inputHandler);
+        this.interpolation.addItemListener(this.inputHandler);
     }
 
@@ -136,7 +136,7 @@
         if (inputPanel == null) {
 
-        	GridBagConstraints c = new GridBagConstraints();
-
-        	messageLabel = new JTextArea();
+            GridBagConstraints c = new GridBagConstraints();
+
+            messageLabel = new JTextArea();
             messageLabel.setText(DEFAULT_MESSAGE);
             messageLabel.setAutoscrolls(true);
@@ -168,5 +168,5 @@
             inputPanel.setLayout(new GridBagLayout());
             c.fill = GridBagConstraints.HORIZONTAL;
-			c.gridwidth = GridBagConstraints.REMAINDER;
+            c.gridwidth = GridBagConstraints.REMAINDER;
             inputPanel.add(messageLabel, c);
 
@@ -191,5 +191,5 @@
     }
 
-	/**
+    /**
      * Overrides the default actions. Will not close the window when upload trace is clicked
      */
@@ -268,7 +268,7 @@
             interpolation.add(tr("Even/Odd"));
             if (Main.pref.getInteger(INTERPOLATION, 2) == 1) {
-            	interpolation.select(tr("All"));
+                interpolation.select(tr("All"));
             } else {
-            	interpolation.select(tr("Even/Odd"));
+                interpolation.select(tr("Even/Odd"));
             }
             //return (dialog.interpolation.getSelectedItem().equals(tr("All"))) ? 1 : 2;
Index: applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputHandler.java
===================================================================
--- applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputHandler.java	(revision 22018)
+++ applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputHandler.java	(revision 23191)
@@ -61,36 +61,36 @@
         this.street = street;
         this.associatedStreet = associatedStreet;
-        
+
         // This dialog is started modal
         this.dialog = new HouseNumberInputDialog(this, street, associatedStreet != null);
-        
+
         // We're done
     }
 
-	/**
-	 * Find a button with a certain caption.
-	 * Loops recursively through all objects to find all buttons.
-	 * Function returns on the first match.
-	 *
-	 * @param root A container object that is recursively searched for other containers or buttons
-	 * @param caption The caption of the button that is being searched
-	 *
-	 * @return The first button that matches the caption or null if not found
-	 */
-	private static JButton getButton(Container root, String caption) {
-		Component children[] = root.getComponents();
+    /**
+     * Find a button with a certain caption.
+     * Loops recursively through all objects to find all buttons.
+     * Function returns on the first match.
+     *
+     * @param root A container object that is recursively searched for other containers or buttons
+     * @param caption The caption of the button that is being searched
+     *
+     * @return The first button that matches the caption or null if not found
+     */
+    private static JButton getButton(Container root, String caption) {
+        Component children[] = root.getComponents();
          for (Component child : children) {
-         	JButton b;
-         	if (child instanceof JButton) {
-				b = (JButton) child;
-				if (caption.equals(b.getText())) return b;
-			} else if (child instanceof Container) {
+            JButton b;
+            if (child instanceof JButton) {
+                b = (JButton) child;
+                if (caption.equals(b.getText())) return b;
+            } else if (child instanceof Container) {
                   b = getButton((Container)child, caption);
                   if (b != null) return b;
              }
          }
-		return null;
-	}
-	
+        return null;
+    }
+
     /**
      * Validate the current input fields.
@@ -110,8 +110,8 @@
         // Allow non numeric characters for the low number as long as there is no high number of the segmentcount is 1
         if (dialog.hi.getText().length() > 0 | segments() > 1) {
-		    isOk = isOk
-		            && checkNumberStringField(dialog.lo, tr("Lowest number"),
-		                    message);
-		}
+            isOk = isOk
+                    && checkNumberStringField(dialog.lo, tr("Lowest number"),
+                            message);
+        }
         isOk = isOk
                 && checkNumberStringField(dialog.hi, tr("Highest number"),
@@ -124,6 +124,6 @@
             JButton okButton = getButton(dialog, "OK");
             if (okButton != null)
-            	okButton.setEnabled(true);
-            
+                okButton.setEnabled(true);
+
             // For some reason the messageLabel doesn't want to show up
             dialog.messageLabel.setForeground(Color.black);
@@ -133,10 +133,10 @@
             JButton okButton = getButton(dialog, "OK");
             if (okButton != null)
-		       	okButton.setEnabled(false);
-		        	
-	        // For some reason the messageLabel doesn't want to show up, so a MessageDialog is shown instead. Someone more knowledgeable might fix this.
-	        dialog.messageLabel.setForeground(Color.red);
-	        dialog.messageLabel.setText(message.toString());
-	        //JOptionPane.showMessageDialog(null, message.toString(), tr("Error"), JOptionPane.ERROR_MESSAGE);
+                okButton.setEnabled(false);
+
+            // For some reason the messageLabel doesn't want to show up, so a MessageDialog is shown instead. Someone more knowledgeable might fix this.
+            dialog.messageLabel.setForeground(Color.red);
+            dialog.messageLabel.setText(message.toString());
+            //JOptionPane.showMessageDialog(null, message.toString(), tr("Error"), JOptionPane.ERROR_MESSAGE);
 
             return false;
@@ -273,21 +273,21 @@
             JButton button = (JButton) e.getSource();
             if ("OK".equals(button.getActionCommand()) & button.isEnabled()) {
-            	if (validateInput()) {
-		            saveValues();
-		            
-			        terracerAction.terraceBuilding(
-			            outline,
-			            street,
-			            associatedStreet,
-			            segments(),
-			            dialog.lo.getText(),
-			            dialog.hi.getText(),
-			            stepSize(),
-			            streetName(),
-			            doHandleRelation(),
-			            doDeleteOutline());
-				
-		            this.dialog.dispose();
-		        }
+                if (validateInput()) {
+                    saveValues();
+
+                    terracerAction.terraceBuilding(
+                        outline,
+                        street,
+                        associatedStreet,
+                        segments(),
+                        dialog.lo.getText(),
+                        dialog.hi.getText(),
+                        stepSize(),
+                        streetName(),
+                        doHandleRelation(),
+                        doDeleteOutline());
+
+                    this.dialog.dispose();
+                }
             } else if ("Cancel".equals(button.getActionCommand())) {
                 this.dialog.dispose();
@@ -357,5 +357,5 @@
         if (street != null)
             return null;
-            
+
         Object selected = dialog.streetComboBox.getSelectedItem();
         if (selected == null) {
@@ -376,16 +376,16 @@
      */
     public boolean doHandleRelation() {
-    	if (this.dialog == null) {
-    		JOptionPane.showMessageDialog(null, "dialog", "alert", JOptionPane.ERROR_MESSAGE); 
-    	}
-    	if (this.dialog.handleRelationCheckBox == null) {
-    		JOptionPane.showMessageDialog(null, "checkbox", "alert", JOptionPane.ERROR_MESSAGE); 
-    		return true;
-    	}  else {
-        	return this.dialog.handleRelationCheckBox.isSelected();
-        }
-    }
-
-   
+        if (this.dialog == null) {
+            JOptionPane.showMessageDialog(null, "dialog", "alert", JOptionPane.ERROR_MESSAGE);
+        }
+        if (this.dialog.handleRelationCheckBox == null) {
+            JOptionPane.showMessageDialog(null, "checkbox", "alert", JOptionPane.ERROR_MESSAGE);
+            return true;
+        }  else {
+            return this.dialog.handleRelationCheckBox.isSelected();
+        }
+    }
+
+
     /**
      * Whether the user likes to delete the outline way.
@@ -394,10 +394,10 @@
         return dialog.deleteOutlineCheckBox.isSelected();
     }
-    
+
     /* (non-Javadoc)
      * @see java.awt.event.FocusListener#focusGained(java.awt.event.FocusEvent)
      */
     public void focusGained(FocusEvent e) {
-		// Empty, but placeholder is required
+        // Empty, but placeholder is required
     }
 
@@ -406,6 +406,6 @@
      */
     public void focusLost(FocusEvent e) {
-    	if (e.getOppositeComponent() == null)
-    		return;
+        if (e.getOppositeComponent() == null)
+            return;
 
         validateInput();
Index: applications/editors/josm/plugins/terracer/src/terracer/ReverseTerraceAction.java
===================================================================
--- applications/editors/josm/plugins/terracer/src/terracer/ReverseTerraceAction.java	(revision 22018)
+++ applications/editors/josm/plugins/terracer/src/terracer/ReverseTerraceAction.java	(revision 23191)
@@ -78,10 +78,10 @@
             }
         }
-        
+
         if (front.isEmpty()) {
             JOptionPane.showMessageDialog(Main.parent,
                     tr("Cannot reverse!"));
             return;
-        }                
+        }
 
         // This is like a visitedWays set, but in a linear order.
@@ -130,4 +130,4 @@
     protected void updateEnabledState() {
         setEnabled(getCurrentDataSet() != null);
-    }    
+    }
 }
Index: applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java
===================================================================
--- applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java	(revision 22018)
+++ applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java	(revision 23191)
@@ -58,7 +58,7 @@
     // repeated terraces. this is the easiest, but not necessarily nicest, way.
     // private static String lastSelectedValue = "";
-	
-	Collection<Command> commands;
-	
+
+    Collection<Command> commands;
+
     public TerracerAction() {
         super(tr("Terrace a building"), "terrace",
@@ -152,12 +152,12 @@
     }
 
-	public Integer getNumber(String number) {
-		try {
+    public Integer getNumber(String number) {
+        try {
             return Integer.parseInt(number);
         } catch (NumberFormatException ex) {
             return null;
         }
-	}
-	
+    }
+
     /**
      * Terraces a single, closed, quadrilateral way.
@@ -178,15 +178,15 @@
      */
     public void terraceBuilding(Way outline,
-				Way street,
-				Relation associatedStreet,
-				Integer segments,
-				String From,
-				String To,
-				int step,
-				String streetName,
-				boolean handleRelations,
-				boolean deleteOutline) {
+                Way street,
+                Relation associatedStreet,
+                Integer segments,
+                String From,
+                String To,
+                int step,
+                String streetName,
+                boolean handleRelations,
+                boolean deleteOutline) {
         final int nb;
-        
+
         Integer to, from;
         to = getNumber(To);
@@ -210,88 +210,88 @@
         Collection<Way> ways = new LinkedList<Way>();
 
-		// Should this building be terraced (i.e. is there more then one section?)
-		if (nb > 1) {
-		    // create intermediate nodes by interpolating.
-		    
-		    // now find which is the longest side connecting the first node
-			Pair<Way, Way> interp = findFrontAndBack(outline);
-
-			final double frontLength = wayLength(interp.a);
-			final double backLength = wayLength(interp.b);
-			
-		    for (int i = 0; i <= nb; ++i) {
-		        new_nodes[0][i] = interpolateAlong(interp.a, frontLength * i / nb);
-		        new_nodes[1][i] = interpolateAlong(interp.b, backLength * i / nb);
-		        this.commands.add(new AddCommand(new_nodes[0][i]));
-		        this.commands.add(new AddCommand(new_nodes[1][i]));
-		    }
-
-		    // assemble new quadrilateral, closed ways
-		    for (int i = 0; i < nb; ++i) {
-		        Way terr = new Way();
-		        // Using Way.nodes.add rather than Way.addNode because the latter
-		        // doesn't
-		        // exist in older versions of JOSM.
-		        terr.addNode(new_nodes[0][i]);
-		        terr.addNode(new_nodes[0][i + 1]);
-		        terr.addNode(new_nodes[1][i + 1]);
-		        terr.addNode(new_nodes[1][i]);
-		        terr.addNode(new_nodes[0][i]);
-		        
-		        // add the tags of the outline to each building (e.g. source=*)
-		        TagCollection.from(outline).applyTo(terr);
-
-				String number = null;
-				if (from != null) {
-					number = Integer.toString(from + i * step);
-				}
-		       	terr = addressBuilding(terr, street, streetName, number);
-
-		        ways.add(terr);
-		        this.commands.add(new AddCommand(terr));
-		    }
-
-		    if (deleteOutline) {
-		        this.commands.add(DeleteCommand.delete(Main.main.getEditLayer(), Collections.singleton(outline), true, true));
-		    }
-		} else {
-			// Single section, just add the address details
-			Way newOutline;
-			newOutline = addressBuilding(outline, street, streetName, From);
-			ways.add(newOutline);
-			this.commands.add(new ChangeCommand(outline, newOutline));
-		}
-		
-		if (handleRelations) { // create a new relation or merge with existing
-		    if (associatedStreet == null) {  // create a new relation
-		        associatedStreet = new Relation();
-		        associatedStreet.put("type", "associatedStreet");
-		        if (street != null) { // a street was part of the selection
-		            associatedStreet.put("name", street.get("name"));
-		            associatedStreet.addMember(new RelationMember("street", street));
-		        } else {
-		            associatedStreet.put("name", streetName);
-		        }
-		        for (Way w : ways) {
-		            associatedStreet.addMember(new RelationMember("house", w));
-		        }
-		        this.commands.add(new AddCommand(associatedStreet));
-		    }
-		    else { // relation exists already - add new members
-		        Relation newAssociatedStreet = new Relation(associatedStreet);
-		        for (Way w : ways) {
-		            newAssociatedStreet.addMember(new RelationMember("house", w));
-		        }
-		        this.commands.add(new ChangeCommand(associatedStreet, newAssociatedStreet));
-		    }
-		}
-		Main.main.undoRedo.add(new SequenceCommand(tr("Terrace"), commands));
-		if (nb > 1) {
-			// Select the new building outlines (for quick reversing)
-		    Main.main.getCurrentDataSet().setSelected(ways);
-		} else if (street != null) {
-			// Select the way (for quick selection of a new house (with the same way))
-		    Main.main.getCurrentDataSet().setSelected(street);
-		}
+        // Should this building be terraced (i.e. is there more then one section?)
+        if (nb > 1) {
+            // create intermediate nodes by interpolating.
+
+            // now find which is the longest side connecting the first node
+            Pair<Way, Way> interp = findFrontAndBack(outline);
+
+            final double frontLength = wayLength(interp.a);
+            final double backLength = wayLength(interp.b);
+
+            for (int i = 0; i <= nb; ++i) {
+                new_nodes[0][i] = interpolateAlong(interp.a, frontLength * i / nb);
+                new_nodes[1][i] = interpolateAlong(interp.b, backLength * i / nb);
+                this.commands.add(new AddCommand(new_nodes[0][i]));
+                this.commands.add(new AddCommand(new_nodes[1][i]));
+            }
+
+            // assemble new quadrilateral, closed ways
+            for (int i = 0; i < nb; ++i) {
+                Way terr = new Way();
+                // Using Way.nodes.add rather than Way.addNode because the latter
+                // doesn't
+                // exist in older versions of JOSM.
+                terr.addNode(new_nodes[0][i]);
+                terr.addNode(new_nodes[0][i + 1]);
+                terr.addNode(new_nodes[1][i + 1]);
+                terr.addNode(new_nodes[1][i]);
+                terr.addNode(new_nodes[0][i]);
+
+                // add the tags of the outline to each building (e.g. source=*)
+                TagCollection.from(outline).applyTo(terr);
+
+                String number = null;
+                if (from != null) {
+                    number = Integer.toString(from + i * step);
+                }
+                terr = addressBuilding(terr, street, streetName, number);
+
+                ways.add(terr);
+                this.commands.add(new AddCommand(terr));
+            }
+
+            if (deleteOutline) {
+                this.commands.add(DeleteCommand.delete(Main.main.getEditLayer(), Collections.singleton(outline), true, true));
+            }
+        } else {
+            // Single section, just add the address details
+            Way newOutline;
+            newOutline = addressBuilding(outline, street, streetName, From);
+            ways.add(newOutline);
+            this.commands.add(new ChangeCommand(outline, newOutline));
+        }
+
+        if (handleRelations) { // create a new relation or merge with existing
+            if (associatedStreet == null) {  // create a new relation
+                associatedStreet = new Relation();
+                associatedStreet.put("type", "associatedStreet");
+                if (street != null) { // a street was part of the selection
+                    associatedStreet.put("name", street.get("name"));
+                    associatedStreet.addMember(new RelationMember("street", street));
+                } else {
+                    associatedStreet.put("name", streetName);
+                }
+                for (Way w : ways) {
+                    associatedStreet.addMember(new RelationMember("house", w));
+                }
+                this.commands.add(new AddCommand(associatedStreet));
+            }
+            else { // relation exists already - add new members
+                Relation newAssociatedStreet = new Relation(associatedStreet);
+                for (Way w : ways) {
+                    newAssociatedStreet.addMember(new RelationMember("house", w));
+                }
+                this.commands.add(new ChangeCommand(associatedStreet, newAssociatedStreet));
+            }
+        }
+        Main.main.undoRedo.add(new SequenceCommand(tr("Terrace"), commands));
+        if (nb > 1) {
+            // Select the new building outlines (for quick reversing)
+            Main.main.getCurrentDataSet().setSelected(ways);
+        } else if (street != null) {
+            // Select the way (for quick selection of a new house (with the same way))
+            Main.main.getCurrentDataSet().setSelected(street);
+        }
     }
 
@@ -306,5 +306,5 @@
      */
     private Way addressBuilding(Way outline, Way street, String streetName, String number) {
-    	Way changedOutline = outline;
+        Way changedOutline = outline;
         if (number != null) {
             // only, if the user has specified house numbers
@@ -431,10 +431,10 @@
         return Math.min(positiveModulus(i1 - i2, n), positiveModulus(i2 - i1, n));
     }
-    
+
     /**
      * return the modulus in the range [0, n)
      */
     private int positiveModulus(int a, int n) {
-        if (n <=0) 
+        if (n <=0)
             throw new IllegalArgumentException();
         int res = a % n;
@@ -444,5 +444,5 @@
         return res;
     }
-    
+
     /**
      * Calculate the length of a side (from node i to i+1) in a way. This assumes that
@@ -548,4 +548,4 @@
     protected void updateEnabledState() {
         setEnabled(getCurrentDataSet() != null);
-    }    
+    }
 }
Index: applications/editors/josm/plugins/terracer/src/terracer/TerracerPlugin.java
===================================================================
--- applications/editors/josm/plugins/terracer/src/terracer/TerracerPlugin.java	(revision 22018)
+++ applications/editors/josm/plugins/terracer/src/terracer/TerracerPlugin.java	(revision 23191)
@@ -1,7 +1,7 @@
 /**
  * Terracer: A JOSM Plugin for terraced houses.
- * 
+ *
  * Copyright 2009 CloudMade Ltd.
- * 
+ *
  * Released under the GPLv2, see LICENSE file for details.
  */
@@ -15,5 +15,5 @@
 /**
  * Plugin interface implementation for Terracer.
- * 
+ *
  * @author zere
  */
@@ -21,5 +21,5 @@
     public TerracerPlugin(PluginInformation info) {
         super(info);
-        
+
         MainMenu.add(Main.main.menu.toolsMenu, new TerracerAction());
         MainMenu.add(Main.main.menu.toolsMenu, new ReverseTerraceAction());
Index: applications/editors/josm/plugins/terracer/src/terracer/TerracerRuntimeException.java
===================================================================
--- applications/editors/josm/plugins/terracer/src/terracer/TerracerRuntimeException.java	(revision 22018)
+++ applications/editors/josm/plugins/terracer/src/terracer/TerracerRuntimeException.java	(revision 23191)
@@ -10,40 +10,40 @@
 /**
  * The Class TerracerRuntimeException indicates errors from the Terracer Plugin.
- * 
+ *
  * @author casualwalker
  */
 public class TerracerRuntimeException extends RuntimeException {
 
-	/** The Constant serialVersionUID. */
-	private static final long serialVersionUID = 857926026580277816L;
+    /** The Constant serialVersionUID. */
+    private static final long serialVersionUID = 857926026580277816L;
 
-	/**
-	 * Default constructor.
-	 */
-	public TerracerRuntimeException() {
-		super();
-	}
+    /**
+     * Default constructor.
+     */
+    public TerracerRuntimeException() {
+        super();
+    }
 
-	/**
-	 * @param message
-	 * @param cause
-	 */
-	public TerracerRuntimeException(String message, Throwable cause) {
-		super(message, cause);
-	}
+    /**
+     * @param message
+     * @param cause
+     */
+    public TerracerRuntimeException(String message, Throwable cause) {
+        super(message, cause);
+    }
 
-	/**
-	 * @param message
-	 */
-	public TerracerRuntimeException(String message) {
-		super(message);
-	}
+    /**
+     * @param message
+     */
+    public TerracerRuntimeException(String message) {
+        super(message);
+    }
 
-	/**
-	 * @param cause
-	 */
-	public TerracerRuntimeException(Throwable cause) {
-		super(cause);
-	}
+    /**
+     * @param cause
+     */
+    public TerracerRuntimeException(Throwable cause) {
+        super(cause);
+    }
 
 }
