Index: trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- trunk/src/org/openstreetmap/josm/Main.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/Main.java	(revision 8510)
@@ -501,5 +501,5 @@
         }
         panel.setVisible(true);
-        redoUndoListener.commandChanged(0,0);
+        redoUndoListener.commandChanged(0, 0);
 
         Main.map = map;
@@ -532,4 +532,5 @@
 
         Object updateStatus(String event);
+
         void finish(Object status);
     }
@@ -768,5 +769,5 @@
         setMapFrame(mapFrame);
         if (firstLayer != null) {
-            mapFrame.selectMapMode((MapMode)mapFrame.getDefaultButtonAction(), firstLayer);
+            mapFrame.selectMapMode((MapMode) mapFrame.getDefaultButtonAction(), firstLayer);
         }
         mapFrame.initializeDialogsPane();
@@ -904,5 +905,5 @@
     protected static int windowState = JFrame.NORMAL;
 
-    private final CommandQueueListener redoUndoListener = new CommandQueueListener(){
+    private final CommandQueueListener redoUndoListener = new CommandQueueListener() {
         @Override
         public void commandChanged(final int queueSize, final int redoSize) {
@@ -998,5 +999,5 @@
                                 );
                     }
-                    if (f!=null) {
+                    if (f != null) {
                         fileList.add(f);
                     }
@@ -1008,5 +1009,5 @@
                 }
             }
-            if(!fileList.isEmpty()) {
+            if (!fileList.isEmpty()) {
                 OpenFileAction.openFiles(fileList, true);
             }
@@ -1067,5 +1068,5 @@
                 continue;
             }
-            AbstractModifiableLayer odl = (AbstractModifiableLayer)l;
+            AbstractModifiableLayer odl = (AbstractModifiableLayer) l;
             if ((odl.requiresSaveToFile() || (odl.requiresUploadToServer() && !odl.isUploadDiscouraged())) && odl.isModified()) {
                 layersWithUnmodifiedChanges.add(odl);
@@ -1138,8 +1139,8 @@
      */
     private static DownloadParamType paramType(String s) {
-        if(s.startsWith("http:") || s.startsWith("https:")) return DownloadParamType.httpUrl;
-        if(s.startsWith("file:")) return DownloadParamType.fileUrl;
+        if (s.startsWith("http:") || s.startsWith("https:")) return DownloadParamType.httpUrl;
+        if (s.startsWith("file:")) return DownloadParamType.fileUrl;
         String coorPattern = "\\s*[+-]?[0-9]+(\\.[0-9]+)?\\s*";
-        if(s.matches(coorPattern+"(,"+coorPattern+"){3}")) return DownloadParamType.bounds;
+        if (s.matches(coorPattern+"(,"+coorPattern+") {3}")) return DownloadParamType.bounds;
         // everything else must be a file name
         return DownloadParamType.fileName;
@@ -1174,6 +1175,6 @@
         if (st.countTokens() == 4) {
             Bounds b = new Bounds(
-                    new LatLon(Double.parseDouble(st.nextToken()),Double.parseDouble(st.nextToken())),
-                    new LatLon(Double.parseDouble(st.nextToken()),Double.parseDouble(st.nextToken()))
+                    new LatLon(Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken())),
+                    new LatLon(Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()))
                     );
             downloadFromParamBounds(rawGps, b);
@@ -1247,5 +1248,5 @@
             Component c = e.getComponent();
             if (c instanceof JFrame && c.isVisible()) {
-                if(Main.windowState == JFrame.NORMAL) {
+                if (Main.windowState == JFrame.NORMAL) {
                     Main.geometry = new WindowGeometry((JFrame) c);
                 } else {
@@ -1258,5 +1259,5 @@
     protected static void addListener() {
         parent.addComponentListener(new WindowPositionSizeListener());
-        ((JFrame)parent).addWindowStateListener(new WindowPositionSizeListener());
+        ((JFrame) parent).addWindowStateListener(new WindowPositionSizeListener());
     }
 
@@ -1356,7 +1357,7 @@
                 || (newValue != null && oldValue != null && !Objects.equals(newValue.toCode(), oldValue.toCode()))) {
 
-            synchronized(Main.class) {
+            synchronized (Main.class) {
                 Iterator<WeakReference<ProjectionChangeListener>> it = listeners.iterator();
-                while (it.hasNext()){
+                while (it.hasNext()) {
                     WeakReference<ProjectionChangeListener> wr = it.next();
                     ProjectionChangeListener listener = wr.get();
@@ -1398,7 +1399,7 @@
     public static void removeProjectionChangeListener(ProjectionChangeListener listener) {
         if (listener == null) return;
-        synchronized(Main.class){
+        synchronized (Main.class) {
             Iterator<WeakReference<ProjectionChangeListener>> it = listeners.iterator();
-            while (it.hasNext()){
+            while (it.hasNext()) {
                 WeakReference<ProjectionChangeListener> wr = it.next();
                 // remove the listener - and any other listener which got garbage
@@ -1462,7 +1463,7 @@
     public static void removeWindowSwitchListener(WindowSwitchListener listener) {
         if (listener == null) return;
-        synchronized (Main.class){
+        synchronized (Main.class) {
             Iterator<WeakReference<WindowSwitchListener>> it = windowSwitchListeners.iterator();
-            while (it.hasNext()){
+            while (it.hasNext()) {
                 WeakReference<WindowSwitchListener> wr = it.next();
                 // remove the listener - and any other listener which got garbage
@@ -1536,5 +1537,5 @@
                 synchronized (Main.class) {
                     Iterator<WeakReference<WindowSwitchListener>> it = windowSwitchListeners.iterator();
-                    while (it.hasNext()){
+                    while (it.hasNext()) {
                         WeakReference<WindowSwitchListener> wr = it.next();
                         WindowSwitchListener listener = wr.get();
@@ -1565,5 +1566,5 @@
                 synchronized (Main.class) {
                     Iterator<WeakReference<WindowSwitchListener>> it = windowSwitchListeners.iterator();
-                    while (it.hasNext()){
+                    while (it.hasNext()) {
                         WeakReference<WindowSwitchListener> wr = it.next();
                         WindowSwitchListener listener = wr.get();
Index: trunk/src/org/openstreetmap/josm/actions/AboutAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AboutAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/AboutAction.java	(revision 8510)
@@ -87,8 +87,8 @@
                 "</html>");
         info.add(label, GBC.eol().fill(GBC.HORIZONTAL).insets(10, 0, 0, 0));
-        info.add(new JLabel(tr("Homepage")), GBC.std().insets(10,0,10,0));
-        info.add(new UrlLabel(Main.getJOSMWebsite(),2), GBC.eol().fill(GBC.HORIZONTAL));
-        info.add(GBC.glue(0,5), GBC.eol());
-        info.add(new JLabel(tr("Bug Reports")), GBC.std().insets(10,0,10,0));
+        info.add(new JLabel(tr("Homepage")), GBC.std().insets(10, 0, 10, 0));
+        info.add(new UrlLabel(Main.getJOSMWebsite(), 2), GBC.eol().fill(GBC.HORIZONTAL));
+        info.add(GBC.glue(0, 5), GBC.eol());
+        info.add(new JLabel(tr("Bug Reports")), GBC.std().insets(10, 0, 10, 0));
         info.add(BugReportExceptionHandler.getBugReportUrlLabel(Utils.strip(ShowStatusReportAction.getReportHeader())),
                 GBC.eol().fill(GBC.HORIZONTAL));
@@ -112,5 +112,5 @@
 
     private JScrollPane createScrollPane(JosmTextArea area) {
-        area.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        area.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         area.setOpaque(false);
         JScrollPane sp = new JScrollPane(area);
Index: trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java	(revision 8510)
@@ -82,5 +82,5 @@
         //
         Iterator<OsmPrimitive> it = primitivesToShow.iterator();
-        while(it.hasNext()) {
+        while (it.hasNext()) {
             if (it.next().isNew()) {
                 it.remove();
Index: trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 8510)
@@ -43,5 +43,5 @@
      */
     public AddImageryLayerAction(ImageryInfo info) {
-        super(info.getMenuName(), /* ICON */"imagery_menu", tr("Add imagery layer {0}",info.getName()), null, false, false);
+        super(info.getMenuName(), /* ICON */"imagery_menu", tr("Add imagery layer {0}", info.getName()), null, false, false);
         putValue("toolbar", "imagery_" + info.getToolbarName());
         putValue("help", ht("/Preferences/Imagery"));
@@ -105,5 +105,5 @@
             formats.setToolTipText(tr("Select image format for WMS layer"));
 
-            if (1 != new ExtendedDialog(Main.parent, tr("Select WMS layers"), new String[]{tr("Add layers"), tr("Cancel")}) {{
+            if (1 != new ExtendedDialog(Main.parent, tr("Select WMS layers"), new String[]{tr("Add layers"), tr("Cancel")}) { {
                 final JScrollPane scrollPane = new JScrollPane(tree.getLayerTree());
                 scrollPane.setPreferredSize(new Dimension(400, 400));
@@ -112,5 +112,5 @@
                 panel.add(formats, GBC.eol().fill(GBC.HORIZONTAL));
                 setContent(panel);
-            }}.showDialog().getValue()) {
+            } }.showDialog().getValue()) {
                 return null;
             }
Index: trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 8510)
@@ -165,13 +165,13 @@
             List<Node> outside = new ArrayList<>();
 
-            for(Node n: nodes) {
+            for (Node n: nodes) {
                 boolean isInside = false;
-                for(Way w: ways) {
-                    if(w.getNodes().contains(n)) {
+                for (Way w: ways) {
+                    if (w.getNodes().contains(n)) {
                         isInside = true;
                         break;
                     }
                 }
-                if(isInside)
+                if (isInside)
                     inside.add(n);
                 else
@@ -179,10 +179,10 @@
             }
 
-            if(outside.size() == 1 && inside.isEmpty()) {
+            if (outside.size() == 1 && inside.isEmpty()) {
                 center = outside.get(0).getEastNorth();
-            } else if(outside.size() == 1 && inside.size() == 1) {
+            } else if (outside.size() == 1 && inside.size() == 1) {
                 center = outside.get(0).getEastNorth();
                 radius = distance(center, inside.get(0).getEastNorth());
-            } else if(inside.size() == 2 && outside.isEmpty()) {
+            } else if (inside.size() == 2 && outside.isEmpty()) {
                 // 2 nodes inside, define diameter
                 EastNorth en0 = inside.get(0).getEastNorth();
@@ -239,5 +239,5 @@
         }
 
-        if(!actionAllowed(nodes)) return;
+        if (!actionAllowed(nodes)) return;
 
         Collection<Command> cmds = new LinkedList<>();
@@ -248,27 +248,27 @@
         // Search first fixed node
         int startPosition = 0;
-        for(startPosition = 0; startPosition < nodeCount; startPosition++)
-            if(fixNodes.contains(nodes.get(startPosition % nodeCount))) break;
+        for (startPosition = 0; startPosition < nodeCount; startPosition++)
+            if (fixNodes.contains(nodes.get(startPosition % nodeCount))) break;
         int i = startPosition; // Start position for current arc
         int j; // End position for current arc
-        while(i < startPosition + nodeCount) {
-            for(j = i + 1; j < startPosition + nodeCount; j++)
-                if(fixNodes.contains(nodes.get(j % nodeCount))) break;
+        while (i < startPosition + nodeCount) {
+            for (j = i + 1; j < startPosition + nodeCount; j++)
+                if (fixNodes.contains(nodes.get(j % nodeCount))) break;
             Node first = nodes.get(i % nodeCount);
             PolarCoor pcFirst = new PolarCoor(first.getEastNorth(), center, 0);
             pcFirst.radius = radius;
             cmds.add(pcFirst.createMoveCommand(first));
-            if(j > i + 1) {
+            if (j > i + 1) {
                 double delta;
-                if(j == i + nodeCount) {
+                if (j == i + nodeCount) {
                     delta = 2 * Math.PI / nodeCount;
                 } else {
                     PolarCoor pcLast = new PolarCoor(nodes.get(j % nodeCount).getEastNorth(), center, 0);
                     delta = pcLast.angle - pcFirst.angle;
-                    if(delta < 0) // Assume each PolarCoor.angle is in range ]-pi; pi]
+                    if (delta < 0) // Assume each PolarCoor.angle is in range ]-pi; pi]
                         delta +=  2*Math.PI;
                     delta /= j - i;
                 }
-                for(int k = i+1; k < j; k++) {
+                for (int k = i+1; k < j; k++) {
                     PolarCoor p = new PolarCoor(radius, pcFirst.angle + (k-i)*delta, center, 0);
                     cmds.add(p.createMoveCommand(nodes.get(k % nodeCount)));
@@ -289,7 +289,7 @@
     private List<Node> collectNodesWithExternReferers(List<Way> ways) {
         List<Node> withReferrers = new ArrayList<>();
-        for(Way w: ways)
-            for(Node n: w.getNodes())
-                if(n.getReferrers().size() > 1)
+        for (Way w: ways)
+            for (Node n: w.getNodes())
+                if (n.getReferrers().size() > 1)
                     withReferrers.add(n);
         return withReferrers;
@@ -306,11 +306,11 @@
         Node lastNode = null;
         Way lastWay = null;
-        while(firstNode != lastNode) {
-            if(lastNode == null) lastNode = firstNode;
-            for(Way way: ways) {
-                if(way == lastWay) continue;
-                if(way.firstNode() == lastNode) {
+        while (firstNode != lastNode) {
+            if (lastNode == null) lastNode = firstNode;
+            for (Way way: ways) {
+                if (way == lastWay) continue;
+                if (way.firstNode() == lastNode) {
                     List<Node> wayNodes = way.getNodes();
-                    for(int i = 0; i < wayNodes.size() - 1; i++)
+                    for (int i = 0; i < wayNodes.size() - 1; i++)
                         nodes.add(wayNodes.get(i));
                     lastNode = way.lastNode();
@@ -318,7 +318,7 @@
                     break;
                 }
-                if(way.lastNode() == lastNode) {
+                if (way.lastNode() == lastNode) {
                     List<Node> wayNodes = way.getNodes();
-                    for(int i = wayNodes.size() - 1; i > 0; i--)
+                    for (int i = wayNodes.size() - 1; i > 0; i--)
                         nodes.add(wayNodes.get(i));
                     lastNode = way.firstNode();
@@ -331,10 +331,10 @@
         int nc = nodes.size();
         double area = 0;
-        for(int i = 0; i < nc; i++) {
+        for (int i = 0; i < nc; i++) {
             EastNorth p1 = nodes.get(i).getEastNorth();
             EastNorth p2 = nodes.get((i+1) % nc).getEastNorth();
             area += p1.east()*p2.north() - p2.east()*p1.north();
         }
-        if(area < 0)
+        if (area < 0)
             Collections.reverse(nodes);
         return nodes;
@@ -348,10 +348,10 @@
     private boolean actionAllowed(Collection<Node> nodes) {
         boolean outside = false;
-        for(Node n: nodes)
-            if(n.isOutsideDownloadArea()) {
+        for (Node n: nodes)
+            if (n.isOutsideDownloadArea()) {
                 outside = true;
                 break;
             }
-        if(outside)
+        if (outside)
             new Notification(
                     tr("One or more nodes involved in this action is outside of the downloaded area."))
Index: trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java	(revision 8510)
@@ -87,7 +87,7 @@
         // Get ways passing though all selected nodes.
         Set<Way> waysRef = null;
-        for(Node n: nodes) {
+        for (Node n: nodes) {
             Collection<Way> ref = OsmPrimitive.getFilteredList(n.getReferrers(), Way.class);
-            if(waysRef == null)
+            if (waysRef == null)
                 waysRef = new HashSet<>(ref);
             else
@@ -171,12 +171,12 @@
             // Decide what to align based on selection:
 
-            if(selectedNodes.isEmpty() && !selectedWays.isEmpty()) {
+            if (selectedNodes.isEmpty() && !selectedWays.isEmpty()) {
                 // Only ways selected -> For each way align their nodes taking care of intersection
                 cmd = alignMultiWay(selectedWays);
-            } else if(selectedNodes.size() == 1) {
+            } else if (selectedNodes.size() == 1) {
                 // Only 1 node selected -> align this node relative to referers way
                 Node selectedNode = selectedNodes.get(0);
                 List<Way> involvedWays = null;
-                if(selectedWays.isEmpty())
+                if (selectedWays.isEmpty())
                     // No selected way, all way containing this node are used
                     involvedWays = OsmPrimitive.getFilteredList(selectedNode.getReferrers(), Way.class);
@@ -185,8 +185,8 @@
                     involvedWays = selectedWays;
                 List<Line> lines = getInvolvedLines(selectedNode, involvedWays);
-                if(lines.size() > 2 || lines.isEmpty())
+                if (lines.size() > 2 || lines.isEmpty())
                     throw new InvalidSelection();
                 cmd = alignSingleNode(selectedNodes.get(0), lines);
-            } else if(selectedNodes.size() >= 3) {
+            } else if (selectedNodes.size() >= 3) {
                 // More than 3 nodes and way(s) selected -> align selected nodes. Don't care of way(s).
                 cmd = alignOnlyNodes(selectedNodes);
@@ -219,6 +219,6 @@
         Collection<Command> cmds = new ArrayList<>(nodes.size());
         Line line = new Line(anchors[0], anchors[1]);
-        for(Node node: nodes)
-            if(node != anchors[0] && node != anchors[1])
+        for (Node node: nodes)
+            if (node != anchors[0] && node != anchors[1])
                 cmds.add(line.projectionCommand(node));
         return new SequenceCommand(tr("Align Nodes in Line"), cmds);
@@ -271,36 +271,36 @@
         List<Line> lines = new ArrayList<>();
         List<Node> neighbors = new ArrayList<>();
-        for(Way way: refWays) {
+        for (Way way: refWays) {
             List<Node> nodes = way.getNodes();
             neighbors.clear();
-            for(int i = 1; i < nodes.size()-1; i++)
-                if(nodes.get(i) == node) {
+            for (int i = 1; i < nodes.size()-1; i++)
+                if (nodes.get(i) == node) {
                     neighbors.add(nodes.get(i-1));
                     neighbors.add(nodes.get(i+1));
                 }
-            if(neighbors.isEmpty())
+            if (neighbors.isEmpty())
                 continue;
-            else if(neighbors.size() == 2)
+            else if (neighbors.size() == 2)
                 // Non self crossing
                 lines.add(new Line(neighbors.get(0), neighbors.get(1)));
-            else if(neighbors.size() == 4) {
+            else if (neighbors.size() == 4) {
                 // Self crossing, have to make 2 lines with 4 neighbors
                 // see #9081 comment 6
                 EastNorth c = node.getEastNorth();
                 double[] angle = new double[4];
-                for(int i = 0; i < 4; i++) {
+                for (int i = 0; i < 4; i++) {
                     EastNorth p = neighbors.get(i).getEastNorth();
                     angle[i] = Math.atan2(p.north() - c.north(), p.east() - c.east());
                 }
                 double[] deltaAngle = new double[3];
-                for(int i = 0; i < 3; i++) {
+                for (int i = 0; i < 3; i++) {
                     deltaAngle[i] = angle[i+1] - angle[0];
-                    if(deltaAngle[i] < 0)
+                    if (deltaAngle[i] < 0)
                         deltaAngle[i] += 2*Math.PI;
                 }
                 int nb = 0;
-                if(deltaAngle[1] < deltaAngle[0]) nb++;
-                if(deltaAngle[2] < deltaAngle[0]) nb++;
-                if(nb == 1) {
+                if (deltaAngle[1] < deltaAngle[0]) nb++;
+                if (deltaAngle[2] < deltaAngle[0]) nb++;
+                if (nb == 1) {
                     // Align along [neighbors[0], neighbors[1]] and [neighbors[0], neighbors[2]]
                     lines.add(new Line(neighbors.get(0), neighbors.get(1)));
@@ -325,7 +325,7 @@
      */
     private Command alignSingleNode(Node node, List<Line> lines) throws InvalidSelection {
-        if(lines.size() == 1)
+        if (lines.size() == 1)
             return lines.get(0).projectionCommand(node);
-        else if(lines.size() == 2)
+        else if (lines.size() == 2)
             return lines.get(0).intersectionCommand(node,  lines.get(1));
         throw new InvalidSelection();
@@ -396,5 +396,5 @@
         public Command intersectionCommand(Node n, Line other) throws InvalidSelection {
             double d = this.a * other.b - other.a * this.b;
-            if(Math.abs(d) < 10e-6)
+            if (Math.abs(d) < 10e-6)
                 // parallels lines
                 throw new InvalidSelection(tr("Two parallels ways found. Abort."));
Index: trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 8510)
@@ -270,12 +270,12 @@
             }
             DataSet dataset = Main.main.getCurrentDataSet();
-            if(dataset != null) {
+            if (dataset != null) {
                 List<DataSource> dataSources = new ArrayList<>(dataset.getDataSources());
                 int s = dataSources.size();
-                if(s > 0) {
-                    if(lastZoomTime == -1 || lastZoomArea == -1 || lastZoomArea > s) {
+                if (s > 0) {
+                    if (lastZoomTime == -1 || lastZoomArea == -1 || lastZoomArea > s) {
                         lastZoomArea = s-1;
                         v.visit(dataSources.get(lastZoomArea).bounds);
-                    } else if(lastZoomArea > 0) {
+                    } else if (lastZoomArea > 0) {
                         lastZoomArea -= 1;
                         v.visit(dataSources.get(lastZoomArea).bounds);
Index: trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java	(revision 8510)
@@ -48,4 +48,5 @@
 
     }
+
     @Override
     public void actionPerformed(ActionEvent e) {
@@ -136,5 +137,5 @@
                         getProgressMonitor().createSubTaskMonitor(1, false /* not internal */)
                 );
-            } catch(Exception e) {
+            } catch (Exception e) {
                 if (canceled)
                     return;
Index: trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 8510)
@@ -220,5 +220,5 @@
         final Way selectedWay = combineResult.a;
         Main.main.undoRedo.add(combineResult.b);
-        if(selectedWay != null) {
+        if (selectedWay != null) {
             Runnable guiTask = new Runnable() {
                 @Override
@@ -272,5 +272,5 @@
          * @param pair An existing {@code Pair} of nodes
          */
-        public NodePair(Pair<Node,Node> pair) {
+        public NodePair(Pair<Node, Node> pair) {
             this(pair.a, pair.b);
         }
@@ -317,5 +317,5 @@
 
         public NodePair swap() {
-            return new NodePair(b,a);
+            return new NodePair(b, a);
         }
 
@@ -375,5 +375,5 @@
         public static List<NodePair> buildNodePairs(Way way, boolean directed) {
             List<NodePair> pairs = new ArrayList<>();
-            for (Pair<Node,Node> pair: way.getNodePairs(false /* don't sort */)) {
+            for (Pair<Node, Node> pair: way.getNodePairs(false /* don't sort */)) {
                 pairs.add(new NodePair(pair));
                 if (!directed) {
@@ -394,5 +394,5 @@
         public static List<NodePair> eliminateDuplicateNodePairs(List<NodePair> pairs) {
             List<NodePair> cleaned = new ArrayList<>();
-            for(NodePair p: pairs) {
+            for (NodePair p: pairs) {
                 if (!cleaned.contains(p) && !cleaned.contains(p.swap())) {
                     cleaned.add(p);
@@ -451,5 +451,5 @@
             NodeGraph graph = new NodeGraph();
             for (Way w: ways) {
-                if(!w.isNew()) {
+                if (!w.isNew()) {
                     /* let the first non-new way give the direction (see #5880) */
                     graph.add(buildNodePairs(w, dir));
@@ -540,5 +540,5 @@
             Set<Node> nodes = getNodes();
             for (Node n: nodes) {
-                if (successors.get(n) != null && successors.get(n).size() ==1)
+                if (successors.get(n) != null && successors.get(n).size() == 1)
                     return n;
             }
@@ -612,8 +612,8 @@
             Stack<NodePair> nextPairs  = new Stack<>();
             nextPairs.addAll(getOutboundPairs(startNode));
-            while(!nextPairs.isEmpty()) {
-                NodePair cur= nextPairs.pop();
+            while (!nextPairs.isEmpty()) {
+                NodePair cur = nextPairs.pop();
                 if (!path.contains(cur) && !path.contains(cur.swap())) {
-                    while(!path.isEmpty() && !path.peek().isPredecessorOf(cur)) {
+                    while (!path.isEmpty() && !path.peek().isPredecessorOf(cur)) {
                         path.pop();
                     }
Index: trunk/src/org/openstreetmap/josm/actions/CopyAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CopyAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/CopyAction.java	(revision 8510)
@@ -43,5 +43,5 @@
     @Override
     public void actionPerformed(ActionEvent e) {
-        if(isEmptySelection()) return;
+        if (isEmptySelection()) return;
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
 
Index: trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java	(revision 8510)
@@ -73,11 +73,11 @@
         double[] width = new double[angles.length];
         double[] remainder = new double[angles.length];
-        for(int i = 0; i < angles.length; i++) {
+        for (int i = 0; i < angles.length; i++) {
             width[i] = angles[(i+1) % angles.length].a - angles[i].a;
-            if(width[i] < 0)
+            if (width[i] < 0)
                 width[i] += 2*Math.PI;
         }
         int assign = 0;
-        for(int i = 0; i < angles.length; i++) {
+        for (int i = 0; i < angles.length; i++) {
             double part = width[i] / 2.0 / Math.PI * nodesCount;
             count[i] = (int) Math.floor(part);
@@ -85,8 +85,8 @@
             assign += count[i];
         }
-        while(assign < nodesCount) {
+        while (assign < nodesCount) {
             int imax = 0;
-            for(int i = 1; i < angles.length; i++)
-                if(remainder[i] > remainder[imax])
+            for (int i = 1; i < angles.length; i++)
+                if (remainder[i] > remainder[imax])
                     imax = i;
             count[imax]++;
@@ -116,4 +116,5 @@
     private static class PolarNodeComparator implements Comparator<PolarNode>, Serializable {
         private static final long serialVersionUID = 1L;
+
         @Override
         public int compare(PolarNode pc1, PolarNode pc2) {
@@ -145,5 +146,5 @@
             existingWay = ways.get(0);
             for (Node n : existingWay.getNodes()) {
-                if(!nodes.contains(n)) {
+                if (!nodes.contains(n)) {
                     nodes.add(n);
                 }
@@ -188,10 +189,10 @@
         // calculate the radius (r)
         EastNorth n1 = nodes.get(0).getEastNorth();
-        double r = Math.sqrt(Math.pow(center.east()-n1.east(),2) +
-                Math.pow(center.north()-n1.north(),2));
+        double r = Math.sqrt(Math.pow(center.east()-n1.east(), 2) +
+                Math.pow(center.north()-n1.north(), 2));
 
         // Order nodes by angle
         PolarNode[] angles = new PolarNode[nodes.size()];
-        for(int i = 0; i < nodes.size(); i++) {
+        for (int i = 0; i < nodes.size(); i++) {
             angles[i] = new PolarNode(center, nodes.get(i));
         }
@@ -202,14 +203,14 @@
         // build a way for the circle
         List<Node> nodesToAdd = new ArrayList<>();
-        for(int i = 0; i < nodes.size(); i++) {
+        for (int i = 0; i < nodes.size(); i++) {
             nodesToAdd.add(angles[i].node);
             double delta = angles[(i+1) % nodes.size()].a - angles[i].a;
-            if(delta < 0)
+            if (delta < 0)
                 delta += 2*Math.PI;
-            for(int j = 0; j < count[i]; j++) {
+            for (int j = 0; j < count[i]; j++) {
                 double alpha = angles[i].a + (j+1)*delta/(count[i]+1);
                 double x = center.east() + r*Math.cos(alpha);
                 double y = center.north() + r*Math.sin(alpha);
-                LatLon ll = Main.getProjection().eastNorth2latlon(new EastNorth(x,y));
+                LatLon ll = Main.getProjection().eastNorth2latlon(new EastNorth(x, y));
                 if (ll.isOutSideWorld()) {
                     notifyNodesNotOnCircle();
Index: trunk/src/org/openstreetmap/josm/actions/DialogsToggleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/DialogsToggleAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/DialogsToggleAction.java	(revision 8510)
@@ -26,5 +26,5 @@
               (ImageProvider) null, /* no icon */
               tr("Toggle dialogs panel, maximize mapview"),
-              Shortcut.registerShortcut("menu:view:dialogspanel", tr("Toggle dialogs panel"),KeyEvent.VK_TAB, Shortcut.DIRECT),
+              Shortcut.registerShortcut("menu:view:dialogspanel", tr("Toggle dialogs panel"), KeyEvent.VK_TAB, Shortcut.DIRECT),
               true, "dialogspanel", /* register in toolbar */
               false
Index: trunk/src/org/openstreetmap/josm/actions/DistributeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/DistributeAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/DistributeAction.java	(revision 8510)
@@ -66,8 +66,8 @@
         Collection<Way> ways = new LinkedList<>();
         Collection<Node> nodes = new HashSet<>();
-        for(OsmPrimitive osm : selected) {
-            if(osm instanceof Node) {
+        for (OsmPrimitive osm : selected) {
+            if (osm instanceof Node) {
                 nodes.add((Node) osm);
-            } else if(osm instanceof Way) {
+            } else if (osm instanceof Way) {
                 ways.add((Way) osm);
             }
@@ -82,7 +82,7 @@
         // Switch between algorithms
         Collection<Command> cmds;
-        if(checkDistributeWay(ways, nodes)) {
+        if (checkDistributeWay(ways, nodes)) {
             cmds = distributeWay(ways, nodes);
-        } else if(checkDistributeNodes(ways, nodes)) {
+        } else if (checkDistributeNodes(ways, nodes)) {
             cmds = distributeNodes(nodes);
         } else {
@@ -97,5 +97,5 @@
         }
 
-        if(cmds.isEmpty()) {
+        if (cmds.isEmpty()) {
             return;
         }
@@ -113,13 +113,13 @@
      */
     private boolean checkDistributeWay(Collection<Way> ways, Collection<Node> nodes) {
-        if(ways.size() == 1 && nodes.size() <= 2) {
+        if (ways.size() == 1 && nodes.size() <= 2) {
             Way w = ways.iterator().next();
             Set<Node> unduplicated = new HashSet<>(w.getNodes());
-            if(unduplicated.size() != w.getNodesCount()) {
+            if (unduplicated.size() != w.getNodesCount()) {
                 // No self crossing way
                 return false;
             }
-            for(Node node: nodes) {
-                if(!w.containsNode(node)) {
+            for (Node node: nodes) {
+                if (!w.containsNode(node)) {
                     return false;
                 }
@@ -142,5 +142,5 @@
         Collection<Command> cmds = new LinkedList<>();
 
-        if(w.getNodesCount() == nodes.size() || w.getNodesCount() <= 2) {
+        if (w.getNodesCount() == nodes.size() || w.getNodesCount() <= 2) {
             // Nothing to do
             return cmds;
@@ -149,5 +149,5 @@
         double xa, ya; // Start point
         double dx, dy; // Segment increment
-        if(nodes.isEmpty()) {
+        if (nodes.isEmpty()) {
             Node na = w.firstNode();
             nodes.add(na);
@@ -158,5 +158,5 @@
             dx = (nb.getEastNorth().east() - xa) / (w.getNodesCount() - 1);
             dy = (nb.getEastNorth().north() - ya) / (w.getNodesCount() - 1);
-        } else if(nodes.size() == 1) {
+        } else if (nodes.size() == 1) {
             Node n = nodes.iterator().next();
             int nIdx = w.getNodes().indexOf(n);
@@ -182,5 +182,5 @@
         }
 
-        for(int i = 0; i < w.getNodesCount(); i++) {
+        for (int i = 0; i < w.getNodesCount(); i++) {
             Node n = w.getNode(i);
             if (!n.isLatLonKnown() || nodes.contains(n)) {
Index: trunk/src/org/openstreetmap/josm/actions/DownloadAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/DownloadAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/DownloadAction.java	(revision 8510)
@@ -52,5 +52,5 @@
             if (dialog.isDownloadGpxData()) {
                 DownloadGpsTask task = new DownloadGpsTask();
-                Future<?> future = task.download(dialog.isNewLayerRequired(),area, null);
+                Future<?> future = task.download(dialog.isNewLayerRequired(), area, null);
                 Main.worker.submit(new PostDownloadHandler(task, future));
             }
Index: trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java	(revision 8510)
@@ -57,5 +57,5 @@
             public void run() {
                 final List<PrimitiveId> downloaded = task.getDownloadedId();
-                if(downloaded != null) {
+                if (downloaded != null) {
                     GuiHelper.runInEDT(new Runnable() {
                         @Override
Index: trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java	(revision 8510)
@@ -90,5 +90,5 @@
             return;
         Collection<OsmPrimitive> primitives = layer.data.getSelected();
-        downloadReferrers(layer,primitives);
+        downloadReferrers(layer, primitives);
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 8510)
@@ -104,5 +104,5 @@
         for (String classname : exporterNames) {
             try {
-                FileExporter exporter = (FileExporter)Class.forName(classname).newInstance();
+                FileExporter exporter = (FileExporter) Class.forName(classname).newInstance();
                 exporters.add(exporter);
                 MapView.addLayerChangeListener(exporter);
@@ -148,6 +148,6 @@
      */
     public static void updateAllFormatsImporter() {
-        for(int i=0; i < importers.size(); i++) {
-            if(importers.get(i) instanceof AllFormatsImporter) {
+        for (int i = 0; i < importers.size(); i++) {
+            if (importers.get(i) instanceof AllFormatsImporter) {
                 importers.set(i, new AllFormatsImporter());
             }
Index: trunk/src/org/openstreetmap/josm/actions/FullscreenToggleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/FullscreenToggleAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/FullscreenToggleAction.java	(revision 8510)
@@ -38,5 +38,5 @@
               null, /* no icon */
               tr("Toggle fullscreen view"),
-              Shortcut.registerShortcut("menu:view:fullscreen", tr("Toggle fullscreen view"),KeyEvent.VK_F11, Shortcut.DIRECT),
+              Shortcut.registerShortcut("menu:view:fullscreen", tr("Toggle fullscreen view"), KeyEvent.VK_F11, Shortcut.DIRECT),
               false /* register */
         );
Index: trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java	(revision 8510)
@@ -43,5 +43,5 @@
      */
     protected Layer getLayer() {
-        if(!Main.isDisplayingMapView())
+        if (!Main.isDisplayingMapView())
             return null;
         Layer layer = Main.map.mapView.getActiveLayer();
Index: trunk/src/org/openstreetmap/josm/actions/HelpAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/HelpAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/HelpAction.java	(revision 8510)
@@ -38,5 +38,5 @@
             String topic;
             if (e.getSource() instanceof Component) {
-                Component c = SwingUtilities.getRoot((Component)e.getSource());
+                Component c = SwingUtilities.getRoot((Component) e.getSource());
                 Point mouse = c.getMousePosition();
                 if (mouse != null) {
Index: trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 8510)
@@ -119,5 +119,5 @@
             return;
         }
-        KeyEvent kev = (KeyEvent)event;
+        KeyEvent kev = (KeyEvent) event;
         int dx = 0, dy = 0;
         switch (kev.getKeyCode()) {
@@ -148,5 +148,5 @@
         if (layer.isVisible()) {
             requestFocusInMapView();
-            prevEastNorth=Main.map.mapView.getEastNorth(e.getX(),e.getY());
+            prevEastNorth = Main.map.mapView.getEastNorth(e.getX(), e.getY());
             Main.map.mapView.setNewCursor(Cursor.MOVE_CURSOR, this);
         }
@@ -157,5 +157,5 @@
         if (layer == null || prevEastNorth == null) return;
         EastNorth eastNorth =
-            Main.map.mapView.getEastNorth(e.getX(),e.getY());
+            Main.map.mapView.getEastNorth(e.getX(), e.getY());
         double dx = layer.getDx()+eastNorth.east()-prevEastNorth.east();
         double dy = layer.getDy()+eastNorth.north()-prevEastNorth.north();
@@ -194,5 +194,5 @@
             super(Main.parent,
                     tr("Adjust imagery offset"),
-                    new String[] {tr("OK"),tr("Cancel")},
+                    new String[] {tr("OK"), tr("Cancel")},
                     false);
             setButtonIcons(new String[] {"ok", "cancel"});
@@ -203,8 +203,8 @@
                     "If you want to save the offset as bookmark, enter the bookmark name below",
                     Main.getProjection().toString())), GBC.eop());
-            pnl.add(new JLabel(tr("Offset: ")),GBC.std());
-            pnl.add(tOffset,GBC.eol().fill(GBC.HORIZONTAL).insets(0,0,0,5));
-            pnl.add(new JLabel(tr("Bookmark name: ")),GBC.std());
-            pnl.add(tBookmarkName,GBC.eol().fill(GBC.HORIZONTAL));
+            pnl.add(new JLabel(tr("Offset: ")), GBC.std());
+            pnl.add(tOffset, GBC.eol().fill(GBC.HORIZONTAL).insets(0, 0, 0, 5));
+            pnl.add(new JLabel(tr("Bookmark name: ")), GBC.std());
+            pnl.add(tBookmarkName, GBC.eol().fill(GBC.HORIZONTAL));
             tOffset.setColumns(16);
             updateOffsetIntl();
@@ -269,7 +269,7 @@
                     tr("Overwrite"),
                     new String[] {tr("Overwrite"), tr("Cancel")}
-            ) {{
+            ) { {
                 contentInsets = new Insets(10, 15, 10, 15);
-            }};
+            } };
             dialog.setContent(tr("Offset bookmark already exists. Overwrite?"));
             dialog.setButtonIcons(new String[] {"ok.png", "cancel.png"});
Index: trunk/src/org/openstreetmap/josm/actions/InfoWebAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/InfoWebAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/InfoWebAction.java	(revision 8510)
@@ -35,8 +35,8 @@
     protected String createInfoUrl(Object infoObject) {
         if (infoObject instanceof OsmPrimitive) {
-            OsmPrimitive primitive = (OsmPrimitive)infoObject;
+            OsmPrimitive primitive = (OsmPrimitive) infoObject;
             return Main.getBaseBrowseUrl() + "/" + OsmPrimitiveType.from(primitive).getAPIName() + "/" + primitive.getId();
         } else if (infoObject instanceof Note) {
-            Note note = (Note)infoObject;
+            Note note = (Note) infoObject;
             return Main.getBaseBrowseUrl() + "/note/" + note.getId();
         } else {
Index: trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 8510)
@@ -84,4 +84,5 @@
         public final Relation rel;
         public final String role;
+
         public RelationRole(Relation rel, String role) {
             this.rel = rel;
@@ -101,5 +102,4 @@
         }
     }
-
 
     /**
@@ -165,5 +165,5 @@
          */
         public void reverse() {
-            for(WayInPolygon way: ways)
+            for (WayInPolygon way: ways)
                 way.insideToTheRight = !way.insideToTheRight;
             Collections.reverse(ways);
@@ -266,7 +266,7 @@
             double angle = Math.atan2(en3.getY() - en1.getY(), en3.getX() - en1.getX()) -
                     Math.atan2(en2.getY() - en1.getY(), en2.getX() - en1.getX());
-            while(angle >= 2*Math.PI)
+            while (angle >= 2*Math.PI)
                 angle -= 2*Math.PI;
-            while(angle < 0)
+            while (angle < 0)
                 angle += 2*Math.PI;
             return angle;
@@ -301,5 +301,5 @@
                 }
 
-                if(nextNode == prevNode) {
+                if (nextNode == prevNode) {
                     // go back
                     lastWay = way;
@@ -310,7 +310,7 @@
                 double angle = Math.atan2(nextNode.getEastNorth().east() - headNode.getEastNorth().east(),
                         nextNode.getEastNorth().north() - headNode.getEastNorth().north()) - headAngle;
-                if(angle > Math.PI)
+                if (angle > Math.PI)
                     angle -= 2*Math.PI;
-                if(angle <= -Math.PI)
+                if (angle <= -Math.PI)
                     angle += 2*Math.PI;
 
@@ -345,18 +345,18 @@
                 Node candidatePrevNode;
 
-                if(candidateWay.way.firstNode().equals(headNode)) {
+                if (candidateWay.way.firstNode().equals(headNode)) {
                     candidateComingToHead = !candidateWay.insideToTheRight;
                     candidatePrevNode = candidateWay.way.getNode(1);
-                } else if(candidateWay.way.lastNode().equals(headNode)) {
+                } else if (candidateWay.way.lastNode().equals(headNode)) {
                      candidateComingToHead = candidateWay.insideToTheRight;
                      candidatePrevNode = candidateWay.way.getNode(candidateWay.way.getNodesCount() - 2);
                 } else
                     continue;
-                if(candidateWay.equals(lastWay) && candidateComingToHead)
+                if (candidateWay.equals(lastWay) && candidateComingToHead)
                     continue;
 
                 double candidateAngle = getAngle(headNode, candidatePrevNode, prevNode);
 
-                if(mostLeft == null || candidateAngle < angle || (Utils.equalsEpsilon(candidateAngle, angle) && !candidateComingToHead)) {
+                if (mostLeft == null || candidateAngle < angle || (Utils.equalsEpsilon(candidateAngle, angle) && !candidateComingToHead)) {
                     // Candidate is most left
                     mostLeft = candidateWay;
@@ -441,5 +441,5 @@
                 tr("The selected area is incomplete. Continue?"),
                 allNodes, null);
-        if(!ok) return;
+        if (!ok) return;
 
         //analyze multipolygon relations and collect all areas
@@ -614,5 +614,5 @@
         commitCommands(marktr("Assemble new polygons"));
 
-        for(Relation rel: relationsToDelete) {
+        for (Relation rel: relationsToDelete) {
             cmds.add(new DeleteCommand(rel));
         }
@@ -725,5 +725,5 @@
                 }
 
-                Way newWay=new Way(way);
+                Way newWay = new Way(way);
                 newWay.setNodes(newNodes);
                 cmds.add(new ChangeCommand(way, newWay));
@@ -1080,12 +1080,12 @@
 
         WayInPolygon startWay;
-        while((startWay = traverser.startNewWay()) != null) {
+        while ((startWay = traverser.startNewWay()) != null) {
             List<WayInPolygon> path = new ArrayList<>();
             List<WayInPolygon> startWays = new ArrayList<>();
             path.add(startWay);
-            while(true) {
+            while (true) {
                 WayInPolygon leftComing;
-                while((leftComing = traverser.leftComingWay()) != null) {
-                    if(startWays.contains(leftComing))
+                while ((leftComing = traverser.leftComingWay()) != null) {
+                    if (startWays.contains(leftComing))
                         break;
                     // Need restart traverser walk
@@ -1097,13 +1097,13 @@
                 }
                 WayInPolygon nextWay = traverser.walk();
-                if(nextWay == null)
+                if (nextWay == null)
                     throw new RuntimeException("Join areas internal error.");
-                if(path.get(0) == nextWay) {
+                if (path.get(0) == nextWay) {
                     // path is closed -> stop here
                     AssembledPolygon ring = new AssembledPolygon(path);
-                    if(ring.getNodes().size() <= 2) {
+                    if (ring.getNodes().size() <= 2) {
                         // Invalid ring (2 nodes) -> remove
                         traverser.removeWays(path);
-                        for(WayInPolygon way: path)
+                        for (WayInPolygon way: path)
                             discardedResult.add(way.way);
                     } else {
@@ -1114,8 +1114,8 @@
                     break;
                 }
-                if(path.contains(nextWay)) {
+                if (path.contains(nextWay)) {
                     // Inner loop -> remove
                     int index = path.indexOf(nextWay);
-                    while(path.size() > index) {
+                    while (path.size() > index) {
                         WayInPolygon currentWay = path.get(index);
                         discardedResult.add(currentWay.way);
@@ -1145,10 +1145,10 @@
             WayInPolygon startWay;
 
-            while((startWay = traverser.startNewWay()) != null) {
+            while ((startWay = traverser.startNewWay()) != null) {
                 List<WayInPolygon> simpleRingWays = new ArrayList<>();
                 simpleRingWays.add(startWay);
                 WayInPolygon nextWay;
-                while((nextWay = traverser.walk()) != startWay) {
-                    if(nextWay == null)
+                while ((nextWay = traverser.walk()) != startWay) {
+                    if (nextWay == null)
                         throw new RuntimeException("Join areas internal error.");
                     simpleRingWays.add(nextWay);
@@ -1233,5 +1233,5 @@
      * @return The newly created way
      */
-    private Way joinOrientedWays(List<WayInPolygon> ways) throws UserCancelException{
+    private Way joinOrientedWays(List<WayInPolygon> ways) throws UserCancelException {
         if (ways.size() < 2)
             return ways.get(0).way;
Index: trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java	(revision 8510)
@@ -183,4 +183,5 @@
         private EastNorth refPoint2;
         private final boolean projectToSegment;
+
         NodeDistanceToRefNodeComparator(Node referenceNode, Node referenceNode2, boolean projectFirst) {
             refPoint = referenceNode.getEastNorth();
@@ -188,4 +189,5 @@
             projectToSegment = projectFirst;
         }
+
         @Override
         public int compare(Node first, Node second) {
Index: trunk/src/org/openstreetmap/josm/actions/JosmAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 8510)
@@ -76,5 +76,5 @@
             String toolbarId, boolean installAdapters) {
         super(name);
-        if(icon != null)
+        if (icon != null)
             icon.getResource().getImageIcon(this);
         setHelpId();
@@ -282,4 +282,5 @@
             });
         }
+
         @Override
         public void activeLayerChange(Layer oldLayer, Layer newLayer) {
Index: trunk/src/org/openstreetmap/josm/actions/JumpToAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JumpToAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/JumpToAction.java	(revision 8510)
@@ -50,13 +50,23 @@
 
     class OsmURLListener implements DocumentListener {
-        @Override public void changedUpdate(DocumentEvent e) { parseURL(); }
-        @Override public void insertUpdate(DocumentEvent e) { parseURL(); }
-        @Override public void removeUpdate(DocumentEvent e) { parseURL(); }
+        @Override
+        public void changedUpdate(DocumentEvent e) { parseURL(); }
+
+        @Override
+        public void insertUpdate(DocumentEvent e) { parseURL(); }
+
+        @Override
+        public void removeUpdate(DocumentEvent e) { parseURL(); }
     }
 
     class OsmLonLatListener implements DocumentListener {
-        @Override public void changedUpdate(DocumentEvent e) { updateUrl(false); }
-        @Override public void insertUpdate(DocumentEvent e) { updateUrl(false); }
-        @Override public void removeUpdate(DocumentEvent e) { updateUrl(false); }
+        @Override
+        public void changedUpdate(DocumentEvent e) { updateUrl(false); }
+
+        @Override
+        public void insertUpdate(DocumentEvent e) { updateUrl(false); }
+
+        @Override
+        public void removeUpdate(DocumentEvent e) { updateUrl(false); }
     }
 
@@ -112,5 +122,5 @@
         LatLon ll = null;
         double zoomLvl = 100;
-        while(ll == null) {
+        while (ll == null) {
             int option = JOptionPane.showOptionDialog(
                             Main.parent,
@@ -166,5 +176,5 @@
 
     private void updateUrl(boolean force) {
-        if(!lat.hasFocus() && !lon.hasFocus() && !zm.hasFocus() && !force) return;
+        if (!lat.hasFocus() && !lon.hasFocus() && !zm.hasFocus() && !force) return;
         try {
             double dlat = Double.parseDouble(lat.getText());
@@ -172,9 +182,8 @@
             double m = Double.parseDouble(zm.getText());
             // Inverse function to the one above. 18 is the current maximum zoom
-            // available on standard renderers, so choose this is in case m
-            // should be zero
+            // available on standard renderers, so choose this is in case m should be zero
             int zoomLvl = 18;
-            if(m > 0)
-                zoomLvl = (int)Math.round((-1) * Math.log(m/10000000)/Math.log(2));
+            if (m > 0)
+                zoomLvl = (int) Math.round((-1) * Math.log(m/10000000)/Math.log(2));
 
             url.setText(OsmUrlToBounds.getURL(dlat, dlon, zoomLvl));
Index: trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/MapRectifierWMSmenuAction.java	(revision 8510)
@@ -129,7 +129,7 @@
 
         JRadioButton firstBtn = null;
-        for(RectifierService s : services) {
+        for (RectifierService s : services) {
             JRadioButton serviceBtn = new JRadioButton(s.name);
-            if(firstBtn == null) {
+            if (firstBtn == null) {
                 firstBtn = serviceBtn;
             }
@@ -137,5 +137,5 @@
             // If the contents match, they will be inserted into the text field and the corresponding
             // service will be pre-selected.
-            if(!clip.isEmpty() && tfWmsUrl.getText().isEmpty()
+            if (!clip.isEmpty() && tfWmsUrl.getText().isEmpty()
                     && (s.urlRegEx.matcher(clip).find() || s.idValidator.matcher(clip).matches())) {
                 serviceBtn.setSelected(true);
@@ -144,5 +144,5 @@
             s.btn = serviceBtn;
             group.add(serviceBtn);
-            if(!s.url.isEmpty()) {
+            if (!s.url.isEmpty()) {
                 panel.add(serviceBtn, GBC.std());
                 panel.add(new UrlLabel(s.url, tr("Visit Homepage")), GBC.eol().anchor(GridBagConstraints.EAST));
@@ -153,5 +153,5 @@
 
         // Fallback in case no match was found
-        if(tfWmsUrl.getText().isEmpty() && firstBtn != null) {
+        if (tfWmsUrl.getText().isEmpty() && firstBtn != null) {
             firstBtn.setSelected(true);
         }
@@ -169,9 +169,9 @@
         // This repeatedly shows the dialog in case there has been an error.
         // The loop is break;-ed if the users cancels
-        outer: while(true) {
+        outer: while (true) {
             diag.showDialog();
             int answer = diag.getValue();
             // Break loop when the user cancels
-            if(answer != 1) {
+            if (answer != 1) {
                 break;
             }
@@ -179,6 +179,6 @@
             String text = tfWmsUrl.getText().trim();
             // Loop all services until we find the selected one
-            for(RectifierService s : services) {
-                if(!s.isSelected()) {
+            for (RectifierService s : services) {
+                if (!s.isSelected()) {
                     continue;
                 }
@@ -186,5 +186,5 @@
                 // We've reached the custom WMS URL service
                 // Just set the URL and hope everything works out
-                if(s.wmsUrl.isEmpty()) {
+                if (s.wmsUrl.isEmpty()) {
                     try {
                         addWMSLayer(s.name + " (" + text + ")", text);
@@ -197,5 +197,5 @@
                 // First try to match if the entered string as an URL
                 Matcher m = s.urlRegEx.matcher(text);
-                if(m.find()) {
+                if (m.find()) {
                     String id = m.group(1);
                     String newURL = s.wmsUrl.replaceAll("__s__", id);
@@ -205,5 +205,5 @@
                 }
                 // If not, look if it's a valid ID for the selected service
-                if(s.idValidator.matcher(text).matches()) {
+                if (s.idValidator.matcher(text).matches()) {
                     String newURL = s.wmsUrl.replaceAll("__s__", text);
                     String title = s.name + " (" + text + ")";
@@ -217,5 +217,5 @@
             }
 
-            // and display an error message. The while(true) ensures that the dialog pops up again
+            // and display an error message. The while (true) ensures that the dialog pops up again
             JOptionPane.showMessageDialog(Main.parent,
                     tr("Couldn''t match the entered link or id to the selected service. Please try again."),
Index: trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java	(revision 8510)
@@ -48,5 +48,5 @@
                     if (sourceLayer != null && !sourceLayer.equals(targetLayer)) {
                         if (sourceLayer instanceof OsmDataLayer && targetLayer instanceof OsmDataLayer
-                                && ((OsmDataLayer)sourceLayer).isUploadDiscouraged() != ((OsmDataLayer)targetLayer).isUploadDiscouraged()) {
+                                && ((OsmDataLayer) sourceLayer).isUploadDiscouraged() != ((OsmDataLayer) targetLayer).isUploadDiscouraged()) {
                             if (warnMergingUploadDiscouragedLayers(sourceLayer, targetLayer)) {
                                 break;
Index: trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 8510)
@@ -236,5 +236,5 @@
                     return null;
                 }
-            } else if(newNodes.size() < 2 && w.getReferrers().isEmpty()) {
+            } else if (newNodes.size() < 2 && w.getReferrers().isEmpty()) {
                 waysToDelete.add(w);
             } else {
Index: trunk/src/org/openstreetmap/josm/actions/MergeSelectionAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MergeSelectionAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/MergeSelectionAction.java	(revision 8510)
@@ -50,5 +50,5 @@
             return;
         if (getEditLayer().isUploadDiscouraged() && targetLayer instanceof OsmDataLayer
-                && !((OsmDataLayer)targetLayer).isUploadDiscouraged()
+                && !((OsmDataLayer) targetLayer).isUploadDiscouraged()
                 && getEditLayer().data.getAllSelected().size() > 1
                 && warnMergingUploadDiscouragedObjects(targetLayer)) {
@@ -56,5 +56,5 @@
         }
         MergeSourceBuildingVisitor builder = new MergeSourceBuildingVisitor(getEditLayer().data);
-        ((OsmDataLayer)targetLayer).mergeFrom(builder.build());
+        ((OsmDataLayer) targetLayer).mergeFrom(builder.build());
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/MirrorAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MirrorAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/MirrorAction.java	(revision 8510)
@@ -50,7 +50,7 @@
         for (OsmPrimitive osm : sel) {
             if (osm instanceof Node) {
-                nodes.add((Node)osm);
+                nodes.add((Node) osm);
             } else if (osm instanceof Way) {
-                nodes.addAll(((Way)osm).getNodes());
+                nodes.addAll(((Way) osm).getNodes());
             }
         }
Index: trunk/src/org/openstreetmap/josm/actions/MoveAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MoveAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/MoveAction.java	(revision 8510)
@@ -121,6 +121,6 @@
 
         getCurrentDataSet().beginUpdate();
-        if (c instanceof MoveCommand && affectedNodes.equals(((MoveCommand)c).getParticipatingPrimitives())) {
-            ((MoveCommand)c).moveAgain(distx, disty);
+        if (c instanceof MoveCommand && affectedNodes.equals(((MoveCommand) c).getParticipatingPrimitives())) {
+            ((MoveCommand) c).moveAgain(distx, disty);
         } else {
             c = new MoveCommand(selection, distx, disty);
Index: trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java	(revision 8510)
@@ -218,5 +218,6 @@
         final JList<DownloadTask> list = new JList<>(tasks.toArray(new DownloadTask[tasks.size()]));
         list.addSelectionInterval(0, tasks.size() - 1);
-        final ExtendedDialog dialog = new ExtendedDialog(Main.parent, tr("Which tasks to perform?"), new String[]{tr("Ok"), tr("Cancel")}, true) {{
+        final ExtendedDialog dialog = new ExtendedDialog(Main.parent,
+                tr("Which tasks to perform?"), new String[]{tr("Ok"), tr("Cancel")}, true) { {
             setButtonIcons(new String[]{"ok", "cancel"});
             final JPanel pane = new JPanel(new GridLayout(2, 1));
@@ -224,5 +225,5 @@
             pane.add(list);
             setContent(pane);
-        }};
+        } };
         dialog.showDialog();
         return dialog.getValue() == 1 ? list.getSelectedValuesList() : Collections.<DownloadTask>emptyList();
Index: trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 8510)
@@ -93,4 +93,5 @@
                     true, "action/orthogonalize/undo", true);
         }
+
         @Override
         public void actionPerformed(ActionEvent e) {
@@ -101,5 +102,5 @@
             try {
                 for (OsmPrimitive p : sel) {
-                    if (!(p instanceof Node)) throw new InvalidUserInputException();
+                    if (!(p instanceof Node)) throw new InvalidUserInputException("selected object is not a node");
                     Node n = (Node) p;
                     if (rememberMovements.containsKey(n)) {
@@ -112,5 +113,7 @@
                     Main.main.undoRedo.add(new SequenceCommand(tr("Orthogonalize / Undo"), commands));
                     Main.map.repaint();
-                } else throw new InvalidUserInputException();
+                } else {
+                    throw new InvalidUserInputException("Commands are empty");
+                }
             } catch (InvalidUserInputException ex) {
                 new Notification(
@@ -308,5 +311,5 @@
         final Direction[] VERTICAL = {Direction.UP, Direction.DOWN};
         final Direction[][] ORIENTATIONS = {HORIZONTAL, VERTICAL};
-        for (Direction[] orientation : ORIENTATIONS){
+        for (Direction[] orientation : ORIENTATIONS) {
             final Set<Node> s = new HashSet<>(allNodes);
             int s_size = s.size();
@@ -324,5 +327,5 @@
                     somethingHappened = false;
                     for (WayData w : wayDataList) {
-                        for (int i=0; i < w.nSeg; ++i) {
+                        for (int i = 0; i < w.nSeg; ++i) {
                             Node n1 = w.way.getNodes().get(i);
                             Node n2 = w.way.getNodes().get(i+1);
@@ -407,4 +410,5 @@
         // segments turned by 90 degrees
         public double heading;            // heading of segSum == approximate heading of the way
+
         public WayData(Way pWay) {
             way = pWay;
@@ -423,5 +427,5 @@
         public void calcDirections(Direction pInitialDirection) throws InvalidUserInputException {
             final EastNorth[] en = new EastNorth[nNode]; // alias: way.getNodes().get(i).getEastNorth() ---> en[i]
-            for (int i=0; i < nNode; i++) {
+            for (int i = 0; i < nNode; i++) {
                 en[i] = new EastNorth(way.getNodes().get(i).getEastNorth().east(), way.getNodes().get(i).getEastNorth().north());
             }
@@ -429,7 +433,7 @@
             Direction direction = pInitialDirection;
             segDirections[0] = direction;
-            for (int i=0; i < nSeg - 1; i++) {
-                double h1 = EN.polar(en[i],en[i+1]);
-                double h2 = EN.polar(en[i+1],en[i+2]);
+            for (int i = 0; i < nSeg - 1; i++) {
+                double h1 = EN.polar(en[i], en[i+1]);
+                double h2 = EN.polar(en[i+1], en[i+2]);
                 try {
                     direction = direction.changeBy(angleToDirectionChange(h2 - h1, TOLERANCE1));
@@ -441,16 +445,16 @@
 
             // sum up segments
-            EastNorth h = new EastNorth(0.,0.);
-            EastNorth v = new EastNorth(0.,0.);
+            EastNorth h = new EastNorth(0., 0.);
+            EastNorth v = new EastNorth(0., 0.);
             for (int i = 0; i < nSeg; ++i) {
                 EastNorth segment = EN.diff(en[i+1], en[i]);
                 if      (segDirections[i] == Direction.RIGHT) {
-                    h = EN.sum(h,segment);
+                    h = EN.sum(h, segment);
                 } else if (segDirections[i] == Direction.UP) {
-                    v = EN.sum(v,segment);
+                    v = EN.sum(v, segment);
                 } else if (segDirections[i] == Direction.LEFT) {
-                    h = EN.diff(h,segment);
+                    h = EN.diff(h, segment);
                 } else if (segDirections[i] == Direction.DOWN) {
-                    v = EN.diff(v,segment);
+                    v = EN.diff(v, segment);
                 } else throw new IllegalStateException();
                 /**
@@ -470,5 +474,5 @@
             segSum = EN.sum(h, new EastNorth(v.north(), -v.east()));
             //            if (EN.abs(segSum) < lh) throw new AssertionError();
-            this.heading = EN.polar(new EastNorth(0.,0.), segSum);
+            this.heading = EN.polar(new EastNorth(0., 0.), segSum);
         }
     }
@@ -518,4 +522,5 @@
             // Hide implicit public constructor for utility class
         }
+
         /**
          * Rotate counter-clock-wise.
@@ -530,10 +535,13 @@
             return new EastNorth(nx, ny);
         }
+
         public static EastNorth sum(EastNorth en1, EastNorth en2) {
             return new EastNorth(en1.east() + en2.east(), en1.north() + en2.north());
         }
+
         public static EastNorth diff(EastNorth en1, EastNorth en2) {
             return new EastNorth(en1.east() - en2.east(), en1.north() - en2.north());
         }
+
         public static double polar(EastNorth en1, EastNorth en2) {
             return Math.atan2(en2.north() - en1.north(), en2.east() -  en1.east());
@@ -575,11 +583,10 @@
             super(message);
         }
+
         InvalidUserInputException(String message, Throwable cause) {
             super(message, cause);
         }
-        InvalidUserInputException() {
-            super();
-        }
-    }
+    }
+
     /**
      * Exception: angle cannot be recognized as 0, 90, 180 or 270 degrees
Index: trunk/src/org/openstreetmap/josm/actions/ParameterizedAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ParameterizedAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/ParameterizedAction.java	(revision 8510)
@@ -9,5 +9,5 @@
 
     List<ActionParameter<?>> getActionParameters();
+
     void actionPerformed(ActionEvent e, Map<String, Object> parameters);
-
 }
Index: trunk/src/org/openstreetmap/josm/actions/ParameterizedActionDecorator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ParameterizedActionDecorator.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/ParameterizedActionDecorator.java	(revision 8510)
@@ -23,24 +23,30 @@
         action.addPropertyChangeListener(listener);
     }
+
     @Override
     public Object getValue(String key) {
         return action.getValue(key);
     }
+
     @Override
     public boolean isEnabled() {
         return action.isEnabled();
     }
+
     @Override
     public void putValue(String key, Object value) {
         action.putValue(key, value);
     }
+
     @Override
     public void removePropertyChangeListener(PropertyChangeListener listener) {
         action.removePropertyChangeListener(listener);
     }
+
     @Override
     public void setEnabled(boolean b) {
         action.setEnabled(b);
     }
+
     @Override
     public void actionPerformed(ActionEvent e) {
@@ -51,4 +57,3 @@
         return parameters;
     }
-
 }
Index: trunk/src/org/openstreetmap/josm/actions/PasteAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/PasteAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/PasteAction.java	(revision 8510)
@@ -68,5 +68,5 @@
         for (PrimitiveData data : pasteBuffer.getAll()) {
             if (data instanceof NodeData) {
-                NodeData n = (NodeData)data;
+                NodeData n = (NodeData) data;
                 if (n.getEastNorth() != null) {
                     double east = n.getEastNorth().east();
@@ -97,5 +97,5 @@
             final Point tl = Main.map.mapView.getLocationOnScreen();
             final Point pos = new Point(mp.x-tl.x, mp.y-tl.y);
-            if(Main.map.mapView.contains(pos)) {
+            if (Main.map.mapView.contains(pos)) {
                 mPosition = Main.map.mapView.getEastNorth(pos.x, pos.y);
             }
@@ -133,5 +133,5 @@
         for (PrimitiveData data:bufferCopy) {
             if (data instanceof NodeData) {
-                NodeData nodeData = (NodeData)data;
+                NodeData nodeData = (NodeData) data;
                 if (Main.main.getEditLayer() == source) {
                     nodeData.setEastNorth(nodeData.getEastNorth().add(offsetEast, offsetNorth));
@@ -139,5 +139,5 @@
             } else if (data instanceof WayData) {
                 List<Long> newNodes = new ArrayList<>();
-                for (Long oldNodeId: ((WayData)data).getNodes()) {
+                for (Long oldNodeId: ((WayData) data).getNodes()) {
                     Long newNodeId = newNodeIds.get(oldNodeId);
                     if (newNodeId != null) {
@@ -145,8 +145,8 @@
                     }
                 }
-                ((WayData)data).setNodes(newNodes);
+                ((WayData) data).setNodes(newNodes);
             } else if (data instanceof RelationData) {
                 List<RelationMemberData> newMembers = new ArrayList<>();
-                for (RelationMemberData member: ((RelationData)data).getMembers()) {
+                for (RelationMemberData member: ((RelationData) data).getMembers()) {
                     OsmPrimitiveType memberType = member.getMemberType();
                     Long newId = null;
@@ -166,10 +166,9 @@
                     }
                 }
-                ((RelationData)data).setMembers(newMembers);
+                ((RelationData) data).setMembers(newMembers);
             }
         }
 
         /* Now execute the commands to add the duplicated contents of the paste buffer to the map */
-
         Main.main.undoRedo.add(new AddPrimitivesCommand(bufferCopy, toSelect));
         Main.map.mapView.repaint();
Index: trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java	(revision 8510)
@@ -263,5 +263,5 @@
     public static boolean pasteTagsFromText(Collection<OsmPrimitive> selection, String text) {
         Map<String, String> tags = TextTagParser.readTagsFromText(text);
-        if (tags==null || tags.isEmpty()) {
+        if (tags == null || tags.isEmpty()) {
             TextTagParser.showBadBufferMessage(help);
             return false;
@@ -272,5 +272,5 @@
         for (Entry<String, String> entry: tags.entrySet()) {
             String v = entry.getValue();
-            commands.add(new ChangePropertyCommand(selection, entry.getKey(), "".equals(v)?null:v));
+            commands.add(new ChangePropertyCommand(selection, entry.getKey(), "".equals(v) ? null : v));
         }
         commitCommands(selection, commands);
@@ -284,5 +284,5 @@
     public static boolean pasteTagsFromJOSMBuffer(Collection<OsmPrimitive> selection) {
         List<PrimitiveData> directlyAdded = Main.pasteBuffer.getDirectlyAdded();
-        if (directlyAdded==null || directlyAdded.isEmpty()) return false;
+        if (directlyAdded == null || directlyAdded.isEmpty()) return false;
 
         PasteTagsAction.TagPaster tagPaster = new PasteTagsAction.TagPaster(directlyAdded, selection);
@@ -323,5 +323,5 @@
     @Override
     protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
-        setEnabled(selection!= null && !selection.isEmpty());
+        setEnabled(selection != null && !selection.isEmpty());
     }
 }
Index: trunk/src/org/openstreetmap/josm/actions/PurgeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/PurgeAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/PurgeAction.java	(revision 8510)
@@ -181,5 +181,5 @@
              */
             List<Relation> relLst = new ArrayList<>(relSet);
-            for (int i=0; i<relLst.size(); ++i) {
+            for (int i = 0; i < relLst.size(); ++i) {
                 for (OsmPrimitive parent : relLst.get(i).getReferrers()) {
                     if (!(toPurgeChecked.contains(parent))
@@ -223,5 +223,5 @@
         JPanel pnl = new JPanel(new GridBagLayout());
 
-        pnl.add(Box.createRigidArea(new Dimension(400,0)), GBC.eol().fill(GBC.HORIZONTAL));
+        pnl.add(Box.createRigidArea(new Dimension(400, 0)), GBC.eol().fill(GBC.HORIZONTAL));
 
         pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
@@ -233,5 +233,5 @@
 
         if (!toPurgeAdditionally.isEmpty()) {
-            pnl.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0,5,0,5));
+            pnl.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0, 5, 0, 5));
             pnl.add(new JLabel("<html>"+
                     tr("The following dependent objects will be purged<br> " +
@@ -268,5 +268,5 @@
                 {
                     putValue(SHORT_DESCRIPTION,   tr("Add to selection"));
-                    putValue(SMALL_ICON, ImageProvider.get("dialogs","select"));
+                    putValue(SMALL_ICON, ImageProvider.get("dialogs", "select"));
                 }
 
@@ -276,10 +276,10 @@
                 }
             });
-            addToSelection.setMargin(new Insets(0,0,0,0));
-            pnl.add(addToSelection, GBC.eol().anchor(GBC.SOUTHWEST).weight(0.0, 1.0).insets(2,0,0,3));
+            addToSelection.setMargin(new Insets(0, 0, 0, 0));
+            pnl.add(addToSelection, GBC.eol().anchor(GBC.SOUTHWEST).weight(0.0, 1.0).insets(2, 0, 0, 3));
         }
 
         if (modified) {
-            pnl.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0,5,0,5));
+            pnl.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0, 5, 0, 5));
             pnl.add(new JLabel("<html>"+tr("Some of the objects are modified.<br> " +
                     "Proceed, if these changes should be discarded."+"</html>"),
@@ -291,5 +291,5 @@
         cbClearUndoRedo.setSelected(Main.pref.getBoolean("purge.clear_undo_redo", false));
 
-        pnl.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0,5,0,5));
+        pnl.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0, 5, 0, 5));
         pnl.add(cbClearUndoRedo, GBC.eol());
         return pnl;
Index: trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java	(revision 8510)
@@ -54,5 +54,5 @@
         }
 
-        final JOptionPane optionPane = new JOptionPane(panel, JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION){
+        final JOptionPane optionPane = new JOptionPane(panel, JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION) {
             @Override public void selectInitialValue() {
                 name.requestFocusInWindow();
@@ -66,5 +66,5 @@
         Object answer = optionPane.getValue();
         if (answer == null || answer == JOptionPane.UNINITIALIZED_VALUE ||
-                (answer instanceof Integer && (Integer)answer != JOptionPane.OK_OPTION))
+                (answer instanceof Integer && (Integer) answer != JOptionPane.OK_OPTION))
             return;
 
Index: trunk/src/org/openstreetmap/josm/actions/SaveAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SaveAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/SaveAction.java	(revision 8510)
@@ -38,10 +38,10 @@
         File f = layer.getAssociatedFile();
         if (f != null && !f.exists()) {
-            f=null;
+            f = null;
         }
 
         // Ask for overwrite in case of GpxLayer: GpxLayers usually are imports
         // and modifying is an error most of the time.
-        if(f != null && layer instanceof GpxLayer) {
+        if (f != null && layer instanceof GpxLayer) {
             ExtendedDialog dialog = new ExtendedDialog(
                     Main.parent,
Index: trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/SaveActionBase.java	(revision 8510)
@@ -52,5 +52,5 @@
 
     public boolean doSave(Layer layer) {
-        if(!layer.checkSaveConditions())
+        if (!layer.checkSaveConditions())
             return false;
         file = getFile(layer);
@@ -119,5 +119,5 @@
         boolean check = Main.isDisplayingMapView()
         && Main.map.mapView.getActiveLayer() != null;
-        if(!check) {
+        if (!check) {
             setEnabled(false);
             return;
@@ -172,5 +172,5 @@
             String fn = file.getPath();
             if (ff instanceof ExtensionFileFilter) {
-                fn += "." + ((ExtensionFileFilter)ff).getDefaultExtension();
+                fn += "." + ((ExtensionFileFilter) ff).getDefaultExtension();
             } else if (extension != null) {
                 fn += "." + extension;
Index: trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java	(revision 8510)
@@ -2,6 +2,6 @@
 package org.openstreetmap.josm.actions;
 
+import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
 import static org.openstreetmap.josm.tools.I18n.tr;
-import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
 
 import java.awt.event.ActionEvent;
@@ -12,6 +12,9 @@
 public class SelectAllAction extends JosmAction {
 
+    /**
+     * Constructs a new {@code SelectAllAction}.
+     */
     public SelectAllAction() {
-        super(tr("Select All"),"selectall", tr("Select all undeleted objects in the data layer. This selects incomplete objects too."),
+        super(tr("Select All"), "selectall", tr("Select all undeleted objects in the data layer. This selects incomplete objects too."),
                 Shortcut.registerShortcut("system:selectall", tr("Edit: {0}", tr("Select All")), KeyEvent.VK_A, Shortcut.CTRL), true);
         putValue("help", ht("/Action/SelectAll"));
Index: trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java	(revision 8510)
@@ -193,5 +193,5 @@
 
             int numNoExporter = 0;
-            WHILE:while (numNoExporter != noExporter.size()) {
+            WHILE: while (numNoExporter != noExporter.size()) {
                 numNoExporter = noExporter.size();
                 for (Layer layer : layers) {
@@ -223,7 +223,7 @@
                 }
                 wrapper.add(exportPanel, GBC.std().fill(GBC.HORIZONTAL));
-                ip.add(wrapper, GBC.eol().fill(GBC.HORIZONTAL).insets(2,2,4,2));
-            }
-            ip.add(GBC.glue(0,1), GBC.eol().fill(GBC.VERTICAL));
+                ip.add(wrapper, GBC.eol().fill(GBC.HORIZONTAL).insets(2, 2, 4, 2));
+            }
+            ip.add(GBC.glue(0, 1), GBC.eol().fill(GBC.VERTICAL));
             JScrollPane sp = new JScrollPane(ip);
             sp.setBorder(BorderFactory.createEmptyBorder());
@@ -244,5 +244,5 @@
             p.add(include, GBC.std());
             p.add(lbl, GBC.std());
-            p.add(GBC.glue(1,0), GBC.std().fill(GBC.HORIZONTAL));
+            p.add(GBC.glue(1, 0), GBC.std().fill(GBC.HORIZONTAL));
             return p;
         }
Index: trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 8510)
@@ -174,6 +174,6 @@
         int i = 0;
         List<Node> newNodes = new ArrayList<>(w.getNodesCount());
-        while(i < w.getNodesCount()){
-            if (isRequiredNode(w,w.getNode(i))) {
+        while (i < w.getNodesCount()) {
+            if (isRequiredNode(w, w.getNode(i))) {
                 // copy a required node to the list of new nodes. Simplify not possible
                 newNodes.add(w.getNode(i));
@@ -184,10 +184,10 @@
             i++;
             // find the longest sequence of not required nodes ...
-            while(i<w.getNodesCount() && !isRequiredNode(w,w.getNode(i))) {
+            while (i < w.getNodesCount() && !isRequiredNode(w, w.getNode(i))) {
                 i++;
             }
             // ... and simplify them
             buildSimplifiedNodeList(w.getNodes(), lower, Math.min(w.getNodesCount()-1, i), threshold, newNodes);
-            lower=i;
+            lower = i;
             i++;
         }
@@ -239,6 +239,6 @@
         if (imax != -1 && xtemax >= threshold) {
             // Segment cannot be simplified - try shorter segments
-            buildSimplifiedNodeList(wnew, from, imax,threshold,simplifiedNodes);
-            buildSimplifiedNodeList(wnew, imax, to, threshold,simplifiedNodes);
+            buildSimplifiedNodeList(wnew, from, imax, threshold, simplifiedNodes);
+            buildSimplifiedNodeList(wnew, imax, to, threshold, simplifiedNodes);
         } else {
             // Simplify segment
Index: trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 8510)
@@ -183,5 +183,5 @@
             sel.addAll(selectedWays);
             sel.addAll(selectedRelations);
-            SplitWayResult result = splitWay(getEditLayer(),selectedWay, wayChunks, sel);
+            SplitWayResult result = splitWay(getEditLayer(), selectedWay, wayChunks, sel);
             Main.main.undoRedo.add(result.getCommand());
             getCurrentDataSet().setSelected(result.getNewSelection());
@@ -226,5 +226,5 @@
             new ArrayList<>(OsmPrimitive.getFilteredList(selectedNodes.get(0).getReferrers(),
                                                          Way.class));
-        for (int i=1; i<selectedNodes.size(); i++) {
+        for (int i = 1; i < selectedNodes.size(); i++) {
             List<OsmPrimitive> ref = selectedNodes.get(i).getReferrers();
             for (Iterator<Way> it = result.iterator(); it.hasNext();) {
@@ -268,5 +268,5 @@
      * @return the list of chunks
      */
-    public static List<List<Node>> buildSplitChunks(Way wayToSplit, List<Node> splitPoints){
+    public static List<List<Node>> buildSplitChunks(Way wayToSplit, List<Node> splitPoints) {
         CheckParameterUtil.ensureParameterNotNull(wayToSplit, "wayToSplit");
         CheckParameterUtil.ensureParameterNotNull(splitPoints, "splitPoints");
@@ -392,8 +392,8 @@
                         /* this code assumes the restriction is correct. No real error checking done */
                         String role = rm.getRole();
-                        if("from".equals(role) || "to".equals(role)) {
+                        if ("from".equals(role) || "to".equals(role)) {
                             OsmPrimitive via = null;
                             for (RelationMember rmv : r.getMembers()) {
-                                if ("via".equals(rmv.getRole())){
+                                if ("via".equals(rmv.getRole())) {
                                     via = rmv.getMember();
                                 }
@@ -402,13 +402,13 @@
                             if (via != null) {
                                 if (via instanceof Node) {
-                                    nodes.add((Node)via);
+                                    nodes.add((Node) via);
                                 } else if (via instanceof Way) {
-                                    nodes.add(((Way)via).lastNode());
-                                    nodes.add(((Way)via).firstNode());
+                                    nodes.add(((Way) via).lastNode());
+                                    nodes.add(((Way) via).firstNode());
                                 }
                             }
                             Way res = null;
                             for (Node n : nodes) {
-                                if(changedWay.isFirstLastNode(n)) {
+                                if (changedWay.isFirstLastNode(n)) {
                                     res = way;
                                 }
@@ -416,6 +416,6 @@
                             if (res == null) {
                                 for (Way wayToAdd : newWays) {
-                                    for(Node n : nodes) {
-                                        if(wayToAdd.isFirstLastNode(n)) {
+                                    for (Node n : nodes) {
+                                        if (wayToAdd.isFirstLastNode(n)) {
                                             res = wayToAdd;
                                         }
@@ -433,5 +433,5 @@
                                 insert = false;
                             }
-                        } else if(!"via".equals(role)) {
+                        } else if (!"via".equals(role)) {
                             warnme = true;
                         }
@@ -451,5 +451,5 @@
                         int k = 1;
                         while (i_r - k >= 0 || i_r + k < relationMembers.size()) {
-                            if ((i_r - k >= 0) && relationMembers.get(i_r - k).isWay()){
+                            if ((i_r - k >= 0) && relationMembers.get(i_r - k).isWay()) {
                                 Way w = relationMembers.get(i_r - k).getWay();
                                 if ((w.lastNode() == way.firstNode()) || w.firstNode() == way.firstNode()) {
@@ -460,5 +460,5 @@
                                 break;
                             }
-                            if ((i_r + k < relationMembers.size()) && relationMembers.get(i_r + k).isWay()){
+                            if ((i_r + k < relationMembers.size()) && relationMembers.get(i_r + k).isWay()) {
                                 Way w = relationMembers.get(i_r + k).getWay();
                                 if ((w.lastNode() == way.firstNode()) || w.firstNode() == way.firstNode()) {
@@ -537,5 +537,5 @@
         List<List<Node>> chunks = buildSplitChunks(way, atNodes);
         if (chunks == null) return null;
-        return splitWay(layer,way, chunks, selection);
+        return splitWay(layer, way, chunks, selection);
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java	(revision 8510)
@@ -149,5 +149,5 @@
         }
 
-        if(errMsg != null) {
+        if (errMsg != null) {
             new Notification(
                     errMsg)
@@ -177,5 +177,5 @@
 
         // If this wasn't called from menu, place it where the cursor is/was
-        if(e.getSource() instanceof JPanel) {
+        if (e.getSource() instanceof JPanel) {
             MapView mv = Main.map.mapView;
             n.setCoor(mv.getLatLon(mv.lastMEvent.getX(), mv.lastMEvent.getY()));
Index: trunk/src/org/openstreetmap/josm/actions/UnJoinNodeWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UnJoinNodeWayAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/UnJoinNodeWayAction.java	(revision 8510)
@@ -155,5 +155,5 @@
         // List of ways shared by all nodes
         List<Way> result = new ArrayList<>(OsmPrimitive.getFilteredList(selectedNodes.get(0).getReferrers(), Way.class));
-        for (int i=1; i<selectedNodes.size(); i++) {
+        for (int i = 1; i < selectedNodes.size(); i++) {
             List<OsmPrimitive> ref = selectedNodes.get(i).getReferrers();
             for (Iterator<Way> it = result.iterator(); it.hasNext();) {
Index: trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java	(revision 8510)
@@ -51,5 +51,5 @@
 
         List<Area> areas = new ArrayList<>();
-        for(DataSource ds : getEditLayer().data.dataSources) {
+        for (DataSource ds : getEditLayer().data.dataSources) {
             areas.add(new Area(ds.bounds.asRect()));
         }
@@ -59,12 +59,12 @@
         // and also skips smaller bounding boxes that are contained within larger ones
         // entirely.
-        for(int i = 0; i < areas.size(); i++) {
-            for(int j = i+1; j < areas.size(); j++) {
+        for (int i = 0; i < areas.size(); i++) {
+            for (int j = i+1; j < areas.size(); j++) {
                 areas.get(i).subtract(areas.get(j));
             }
         }
 
-        for(int i = areas.size()-1; i > 0; i--) {
-            for(int j = i-1; j > 0; j--) {
+        for (int i = areas.size()-1; i > 0; i--) {
+            for (int j = i-1; j > 0; j--) {
                 areas.get(i).subtract(areas.get(j));
             }
@@ -72,6 +72,6 @@
 
         List<Area> areasToDownload = new ArrayList<>();
-        for(Area a : areas) {
-            if(a.isEmpty()) {
+        for (Area a : areas) {
+            if (a.isEmpty()) {
                 continue;
             }
@@ -79,5 +79,5 @@
         }
 
-        if(areasToDownload.isEmpty()) {
+        if (areasToDownload.isEmpty()) {
             // no bounds defined in the dataset? we update all primitives in the data set
             // using a series of multi fetch requests
@@ -95,5 +95,5 @@
                             try {
                                 future.get();
-                            } catch(Exception e) {
+                            } catch (Exception e) {
                                 Main.error(e);
                                 return;
Index: trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 8510)
@@ -44,5 +44,5 @@
             DataSet ds = reader.parseOsm(NullProgressMonitor.INSTANCE);
             Main.main.getEditLayer().mergeFrom(ds);
-        } catch(Exception e) {
+        } catch (Exception e) {
             ExceptionDialogUtil.explainException(e);
         }
@@ -57,5 +57,5 @@
      */
     public static void updatePrimitives(final Collection<OsmPrimitive> selection) {
-        UpdatePrimitivesTask task = new UpdatePrimitivesTask(Main.main.getEditLayer(),selection);
+        UpdatePrimitivesTask task = new UpdatePrimitivesTask(Main.main.getEditLayer(), selection);
         Main.worker.submit(task);
     }
Index: trunk/src/org/openstreetmap/josm/actions/UploadAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UploadAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/UploadAction.java	(revision 8510)
@@ -57,4 +57,5 @@
     private static final List<UploadHook> uploadHooks = new LinkedList<>();
     private static final List<UploadHook> lateUploadHooks = new LinkedList<>();
+
     static {
         /**
@@ -102,5 +103,5 @@
      */
     public static void registerUploadHook(UploadHook hook, boolean late) {
-        if(hook == null) return;
+        if (hook == null) return;
         if (late) {
             if (!lateUploadHooks.contains(hook)) {
@@ -120,5 +121,5 @@
      */
     public static void unregisterUploadHook(UploadHook hook) {
-        if(hook == null) return;
+        if (hook == null) return;
         if (uploadHooks.contains(hook)) {
             uploadHooks.remove(hook);
@@ -146,5 +147,5 @@
     public static boolean checkPreUploadConditions(AbstractModifiableLayer layer) {
         return checkPreUploadConditions(layer,
-                layer instanceof OsmDataLayer ? new APIDataSet(((OsmDataLayer)layer).data) : null);
+                layer instanceof OsmDataLayer ? new APIDataSet(((OsmDataLayer) layer).data) : null);
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/UploadNotesAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UploadNotesAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/UploadNotesAction.java	(revision 8510)
@@ -24,5 +24,5 @@
     /** Create a new action to upload notes */
     public UploadNotesAction() {
-        putValue(SHORT_DESCRIPTION,tr("Upload note changes to server"));
+        putValue(SHORT_DESCRIPTION, tr("Upload note changes to server"));
         putValue(NAME, tr("Upload notes"));
         putValue(SMALL_ICON, ImageProvider.get("upload"));
@@ -47,5 +47,5 @@
         NoteData noteData = layer.getNoteData();
 
-        if(noteData == null || !noteData.isModified()) {
+        if (noteData == null || !noteData.isModified()) {
             if (Main.isDebugEnabled()) {
                 Main.debug("No changed notes to upload");
Index: trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java	(revision 8510)
@@ -190,5 +190,5 @@
         private Set<OsmPrimitive> hull;
 
-        public UploadHullBuilder(){
+        public UploadHullBuilder() {
             hull = new HashSet<>();
         }
@@ -321,13 +321,13 @@
                 toCheck.addAll(getPrimitivesToCheckForParents());
                 Set<OsmPrimitive> checked = new HashSet<>();
-                while(!toCheck.isEmpty()) {
+                while (!toCheck.isEmpty()) {
                     if (canceled) return;
                     OsmPrimitive current = toCheck.pop();
-                    synchronized(this) {
+                    synchronized (this) {
                         reader = new OsmServerBackreferenceReader(current);
                     }
                     getProgressMonitor().subTask(tr("Reading parents of ''{0}''", current.getDisplayName(DefaultNameFormatter.getInstance())));
                     DataSet ds = reader.parseOsm(getProgressMonitor().createSubTaskMonitor(1, false));
-                    synchronized(this) {
+                    synchronized (this) {
                         reader = null;
                     }
@@ -350,5 +350,5 @@
                     }
                 }
-            } catch(Exception e) {
+            } catch (Exception e) {
                 if (canceled)
                     // ignore exception
Index: trunk/src/org/openstreetmap/josm/actions/ValidateAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ValidateAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/ValidateAction.java	(revision 8510)
@@ -165,5 +165,5 @@
                     return;
                 testCounter++;
-                getProgressMonitor().setCustomText(tr("Test {0}/{1}: Starting {2}", testCounter, tests.size(),test.getName()));
+                getProgressMonitor().setCustomText(tr("Test {0}/{1}: Starting {2}", testCounter, tests.size(), test.getName()));
                 test.setPartialSelection(formerValidatedPrimitives != null);
                 test.startTest(getProgressMonitor().createSubTaskMonitor(validatedPrimitives.size(), false));
Index: trunk/src/org/openstreetmap/josm/actions/WireframeToggleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/WireframeToggleAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/WireframeToggleAction.java	(revision 8510)
@@ -26,5 +26,5 @@
               null, /* no icon */
               tr("Enable/disable rendering the map as wireframe only"),
-              Shortcut.registerShortcut("menu:view:wireframe", tr("Toggle Wireframe view"),KeyEvent.VK_W, Shortcut.CTRL),
+              Shortcut.registerShortcut("menu:view:wireframe", tr("Toggle Wireframe view"), KeyEvent.VK_W, Shortcut.CTRL),
               false /* register toolbar */
         );
Index: trunk/src/org/openstreetmap/josm/actions/ZoomInAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ZoomInAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/ZoomInAction.java	(revision 8510)
@@ -26,5 +26,5 @@
                 tr("Zoom In"),
                 // Although it might be possible on few custom keyboards, the vast majority of layouts do not have a direct '+' key, see below
-                Shortcut.registerShortcut("view:zoomin", tr("View: {0}", tr("Zoom In")),KeyEvent.VK_PLUS, Shortcut.DIRECT),
+                Shortcut.registerShortcut("view:zoomin", tr("View: {0}", tr("Zoom In")), KeyEvent.VK_PLUS, Shortcut.DIRECT),
                 true
         );
Index: trunk/src/org/openstreetmap/josm/actions/audio/AudioPlayPauseAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/audio/AudioPlayPauseAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/audio/AudioPlayPauseAction.java	(revision 8510)
@@ -38,5 +38,5 @@
             if (AudioPlayer.paused() && url != null) {
                 AudioPlayer.play(url);
-            } else if (AudioPlayer.playing()){
+            } else if (AudioPlayer.playing()) {
                 if (!Utils.equalsEpsilon(AudioPlayer.speed(), 1.0))
                     AudioPlayer.play(url, AudioPlayer.position());
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/AbstractDownloadTask.java	(revision 8510)
@@ -55,5 +55,5 @@
             .append(":</td><td>");
         String[] patterns = getPatterns();
-        if (patterns.length>0) {
+        if (patterns.length > 0) {
             buff.append("<ul>");
             for (String pattern: patterns) {
@@ -70,5 +70,5 @@
     // Can be overridden for more complex checking logic
     public boolean acceptsUrl(String url) {
-        if (url==null) return false;
+        if (url == null) return false;
         for (String p: getPatterns()) {
             if (url.matches(p)) {
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java	(revision 8510)
@@ -82,6 +82,6 @@
         } else if (url.matches(PATTERN_TRACKPOINTS_BBOX)) {
             String[] table = url.split("\\?|=|&");
-            for (int i = 0; i<table.length; i++) {
-                if ("bbox".equals(table[i]) && i<table.length-1)
+            for (int i = 0; i < table.length; i++) {
+                if ("bbox".equals(table[i]) && i < table.length-1)
                     return download(newLayer, new Bounds(table[i+1], ",", ParseMethod.LEFT_BOTTOM_RIGHT_TOP), progressMonitor);
             }
@@ -115,5 +115,5 @@
                 ProgressMonitor subMonitor = progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false);
                 rawData = reader.parseRawGps(subMonitor);
-            } catch(Exception e) {
+            } catch (Exception e) {
                 if (isCanceled())
                     return;
@@ -160,5 +160,5 @@
             boolean merge = Main.pref.getBoolean("download.gps.mergeWithLocal", false);
             Layer active = Main.map.mapView.getActiveLayer();
-            if (active instanceof GpxLayer && (merge || ((GpxLayer)active).data.fromServer))
+            if (active instanceof GpxLayer && (merge || ((GpxLayer) active).data.fromServer))
                 return (GpxLayer) active;
             for (GpxLayer l : Main.map.mapView.getLayersOfType(GpxLayer.class)) {
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadNotesUrlBoundsTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadNotesUrlBoundsTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadNotesUrlBoundsTask.java	(revision 8510)
@@ -2,10 +2,10 @@
 package org.openstreetmap.josm.actions.downloadtasks;
 
-import org.openstreetmap.josm.gui.progress.ProgressMonitor;
-import org.openstreetmap.josm.tools.OsmUrlToBounds;
+import static org.openstreetmap.josm.tools.I18n.tr;
 
 import java.util.concurrent.Future;
 
-import static org.openstreetmap.josm.tools.I18n.tr;
+import org.openstreetmap.josm.gui.progress.ProgressMonitor;
+import org.openstreetmap.josm.tools.OsmUrlToBounds;
 
 public class DownloadNotesUrlBoundsTask extends DownloadNotesTask {
@@ -21,4 +21,5 @@
                 "https?://www\\.(osm|openstreetmap)\\.org/(.*)?#map=\\p{Digit}+/.*/.*&layers=[A-MO-Z]*N[A-MO-Z]*"};
     }
+
     @Override
     public String getTitle() {
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmChangeTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmChangeTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmChangeTask.java	(revision 8510)
@@ -154,10 +154,10 @@
                         case NODE:
                             data = new NodeData();
-                            ((NodeData)data).setCoor(((HistoryNode)hp).getCoords());
+                            ((NodeData) data).setCoor(((HistoryNode) hp).getCoords());
                             break;
                         case WAY:
                             data = new WayData();
-                            List<Long> nodeIds = ((HistoryWay)hp).getNodes();
-                            ((WayData)data).setNodes(nodeIds);
+                            List<Long> nodeIds = ((HistoryWay) hp).getNodes();
+                            ((WayData) data).setNodes(nodeIds);
                             // Find incomplete nodes to load at next run
                             for (Long nodeId : nodeIds) {
@@ -171,6 +171,6 @@
                         case RELATION:
                             data = new RelationData();
-                            List<RelationMemberData> members = ((HistoryRelation)hp).getMembers();
-                            ((RelationData)data).setMembers(members);
+                            List<RelationMemberData> members = ((HistoryRelation) hp).getMembers();
+                            ((RelationData) data).setMembers(members);
                             break;
                         default: throw new AssertionError("Unknown primitive type");
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java	(revision 8510)
@@ -313,5 +313,5 @@
                     return;
                 dataSet = parseDataSet();
-            } catch(Exception e) {
+            } catch (Exception e) {
                 if (isCanceled()) {
                     Main.info(tr("Ignoring exception because download has been canceled. Exception was: {0}", e.toString()));
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTask.java	(revision 8510)
@@ -157,5 +157,5 @@
     protected void cancel() {
         canceled = true;
-        synchronized(this) {
+        synchronized (this) {
             if (reader != null) {
                 reader.cancel();
@@ -180,5 +180,5 @@
                     public void run() {
                         targetLayer.onPostDownloadFromServer();
-                        if(Main.map != null)
+                        if (Main.map != null)
                             Main.map.mapView.repaint();
                     }
@@ -202,8 +202,8 @@
     }
 
-    protected void downloadParents(long id, OsmPrimitiveType type, ProgressMonitor progressMonitor) throws OsmTransferException{
+    protected void downloadParents(long id, OsmPrimitiveType type, ProgressMonitor progressMonitor) throws OsmTransferException {
         reader = new OsmServerBackreferenceReader(id, type);
         DataSet ds = reader.parseOsm(progressMonitor.createSubTaskMonitor(1, false));
-        synchronized(this) { // avoid race condition in cancel()
+        synchronized (this) { // avoid race condition in cancel()
             reader = null;
         }
@@ -221,7 +221,7 @@
             if (!nodes.isEmpty()) {
                 reader = new MultiFetchServerObjectReader();
-                ((MultiFetchServerObjectReader)reader).append(nodes);
+                ((MultiFetchServerObjectReader) reader).append(nodes);
                 DataSet wayNodes = reader.parseOsm(progressMonitor.createSubTaskMonitor(1, false));
-                synchronized(this) { // avoid race condition in cancel()
+                synchronized (this) { // avoid race condition in cancel()
                     reader = null;
                 }
@@ -238,5 +238,5 @@
         try {
             progressMonitor.setTicksCount(children.size());
-            int i=1;
+            int i = 1;
             for (Entry<Long, OsmPrimitiveType> entry: children.entrySet()) {
                 if (canceled)
@@ -244,7 +244,7 @@
                 String msg = "";
                 switch(entry.getValue()) {
-                case NODE: msg = tr("({0}/{1}) Loading parents of node {2}", i+1,children.size(), entry.getKey()); break;
-                case WAY: msg = tr("({0}/{1}) Loading parents of way {2}", i+1,children.size(), entry.getKey()); break;
-                case RELATION: msg = tr("({0}/{1}) Loading parents of relation {2}", i+1,children.size(), entry.getKey()); break;
+                case NODE: msg = tr("({0}/{1}) Loading parents of node {2}", i+1, children.size(), entry.getKey()); break;
+                case WAY: msg = tr("({0}/{1}) Loading parents of way {2}", i+1, children.size(), entry.getKey()); break;
+                case RELATION: msg = tr("({0}/{1}) Loading parents of relation {2}", i+1, children.size(), entry.getKey()); break;
                 }
                 progressMonitor.subTask(msg);
@@ -252,5 +252,5 @@
                 i++;
             }
-        } catch(Exception e) {
+        } catch (Exception e) {
             if (canceled)
                 return;
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java	(revision 8510)
@@ -70,5 +70,5 @@
             try {
                 future.get();
-            } catch(Exception e) {
+            } catch (Exception e) {
                 Main.error(e);
                 return;
@@ -91,5 +91,5 @@
                 public void run() {
                     if (error instanceof Exception) {
-                        ExceptionDialogUtil.explainException((Exception)error);
+                        ExceptionDialogUtil.explainException((Exception) error);
                     } else if (tr("No data found in this area.").equals(error)) {
                         new Notification(error.toString()).setIcon(JOptionPane.WARNING_MESSAGE).show();
@@ -114,5 +114,5 @@
                     items.add((String) error);
                 } else if (error instanceof Exception) {
-                    items.add(ExceptionUtil.explainException((Exception)error));
+                    items.add(ExceptionUtil.explainException((Exception) error));
                 }
             }
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java	(revision 8510)
@@ -93,5 +93,5 @@
                 "delete",
                 tr("Delete nodes or ways."),
-                Shortcut.registerShortcut("mapmode:delete", tr("Mode: {0}",tr("Delete")),
+                Shortcut.registerShortcut("mapmode:delete", tr("Mode: {0}", tr("Delete")),
                 KeyEvent.VK_DELETE, Shortcut.CTRL),
                 mapFrame,
@@ -135,11 +135,11 @@
             return;
         boolean ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0;
-        boolean alt = (e.getModifiers() & (ActionEvent.ALT_MASK|InputEvent.ALT_GRAPH_MASK)) != 0;
+        boolean alt = (e.getModifiers() & (ActionEvent.ALT_MASK | InputEvent.ALT_GRAPH_MASK)) != 0;
 
         Command c;
         if (ctrl) {
-            c = DeleteCommand.deleteWithReferences(getEditLayer(),getCurrentDataSet().getSelected());
+            c = DeleteCommand.deleteWithReferences(getEditLayer(), getCurrentDataSet().getSelected());
         } else {
-            c = DeleteCommand.delete(getEditLayer(),getCurrentDataSet().getSelected(), !alt /* also delete nodes in way */);
+            c = DeleteCommand.delete(getEditLayer(), getCurrentDataSet().getSelected(), !alt /* also delete nodes in way */);
         }
         // if c is null, an error occurred or the user aborted. Don't do anything in that case.
@@ -172,5 +172,5 @@
         highlightHelper.clear();
         DataSet ds = getCurrentDataSet();
-        if(ds != null) {
+        if (ds != null) {
             ds.clearHighlightedWaySegments();
         }
@@ -184,5 +184,5 @@
      */
     private void addHighlighting(MouseEvent e, int modifiers) {
-        if(!drawTargetHighlight)
+        if (!drawTargetHighlight)
             return;
 
@@ -190,5 +190,5 @@
         DeleteParameters parameters = getDeleteParameters(e, modifiers);
 
-        if(parameters.mode == DeleteMode.segment) {
+        if (parameters.mode == DeleteMode.segment) {
             // deleting segments is the only action not working on OsmPrimitives
             // so we have to handle them separately.
@@ -198,7 +198,7 @@
             // silent operation and SplitWayAction will show dialogs. A lot.
             Command delCmd = buildDeleteCommands(e, modifiers, true);
-            if(delCmd != null) {
+            if (delCmd != null) {
                 // all other cases delete OsmPrimitives directly, so we can safely do the following
-                for(OsmPrimitive osm : delCmd.getParticipatingPrimitives()) {
+                for (OsmPrimitive osm : delCmd.getParticipatingPrimitives()) {
                     newHighlights.add(osm);
                 }
@@ -212,12 +212,12 @@
         DataSet ds = getCurrentDataSet();
 
-        if(newHighlightedWaySegment == null && oldHighlightedWaySegment != null) {
-            if(ds != null) {
+        if (newHighlightedWaySegment == null && oldHighlightedWaySegment != null) {
+            if (ds != null) {
                 ds.clearHighlightedWaySegments();
                 needsRepaint = true;
             }
             oldHighlightedWaySegment = null;
-        } else if(newHighlightedWaySegment != null && !newHighlightedWaySegment.equals(oldHighlightedWaySegment)) {
-            if(ds != null) {
+        } else if (newHighlightedWaySegment != null && !newHighlightedWaySegment.equals(oldHighlightedWaySegment)) {
+            if (ds != null) {
                 ds.setHighlightedWaySegments(Collections.singleton(newHighlightedWaySegment));
                 needsRepaint = true;
@@ -226,5 +226,5 @@
         }
         needsRepaint |= highlightHelper.highlightOnly(newHighlights);
-        if(needsRepaint) {
+        if (needsRepaint) {
             Main.map.mapView.repaint();
         }
@@ -240,5 +240,5 @@
         if (!Main.isDisplayingMapView())
             return;
-        if(!Main.map.mapView.isActiveLayerVisible() || e == null)
+        if (!Main.map.mapView.isActiveLayerVisible() || e == null)
             return;
 
@@ -278,5 +278,5 @@
         if (e.getButton() != MouseEvent.BUTTON1)
             return;
-        if(!Main.map.mapView.isActiveLayerVisible())
+        if (!Main.map.mapView.isActiveLayerVisible())
             return;
 
@@ -346,5 +346,5 @@
                     result.mode = DeleteMode.way_with_references;
                 } else {
-                    result.mode = alt?DeleteMode.way:DeleteMode.way_with_nodes;
+                    result.mode = alt ? DeleteMode.way : DeleteMode.way_with_nodes;
                 }
             } else {
@@ -372,7 +372,7 @@
         switch (parameters.mode) {
         case node:
-            return DeleteCommand.delete(getEditLayer(),Collections.singleton(parameters.nearestNode), false, silent);
+            return DeleteCommand.delete(getEditLayer(), Collections.singleton(parameters.nearestNode), false, silent);
         case node_with_references:
-            return DeleteCommand.deleteWithReferences(getEditLayer(),Collections.singleton(parameters.nearestNode), silent);
+            return DeleteCommand.deleteWithReferences(getEditLayer(), Collections.singleton(parameters.nearestNode), silent);
         case segment:
             return DeleteCommand.deleteWaySegment(getEditLayer(), parameters.nearestSegment);
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 8510)
@@ -74,5 +74,5 @@
 public class DrawAction extends MapMode implements MapViewPaintable, SelectionChangedListener, KeyPressReleaseListener, ModifierListener {
 
-    private static final Color ORANGE_TRANSPARENT = new Color(Color.ORANGE.getRed(),Color.ORANGE.getGreen(),Color.ORANGE.getBlue(),128);
+    private static final Color ORANGE_TRANSPARENT = new Color(Color.ORANGE.getRed(), Color.ORANGE.getGreen(), Color.ORANGE.getBlue(), 128);
     private static final double PHI = Math.toRadians(90);
 
@@ -144,8 +144,8 @@
 
     private JCheckBoxMenuItem addMenuItem() {
-        int n=Main.main.menu.editMenu.getItemCount();
-        for (int i=n-1;i>0;i--) {
+        int n = Main.main.menu.editMenu.getItemCount();
+        for (int i = n-1; i > 0; i--) {
             JMenuItem item = Main.main.menu.editMenu.getItem(i);
-            if (item!=null && item.getAction() !=null && item.getAction() instanceof SnapChangeAction) {
+            if (item != null && item.getAction() != null && item.getAction() instanceof SnapChangeAction) {
                 Main.main.menu.editMenu.remove(i);
             }
@@ -161,8 +161,8 @@
         // repaint required if the helper line is active.
         boolean needsRepaint = drawHelperLine && !wayIsFinished;
-        if(drawTargetHighlight) {
+        if (drawTargetHighlight) {
             // move newHighlights to oldHighlights; only update changed primitives
-            for(OsmPrimitive x : newHighlights) {
-                if(oldHighlights.contains(x)) {
+            for (OsmPrimitive x : newHighlights) {
+                if (oldHighlights.contains(x)) {
                     continue;
                 }
@@ -171,5 +171,5 @@
             }
             oldHighlights.removeAll(newHighlights);
-            for(OsmPrimitive x : oldHighlights) {
+            for (OsmPrimitive x : oldHighlights) {
                 x.setHighlighted(false);
                 needsRepaint = true;
@@ -195,5 +195,5 @@
         }
 
-        if(needsRepaint) {
+        if (needsRepaint) {
             Main.map.mapView.repaint();
         }
@@ -244,8 +244,8 @@
         if (rubberLineColor == null) rubberLineColor = PaintColors.SELECTED.get();
 
-        rubberLineStroke = GuiHelper.getCustomizedStroke(Main.pref.get("draw.stroke.helper-line","3"));
+        rubberLineStroke = GuiHelper.getCustomizedStroke(Main.pref.get("draw.stroke.helper-line", "3"));
         drawHelperLine = Main.pref.getBoolean("draw.helper-line", true);
         drawTargetHighlight = Main.pref.getBoolean("draw.target-highlight", true);
-        snapToIntersectionThreshold = Main.pref.getInteger("edit.snap-intersection-threshold",10);
+        snapToIntersectionThreshold = Main.pref.getInteger("edit.snap-intersection-threshold", 10);
     }
 
@@ -272,5 +272,5 @@
         //
         DataSet ds = getCurrentDataSet();
-        if(ds != null) {
+        if (ds != null) {
             ds.fireSelectionChanged();
         }
@@ -316,5 +316,5 @@
     @Override
     public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
-        if(!Main.map.mapView.isActiveLayerDrawable())
+        if (!Main.map.mapView.isActiveLayerDrawable())
             return;
         computeHelperLine();
@@ -372,5 +372,5 @@
         if (e.getButton() != MouseEvent.BUTTON1)
             return;
-        if(!Main.map.mapView.isActiveLayerDrawable())
+        if (!Main.map.mapView.isActiveLayerDrawable())
             return;
         // request focus in order to enable the expected keyboard shortcuts
@@ -378,5 +378,5 @@
         Main.map.mapView.requestFocus();
 
-        if(e.getClickCount() > 1 && mousePos != null && mousePos.equals(oldMousePos)) {
+        if (e.getClickCount() > 1 && mousePos != null && mousePos.equals(oldMousePos)) {
             // A double click equals "user clicked last node again, finish way"
             // Change draw tool only if mouse position is nearly the same, as
@@ -410,5 +410,5 @@
                 if (!it.next().containsNode(n)) n = null;
             } else {
-                n=null; // ctrl-click + no selected way = new node
+                n = null; // ctrl-click + no selected way = new node
             }
         }
@@ -434,5 +434,5 @@
         } else {
             EastNorth newEN;
-            if (n!=null) {
+            if (n != null) {
                 EastNorth foundPoint = n.getEastNorth();
                 // project found node to snapping line
@@ -470,5 +470,5 @@
                         Main.map.mapView.getPoint(n), OsmPrimitive.isSelectablePredicate);
                 if (snapHelper.isActive()) {
-                    tryToMoveNodeOnIntersection(wss,n);
+                    tryToMoveNodeOnIntersection(wss, n);
                 }
                 insertNodeIntoAllNearbySegments(wss, n, newSelection, cmds, replacedWays, reuseWays);
@@ -477,6 +477,5 @@
         // now "n" is newly created or reused node that shoud be added to some way
 
-        // This part decides whether or not a "segment" (i.e. a connection) is made to an
-        // existing node.
+        // This part decides whether or not a "segment" (i.e. a connection) is made to an existing node.
 
         // For a connection to be made, the user must either have a node selected (connection
@@ -517,14 +516,14 @@
             Node n0 = findNodeToContinueFrom(selectedNode, selectedWay);
             // We have a selection but it isn't suitable. Try again.
-            if(n0 == null) {
+            if (n0 == null) {
                 tryAgain(e);
                 return;
             }
-            if(!wayIsFinishedTemp){
-                if(isSelfContainedWay(selectedWay, n0, n))
+            if (!wayIsFinishedTemp) {
+                if (isSelfContainedWay(selectedWay, n0, n))
                     return;
 
                 // User clicked last node again, finish way
-                if(n0 == n) {
+                if (n0 == n) {
                     finishDrawing();
                     return;
@@ -538,11 +537,11 @@
 
                 // Don't allow creation of self-overlapping ways
-                if(way != null) {
-                    int nodeCount=0;
+                if (way != null) {
+                    int nodeCount = 0;
                     for (Node p : way.getNodes())
-                        if(p.equals(n0)) {
+                        if (p.equals(n0)) {
                             nodeCount++;
                         }
-                    if(nodeCount > 1) {
+                    if (nodeCount > 1) {
                         way = null;
                     }
@@ -568,5 +567,5 @@
 
                 // Connected to a node that's already in the way
-                if(way.containsNode(n)) {
+                if (way.containsNode(n)) {
                     wayIsFinished = true;
                     selection.clear();
@@ -611,5 +610,5 @@
 
         Main.main.undoRedo.add(c);
-        if(!wayIsFinished) {
+        if (!wayIsFinished) {
             lastUsedNode = n;
         }
@@ -641,5 +640,5 @@
         }
 
-        Set<Pair<Node,Node>> segSet = new HashSet<>();
+        Set<Pair<Node, Node>> segSet = new HashSet<>();
 
         for (Map.Entry<Way, List<Integer>> insertPoint : insertPoints.entrySet()) {
@@ -662,5 +661,5 @@
             // but pressing ALT prevents this. Therefore we must de-select the way manually
             // here so /only/ the new way will be selected after this method finishes.
-            if(alt) {
+            if (alt) {
                 newSelection.add(insertPoint.getKey());
             }
@@ -690,5 +689,5 @@
      */
     private boolean isSelfContainedWay(Way selectedWay, Node currentNode, Node targetNode) {
-        if(selectedWay != null) {
+        if (selectedWay != null) {
             int posn0 = selectedWay.getNodes().indexOf(currentNode);
             if (posn0 != -1 && // n0 is part of way
@@ -713,5 +712,5 @@
         // No nodes or ways have been selected, this occurs when a relation
         // has been selected or the selection is empty
-        if(selectedNode == null && selectedWay == null)
+        if (selectedNode == null && selectedWay == null)
             return null;
 
@@ -741,5 +740,5 @@
     @Override
     public void mouseMoved(MouseEvent e) {
-        if(!Main.map.mapView.isActiveLayerDrawable())
+        if (!Main.map.mapView.isActiveLayerDrawable())
             return;
 
@@ -761,5 +760,5 @@
     private void tryToSetBaseSegmentForAngleSnap() {
         WaySegment seg = Main.map.mapView.getNearestWaySegment(mousePos, OsmPrimitive.isSelectablePredicate);
-        if (seg!=null) {
+        if (seg != null) {
             snapHelper.setBaseSegment(seg);
         }
@@ -794,7 +793,7 @@
         // We need this for highlighting and we'll only do so if we actually want to re-use
         // *and* there is no node nearby (because nodes beat ways when re-using)
-        if(!ctrl && currentMouseNode == null) {
+        if (!ctrl && currentMouseNode == null) {
             List<WaySegment> wss = mv.getNearestWaySegments(mousePos, OsmPrimitive.isSelectablePredicate);
-            for(WaySegment ws : wss) {
+            for (WaySegment ws : wss) {
                 mouseOnExistingWays.add(ws.way);
             }
@@ -822,5 +821,5 @@
         double curHdg = Math.toDegrees(getCurrentBaseNode().getEastNorth()
                 .heading(currentMouseEastNorth));
-        double baseHdg=-1;
+        double baseHdg = -1;
         if (previousNode != null) {
             baseHdg =  Math.toDegrees(previousNode.getEastNorth()
@@ -828,5 +827,5 @@
         }
 
-        snapHelper.checkAngleSnapping(currentMouseEastNorth,baseHdg, curHdg);
+        snapHelper.checkAngleSnapping(currentMouseEastNorth, baseHdg, curHdg);
 
         // status bar was filled by snapHelper
@@ -871,6 +870,6 @@
             for (OsmPrimitive p: selectedNode.getReferrers()) {
                 if (p.isUsable() && p instanceof Way && ((Way) p).isFirstLastNode(selectedNode)) {
-                    if (selectedWay!=null) { // two uncontinued ways, nothing to take as reference
-                        selectedWay=null;
+                    if (selectedWay != null) { // two uncontinued ways, nothing to take as reference
+                        selectedWay = null;
                         break;
                     } else {
@@ -899,10 +898,10 @@
     private void continueWayFromNode(Way way, Node node) {
         int n = way.getNodesCount();
-        if (node == way.firstNode()){
+        if (node == way.firstNode()) {
             currentBaseNode = node;
-            if (n>1) previousNode = way.getNode(1);
+            if (n > 1) previousNode = way.getNode(1);
         } else if (node == way.lastNode()) {
             currentBaseNode = node;
-            if (n>1) previousNode = way.getNode(n-2);
+            if (n > 1) previousNode = way.getNode(n-2);
         }
     }
@@ -913,5 +912,5 @@
     @Override
     public void mouseExited(MouseEvent e) {
-        if(!Main.map.mapView.isActiveLayerDrawable())
+        if (!Main.map.mapView.isActiveLayerDrawable())
             return;
         mousePos = e.getPoint();
@@ -920,5 +919,5 @@
         // force repaint in case snapHelper needs one. If removeHighlighting
         // caused one already, don’t do it again.
-        if(!repaintIssued) {
+        if (!repaintIssued) {
             Main.map.mapView.repaint();
         }
@@ -985,5 +984,5 @@
      * @param n the node to adjust
      */
-    private static void adjustNode(Collection<Pair<Node,Node>> segs, Node n) {
+    private static void adjustNode(Collection<Pair<Node, Node>> segs, Node n) {
 
         switch (segs.size()) {
@@ -991,8 +990,7 @@
             return;
         case 2:
-            // This computes the intersection between
-            // the two segments and adjusts the node position.
-            Iterator<Pair<Node,Node>> i = segs.iterator();
-            Pair<Node,Node> seg = i.next();
+            // This computes the intersection between the two segments and adjusts the node position.
+            Iterator<Pair<Node, Node>> i = segs.iterator();
+            Pair<Node, Node> seg = i.next();
             EastNorth A = seg.a.getEastNorth();
             EastNorth B = seg.b.getEastNorth();
@@ -1001,5 +999,5 @@
             EastNorth D = seg.b.getEastNorth();
 
-            double u=det(B.east() - A.east(), B.north() - A.north(), C.east() - D.east(), C.north() - D.north());
+            double u = det(B.east() - A.east(), B.north() - A.north(), C.east() - D.east(), C.north() - D.north());
 
             // Check for parallel segments and do nothing if they are
@@ -1048,10 +1046,10 @@
             return;
         WaySegment ws = wss.get(0);
-        EastNorth p1=ws.getFirstNode().getEastNorth();
-        EastNorth p2=ws.getSecondNode().getEastNorth();
+        EastNorth p1 = ws.getFirstNode().getEastNorth();
+        EastNorth p2 = ws.getSecondNode().getEastNorth();
         if (snapHelper.dir2 != null && getCurrentBaseNode() != null) {
             EastNorth xPoint = Geometry.getSegmentSegmentIntersection(p1, p2, snapHelper.dir2,
                     getCurrentBaseNode().getEastNorth());
-            if (xPoint!=null) {
+            if (xPoint != null) {
                 n.setEastNorth(xPoint);
             }
@@ -1124,5 +1122,5 @@
 
         Graphics2D g2 = g;
-        snapHelper.drawIfNeeded(g2,mv);
+        snapHelper.drawIfNeeded(g2, mv);
         if (!drawHelperLine || wayIsFinished || shift)
             return;
@@ -1134,15 +1132,16 @@
             return;
         GeneralPath b = new GeneralPath();
-        Point p1=mv.getPoint(getCurrentBaseNode());
-        Point p2=mv.getPoint(currentMouseEastNorth);
+        Point p1 = mv.getPoint(getCurrentBaseNode());
+        Point p2 = mv.getPoint(currentMouseEastNorth);
 
         double t = Math.atan2(p2.y-p1.y, p2.x-p1.x) + Math.PI;
 
-        b.moveTo(p1.x,p1.y); b.lineTo(p2.x, p2.y);
+        b.moveTo(p1.x, p1.y);
+        b.lineTo(p2.x, p2.y);
 
         // if alt key is held ("start new way"), draw a little perpendicular line
         if (alt) {
-            b.moveTo((int)(p1.x + 8*Math.cos(t+PHI)), (int)(p1.y + 8*Math.sin(t+PHI)));
-            b.lineTo((int)(p1.x + 8*Math.cos(t-PHI)), (int)(p1.y + 8*Math.sin(t-PHI)));
+            b.moveTo((int) (p1.x + 8*Math.cos(t+PHI)), (int) (p1.y + 8*Math.sin(t+PHI)));
+            b.lineTo((int) (p1.x + 8*Math.cos(t-PHI)), (int) (p1.y + 8*Math.sin(t-PHI)));
         }
 
@@ -1270,16 +1269,16 @@
         public void actionPerformed(ActionEvent e) {
             Main.main.undoRedo.undo();
-            Node n=null;
-            Command lastCmd=Main.main.undoRedo.commands.peekLast();
-            if (lastCmd==null) return;
+            Node n = null;
+            Command lastCmd = Main.main.undoRedo.commands.peekLast();
+            if (lastCmd == null) return;
             for (OsmPrimitive p: lastCmd.getParticipatingPrimitives()) {
                 if (p instanceof Node) {
-                    if (n==null) {
-                        n=(Node) p; // found one node
-                        wayIsFinished=false;
+                    if (n == null) {
+                        n = (Node) p; // found one node
+                        wayIsFinished = false;
                     }  else {
                         // if more than 1 node were affected by previous command,
                         // we have no way to continue, so we forget about found node
-                        n=null;
+                        n = null;
                         break;
                     }
@@ -1287,5 +1286,5 @@
             }
             // select last added node - maybe we will continue drawing from it
-            if (n!=null) {
+            if (n != null) {
                 getCurrentDataSet().addSelected(n);
             }
@@ -1300,5 +1299,5 @@
                 @Override
                 public void actionPerformed(ActionEvent e) {
-                    boolean sel=((JCheckBoxMenuItem) e.getSource()).getState();
+                    boolean sel = ((JCheckBoxMenuItem) e.getSource()).getState();
                     Main.pref.put("draw.anglesnap.toggleOnRepeatedA", sel);
                     init();
@@ -1310,5 +1309,5 @@
                 @Override
                 public void actionPerformed(ActionEvent e) {
-                    boolean sel=((JCheckBoxMenuItem) e.getSource()).getState();
+                    boolean sel = ((JCheckBoxMenuItem) e.getSource()).getState();
                     Main.pref.put("draw.anglesnap.drawConstructionGeometry", sel);
                     Main.pref.put("draw.anglesnap.drawProjectedPoint", sel);
@@ -1323,5 +1322,5 @@
                 @Override
                 public void actionPerformed(ActionEvent e) {
-                    boolean sel=((JCheckBoxMenuItem) e.getSource()).getState();
+                    boolean sel = ((JCheckBoxMenuItem) e.getSource()).getState();
                     Main.pref.put("draw.anglesnap.projectionsnap", sel);
                     init();
@@ -1331,7 +1330,7 @@
 
             private AnglePopupMenu() {
-                helperCb.setState(Main.pref.getBoolean("draw.anglesnap.drawConstructionGeometry",true));
-                projectionCb.setState(Main.pref.getBoolean("draw.anglesnap.projectionsnapgvff",true));
-                repeatedCb.setState(Main.pref.getBoolean("draw.anglesnap.toggleOnRepeatedA",true));
+                helperCb.setState(Main.pref.getBoolean("draw.anglesnap.drawConstructionGeometry", true));
+                projectionCb.setState(Main.pref.getBoolean("draw.anglesnap.projectionsnapgvff", true));
+                repeatedCb.setState(Main.pref.getBoolean("draw.anglesnap.toggleOnRepeatedA", true));
                 add(repeatedCb);
                 add(helperCb);
@@ -1346,5 +1345,5 @@
                 add(new AbstractAction(tr("0,90,...")) {
                     @Override public void actionPerformed(ActionEvent e) {
-                        saveAngles("0","90","180");
+                        saveAngles("0", "90", "180");
                         init();
                         enableSnapping();
@@ -1353,5 +1352,5 @@
                 add(new AbstractAction(tr("0,45,90,...")) {
                     @Override public void actionPerformed(ActionEvent e) {
-                        saveAngles("0","45","90","135","180");
+                        saveAngles("0", "45", "90", "135", "180");
                         init();
                         enableSnapping();
@@ -1360,5 +1359,5 @@
                 add(new AbstractAction(tr("0,30,45,60,90,...")) {
                     @Override public void actionPerformed(ActionEvent e) {
-                        saveAngles("0","30","45","60","90","120","135","150","180");
+                        saveAngles("0", "30", "45", "60", "90", "120", "135", "150", "180");
                         init();
                         enableSnapping();
@@ -1385,5 +1384,5 @@
         private double lastAngle;
 
-        private double customBaseHeading=-1; // angle of base line, if not last segment)
+        private double customBaseHeading = -1; // angle of base line, if not last segment)
         private EastNorth segmentPoint1; // remembered first point of base segment
         private EastNorth segmentPoint2; // remembered second point of base segment
@@ -1393,8 +1392,8 @@
         private double snapAngleTolerance;
 
-        private double pe,pn; // (pe,pn) - direction of snapping line
-        private double e0,n0; // (e0,n0) - origin of snapping line
-
-        private final String fixFmt="%d "+tr("FIX");
+        private double pe, pn; // (pe, pn) - direction of snapping line
+        private double e0, n0; // (e0, n0) - origin of snapping line
+
+        private final String fixFmt = "%d "+tr("FIX");
         private Color snapHelperColor;
         private Color highlightColor;
@@ -1418,13 +1417,14 @@
 
         public void init() {
-            snapOn=false;
+            snapOn = false;
             checkBox.setState(snapOn);
-            fixed=false; absoluteFix=false;
+            fixed = false;
+            absoluteFix = false;
 
             Collection<String> angles = Main.pref.getCollection("draw.anglesnap.angles",
-                    Arrays.asList("0","30","45","60","90","120","135","150","180"));
+                    Arrays.asList("0", "30", "45", "60", "90", "120", "135", "150", "180"));
 
             snapAngles = new double[2*angles.size()];
-            int i=0;
+            int i = 0;
             for (String s: angles) {
                 try {
@@ -1433,6 +1433,6 @@
                 } catch (NumberFormatException e) {
                     Main.warn("Incorrect number in draw.anglesnap.angles preferences: "+s);
-                    snapAngles[i]=0;i++;
-                    snapAngles[i]=0;i++;
+                    snapAngles[i] = 0; i++;
+                    snapAngles[i] = 0; i++;
                 }
             }
@@ -1449,6 +1449,6 @@
 
             highlightColor = Main.pref.getColor(marktr("draw angle snap highlight"), ORANGE_TRANSPARENT);
-            highlightStroke = GuiHelper.getCustomizedStroke(Main.pref.get("draw.anglesnap.stroke.highlight","10"));
-            helperStroke = GuiHelper.getCustomizedStroke(Main.pref.get("draw.anglesnap.stroke.helper","1 4"));
+            highlightStroke = GuiHelper.getCustomizedStroke(Main.pref.get("draw.anglesnap.stroke.highlight", "10"));
+            helperStroke = GuiHelper.getCustomizedStroke(Main.pref.get("draw.anglesnap.stroke.helper", "1 4"));
         }
 
@@ -1464,7 +1464,7 @@
             if (!snapOn || !active)
                 return;
-            Point p1=mv.getPoint(getCurrentBaseNode());
-            Point p2=mv.getPoint(dir2);
-            Point p3=mv.getPoint(projected);
+            Point p1 = mv.getPoint(getCurrentBaseNode());
+            Point p2 = mv.getPoint(dir2);
+            Point p3 = mv.getPoint(projected);
             GeneralPath b;
             if (drawConstructionGeometry) {
@@ -1474,9 +1474,9 @@
                 b = new GeneralPath();
                 if (absoluteFix) {
-                    b.moveTo(p2.x,p2.y);
-                    b.lineTo(2*p1.x-p2.x,2*p1.y-p2.y); // bi-directional line
+                    b.moveTo(p2.x, p2.y);
+                    b.lineTo(2*p1.x-p2.x, 2*p1.y-p2.y); // bi-directional line
                 } else {
-                    b.moveTo(p2.x,p2.y);
-                    b.lineTo(p3.x,p3.y);
+                    b.moveTo(p2.x, p2.y);
+                    b.lineTo(p3.x, p3.y);
                 }
                 g2.draw(b);
@@ -1486,7 +1486,7 @@
                 g2.setStroke(helperStroke);
                 b = new GeneralPath();
-                b.moveTo(p3.x,p3.y);
-                Point pp=mv.getPoint(projectionSource);
-                b.lineTo(pp.x,pp.y);
+                b.moveTo(p3.x, p3.y);
+                Point pp = mv.getPoint(projectionSource);
+                b.lineTo(pp.x, pp.y);
                 g2.draw(b);
             }
@@ -1496,8 +1496,8 @@
                 g2.setStroke(highlightStroke);
                 b = new GeneralPath();
-                Point pp1=mv.getPoint(segmentPoint1);
-                Point pp2=mv.getPoint(segmentPoint2);
-                b.moveTo(pp1.x,pp1.y);
-                b.lineTo(pp2.x,pp2.y);
+                Point pp1 = mv.getPoint(segmentPoint1);
+                Point pp2 = mv.getPoint(segmentPoint2);
+                b.moveTo(pp1.x, pp1.y);
+                b.lineTo(pp2.x, pp2.y);
                 g2.draw(b);
             }
@@ -1506,6 +1506,6 @@
             g2.setStroke(normalStroke);
             b = new GeneralPath();
-            b.moveTo(p1.x,p1.y);
-            b.lineTo(p3.x,p3.y);
+            b.moveTo(p1.x, p1.y);
+            b.lineTo(p3.x, p3.y);
             g2.draw(b);
 
@@ -1527,13 +1527,13 @@
             double angle = -1;
 
-            double activeBaseHeading = (customBaseHeading>=0)? customBaseHeading : baseHeading;
-
-            if (snapOn && (activeBaseHeading>=0)) {
+            double activeBaseHeading = (customBaseHeading >= 0) ? customBaseHeading : baseHeading;
+
+            if (snapOn && (activeBaseHeading >= 0)) {
                 angle = curHeading - activeBaseHeading;
                 if (angle < 0) {
-                    angle+=360;
+                    angle += 360;
                 }
                 if (angle > 360) {
-                    angle=0;
+                    angle = 0;
                 }
 
@@ -1545,9 +1545,9 @@
                     nearestAngle = getNearestAngle(angle);
                     if (getAngleDelta(nearestAngle, angle) < snapAngleTolerance) {
-                        active = (customBaseHeading>=0)? true : Math.abs(nearestAngle - 180) > 1e-3;
+                        active = (customBaseHeading >= 0) ? true : Math.abs(nearestAngle - 180) > 1e-3;
                         // if angle is to previous segment, exclude 180 degrees
                         lastAngle = nearestAngle;
                     } else {
-                        active=false;
+                        active = false;
                     }
                 }
@@ -1557,5 +1557,5 @@
                     e0 = p0.east();
                     n0 = p0.north();
-                    buildLabelText((nearestAngle<=180) ? nearestAngle : nearestAngle-360);
+                    buildLabelText((nearestAngle <= 180) ? nearestAngle : nearestAngle-360);
 
                     phi = (nearestAngle + activeBaseHeading) * Math.PI / 180;
@@ -1580,8 +1580,8 @@
                 angle = hdg - baseHeading;
                 if (angle < 0) {
-                    angle+=360;
+                    angle += 360;
                 }
                 if (angle > 360) {
-                    angle=0;
+                    angle = 0;
                 }
             }
@@ -1616,21 +1616,21 @@
             if (!active)
                 return p;
-            double de=p.east()-e0;
-            double dn=p.north()-n0;
+            double de = p.east()-e0;
+            double dn = p.north()-n0;
             double l = de*pe+dn*pn;
             double delta = Main.map.mapView.getDist100Pixel()/20;
-            if (!absoluteFix && l<delta) {
-                active=false;
+            if (!absoluteFix && l < delta) {
+                active = false;
                 return p;
             } //  do not go backward!
 
-            projectionSource=null;
+            projectionSource = null;
             if (snapToProjections) {
                 DataSet ds = getCurrentDataSet();
                 Collection<Way> selectedWays = ds.getSelectedWays();
-                if (selectedWays.size()==1) {
+                if (selectedWays.size() == 1) {
                     Way w = selectedWays.iterator().next();
                     Collection<EastNorth> pointsToProject = new ArrayList<>();
-                    if (w.getNodesCount()<1000) {
+                    if (w.getNodesCount() < 1000) {
                         for (Node n: w.getNodes()) {
                             pointsToProject.add(n.getEastNorth());
@@ -1641,16 +1641,16 @@
                         pointsToProject.add(segmentPoint2);
                     }
-                    EastNorth enOpt=null;
-                    double dOpt=1e5;
+                    EastNorth enOpt = null;
+                    double dOpt = 1e5;
                     for (EastNorth en: pointsToProject) { // searching for besht projection
                         double l1 = (en.east()-e0)*pe+(en.north()-n0)*pn;
                         double d1 = Math.abs(l1-l);
                         if (d1 < delta && d1 < dOpt) {
-                            l=l1;
+                            l = l1;
                             enOpt = en;
                             dOpt = d1;
                         }
                     }
-                    if (enOpt!=null) {
+                    if (enOpt != null) {
                         projectionSource =  enOpt;
                     }
@@ -1661,23 +1661,24 @@
 
         public void noSnapNow() {
-            active=false;
-            dir2=null; projected=null;
-            labelText=null;
+            active = false;
+            dir2 = null;
+            projected = null;
+            labelText = null;
         }
 
         public void setBaseSegment(WaySegment seg) {
-            if (seg==null) return;
-            segmentPoint1=seg.getFirstNode().getEastNorth();
-            segmentPoint2=seg.getSecondNode().getEastNorth();
+            if (seg == null) return;
+            segmentPoint1 = seg.getFirstNode().getEastNorth();
+            segmentPoint2 = seg.getSecondNode().getEastNorth();
 
             double hdg = segmentPoint1.heading(segmentPoint2);
-            hdg=Math.toDegrees(hdg);
-            if (hdg<0) {
-                hdg+=360;
-            }
-            if (hdg>360) {
-                hdg-=360;
-            }
-            customBaseHeading=hdg;
+            hdg = Math.toDegrees(hdg);
+            if (hdg < 0) {
+                hdg += 360;
+            }
+            if (hdg > 360) {
+                hdg -= 360;
+            }
+            customBaseHeading = hdg;
         }
 
@@ -1692,9 +1693,9 @@
                 }
             } else {
-                snapOn=true;
+                snapOn = true;
                 unsetFixedMode();
             }
             checkBox.setState(snapOn);
-            customBaseHeading=-1;
+            customBaseHeading = -1;
         }
 
@@ -1702,5 +1703,5 @@
             snapOn = true;
             checkBox.setState(snapOn);
-            customBaseHeading=-1;
+            customBaseHeading = -1;
             unsetFixedMode();
         }
@@ -1709,5 +1710,5 @@
             snapOn = !snapOn;
             checkBox.setState(snapOn);
-            customBaseHeading=-1;
+            customBaseHeading = -1;
             unsetFixedMode();
         }
@@ -1715,13 +1716,13 @@
         public void setFixedMode() {
             if (active) {
-                fixed=true;
+                fixed = true;
             }
         }
 
         public  void unsetFixedMode() {
-            fixed=false;
-            absoluteFix=false;
-            lastAngle=0;
-            active=false;
+            fixed = false;
+            absoluteFix = false;
+            lastAngle = 0;
+            active = false;
         }
 
@@ -1735,5 +1736,5 @@
 
         private double getNearestAngle(double angle) {
-            double delta,minDelta=1e5, bestAngle=0.0;
+            double delta, minDelta = 1e5, bestAngle = 0.0;
             for (double snapAngle : snapAngles) {
                 delta = getAngleDelta(angle, snapAngle);
@@ -1744,5 +1745,5 @@
             }
             if (Math.abs(bestAngle-360) < 1e-3) {
-                bestAngle=0;
+                bestAngle = 0;
             }
             return bestAngle;
@@ -1751,5 +1752,5 @@
         private double getAngleDelta(double a, double b) {
             double delta = Math.abs(a-b);
-            if (delta>180)
+            if (delta > 180)
                 return 360-delta;
             else
@@ -1778,5 +1779,5 @@
         @Override
         public void actionPerformed(ActionEvent e) {
-            if (snapHelper!=null) {
+            if (snapHelper != null) {
                 snapHelper.toggleSnapping();
             }
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 8510)
@@ -233,5 +233,5 @@
     private JCheckBoxMenuItem addDualAlignMenuItem() {
         int n = Main.main.menu.editMenu.getItemCount();
-        for (int i = n-1; i>0; i--) {
+        for (int i = n-1; i > 0; i--) {
             JMenuItem item = Main.main.menu.editMenu.getItem(i);
             if (item != null && item.getAction() != null && item.getAction() instanceof DualAlignChangeAction) {
@@ -297,5 +297,5 @@
 
     private void readPreferences() {
-        initialMoveDelay = Main.pref.getInteger("edit.initial-move-delay",200);
+        initialMoveDelay = Main.pref.getInteger("edit.initial-move-delay", 200);
         initialMoveThreshold = Main.pref.getInteger("extrude.initial-move-threshold", 1);
         mainColor = Main.pref.getColor(marktr("Extrude: main line"), null);
@@ -374,7 +374,7 @@
     @Override
     public void mousePressed(MouseEvent e) {
-        if(!Main.map.mapView.isActiveLayerVisible())
+        if (!Main.map.mapView.isActiveLayerVisible())
             return;
-        if (!(Boolean)this.getValue("active"))
+        if (!(Boolean) this.getValue("active"))
             return;
         if (e.getButton() != MouseEvent.BUTTON1)
@@ -453,5 +453,5 @@
     @Override
     public void mouseDragged(MouseEvent e) {
-        if(!Main.map.mapView.isActiveLayerVisible())
+        if (!Main.map.mapView.isActiveLayerVisible())
             return;
 
@@ -516,5 +516,5 @@
     public void mouseReleased(MouseEvent e) {
 
-        if(!Main.map.mapView.isActiveLayerVisible())
+        if (!Main.map.mapView.isActiveLayerVisible())
             return;
 
@@ -703,5 +703,5 @@
         Node locNode = MergeNodesAction.selectTargetLocationNode(changedNodes);
         Command mergeCmd = MergeNodesAction.mergeNodes(Main.main.getEditLayer(), changedNodes, targetNode, locNode);
-        if (mergeCmd!=null) {
+        if (mergeCmd != null) {
             Main.main.undoRedo.add(mergeCmd);
         } else {
@@ -772,5 +772,5 @@
             EastNorth targetPos) {
         EastNorth intersectionPoint;
-        if (segmentP1.distanceSq(segmentP2)>1e-7) {
+        if (segmentP1.distanceSq(segmentP2) > 1e-7) {
             intersectionPoint = Geometry.getLineLineIntersection(segmentP1, segmentP2, targetPos, targetPos.add(moveDirection));
         } else {
@@ -858,6 +858,6 @@
         EastNorth n1en = selectedSegment.getFirstNode().getEastNorth();
         EastNorth n2en = selectedSegment.getSecondNode().getEastNorth();
-        if (n1en.distance(prevNode.getEastNorth())<1e-4 ||
-            n2en.distance(nextNode.getEastNorth())<1e-4) {
+        if (n1en.distance(prevNode.getEastNorth()) < 1e-4 ||
+            n2en.distance(nextNode.getEastNorth()) < 1e-4) {
             return false;
         }
@@ -1053,6 +1053,6 @@
                     if (p1.distance(p2) < 3) {
                         g2.setStroke(mainStroke);
-                        g2.drawOval((int)(p1.x-symbolSize/2), (int)(p1.y-symbolSize/2),
-                                (int)(symbolSize), (int)(symbolSize));
+                        g2.drawOval((int) (p1.x-symbolSize/2), (int) (p1.y-symbolSize/2),
+                                (int) (symbolSize), (int) (symbolSize));
                     } else {
                         Line2D oldline = new Line2D.Double(p1, p2);
@@ -1134,7 +1134,7 @@
 
         GeneralPath ra = new GeneralPath();
-        ra.moveTo((float)ra1.getX(), (float)ra1.getY());
-        ra.lineTo((float)ra2.getX(), (float)ra2.getY());
-        ra.lineTo((float)ra3.getX(), (float)ra3.getY());
+        ra.moveTo((float) ra1.getX(), (float) ra1.getY());
+        ra.lineTo((float) ra2.getX(), (float) ra2.getY());
+        ra.lineTo((float) ra3.getX(), (float) ra3.getY());
         g2.setStroke(helperStrokeRA);
         g2.draw(ra);
@@ -1169,6 +1169,6 @@
         try {
             AffineTransform invtrans = g.getTransform().createInverse();
-            Point2D widthpoint = invtrans.deltaTransform(new Point2D.Double(bounds.width,0), null);
-            Point2D heightpoint = invtrans.deltaTransform(new Point2D.Double(0,bounds.height), null);
+            Point2D widthpoint = invtrans.deltaTransform(new Point2D.Double(bounds.width, 0), null);
+            Point2D heightpoint = invtrans.deltaTransform(new Point2D.Double(0, bounds.height), null);
 
             // Here we should end up with a gross overestimate of the maximum viewport diagonal in what
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java	(revision 8510)
@@ -149,5 +149,5 @@
         addNodeStroke = GuiHelper.getCustomizedStroke(Main.pref.get("improvewayaccuracy.stroke.add-node", "1"));
         deleteNodeStroke = GuiHelper.getCustomizedStroke(Main.pref.get("improvewayaccuracy.stroke.delete-node", "1"));
-        dotSize = Main.pref.getInteger("improvewayaccuracy.dot-size",6);
+        dotSize = Main.pref.getInteger("improvewayaccuracy.dot-size", 6);
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/MapMode.java	(revision 8510)
@@ -100,5 +100,5 @@
     protected void updateKeyModifiers(int modifiers) {
         ctrl = (modifiers & ActionEvent.CTRL_MASK) != 0;
-        alt = (modifiers & (ActionEvent.ALT_MASK|InputEvent.ALT_GRAPH_MASK)) != 0;
+        alt = (modifiers & (ActionEvent.ALT_MASK | InputEvent.ALT_GRAPH_MASK)) != 0;
         shift = (modifiers & ActionEvent.SHIFT_MASK) != 0;
     }
@@ -112,16 +112,36 @@
 
     @Override
-    public void mouseReleased(MouseEvent e) {requestFocusInMapView();}
+    public void mouseReleased(MouseEvent e) {
+        requestFocusInMapView();
+    }
+
     @Override
-    public void mouseExited(MouseEvent e) {}
+    public void mouseExited(MouseEvent e) {
+        // Do nothing
+    }
+
     @Override
-    public void mousePressed(MouseEvent e) {requestFocusInMapView();}
+    public void mousePressed(MouseEvent e) {
+        requestFocusInMapView();
+    }
+
     @Override
-    public void mouseClicked(MouseEvent e) {}
+    public void mouseClicked(MouseEvent e) {
+        // Do nothing
+    }
+
     @Override
-    public void mouseEntered(MouseEvent e) {}
+    public void mouseEntered(MouseEvent e) {
+        // Do nothing
+    }
+
     @Override
-    public void mouseMoved(MouseEvent e) {}
+    public void mouseMoved(MouseEvent e) {
+        // Do nothing
+    }
+
     @Override
-    public void mouseDragged(MouseEvent e) {}
+    public void mouseDragged(MouseEvent e) {
+        // Do nothing
+    }
 }
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 8510)
@@ -106,7 +106,9 @@
             c = ImageProvider.getCursor(main, sub);
         }
+
         private SelectActionCursor(int systemCursor) {
             c = Cursor.getPredefinedCursor(systemCursor);
         }
+
         public Cursor cursor() {
             return c;
@@ -218,6 +220,6 @@
     @Override
     public void modifiersChanged(int modifiers) {
-        if (!Main.isDisplayingMapView() || oldEvent==null) return;
-        if(giveUserFeedback(oldEvent, modifiers)) {
+        if (!Main.isDisplayingMapView() || oldEvent == null) return;
+        if (giveUserFeedback(oldEvent, modifiers)) {
             mv.repaint();
         }
@@ -251,5 +253,5 @@
 
         virtualManager.clear();
-        if(mode == Mode.MOVE) {
+        if (mode == Mode.MOVE) {
             if (!dragInProgress() && virtualManager.activateVirtualNodeNearPoint(e.getPoint())) {
                 DataSet ds = getCurrentDataSet();
@@ -266,14 +268,14 @@
 
         // return early if there can't be any highlights
-        if(!drawTargetHighlight || mode != Mode.MOVE || c.isEmpty())
+        if (!drawTargetHighlight || mode != Mode.MOVE || c.isEmpty())
             return repaintIfRequired(newHighlights);
 
         // CTRL toggles selection, but if while dragging CTRL means merge
         final boolean isToggleMode = ctrl && !dragInProgress();
-        for(OsmPrimitive x : c) {
+        for (OsmPrimitive x : c) {
             // only highlight primitives that will change the selection
             // when clicked. I.e. don't highlight selected elements unless
             // we are in toggle mode.
-            if(isToggleMode || !x.isSelected()) {
+            if (isToggleMode || !x.isSelected()) {
                 newHighlights.add(x);
             }
@@ -293,5 +295,5 @@
         switch(mode) {
         case MOVE:
-            if(virtualManager.hasVirtualNode()) {
+            if (virtualManager.hasVirtualNode()) {
                 c = "virtual_node";
                 break;
@@ -300,8 +302,8 @@
             final OsmPrimitive osm = it.hasNext() ? it.next() : null;
 
-            if(dragInProgress()) {
+            if (dragInProgress()) {
                 // only consider merge if ctrl is pressed and there are nodes in
                 // the selection that could be merged
-                if(!ctrl || getCurrentDataSet().getSelectedNodes().isEmpty()) {
+                if (!ctrl || getCurrentDataSet().getSelectedNodes().isEmpty()) {
                     c = "move";
                     break;
@@ -316,7 +318,7 @@
             c = (osm instanceof Node) ? "node" : c;
             c = (osm instanceof Way) ? "way" : c;
-            if(shift) {
+            if (shift) {
                 c += "_add";
-            } else if(ctrl) {
+            } else if (ctrl) {
                 c += osm == null || osm.isSelected() ? "_rm" : "_add";
             }
@@ -346,12 +348,12 @@
         boolean needsRepaint = false;
         DataSet ds = getCurrentDataSet();
-        if(ds != null && !ds.getHighlightedVirtualNodes().isEmpty()) {
+        if (ds != null && !ds.getHighlightedVirtualNodes().isEmpty()) {
             needsRepaint = true;
             ds.clearHighlightedVirtualNodes();
         }
-        if(oldHighlights.isEmpty())
+        if (oldHighlights.isEmpty())
             return needsRepaint;
 
-        for(OsmPrimitive prim : oldHighlights) {
+        for (OsmPrimitive prim : oldHighlights) {
             prim.setHighlighted(false);
         }
@@ -361,10 +363,10 @@
 
     private boolean repaintIfRequired(Set<OsmPrimitive> newHighlights) {
-        if(!drawTargetHighlight)
+        if (!drawTargetHighlight)
             return false;
 
         boolean needsRepaint = false;
-        for(OsmPrimitive x : newHighlights) {
-            if(oldHighlights.contains(x)) {
+        for (OsmPrimitive x : newHighlights) {
+            if (oldHighlights.contains(x)) {
                 continue;
             }
@@ -373,5 +375,5 @@
         }
         oldHighlights.removeAll(newHighlights);
-        for(OsmPrimitive x : oldHighlights) {
+        for (OsmPrimitive x : oldHighlights) {
             x.setHighlighted(false);
             needsRepaint = true;
@@ -412,5 +414,5 @@
         mouseDownTime = System.currentTimeMillis();
         lastMousePos = e.getPoint();
-        startEN = mv.getEastNorth(lastMousePos.x,lastMousePos.y);
+        startEN = mv.getEastNorth(lastMousePos.x, lastMousePos.y);
 
         // primitives under cursor are stored in c collection
@@ -418,5 +420,5 @@
         OsmPrimitive nearestPrimitive = mv.getNearestNodeOrWay(e.getPoint(), mv.isSelectablePredicate, true);
 
-        determineMapMode(nearestPrimitive!=null);
+        determineMapMode(nearestPrimitive != null);
 
         switch(mode) {
@@ -473,5 +475,5 @@
         }
         oldEvent = e;
-        if(giveUserFeedback(e)) {
+        if (giveUserFeedback(e)) {
             mv.repaint();
         }
@@ -520,5 +522,5 @@
             final OsmPrimitive p = canMerge ? findNodeToMergeTo(e.getPoint()) : null;
             boolean needsRepaint = removeHighlighting();
-            if(p != null) {
+            if (p != null) {
                 p.setHighlighted(true);
                 oldHighlights.add(p);
@@ -529,5 +531,5 @@
             // when dragging a node onto another one and then press CTRL to merge
             oldEvent = e;
-            if(needsRepaint) {
+            if (needsRepaint) {
                 mv.repaint();
             }
@@ -570,5 +572,5 @@
     @Override
     public void mouseExited(MouseEvent e) {
-        if(removeHighlighting()) {
+        if (removeHighlighting()) {
             mv.repaint();
         }
@@ -629,5 +631,5 @@
         // selected beforehand this would put us into move mode as well, which breaks
         // the cycling through primitives on top of each other (see #6739).
-        if(e.getButton() == MouseEvent.BUTTON2) {
+        if (e.getButton() == MouseEvent.BUTTON2) {
             removeHighlighting();
         } else {
@@ -954,5 +956,5 @@
                 return tr("Release the mouse button to select the objects in the rectangle.");
             else if (mode == Mode.MOVE && (System.currentTimeMillis() - mouseDownTime >= initialMoveDelay)) {
-                final boolean canMerge = getCurrentDataSet()!=null && !getCurrentDataSet().getSelectedNodes().isEmpty();
+                final boolean canMerge = getCurrentDataSet() != null && !getCurrentDataSet().getSelectedNodes().isEmpty();
                 final String mergeHelp = canMerge ? " " + tr("Ctrl to merge with nearest node.") : "";
                 return tr("Release the mouse button to stop moving.") + mergeHelp;
@@ -962,5 +964,6 @@
                 return tr("Release the mouse button to stop scaling.");
         }
-        return tr("Move objects by dragging; Shift to add to selection (Ctrl to toggle); Shift-Ctrl to rotate selected; Alt-Ctrl to scale selected; or change selection");
+        return tr("Move objects by dragging; Shift to add to selection (Ctrl to toggle); Shift-Ctrl to rotate selected; " +
+                  "Alt-Ctrl to scale selected; or change selection");
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/relation/DeleteRelationsAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/DeleteRelationsAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/relation/DeleteRelationsAction.java	(revision 8510)
@@ -21,5 +21,5 @@
      */
     public DeleteRelationsAction() {
-        putValue(SHORT_DESCRIPTION,tr("Delete the selected relation"));
+        putValue(SHORT_DESCRIPTION, tr("Delete the selected relation"));
         putValue(NAME, tr("Delete"));
         putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));
@@ -32,5 +32,5 @@
                 .deleteRelation(Main.main.getEditLayer(), toDelete);
         // clear selection after deletion
-        if (Main.map.relationListDialog!=null)
+        if (Main.map.relationListDialog != null)
                 Main.map.relationListDialog.selectRelations(null);
     }
Index: trunk/src/org/openstreetmap/josm/actions/relation/DownloadMembersAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/DownloadMembersAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/relation/DownloadMembersAction.java	(revision 8510)
@@ -42,5 +42,5 @@
     public void setPrimitives(Collection<? extends OsmPrimitive> primitives) {
         // selected non-new relations
-        this.relations = Utils.filter(getRelations(primitives), new Predicate<Relation>(){
+        this.relations = Utils.filter(getRelations(primitives), new Predicate<Relation>() {
             @Override public boolean evaluate(Relation r) {
                 return !r.isNew();
Index: trunk/src/org/openstreetmap/josm/actions/relation/DownloadSelectedIncompleteMembersAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/DownloadSelectedIncompleteMembersAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/relation/DownloadSelectedIncompleteMembersAction.java	(revision 8510)
@@ -65,5 +65,5 @@
     public void setPrimitives(Collection<? extends OsmPrimitive> primitives) {
         // selected relations with incomplete members
-        this.relations = Utils.filter(getRelations(primitives), new Predicate<Relation>(){
+        this.relations = Utils.filter(getRelations(primitives), new Predicate<Relation>() {
             @Override
             public boolean evaluate(Relation r) {
@@ -76,5 +76,5 @@
     @Override
     protected void updateEnabledState() {
-        setEnabled(!relations.isEmpty() &&!incompleteMembers.isEmpty() && !Main.isOffline(OnlineResource.OSM_API));
+        setEnabled(!relations.isEmpty() && !incompleteMembers.isEmpty() && !Main.isOffline(OnlineResource.OSM_API));
     }
 }
Index: trunk/src/org/openstreetmap/josm/actions/relation/DuplicateRelationAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/DuplicateRelationAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/relation/DuplicateRelationAction.java	(revision 8510)
@@ -52,5 +52,5 @@
     protected void updateEnabledState() {
         // only one selected relation can be edited
-        setEnabled(relations.size()==1);
+        setEnabled(relations.size() == 1);
     }
 }
Index: trunk/src/org/openstreetmap/josm/actions/relation/SelectInRelationListAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/SelectInRelationListAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/relation/SelectInRelationListAction.java	(revision 8510)
@@ -26,5 +26,5 @@
     @Override
     public void actionPerformed(ActionEvent e) {
-        if (!isEnabled() || relations.isEmpty() || Main.map==null || Main.map.relationListDialog==null) return;
+        if (!isEnabled() || relations.isEmpty() || Main.map == null || Main.map.relationListDialog == null) return;
         Main.map.relationListDialog.unfurlDialog();
         Main.map.relationListDialog.selectRelations(relations);
Index: trunk/src/org/openstreetmap/josm/actions/relation/SelectMembersAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/SelectMembersAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/relation/SelectMembersAction.java	(revision 8510)
@@ -27,5 +27,5 @@
      */
     public SelectMembersAction(boolean add) {
-        putValue(SHORT_DESCRIPTION,add ? tr("Add the members of all selected relations to current selection")
+        putValue(SHORT_DESCRIPTION, add ? tr("Add the members of all selected relations to current selection")
                 : tr("Select the members of all selected relations"));
         putValue(SMALL_ICON, ImageProvider.get("selectall"));
Index: trunk/src/org/openstreetmap/josm/actions/relation/SelectRelationAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/relation/SelectRelationAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/relation/SelectRelationAction.java	(revision 8510)
@@ -35,5 +35,5 @@
         if (!isEnabled() || relations.isEmpty()) return;
         OsmDataLayer editLayer = Main.main.getEditLayer();
-        if (editLayer==null || editLayer.data==null) return;
+        if (editLayer == null || editLayer.data == null) return;
         if (add) {
             editLayer.data.addSelected(relations);
Index: trunk/src/org/openstreetmap/josm/actions/search/PushbackTokenizer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/PushbackTokenizer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/search/PushbackTokenizer.java	(revision 8510)
@@ -70,5 +70,4 @@
     }
 
-
     private void getChar() {
         try {
@@ -86,9 +85,9 @@
         StringBuilder s = new StringBuilder();
         boolean escape = false;
-        while (c != -1 && (escape || (!sChars.contains((char)c) && (quoted || !Character.isWhitespace(c))))) {
+        while (c != -1 && (escape || (!sChars.contains((char) c) && (quoted || !Character.isWhitespace(c))))) {
             if (c == '\\' && !escape) {
                 escape = true;
             } else {
-                s.append((char)c);
+                s.append((char) c);
                 escape = false;
             }
Index: trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 8510)
@@ -99,5 +99,5 @@
 
     public static void saveToHistory(SearchSetting s) {
-        if(searchHistory.isEmpty() || !s.equals(searchHistory.getFirst())) {
+        if (searchHistory.isEmpty() || !s.equals(searchHistory.getFirst())) {
             searchHistory.addFirst(new SearchSetting(s));
         } else if (searchHistory.contains(s)) {
@@ -261,5 +261,5 @@
         left.add(in_selection, GBC.eop());
         left.add(caseSensitive, GBC.eol());
-        if(Main.pref.getBoolean("expert", false)) {
+        if (Main.pref.getBoolean("expert", false)) {
             left.add(allElements, GBC.eol());
             left.add(regexSearch, GBC.eol());
@@ -306,5 +306,5 @@
         int result = dialog.getValue();
 
-        if(result != 1) return null;
+        if (result != 1) return null;
 
         // User pressed OK - let's perform the search
@@ -342,5 +342,6 @@
         right.add(new SearchKeywordRow(hcbSearchString)
                 .addTitle(tr("basics"))
-                .addKeyword("<i>key</i>:<i>valuefragment</i>", null, tr("''valuefragment'' anywhere in ''key''"), "name:str matches name=Bakerstreet")
+                .addKeyword("<i>key</i>:<i>valuefragment</i>", null,
+                        tr("''valuefragment'' anywhere in ''key''"), "name:str matches name=Bakerstreet")
                 .addKeyword("-<i>key</i>:<i>valuefragment</i>", null, tr("''valuefragment'' nowhere in ''key''"))
                 .addKeyword("<i>key</i>=<i>value</i>", null, tr("''key'' with exactly ''value''"))
@@ -350,5 +351,6 @@
                 .addKeyword("<i>key</i>><i>value</i>", null, tr("matches if ''key'' is greater than ''value'' (analogously, less than)"))
                 .addKeyword("\"key\"=\"value\"", "\"\"=\"\"",
-                        tr("to quote operators.<br>Within quoted strings the <b>\"</b> and <b>\\</b> characters need to be escaped by a preceding <b>\\</b> (e.g. <b>\\\"</b> and <b>\\\\</b>)."),
+                        tr("to quote operators.<br>Within quoted strings the <b>\"</b> and <b>\\</b> characters need to be escaped " +
+                           "by a preceding <b>\\</b> (e.g. <b>\\\"</b> and <b>\\\\</b>)."),
                         "\"addr:street\"")
                 , GBC.eol());
@@ -420,5 +422,5 @@
     public static void search() {
         SearchSetting se = showSearchDialog(lastSearch);
-        if(se != null) {
+        if (se != null) {
             searchWithHistory(se);
         }
@@ -460,5 +462,5 @@
 
             Collection<OsmPrimitive> all;
-            if(s.allElements) {
+            if (s.allElements) {
                 all = Main.main.getCurrentDataSet().allPrimitives();
             } else {
@@ -505,5 +507,5 @@
         try {
             String searchText = s.text;
-            if (s instanceof Filter && ((Filter)s).inverted) {
+            if (s instanceof Filter && ((Filter) s).inverted) {
                 searchText = String.format("-(%s)", searchText);
             }
@@ -543,7 +545,7 @@
         final DataSet ds = Main.main.getCurrentDataSet();
         Collection<OsmPrimitive> sel = new HashSet<>(ds.getAllSelected());
-        int foundMatches = getSelection(s, sel, new Predicate<OsmPrimitive>(){
+        int foundMatches = getSelection(s, sel, new Predicate<OsmPrimitive>() {
             @Override
-            public boolean evaluate(OsmPrimitive o){
+            public boolean evaluate(OsmPrimitive o) {
                 return ds.isSelected(o);
             }
@@ -617,5 +619,5 @@
         @Override
         public boolean equals(Object other) {
-            if(!(other instanceof SearchSetting))
+            if (!(other instanceof SearchSetting))
                 return false;
             SearchSetting o = (SearchSetting) other;
Index: trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 8510)
@@ -89,9 +89,9 @@
             // TODO: check for keyword collisions
             if (factory instanceof SimpleMatchFactory) {
-                simpleMatchFactoryMap.put(keyword, (SimpleMatchFactory)factory);
+                simpleMatchFactoryMap.put(keyword, (SimpleMatchFactory) factory);
             } else if (factory instanceof UnaryMatchFactory) {
-                unaryMatchFactoryMap.put(keyword, (UnaryMatchFactory)factory);
+                unaryMatchFactoryMap.put(keyword, (UnaryMatchFactory) factory);
             } else if (factory instanceof BinaryMatchFactory) {
-                binaryMatchFactoryMap.put(keyword, (BinaryMatchFactory)factory);
+                binaryMatchFactoryMap.put(keyword, (BinaryMatchFactory) factory);
             } else
                 throw new AssertionError("Unknown match factory");
@@ -326,12 +326,15 @@
             super(match);
         }
+
         @Override
         public boolean match(OsmPrimitive osm) {
             return !match.match(osm);
         }
+
         @Override
         public String toString() {
             return "!" + match;
         }
+
         public Match getMatch() {
             return match;
@@ -350,4 +353,5 @@
             this.defaultValue = defaultValue;
         }
+
         @Override
         public boolean match(OsmPrimitive osm) {
@@ -367,8 +371,10 @@
             super(lhs, rhs);
         }
+
         @Override
         public boolean match(OsmPrimitive osm) {
             return lhs.match(osm) && rhs.match(osm);
         }
+
         @Override
         public String toString() {
@@ -384,8 +390,10 @@
             super(lhs, rhs);
         }
+
         @Override
         public boolean match(OsmPrimitive osm) {
             return lhs.match(osm) || rhs.match(osm);
         }
+
         @Override
         public String toString() {
@@ -401,8 +409,10 @@
             super(lhs, rhs);
         }
+
         @Override
         public boolean match(OsmPrimitive osm) {
             return lhs.match(osm) ^ rhs.match(osm);
         }
+
         @Override
         public String toString() {
@@ -418,11 +428,14 @@
             super(range);
         }
+
         public Id(PushbackTokenizer tokenizer) throws ParseError {
             this(tokenizer.readRange(tr("Range of primitive ids expected")));
         }
+
         @Override
         protected Long getNumber(OsmPrimitive osm) {
             return osm.isNew() ? 0 : osm.getUniqueId();
         }
+
         @Override
         protected String getString() {
@@ -438,11 +451,14 @@
             super(range);
         }
+
         public ChangesetId(PushbackTokenizer tokenizer) throws ParseError {
             this(tokenizer.readRange(tr("Range of changeset ids expected")));
         }
+
         @Override
         protected Long getNumber(OsmPrimitive osm) {
             return (long) osm.getChangesetId();
         }
+
         @Override
         protected String getString() {
@@ -458,11 +474,14 @@
             super(range);
         }
+
         public Version(PushbackTokenizer tokenizer) throws ParseError {
             this(tokenizer.readRange(tr("Range of versions expected")));
         }
+
         @Override
         protected Long getNumber(OsmPrimitive osm) {
             return (long) osm.getVersion();
         }
+
         @Override
         protected String getString() {
@@ -551,7 +570,7 @@
                 } else {
                     mv = osm.get(key);
-                    if(!caseSensitive && mv == null) {
+                    if (!caseSensitive && mv == null) {
                         for (String k: osm.keySet()) {
-                            if(key.equalsIgnoreCase(k)) {
+                            if (key.equalsIgnoreCase(k)) {
                                 mv = osm.get(k);
                                 break;
@@ -574,4 +593,5 @@
             return false;
         }
+
         @Override
         public String toString() {
@@ -628,5 +648,5 @@
                 throw new ParseError(tr("Key cannot be empty when tag operator is used. Sample use: key=value"));
             this.key = key;
-            this.value = value == null?"":value;
+            this.value = value == null ? "" : value;
             if ("".equals(this.value) && "*".equals(key)) {
                 mode = Mode.NONE;
@@ -800,4 +820,5 @@
             return false;
         }
+
         @Override
         public String toString() {
@@ -808,4 +829,5 @@
     private static class ExactType extends Match {
         private final OsmPrimitiveType type;
+
         public ExactType(String type) throws ParseError {
             this.type = OsmPrimitiveType.from(type);
@@ -814,8 +836,10 @@
                         type));
         }
+
         @Override
         public boolean match(OsmPrimitive osm) {
             return type.equals(osm.getType());
         }
+
         @Override
         public String toString() {
@@ -829,4 +853,5 @@
     private static class UserMatch extends Match {
         private String user;
+
         public UserMatch(String user) {
             if ("anonymous".equals(user)) {
@@ -856,4 +881,5 @@
     private static class RoleMatch extends Match {
         private String role;
+
         public RoleMatch(String role) {
             if (role == null) {
@@ -871,5 +897,5 @@
                         if (m.getMember() == osm) {
                             String testRole = m.getRole();
-                            if(role.equals(testRole == null ? "" : testRole))
+                            if (role.equals(testRole == null ? "" : testRole))
                                 return true;
                         }
@@ -1068,5 +1094,4 @@
             return "timestamp";
         }
-
     }
 
@@ -1079,4 +1104,5 @@
             return osm.isNew();
         }
+
         @Override
         public String toString() {
@@ -1093,4 +1119,5 @@
             return osm.isModified() || osm.isNewOrUndeleted();
         }
+
         @Override
         public String toString() {
@@ -1107,4 +1134,5 @@
             return Main.main.getCurrentDataSet().isSelected(osm);
         }
+
         @Override
         public String toString() {
@@ -1123,4 +1151,5 @@
             return osm.isIncomplete();
         }
+
         @Override
         public String toString() {
@@ -1139,4 +1168,5 @@
             return !osm.isTagged() && !osm.isIncomplete();
         }
+
         @Override
         public String toString() {
@@ -1153,4 +1183,5 @@
             return osm instanceof Way && ((Way) osm).isClosed();
         }
+
         @Override
         public String toString() {
@@ -1166,4 +1197,5 @@
             super(m);
         }
+
         @Override
         public boolean match(OsmPrimitive osm) {
@@ -1171,9 +1203,9 @@
 
             if (osm instanceof Way) {
-                for (Node n : ((Way)osm).getNodes()) {
+                for (Node n : ((Way) osm).getNodes()) {
                     isParent |= match.match(n);
                 }
             } else if (osm instanceof Relation) {
-                for (RelationMember member : ((Relation)osm).getMembers()) {
+                for (RelationMember member : ((Relation) osm).getMembers()) {
                     isParent |= match.match(member.getMember());
                 }
@@ -1181,4 +1213,5 @@
             return isParent;
         }
+
         @Override
         public String toString() {
@@ -1204,4 +1237,5 @@
             return isChild;
         }
+
         @Override
         public String toString() {
@@ -1271,5 +1305,4 @@
     private abstract static class InArea extends Match {
 
-        protected abstract Bounds getBounds();
         protected final boolean all;
 
@@ -1280,4 +1313,6 @@
             this.all = all;
         }
+
+        protected abstract Bounds getBounds();
 
         @Override
@@ -1337,7 +1372,9 @@
             super(msg);
         }
+
         public ParseError(String msg, Throwable cause) {
             super(msg, cause);
         }
+
         public ParseError(Token expected, Token found) {
             this(tr("Unexpected token. Expected {0}, found {1}", expected, found));
Index: trunk/src/org/openstreetmap/josm/actions/upload/ApiPreconditionCheckerHook.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/upload/ApiPreconditionCheckerHook.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/upload/ApiPreconditionCheckerHook.java	(revision 8510)
@@ -79,9 +79,9 @@
 
             if (osmPrimitive instanceof Way &&
-                    ((Way)osmPrimitive).getNodesCount() > maxNodes) {
+                    ((Way) osmPrimitive).getNodesCount() > maxNodes) {
                 JOptionPane.showMessageDialog(
                         Main.parent,
                         tr("{0} nodes in way {1} exceed the max. allowed number of nodes {2}",
-                                ((Way)osmPrimitive).getNodesCount(),
+                                ((Way) osmPrimitive).getNodesCount(),
                                 Long.toString(osmPrimitive.getId()),
                                 maxNodes
Index: trunk/src/org/openstreetmap/josm/actions/upload/CyclicUploadDependencyException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/upload/CyclicUploadDependencyException.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/upload/CyclicUploadDependencyException.java	(revision 8510)
@@ -34,5 +34,5 @@
         sb.append(tr("Cyclic dependency between relations:"))
           .append('[');
-        for (int i=0; i< cycle.size(); i++) {
+        for (int i = 0; i < cycle.size(); i++) {
             if (i > 0) {
                 sb.append(',');
Index: trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/upload/FixDataHook.java	(revision 8510)
@@ -47,5 +47,5 @@
             @Override
             public boolean fixKeys(Map<String, String> keys, OsmPrimitive osm) {
-                if(osm instanceof Relation && "multipolygon".equals(keys.get("type")) && "administrative".equals(keys.get("boundary"))) {
+                if (osm instanceof Relation && "multipolygon".equals(keys.get("type")) && "administrative".equals(keys.get("boundary"))) {
                     keys.put("type", "boundary");
                     return true;
@@ -81,11 +81,11 @@
                 String k = Tag.removeWhiteSpaces(e.getKey());
                 boolean drop = k.isEmpty() || v.isEmpty();
-                if(!e.getKey().equals(k)) {
-                    if(drop || !keys.containsKey(k)) {
+                if (!e.getKey().equals(k)) {
+                    if (drop || !keys.containsKey(k)) {
                         newKeys.put(e.getKey(), null);
-                        if(!drop)
+                        if (!drop)
                             newKeys.put(k, v);
                     }
-                } else if(!e.getValue().equals(v)) {
+                } else if (!e.getValue().equals(v)) {
                     newKeys.put(k, v.isEmpty() ? null : v);
                 } else if (drop) {
@@ -124,9 +124,9 @@
         @Override
         public boolean fixKeys(Map<String, String> keys, OsmPrimitive osm) {
-            if(keys.containsKey(oldKey) && !keys.containsKey(newKey)) {
+            if (keys.containsKey(oldKey) && !keys.containsKey(newKey)) {
                 keys.put(newKey, keys.get(oldKey));
                 keys.put(oldKey, null);
                 return true;
-            } else if(keys.containsKey(oldKey) && keys.containsKey(newKey) && keys.get(oldKey).equals(keys.get(newKey))) {
+            } else if (keys.containsKey(oldKey) && keys.containsKey(newKey) && keys.get(oldKey).equals(keys.get(newKey))) {
                 keys.put(oldKey, null);
                 return true;
@@ -166,8 +166,8 @@
         @Override
         public boolean fixKeys(Map<String, String> keys, OsmPrimitive osm) {
-            if(oldValue.equals(keys.get(oldKey)) && (newKey.equals(oldKey)
+            if (oldValue.equals(keys.get(oldKey)) && (newKey.equals(oldKey)
             || !keys.containsKey(newKey) || keys.get(newKey).equals(newValue))) {
                 keys.put(newKey, newValue);
-                if(!newKey.equals(oldKey))
+                if (!newKey.equals(oldKey))
                     keys.put(oldKey, null);
                 return true;
@@ -183,5 +183,5 @@
     @Override
     public boolean checkUpload(APIDataSet apiDataSet) {
-        if(!Main.pref.getBoolean("fix.data.on.upload", true))
+        if (!Main.pref.getBoolean("fix.data.on.upload", true))
             return true;
 
@@ -191,16 +191,16 @@
         for (OsmPrimitive osm : objectsToUpload) {
             Map<String, String> keys = new HashMap<>(osm.getKeys());
-            if(!keys.isEmpty()) {
+            if (!keys.isEmpty()) {
                 boolean modified = false;
                 for (FixData fix : deprecated) {
-                    if(fix.fixKeys(keys, osm))
+                    if (fix.fixKeys(keys, osm))
                         modified = true;
                 }
-                if(modified)
+                if (modified)
                     cmds.add(new ChangePropertyCommand(Collections.singleton(osm), keys));
             }
         }
 
-        if(!cmds.isEmpty())
+        if (!cmds.isEmpty())
             Main.main.undoRedo.add(new SequenceCommand(tr("Fix deprecated tags"), cmds));
         return true;
Index: trunk/src/org/openstreetmap/josm/actions/upload/RelationUploadOrderHook.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/upload/RelationUploadOrderHook.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/upload/RelationUploadOrderHook.java	(revision 8510)
@@ -48,8 +48,8 @@
         model.addColumn(tr("Relation ..."));
         model.addColumn(tr("... refers to relation"));
-        for (int i=0; i<dep.size()-1;i++) {
+        for (int i = 0; i < dep.size()-1; i++) {
             Relation r1 = dep.get(i);
             Relation r2 = dep.get(i+1);
-            model.addRow(new Relation[] {r1,r2});
+            model.addRow(new Relation[] {r1, r2});
         }
         JTable tbl = new JTable(model);
@@ -70,5 +70,5 @@
         Relation last = dep.get(dep.size() -1);
         Iterator<Relation> it = dep.iterator();
-        while(it.hasNext()) {
+        while (it.hasNext()) {
             if (it.next() != last) {
                 it.remove();
@@ -97,5 +97,5 @@
             apiDataSet.adjustRelationUploadOrder();
             return true;
-        } catch(CyclicUploadDependencyException e) {
+        } catch (CyclicUploadDependencyException e) {
             warnCyclicUploadDependency(e);
             return false;
Index: trunk/src/org/openstreetmap/josm/actions/upload/UploadNotesTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/upload/UploadNotesTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/actions/upload/UploadNotesTask.java	(revision 8510)
@@ -65,5 +65,5 @@
             OsmApi api = OsmApi.getOsmApi();
             for (Note note : noteData.getNotes()) {
-                if(isCanceled) {
+                if (isCanceled) {
                     Main.info("Note upload interrupted by user");
                     break;
Index: trunk/src/org/openstreetmap/josm/command/AddCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/AddCommand.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/command/AddCommand.java	(revision 8510)
@@ -52,5 +52,5 @@
         if (osm instanceof Way) {
             // Fix #10557 - node icon not updated after undoing/redoing addition of a way
-            ((Way)osm).clearCachedNodeStyles();
+            ((Way) osm).clearCachedNodeStyles();
         }
     }
Index: trunk/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java	(revision 8510)
@@ -69,5 +69,6 @@
     }
 
-    @Override public boolean executeCommand() {
+    @Override
+    public boolean executeCommand() {
         Collection<OsmPrimitive> primitivesToSelect;
         if (createdPrimitives == null) { // first time execution
@@ -94,5 +95,5 @@
 
             // Then load ways and relations
-            for (int i=0; i<newPrimitives.size(); i++) {
+            for (int i = 0; i < newPrimitives.size(); i++) {
                 if (!(newPrimitives.get(i) instanceof Node)) {
                     newPrimitives.get(i).load(data.get(i));
Index: trunk/src/org/openstreetmap/josm/command/ChangeCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/ChangeCommand.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/command/ChangeCommand.java	(revision 8510)
@@ -54,5 +54,5 @@
         CheckParameterUtil.ensureParameterNotNull(osm, "osm");
         CheckParameterUtil.ensureParameterNotNull(newOsm, "newOsm");
-        if (newOsm instanceof Way && ((Way)newOsm).getNodesCount() == 0) {
+        if (newOsm instanceof Way && ((Way) newOsm).getNodesCount() == 0) {
             // Do not allow to create empty ways (see #7465)
             throw new IllegalArgumentException(tr("New way {0} has 0 nodes", newOsm));
Index: trunk/src/org/openstreetmap/josm/command/ChangePropertyKeyCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/ChangePropertyKeyCommand.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/command/ChangePropertyKeyCommand.java	(revision 8510)
@@ -88,5 +88,5 @@
             text += " "+tr(v.className)+" "+v.name;
         } else {
-            text += " "+objects.size()+" "+trn("object","objects",objects.size());
+            text += " "+objects.size()+" "+trn("object", "objects", objects.size());
         }
         return text;
@@ -112,8 +112,10 @@
                     return v.name;
                 }
+
                 @Override
                 public Icon getDescriptionIcon() {
                     return v.icon;
                 }
+
                 @Override
                 public Collection<? extends OsmPrimitive> getParticipatingPrimitives() {
Index: trunk/src/org/openstreetmap/josm/command/Command.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/Command.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/command/Command.java	(revision 8510)
@@ -45,8 +45,10 @@
             orig.put(n, n.save());
         }
+
         @Override
         public void visit(Way w) {
             orig.put(w, w.save());
         }
+
         @Override
         public void visit(Relation e) {
@@ -68,5 +70,5 @@
          * @param node The node whose state has to be remembered
          */
-        public OldNodeState(Node node){
+        public OldNodeState(Node node) {
             latlon = node.getCoor();
             eastNorth = node.getEastNorth();
@@ -280,5 +282,5 @@
                     JOptionPane.QUESTION_MESSAGE,
                     JOptionPane.YES_OPTION);
-            if(!answer)
+            if (!answer)
                 return false;
         }
@@ -294,5 +296,5 @@
                     JOptionPane.QUESTION_MESSAGE,
                     JOptionPane.YES_OPTION);
-            if(!answer)
+            if (!answer)
                 return false;
         }
Index: trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 8510)
@@ -259,5 +259,5 @@
         if (!silent && !checkAndConfirmOutlyingDelete(parents, null))
             return null;
-        return new DeleteCommand(layer,parents);
+        return new DeleteCommand(layer, parents);
     }
 
@@ -405,5 +405,5 @@
             Set<RelationToChildReference> references = RelationToChildReference.getRelationToChildReferences(primitivesToDelete);
             Iterator<RelationToChildReference> it = references.iterator();
-            while(it.hasNext()) {
+            while (it.hasNext()) {
                 RelationToChildReference ref = it.next();
                 if (ref.getParent().isDeleted()) {
@@ -431,5 +431,5 @@
         //
         if (!primitivesToDelete.isEmpty()) {
-            cmds.add(new DeleteCommand(layer,primitivesToDelete));
+            cmds.add(new DeleteCommand(layer, primitivesToDelete));
         }
 
@@ -473,5 +473,5 @@
             chunks.add(n1);
             chunks.add(n2);
-            return SplitWayAction.splitWay(layer,ws.way, chunks, Collections.<OsmPrimitive>emptyList()).getCommand();
+            return SplitWayAction.splitWay(layer, ws.way, chunks, Collections.<OsmPrimitive>emptyList()).getCommand();
         }
     }
Index: trunk/src/org/openstreetmap/josm/command/PurgeCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/PurgeCommand.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/command/PurgeCommand.java	(revision 8510)
@@ -84,5 +84,5 @@
              * Loop from back to front to keep referential integrity.
              */
-            for (int i=toPurge.size()-1; i>=0; --i) {
+            for (int i = toPurge.size()-1; i >= 0; --i) {
                 OsmPrimitive osm = toPurge.get(i);
                 if (makeIncompleteDataByPrimId.containsKey(osm)) {
@@ -214,5 +214,5 @@
                 Integer i = numChilds.get(parent);
                 if (i != null) {
-                    numChilds.put((Relation)parent, i+1);
+                    numChilds.put((Relation) parent, i+1);
                 }
             }
Index: trunk/src/org/openstreetmap/josm/command/SequenceCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/SequenceCommand.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/command/SequenceCommand.java	(revision 8510)
@@ -50,5 +50,5 @@
 
     @Override public boolean executeCommand() {
-        for (int i=0; i < sequence.length; i++) {
+        for (int i = 0; i < sequence.length; i++) {
             boolean result = sequence[i].executeCommand();
             if (!result && !continueOnError) {
Index: trunk/src/org/openstreetmap/josm/command/TransformNodesCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/TransformNodesCommand.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/command/TransformNodesCommand.java	(revision 8510)
@@ -130,5 +130,5 @@
      */
     public EastNorth getNodesCenter() {
-        EastNorth sum = new EastNorth(0,0);
+        EastNorth sum = new EastNorth(0, 0);
 
         for (Node n : nodes) {
Index: trunk/src/org/openstreetmap/josm/command/conflict/ConflictAddCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/conflict/ConflictAddCommand.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/command/conflict/ConflictAddCommand.java	(revision 8510)
@@ -52,5 +52,5 @@
         try {
             getLayer().getConflicts().add(conflict);
-        } catch(IllegalStateException e) {
+        } catch (IllegalStateException e) {
             Main.error(e);
             warnBecauseOfDoubleConflict();
Index: trunk/src/org/openstreetmap/josm/command/conflict/ConflictResolveCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/conflict/ConflictResolveCommand.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/command/conflict/ConflictResolveCommand.java	(revision 8510)
@@ -57,5 +57,5 @@
     protected void reconstituteConflicts() {
         OsmDataLayer editLayer = getLayer();
-        for(Conflict<?> c : resolvedConflicts) {
+        for (Conflict<?> c : resolvedConflicts) {
             if (!editLayer.getConflicts().hasConflictForMy(c.getMy())) {
                 editLayer.getConflicts().add(c);
Index: trunk/src/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommand.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommand.java	(revision 8510)
@@ -49,7 +49,5 @@
     @Override
     public boolean executeCommand() {
-        // remember the current state of modified primitives, i.e. of
-        // OSM primitive 'my'
-        //
+        // remember the current state of modified primitives, i.e. of OSM primitive 'my'
         super.executeCommand();
 
@@ -57,6 +55,6 @@
             // do nothing
         } else if (decision.equals(MergeDecisionType.KEEP_THEIR)) {
-            Node my = (Node)conflict.getMy();
-            Node their = (Node)conflict.getTheir();
+            Node my = (Node) conflict.getMy();
+            Node their = (Node) conflict.getTheir();
             my.setCoor(their.getCoor());
         } else
@@ -65,5 +63,4 @@
 
         // remember the layer this command was applied to
-        //
         rememberConflict(conflict);
 
Index: trunk/src/org/openstreetmap/josm/command/conflict/ModifiedConflictResolveCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/conflict/ModifiedConflictResolveCommand.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/command/conflict/ModifiedConflictResolveCommand.java	(revision 8510)
@@ -40,5 +40,5 @@
         case RELATION: msg = marktr("Set the ''modified'' flag for relation {0}"); break;
         }
-        return tr(msg,conflict.getMy().getId());
+        return tr(msg, conflict.getMy().getId());
     }
 
Index: trunk/src/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommand.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommand.java	(revision 8510)
@@ -92,5 +92,5 @@
         //
         if (!editLayer.getConflicts().hasConflictForMy(my)) {
-            editLayer.getConflicts().add(my,their);
+            editLayer.getConflicts().add(my, their);
         }
     }
Index: trunk/src/org/openstreetmap/josm/command/conflict/VersionConflictResolveCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/conflict/VersionConflictResolveCommand.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/command/conflict/VersionConflictResolveCommand.java	(revision 8510)
@@ -56,5 +56,5 @@
             conflict.getMy().setOsmId(
                     conflict.getMy().getId(),
-                    (int)Math.max(myVersion, theirVersion)
+                    (int) Math.max(myVersion, theirVersion)
             );
             // update visiblity state
Index: trunk/src/org/openstreetmap/josm/corrector/CorrectionTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/corrector/CorrectionTable.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/corrector/CorrectionTable.java	(revision 8510)
@@ -26,5 +26,5 @@
             setFont(new Font(f.getName(), f.getStyle() | Font.BOLD, f.getSize()));
 
-            setText((String)value);
+            setText((String) value);
 
             return this;
@@ -59,6 +59,5 @@
     @SuppressWarnings("unchecked")
     public T getCorrectionTableModel() {
-        return (T)getModel();
+        return (T) getModel();
     }
-
 }
Index: trunk/src/org/openstreetmap/josm/corrector/CorrectionTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/corrector/CorrectionTableModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/corrector/CorrectionTableModel.java	(revision 8510)
@@ -26,5 +26,7 @@
 
     protected abstract boolean isBoldCell(int row, int column);
+
     public abstract String getCorrectionColumnName(int colIndex);
+
     public abstract Object getCorrectionValueAt(int rowIndex, int colIndex);
 
@@ -69,5 +71,5 @@
     public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
         if (columnIndex == applyColumn && aValue instanceof Boolean)
-            apply[rowIndex] = (Boolean)aValue;
+            apply[rowIndex] = (Boolean) aValue;
     }
 
Index: trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java	(revision 8510)
@@ -236,5 +236,5 @@
                 continue;
             }
-            Relation relation = (Relation)referrer;
+            Relation relation = (Relation) referrer;
             int position = 0;
             for (RelationMember member : relation.getMembers()) {
Index: trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java	(revision 8510)
@@ -144,9 +144,9 @@
                     OsmPrimitive clone = null;
                     if (primitive instanceof Way) {
-                        clone = new Way((Way)primitive);
+                        clone = new Way((Way) primitive);
                     } else if (primitive instanceof Node) {
-                        clone = new Node((Node)primitive);
+                        clone = new Node((Node) primitive);
                     } else if (primitive instanceof Relation) {
-                        clone = new Relation((Relation)primitive);
+                        clone = new Relation((Relation) primitive);
                     } else
                         throw new AssertionError();
Index: trunk/src/org/openstreetmap/josm/data/APIDataSet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/APIDataSet.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/APIDataSet.java	(revision 8510)
@@ -217,5 +217,5 @@
      * @throws CyclicUploadDependencyException if a cyclic dependency is detected
      */
-    public void adjustRelationUploadOrder() throws CyclicUploadDependencyException{
+    public void adjustRelationUploadOrder() throws CyclicUploadDependencyException {
         List<OsmPrimitive> newToAdd = new LinkedList<>();
         newToAdd.addAll(Utils.filteredCollection(toAdd, Node.class));
@@ -283,5 +283,5 @@
         public final void build(Collection<Relation> relations) {
             this.relations = new HashSet<>();
-            for(Relation relation: relations) {
+            for (Relation relation: relations) {
                 if (newOrUndeleted ? !relation.isNewOrUndeleted() : !relation.isDeleted()) {
                     continue;
@@ -290,5 +290,5 @@
                 for (RelationMember m: relation.getMembers()) {
                     if (m.isRelation() && (newOrUndeleted ? m.getMember().isNewOrUndeleted() : m.getMember().isDeleted())) {
-                        addDependency(relation, (Relation)m.getMember());
+                        addDependency(relation, (Relation) m.getMember());
                     }
                 }
@@ -309,5 +309,5 @@
         }
 
-        protected void visit(Stack<Relation> path, Relation current) throws CyclicUploadDependencyException{
+        protected void visit(Stack<Relation> path, Relation current) throws CyclicUploadDependencyException {
             if (path.contains(current)) {
                 path.push(current);
@@ -318,5 +318,5 @@
                 visited.add(current);
                 for (Relation dependent : getChildren(current)) {
-                    visit(path,dependent);
+                    visit(path, dependent);
                 }
                 uploadOrder.add(current);
Index: trunk/src/org/openstreetmap/josm/data/Bounds.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Bounds.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/Bounds.java	(revision 8510)
@@ -179,8 +179,8 @@
                     MessageFormat.format("Exactly four doubles expected in string, got {0}: {1}", components.length, asString));
         double[] values = new double[4];
-        for (int i=0; i<4; i++) {
+        for (int i = 0; i < 4; i++) {
             try {
                 values[i] = Double.parseDouble(components[i]);
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 throw new IllegalArgumentException(MessageFormat.format("Illegal double value ''{0}''", components[i]), e);
             }
@@ -281,5 +281,5 @@
             double lat = (minLat + maxLat) / 2;
             double lon = (minLon + maxLon - 360.0) / 2;
-            if (lon < -180.0){
+            if (lon < -180.0) {
                 lon += 360.0;
             }
Index: trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 8510)
@@ -93,11 +93,11 @@
      */
     public static void readXML(final File file, final Preferences prefs) {
-        synchronized(CustomConfigurator.class) {
-            busy=true;
+        synchronized (CustomConfigurator.class) {
+            busy = true;
         }
         new XMLCommandProcessor(prefs).openAndReadXML(file);
-        synchronized(CustomConfigurator.class) {
+        synchronized (CustomConfigurator.class) {
             CustomConfigurator.class.notifyAll();
-            busy=false;
+            busy = false;
         }
     }
@@ -159,5 +159,5 @@
      */
     public static void messageBox(String type, String text) {
-        if (type==null || type.isEmpty()) type="plain";
+        if (type == null || type.isEmpty()) type = "plain";
 
         switch (type.charAt(0)) {
@@ -186,10 +186,10 @@
                     JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, 2);
         }
-        if (answer==null) return -1; else return answer;
+        if (answer == null) return -1; else return answer;
     }
 
     public static String askForText(String text) {
         String s = JOptionPane.showInputDialog(Main.parent, text, tr("Enter text"), JOptionPane.QUESTION_MESSAGE);
-        if (s!=null && !(s=s.trim()).isEmpty()) {
+        if (s != null && !(s = s.trim()).isEmpty()) {
             return s;
         } else {
@@ -253,5 +253,5 @@
             Main.warn("Error getting preferences to save:" +ex.getMessage());
         }
-        if (root==null) return;
+        if (root == null) return;
         try {
 
@@ -260,5 +260,5 @@
 
             Element prefElem = exportDocument.createElement("preferences");
-            prefElem.setAttribute("operation", append?"append":"replace");
+            prefElem.setAttribute("operation", append ? "append" : "replace");
             newRoot.appendChild(prefElem);
 
@@ -287,5 +287,5 @@
     public static void deleteFile(String path, String base) {
         String dir = getDirectoryByAbbr(base);
-        if (dir==null) {
+        if (dir == null) {
             log("Error: Can not find base, use base=cache, base=prefs or base=plugins attribute.");
             return;
@@ -321,5 +321,5 @@
     }
 
-    private static boolean busy=false;
+    private static boolean busy = false;
 
     public static void pluginOperation(String install, String uninstall, String delete)  {
@@ -387,5 +387,5 @@
                                 new File(Main.pref.getPluginsDirectory(), pi.name+".jar").deleteOnExit();
                             }
-                            Main.pref.putCollection("plugins",pls);
+                            Main.pref.putCollection("plugins", pls);
                         }
                     });
@@ -423,5 +423,5 @@
 
         private Preferences mainPrefs;
-        private Map<String,Element> tasksMap = new HashMap<>();
+        private Map<String, Element> tasksMap = new HashMap<>();
 
         private boolean lastV; // last If condition result
@@ -433,5 +433,5 @@
             try {
                 String fileDir = file.getParentFile().getAbsolutePath();
-                if (fileDir!=null) engine.eval("scriptDir='"+normalizeDirName(fileDir) +"';");
+                if (fileDir != null) engine.eval("scriptDir='"+normalizeDirName(fileDir) +"';");
                 try (InputStream is = new BufferedInputStream(new FileInputStream(file))) {
                     openAndReadXML(is);
@@ -599,5 +599,5 @@
             String base = evalVars(item.getAttribute("base"));
             String dir = getDirectoryByAbbr(base);
-            if (dir==null) {
+            if (dir == null) {
                 log("Error: Can not find directory to place file, use base=cache, base=prefs or base=plugins attribute.");
                 return;
@@ -624,5 +624,5 @@
             String text = evalVars(elem.getAttribute("text"));
             String locText = evalVars(elem.getAttribute(LanguageInfo.getJOSMLocaleCode()+".text"));
-            if (locText!=null && !locText.isEmpty()) text=locText;
+            if (locText != null && !locText.isEmpty()) text = locText;
 
             String type = evalVars(elem.getAttribute("type"));
@@ -633,7 +633,7 @@
             String text = evalVars(elem.getAttribute("text"));
             String locText = evalVars(elem.getAttribute(LanguageInfo.getJOSMLocaleCode()+".text"));
-            if (!locText.isEmpty()) text=locText;
+            if (!locText.isEmpty()) text = locText;
             String var = elem.getAttribute("var");
-            if (var.isEmpty()) var="result";
+            if (var.isEmpty()) var = "result";
 
             String input = evalVars(elem.getAttribute("input"));
@@ -643,5 +643,5 @@
                 String opts = evalVars(elem.getAttribute("options"));
                 String locOpts = evalVars(elem.getAttribute(LanguageInfo.getJOSMLocaleCode()+".options"));
-                if (!locOpts.isEmpty()) opts=locOpts;
+                if (!locOpts.isEmpty()) opts = locOpts;
                 setVar(var, String.valueOf(askForOption(text, opts)));
             }
@@ -678,5 +678,5 @@
             String taskName = elem.getAttribute("name");
             Element task = tasksMap.get(taskName);
-            if (task!=null) {
+            if (task != null) {
                 log("EXECUTING TASK "+taskName);
                 processXmlFragment(task); // process task recursively
@@ -728,5 +728,5 @@
                 xformer.transform(new DOMSource(item), out);
 
-                String fragmentWithReplacedVars= evalVars(outputWriter.toString());
+                String fragmentWithReplacedVars = evalVars(outputWriter.toString());
 
                 CharArrayReader reader = new CharArrayReader(fragmentWithReplacedVars.toCharArray());
@@ -741,5 +741,5 @@
         private String normalizeDirName(String dir) {
             String s = dir.replace("\\", "/");
-            if (s.endsWith("/")) s=s.substring(0,s.length()-1);
+            if (s.endsWith("/")) s = s.substring(0, s.length()-1);
             return s;
         }
@@ -938,5 +938,7 @@
         JOptionPane.showMessageDialog(
                 Main.parent,
-                tr("<html>Settings file asks to append preferences to <b>{0}</b>,<br/> but its default value is unknown at this moment.<br/> Please activate corresponding function manually and retry importing.", key),
+                tr("<html>Settings file asks to append preferences to <b>{0}</b>,<br/> "+
+                        "but its default value is unknown at this moment.<br/> " +
+                        "Please activate corresponding function manually and retry importing.", key),
                 tr("Warning"),
                 JOptionPane.WARNING_MESSAGE);
@@ -1011,5 +1013,5 @@
         Map<String, List<Collection<String>>> listlistMap = (SortedMap<String, List<Collection<String>>>) engine.get("listlistMap");
         @SuppressWarnings("unchecked")
-        Map<String, List<Map<String, String>>> listmapMap = (SortedMap<String, List<Map<String,String>>>) engine.get("listmapMap");
+        Map<String, List<Map<String, String>>> listmapMap = (SortedMap<String, List<Map<String, String>>>) engine.get("listmapMap");
 
         tmpPref.settingsMap.clear();
@@ -1025,5 +1027,5 @@
         for (Entry<String, List<Collection<String>>> e : listlistMap.entrySet()) {
             @SuppressWarnings("unchecked")
-            List<List<String>> value = (List)e.getValue();
+            List<List<String>> value = (List) e.getValue();
             tmp.put(e.getKey(), new ListListSetting(value));
         }
Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 8510)
@@ -194,12 +194,15 @@
             this.value = value;
         }
+
         @Override
         public T getValue() {
             return value;
         }
+
         @Override
         public String toString() {
             return value != null ? value.toString() : "null";
         }
+
         @Override
         public int hashCode() {
@@ -209,4 +212,5 @@
             return result;
         }
+
         @Override
         public boolean equals(Object obj) {
@@ -238,17 +242,26 @@
             super(value);
         }
-        @Override public boolean equalVal(String otherVal) {
+
+        @Override
+        public boolean equalVal(String otherVal) {
             if (value == null) return otherVal == null;
             return value.equals(otherVal);
         }
-        @Override public StringSetting copy() {
+
+        @Override
+        public StringSetting copy() {
             return new StringSetting(value);
         }
-        @Override public void visit(SettingVisitor visitor) {
+
+        @Override
+        public void visit(SettingVisitor visitor) {
             visitor.visit(this);
         }
-        @Override public StringSetting getNullInstance() {
+
+        @Override
+        public StringSetting getNullInstance() {
             return new StringSetting(null);
         }
+
         @Override
         public boolean equals(Object other) {
@@ -270,4 +283,5 @@
             consistencyTest();
         }
+
         /**
          * Convenience factory method.
@@ -278,7 +292,10 @@
             return new ListSetting(value == null ? null : Collections.unmodifiableList(new ArrayList<>(value)));
         }
-        @Override public boolean equalVal(List<String> otherVal) {
+
+        @Override
+        public boolean equalVal(List<String> otherVal) {
             return equalCollection(value, otherVal);
         }
+
         public static boolean equalCollection(Collection<String> a, Collection<String> b) {
             if (a == null) return b == null;
@@ -290,21 +307,29 @@
                 String aStr = itA.next();
                 String bStr = itB.next();
-                if (!Objects.equals(aStr,bStr)) return false;
+                if (!Objects.equals(aStr, bStr)) return false;
             }
             return true;
         }
-        @Override public ListSetting copy() {
+
+        @Override
+        public ListSetting copy() {
             return ListSetting.create(value);
         }
+
         private void consistencyTest() {
             if (value != null && value.contains(null))
                 throw new RuntimeException("Error: Null as list element in preference setting");
         }
-        @Override public void visit(SettingVisitor visitor) {
+
+        @Override
+        public void visit(SettingVisitor visitor) {
             visitor.visit(this);
         }
-        @Override public ListSetting getNullInstance() {
+
+        @Override
+        public ListSetting getNullInstance() {
             return new ListSetting(null);
         }
+
         @Override
         public boolean equals(Object other) {
@@ -470,6 +495,9 @@
     public interface SettingVisitor {
         void visit(StringSetting setting);
+
         void visit(ListSetting value);
+
         void visit(ListListSetting value);
+
         void visit(MapListSetting value);
     }
@@ -477,5 +505,7 @@
     public interface PreferenceChangeEvent {
         String getKey();
+
         Setting<?> getOldValue();
+
         Setting<?> getNewValue();
     }
@@ -514,5 +544,7 @@
     public interface ColorKey {
         String getColorName();
+
         String getSpecialName();
+
         Color getDefaultValue();
     }
@@ -707,6 +739,6 @@
 
     public synchronized Map<String, String> getAllPrefix(final String prefix) {
-        final Map<String,String> all = new TreeMap<>();
-        for (final Entry<String,Setting<?>> e : settingsMap.entrySet()) {
+        final Map<String, String> all = new TreeMap<>();
+        for (final Entry<String, Setting<?>> e : settingsMap.entrySet()) {
             if (e.getKey().startsWith(prefix) && (e.getValue() instanceof StringSetting)) {
                 all.put(e.getKey(), ((StringSetting) e.getValue()).getValue());
@@ -727,6 +759,6 @@
 
     public synchronized Map<String, String> getAllColors() {
-        final Map<String,String> all = new TreeMap<>();
-        for (final Entry<String,Setting<?>> e : defaultsMap.entrySet()) {
+        final Map<String, String> all = new TreeMap<>();
+        for (final Entry<String, Setting<?>> e : defaultsMap.entrySet()) {
             if (e.getKey().startsWith("color.") && e.getValue() instanceof StringSetting) {
                 StringSetting d = (StringSetting) e.getValue();
@@ -736,5 +768,5 @@
             }
         }
-        for (final Entry<String,Setting<?>> e : settingsMap.entrySet()) {
+        for (final Entry<String, Setting<?>> e : settingsMap.entrySet()) {
             if (e.getKey().startsWith("color.") && (e.getValue() instanceof StringSetting)) {
                 all.put(e.getKey().substring(6), ((StringSetting) e.getValue()).getValue());
@@ -758,5 +790,5 @@
         Setting<?> prop = settingsMap.get(skey);
         if (prop instanceof StringSetting)
-            return Boolean.parseBoolean(((StringSetting)prop).getValue());
+            return Boolean.parseBoolean(((StringSetting) prop).getValue());
         else
             return generic;
@@ -771,5 +803,5 @@
      */
     public boolean put(final String key, String value) {
-        if(value != null && value.isEmpty()) {
+        if (value != null && value.isEmpty()) {
             value = null;
         }
@@ -870,5 +902,5 @@
         File prefDir = getPreferencesDirectory();
         if (prefDir.exists()) {
-            if(!prefDir.isDirectory()) {
+            if (!prefDir.isDirectory()) {
                 Main.warn(tr("Failed to initialize preferences. Preference directory ''{0}'' is not a directory.",
                         prefDir.getAbsoluteFile()));
@@ -908,5 +940,5 @@
                 save();
             }
-        } catch(IOException e) {
+        } catch (IOException e) {
             Main.error(e);
             JOptionPane.showMessageDialog(
@@ -923,8 +955,9 @@
         } catch (Exception e) {
             Main.error(e);
-            File backupFile = new File(prefDir,"preferences.xml.bak");
+            File backupFile = new File(prefDir, "preferences.xml.bak");
             JOptionPane.showMessageDialog(
                     Main.parent,
-                    tr("<html>Preferences file had errors.<br> Making backup of old one to <br>{0}<br> and creating a new default preference file.</html>",
+                    tr("<html>Preferences file had errors.<br> Making backup of old one to <br>{0}<br> " +
+                            "and creating a new default preference file.</html>",
                             backupFile.getAbsoluteFile()),
                     tr("Error"),
@@ -935,5 +968,5 @@
                 resetToDefault();
                 save();
-            } catch(IOException e1) {
+            } catch (IOException e1) {
                 Main.error(e1);
                 Main.warn(tr("Failed to initialize preferences. Failed to reset preference file to default: {0}", getPreferenceFile()));
@@ -942,5 +975,5 @@
     }
 
-    public final void resetToDefault(){
+    public final void resetToDefault() {
         settingsMap.clear();
     }
@@ -1001,5 +1034,5 @@
     public synchronized Color getColor(String colName, String specName, Color def) {
         String colKey = ColorProperty.getColorKey(colName);
-        if(!colKey.equals(colName)) {
+        if (!colKey.equals(colName)) {
             colornames.put(colKey, colName);
         }
@@ -1027,10 +1060,10 @@
     public synchronized int getInteger(String key, int def) {
         String v = get(key, Integer.toString(def));
-        if(v.isEmpty())
+        if (v.isEmpty())
             return def;
 
         try {
             return Integer.parseInt(v);
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             // fall out
         }
@@ -1040,12 +1073,12 @@
     public synchronized int getInteger(String key, String specName, int def) {
         String v = get(key+"."+specName);
-        if(v.isEmpty())
-            v = get(key,Integer.toString(def));
-        if(v.isEmpty())
+        if (v.isEmpty())
+            v = get(key, Integer.toString(def));
+        if (v.isEmpty())
             return def;
 
         try {
             return Integer.parseInt(v);
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             // fall out
         }
@@ -1055,10 +1088,10 @@
     public synchronized long getLong(String key, long def) {
         String v = get(key, Long.toString(def));
-        if(null == v)
+        if (null == v)
             return def;
 
         try {
             return Long.parseLong(v);
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             // fall out
         }
@@ -1068,10 +1101,10 @@
     public synchronized double getDouble(String key, double def) {
         String v = get(key, Double.toString(def));
-        if(null == v)
+        if (null == v)
             return def;
 
         try {
             return Double.parseDouble(v);
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             // fall out
         }
@@ -1139,5 +1172,5 @@
                 try {
                     save();
-                } catch (IOException e){
+                } catch (IOException e) {
                     Main.warn(tr("Failed to persist preferences to ''{0}''", getPreferenceFile().getAbsoluteFile()));
                 }
@@ -1253,10 +1286,10 @@
      */
     public <T> List<T> getListOfStructs(String key, Collection<T> def, Class<T> klass) {
-        Collection<Map<String,String>> prop =
+        Collection<Map<String, String>> prop =
             getListOfStructs(key, def == null ? null : serializeListOfStructs(def, klass));
         if (prop == null)
             return def == null ? null : new ArrayList<>(def);
         List<T> lst = new ArrayList<>();
-        for (Map<String,String> entries : prop) {
+        for (Map<String, String> entries : prop) {
             T struct = deserializeStruct(entries, klass);
             lst.add(struct);
@@ -1282,8 +1315,8 @@
     }
 
-    private <T> Collection<Map<String,String>> serializeListOfStructs(Collection<T> l, Class<T> klass) {
+    private <T> Collection<Map<String, String>> serializeListOfStructs(Collection<T> l, Class<T> klass) {
         if (l == null)
             return null;
-        Collection<Map<String,String>> vals = new ArrayList<>();
+        Collection<Map<String, String>> vals = new ArrayList<>();
         for (T struct : l) {
             if (struct == null) {
@@ -1300,5 +1333,5 @@
         try (JsonWriter writer = Json.createWriter(stringWriter)) {
             JsonObjectBuilder object = Json.createObjectBuilder();
-            for(Object o: map.entrySet()) {
+            for (Object o: map.entrySet()) {
                 Entry e = (Entry) o;
                 object.add(e.getKey().toString(), e.getValue().toString());
@@ -1322,5 +1355,5 @@
     }
 
-    public static <T> Map<String,String> serializeStruct(T struct, Class<T> klass) {
+    public static <T> Map<String, String> serializeStruct(T struct, Class<T> klass) {
         T structPrototype;
         try {
@@ -1330,5 +1363,5 @@
         }
 
-        Map<String,String> hash = new LinkedHashMap<>();
+        Map<String, String> hash = new LinkedHashMap<>();
         for (Field f : klass.getDeclaredFields()) {
             if (f.getAnnotation(pref.class) == null) {
@@ -1356,5 +1389,5 @@
     }
 
-    public static <T> T deserializeStruct(Map<String,String> hash, Class<T> klass) {
+    public static <T> T deserializeStruct(Map<String, String> hash, Class<T> klass) {
         T struct = null;
         try {
@@ -1363,5 +1396,5 @@
             throw new RuntimeException(ex);
         }
-        for (Entry<String,String> key_value : hash.entrySet()) {
+        for (Entry<String, String> key_value : hash.entrySet()) {
             Object value = null;
             Field f;
@@ -1422,7 +1455,7 @@
      */
     public void updateSystemProperties() {
-        if("true".equals(get("prefer.ipv6", "auto"))) {
+        if ("true".equals(get("prefer.ipv6", "auto"))) {
             // never set this to false, only true!
-            if(!"true".equals(Utils.updateSystemProperty("java.net.preferIPv6Addresses", "true"))) {
+            if (!"true".equals(Utils.updateSystemProperty("java.net.preferIPv6Addresses", "true"))) {
                 Main.info(tr("Try enabling IPv6 network, prefering IPv6 over IPv4 (only works on early startup)."));
             }
@@ -1750,11 +1783,11 @@
         // update old style JOSM server links to use zip now, see #10581
         // actually also cache and mirror entries should be cleared
-        if(getInteger("josm.version", Version.getInstance().getVersion()) < 8099) {
-            for(String key: new String[]{"mappaint.style.entries", "taggingpreset.entries"}) {
+        if (getInteger("josm.version", Version.getInstance().getVersion()) < 8099) {
+            for (String key: new String[]{"mappaint.style.entries", "taggingpreset.entries"}) {
                 Collection<Map<String, String>> data = getListOfStructs(key, (Collection<Map<String, String>>) null);
                 if (data != null) {
                     List<Map<String, String>> newlist = new ArrayList<Map<String, String>>();
                     boolean modified = false;
-                    for(Map<String, String> map : data) {
+                    for (Map<String, String> map : data) {
                          Map<String, String> newmap = new LinkedHashMap<String, String>();
                          for (Entry<String, String> entry : map.entrySet()) {
Index: trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java	(revision 8510)
@@ -14,5 +14,5 @@
  * A system of units used to express length and area measurements.
  * @since 3406 (creation)
- * @since 6992 (extraction in this package) 
+ * @since 6992 (extraction in this package)
  */
 public class SystemOfMeasurement {
@@ -41,5 +41,5 @@
      */
     public static final SystemOfMeasurement NAUTICAL_MILE = new SystemOfMeasurement(185.2, "kbl", 1852, "NM");
-    
+
     /**
      * Known systems of measurement.
@@ -54,5 +54,5 @@
         ALL_SYSTEMS.put(marktr("Nautical Mile"), NAUTICAL_MILE);
     }
-    
+
     /** First value, in meters, used to translate unit according to above formula. */
     public final double aValue;
@@ -173,5 +173,5 @@
             return format.format(v) + " " + unit;
         }
-        return String.format(Locale.US, "%." + (v<9.999999 ? 2 : 1) + "f %s", v, unit);
+        return String.format(Locale.US, "%." + (v < 9.999999 ? 2 : 1) + "f %s", v, unit);
     }
 }
Index: trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java	(revision 8510)
@@ -88,5 +88,5 @@
         Main.main.getCurrentDataSet().beginUpdate();
         try {
-            for (int i=1; i<=num; ++i) {
+            for (int i = 1; i <= num; ++i) {
                 final Command c = commands.removeLast();
                 c.undoCommand();
@@ -121,5 +121,5 @@
             return;
         Collection<? extends OsmPrimitive> oldSelection = Main.main.getCurrentDataSet().getSelected();
-        for (int i=0; i<num; ++i) {
+        for (int i = 0; i < num; ++i) {
             final Command c = redoCommands.removeFirst();
             c.executeCommand();
Index: trunk/src/org/openstreetmap/josm/data/Version.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Version.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/Version.java	(revision 8510)
@@ -109,5 +109,5 @@
             try {
                 version = Integer.parseInt(value);
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 version = 0;
                 Main.warn(tr("Unexpected JOSM version number in revision file, value is ''{0}''", value));
@@ -143,5 +143,5 @@
         //
         StringBuilder sb = new StringBuilder();
-        for(Entry<String,String> property: properties.entrySet()) {
+        for (Entry<String, String> property: properties.entrySet()) {
             sb.append(property.getKey()).append(':').append(property.getValue()).append('\n');
         }
Index: trunk/src/org/openstreetmap/josm/data/cache/BufferedImageCacheEntry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/cache/BufferedImageCacheEntry.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/cache/BufferedImageCacheEntry.java	(revision 8510)
@@ -42,5 +42,5 @@
         if (imageLoaded)
             return img;
-        synchronized(this) {
+        synchronized (this) {
             if (imageLoaded)
                 return img;
@@ -57,5 +57,4 @@
         return img;
     }
-
 
     private void writeObject(java.io.ObjectOutputStream out) throws IOException {
@@ -81,5 +80,6 @@
         synchronized (this) {
             if (content == null && img != null) {
-                throw new AssertionError("Trying to serialize (save to disk?) an BufferedImageCacheEntry that was converted to BufferedImage and no raw data is present anymore");
+                throw new AssertionError("Trying to serialize (save to disk?) an BufferedImageCacheEntry " +
+                        "that was converted to BufferedImage and no raw data is present anymore");
             }
             out.writeObject(this);
@@ -90,5 +90,4 @@
                 content = null;
             }
-
         }
     }
Index: trunk/src/org/openstreetmap/josm/data/cache/CacheEntryAttributes.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/cache/CacheEntryAttributes.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/cache/CacheEntryAttributes.java	(revision 8510)
@@ -75,5 +75,5 @@
      */
     public void setEtag(String etag) {
-        if(etag != null) {
+        if (etag != null) {
             attrs.put(ETAG, etag);
         }
Index: trunk/src/org/openstreetmap/josm/data/cache/HostLimitQueue.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/cache/HostLimitQueue.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/cache/HostLimitQueue.java	(revision 8510)
@@ -95,5 +95,5 @@
         Semaphore limit = hostSemaphores.get(host);
         if (limit == null) {
-            synchronized(hostSemaphores) {
+            synchronized (hostSemaphores) {
                 limit = hostSemaphores.get(host);
                 if (limit == null) {
@@ -122,6 +122,5 @@
     }
 
-
-    private boolean tryAcquireSemaphore(final JCSCachedTileLoaderJob<?,?> job) {
+    private boolean tryAcquireSemaphore(final JCSCachedTileLoaderJob<?, ?> job) {
         boolean ret = true;
         Semaphore limit = getSemaphore(job);
@@ -140,5 +139,5 @@
     }
 
-    private void releaseSemaphore(JCSCachedTileLoaderJob<?,?> job) {
+    private void releaseSemaphore(JCSCachedTileLoaderJob<?, ?> job) {
         Semaphore limit = getSemaphore(job);
         if (limit != null) {
Index: trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java	(revision 8510)
@@ -123,5 +123,5 @@
      * @throws IOException if directory is not found
      */
-    public static <K,V> CacheAccess<K, V> getCache(String cacheName) throws IOException {
+    public static <K, V> CacheAccess<K, V> getCache(String cacheName) throws IOException {
         return getCache(cacheName, DEFAULT_MAX_OBJECTS_IN_MEMORY.get().intValue(), 0, null);
     }
@@ -136,5 +136,6 @@
      * @throws IOException if directory is not found
      */
-    public static <K,V> CacheAccess<K, V> getCache(String cacheName, int maxMemoryObjects, int maxDiskObjects, String cachePath) throws IOException {
+    public static <K, V> CacheAccess<K, V> getCache(String cacheName, int maxMemoryObjects, int maxDiskObjects, String cachePath)
+            throws IOException {
         if (cacheManager != null)
             return getCacheInner(cacheName, maxMemoryObjects, maxDiskObjects, cachePath);
@@ -147,7 +148,6 @@
     }
 
-
     @SuppressWarnings("unchecked")
-    private static <K,V> CacheAccess<K, V> getCacheInner(String cacheName, int maxMemoryObjects, int maxDiskObjects, String cachePath) {
+    private static <K, V> CacheAccess<K, V> getCacheInner(String cacheName, int maxMemoryObjects, int maxDiskObjects, String cachePath) {
         CompositeCache<K, V> cc = cacheManager.getCache(cacheName, getCacheAttributes(maxMemoryObjects));
 
Index: trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java	(revision 8510)
@@ -84,5 +84,5 @@
 
     public static ThreadFactory getNamedThreadFactory(final String name) {
-        return new ThreadFactory(){
+        return new ThreadFactory() {
             @Override
             public Thread newThread(Runnable r) {
@@ -94,5 +94,5 @@
     }
 
-    private static ConcurrentMap<String,Set<ICachedLoaderListener>> inProgress = new ConcurrentHashMap<>();
+    private static ConcurrentMap<String, Set<ICachedLoaderListener>> inProgress = new ConcurrentHashMap<>();
     private static ConcurrentMap<String, Boolean> useHead = new ConcurrentHashMap<>();
 
@@ -119,5 +119,5 @@
      * @param downloadJobExecutor that will be executing the jobs
      */
-    public JCSCachedTileLoaderJob(ICacheAccess<K,V> cache,
+    public JCSCachedTileLoaderJob(ICacheAccess<K, V> cache,
             int connectTimeout, int readTimeout,
             Map<String, String> headers,
@@ -337,5 +337,5 @@
                 // we have an object in cache, but we haven't received 304 resposne code
                 // check if we should use HEAD request to verify
-                if((attributes.getEtag() != null && attributes.getEtag().equals(urlConn.getRequestProperty("ETag"))) ||
+                if ((attributes.getEtag() != null && attributes.getEtag().equals(urlConn.getRequestProperty("ETag"))) ||
                         attributes.getLastModification() == urlConn.getLastModified()) {
                     // we sent ETag or If-Modified-Since, but didn't get 304 response code
@@ -455,5 +455,5 @@
         urlConn.setReadTimeout(readTimeout); // 30 seconds read timeout
         urlConn.setConnectTimeout(connectTimeout);
-        for(Map.Entry<String, String> e: headers.entrySet()) {
+        for (Map.Entry<String, String> e: headers.entrySet()) {
             urlConn.setRequestProperty(e.getKey(), e.getValue());
         }
@@ -466,6 +466,6 @@
     private boolean isCacheValidUsingHead() throws IOException {
         URLConnection urlConn = getUrl().openConnection();
-        if(urlConn instanceof HttpURLConnection) {
-            ((HttpURLConnection)urlConn).setRequestMethod("HEAD");
+        if (urlConn instanceof HttpURLConnection) {
+            ((HttpURLConnection) urlConn).setRequestMethod("HEAD");
             long lastModified = urlConn.getLastModified();
             return (attributes.getEtag() != null && attributes.getEtag().equals(urlConn.getRequestProperty("ETag"))) ||
@@ -504,5 +504,5 @@
     public void cancelOutstandingTasks() {
         ThreadPoolExecutor downloadExecutor = getDownloadExecutor();
-        for(Runnable r: downloadExecutor.getQueue()) {
+        for (Runnable r: downloadExecutor.getQueue()) {
             if (downloadExecutor.remove(r)) {
                 if (r instanceof JCSCachedTileLoaderJob) {
Index: trunk/src/org/openstreetmap/josm/data/conflict/Conflict.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/conflict/Conflict.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/conflict/Conflict.java	(revision 8510)
@@ -103,5 +103,5 @@
         if (my != other.my)
             return false;
-        if(their != other.their)
+        if (their != other.their)
             return false;
         return true;
Index: trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java	(revision 8510)
@@ -26,5 +26,5 @@
  *    ConflictCollection conflictCollection = ....
  *
- *    for(Conflict c : conflictCollection) {
+ *    for (Conflict c : conflictCollection) {
  *      // do something
  *    }
@@ -132,5 +132,5 @@
     public void add(Collection<Conflict<?>> otherConflicts) {
         if (otherConflicts == null) return;
-        for(Conflict<?> c : otherConflicts) {
+        for (Conflict<?> c : otherConflicts) {
             addConflict(c);
         }
@@ -167,5 +167,5 @@
     public void remove(OsmPrimitive my) {
         Iterator<Conflict<?>> it = iterator();
-        while(it.hasNext()) {
+        while (it.hasNext()) {
             if (it.next().isMatchingMy(my)) {
                 it.remove();
@@ -184,5 +184,5 @@
      */
     public Conflict<?> getConflictForMy(OsmPrimitive my) {
-        for(Conflict<?> c : conflicts) {
+        for (Conflict<?> c : conflicts) {
             if (c.isMatchingMy(my))
                 return c;
@@ -199,5 +199,5 @@
      */
     public Conflict<?> getConflictForTheir(OsmPrimitive their) {
-        for(Conflict<?> c : conflicts) {
+        for (Conflict<?> c : conflicts) {
             if (c.isMatchingTheir(their))
                 return c;
@@ -243,5 +243,5 @@
     public void removeForMy(OsmPrimitive my) {
         Iterator<Conflict<?>> it = iterator();
-        while(it.hasNext()) {
+        while (it.hasNext()) {
             if (it.next().isMatchingMy(my)) {
                 it.remove();
@@ -257,5 +257,5 @@
     public void removeForTheir(OsmPrimitive their) {
         Iterator<Conflict<?>> it = iterator();
-        while(it.hasNext()) {
+        while (it.hasNext()) {
             if (it.next().isMatchingTheir(their)) {
                 it.remove();
Index: trunk/src/org/openstreetmap/josm/data/conflict/IConflictListener.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/conflict/IConflictListener.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/conflict/IConflictListener.java	(revision 8510)
@@ -4,4 +4,5 @@
 public interface IConflictListener {
     public void onConflictsAdded(ConflictCollection conflicts);
+
     public void onConflictsRemoved(ConflictCollection conflicts);
 }
Index: trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java	(revision 8510)
@@ -14,5 +14,5 @@
 
     public EastNorth(double east, double north) {
-        super(east,north);
+        super(east, north);
     }
 
@@ -73,5 +73,5 @@
      * @return length of this
      */
-    public double length(){
+    public double length() {
         return Math.sqrt(x*x + y*y);
     }
@@ -86,5 +86,5 @@
     public double heading(EastNorth other) {
         double hd = Math.atan2(other.east() - east(), other.north() - north());
-        if(hd < 0) {
+        if (hd < 0) {
             hd = 2 * Math.PI + hd;
         }
Index: trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 8510)
@@ -198,4 +198,5 @@
     public static final String SOUTH = trc("compass", "S");
     public static final String NORTH = trc("compass", "N");
+
     public String latToString(CoordinateFormat d) {
         switch(d) {
@@ -218,4 +219,5 @@
     public static final String WEST = trc("compass", "W");
     public static final String EAST = trc("compass", "E");
+
     public String lonToString(CoordinateFormat d) {
         switch(d) {
Index: trunk/src/org/openstreetmap/josm/data/coor/QuadTiling.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/coor/QuadTiling.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/coor/QuadTiling.java	(revision 8510)
@@ -14,5 +14,5 @@
 
     public static final int TILES_PER_LEVEL_SHIFT = 2; // Has to be 2. Other parts of QuadBuckets code rely on it
-    public static final int TILES_PER_LEVEL = 1<<TILES_PER_LEVEL_SHIFT;
+    public static final int TILES_PER_LEVEL = 1 << TILES_PER_LEVEL_SHIFT;
     public static final int X_PARTS = 360;
     public static final int X_BIAS = -180;
@@ -58,5 +58,5 @@
             tile <<= 2;
             // Note that x is the MSB
-            tile |= (xbit<<1) | ybit;
+            tile |= (xbit << 1) | ybit;
         }
         return tile;
@@ -68,5 +68,5 @@
 
     static long lon2x(double lon) {
-        long ret = (long)((lon + 180.0) * WORLD_PARTS / 360.0);
+        long ret = (long) ((lon + 180.0) * WORLD_PARTS / 360.0);
         if (Utils.equalsEpsilon(ret, WORLD_PARTS)) {
             ret--;
@@ -76,5 +76,5 @@
 
     static long lat2y(double lat) {
-        long ret = (long)((lat + 90.0) * WORLD_PARTS / 180.0);
+        long ret = (long) ((lat + 90.0) * WORLD_PARTS / 180.0);
         if (Utils.equalsEpsilon(ret, WORLD_PARTS)) {
             ret--;
@@ -90,5 +90,5 @@
         long mask = 0x00000003;
         int total_shift = TILES_PER_LEVEL_SHIFT*(NR_LEVELS-level-1);
-        return (int)(mask & (quad >> total_shift));
+        return (int) (mask & (quad >> total_shift));
     }
 
@@ -125,5 +125,5 @@
         long y = lat2y(lat);
         int shift = NR_LEVELS-level-1;
-        return (int)((x >> shift & 1) * 2 + (y >> shift & 1));
+        return (int) ((x >> shift & 1) * 2 + (y >> shift & 1));
     }
 }
Index: trunk/src/org/openstreetmap/josm/data/gpx/GpxConstants.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/GpxConstants.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/gpx/GpxConstants.java	(revision 8510)
@@ -102,4 +102,4 @@
      * Possible fix values.
      */
-    public static Collection<String> FIX_VALUES = Arrays.asList("none","2d","3d","dgps","pps");
+    public static Collection<String> FIX_VALUES = Arrays.asList("none", "2d", "3d", "dgps", "pps");
 }
Index: trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java	(revision 8510)
@@ -200,5 +200,5 @@
             }
         }
-        if (earliest==null || latest==null) return null;
+        if (earliest == null || latest == null) return null;
         return new Date[]{earliest.getTime(), latest.getTime()};
     }
@@ -212,6 +212,6 @@
     */
     public Date[] getMinMaxTimeForAllTracks() {
-        double min=1e100;
-        double max=-1e100;
+        double min = 1e100;
+        double max = -1e100;
         double now = System.currentTimeMillis()/1000.0;
         for (GpxTrack trk: tracks) {
@@ -219,12 +219,12 @@
                 for (WayPoint pnt : seg.getWayPoints()) {
                     double t = pnt.time;
-                    if (t>0 && t<=now) {
-                        if (t>max) max=t;
-                        if (t<min) min=t;
-                    }
-                }
-            }
-        }
-        if (Utils.equalsEpsilon(min,1e100) || Utils.equalsEpsilon(max,-1e100)) return new Date[0];
+                    if (t > 0 && t <= now) {
+                        if (t > max) max = t;
+                        if (t < min) min = t;
+                    }
+                }
+            }
+        }
+        if (Utils.equalsEpsilon(min, 1e100) || Utils.equalsEpsilon(max, -1e100)) return new Date[0];
         return new Date[]{new Date((long) (min * 1000)), new Date((long) (max * 1000))};
     }
@@ -363,9 +363,9 @@
     public void resetEastNorthCache() {
         if (waypoints != null) {
-            for (WayPoint wp : waypoints){
+            for (WayPoint wp : waypoints) {
                 wp.invalidateEastNorthCache();
             }
         }
-        if (tracks != null){
+        if (tracks != null) {
             for (GpxTrack track: tracks) {
                 for (GpxTrackSegment segment: track.getSegments()) {
Index: trunk/src/org/openstreetmap/josm/data/gpx/GpxTrack.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/GpxTrack.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/gpx/GpxTrack.java	(revision 8510)
@@ -14,6 +14,9 @@
 
     Collection<GpxTrackSegment> getSegments();
+
     Map<String, Object> getAttributes();
+
     Bounds getBounds();
+
     double length();
 
Index: trunk/src/org/openstreetmap/josm/data/gpx/GpxTrackSegment.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/GpxTrackSegment.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/gpx/GpxTrackSegment.java	(revision 8510)
@@ -13,6 +13,9 @@
 
     Bounds getBounds();
+
     Collection<WayPoint> getWayPoints();
+
     double length();
+
     /**
      *
Index: trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrack.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrack.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrack.java	(revision 8510)
@@ -30,5 +30,5 @@
     }
 
-    private double calculateLength(){
+    private double calculateLength() {
         double result = 0.0; // in meters
 
Index: trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackSegment.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackSegment.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackSegment.java	(revision 8510)
@@ -36,7 +36,7 @@
         WayPoint last = null;
         for (WayPoint tpt : wayPoints) {
-            if(last != null){
+            if (last != null) {
                 Double d = last.getCoor().greatCircleDistance(tpt.getCoor());
-                if(!d.isNaN() && !d.isInfinite()) {
+                if (!d.isNaN() && !d.isInfinite()) {
                     result += d;
                 }
Index: trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java	(revision 8510)
@@ -67,5 +67,5 @@
 
     public final LatLon getCoor() {
-        return new LatLon(lat,lon);
+        return new LatLon(lat, lon);
     }
 
@@ -95,5 +95,5 @@
     @Override
     public String toString() {
-        return "WayPoint (" + (attr.containsKey(GPX_NAME) ? get(GPX_NAME) + ", " :"") + getCoor() + ", " + attr + ")";
+        return "WayPoint (" + (attr.containsKey(GPX_NAME) ? get(GPX_NAME) + ", " : "") + getCoor() + ", " + attr + ")";
     }
 
@@ -105,5 +105,5 @@
             try {
                 time = dateParser.get().parse(get(PT_TIME).toString()).getTime() / 1000.; /* ms => seconds */
-            } catch(Exception e) {
+            } catch (Exception e) {
                 time = 0;
             }
Index: trunk/src/org/openstreetmap/josm/data/gpx/WithAttributes.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/WithAttributes.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/gpx/WithAttributes.java	(revision 8510)
@@ -44,5 +44,5 @@
     public String getString(String key) {
         Object value = attr.get(key);
-        return (value instanceof String) ? (String)value : null;
+        return (value instanceof String) ? (String) value : null;
     }
 
@@ -60,5 +60,5 @@
     public <T> Collection<T> getCollection(String key) {
         Object value = attr.get(key);
-        return (value instanceof Collection) ? (Collection<T>)value : null;
+        return (value instanceof Collection) ? (Collection<T>) value : null;
     }
 
Index: trunk/src/org/openstreetmap/josm/data/imagery/GeorefImage.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/GeorefImage.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/imagery/GeorefImage.java	(revision 8510)
@@ -37,5 +37,5 @@
     private int yIndex;
 
-    private static final Color transparentColor = new Color(0,0,0,0);
+    private static final Color transparentColor = new Color(0, 0, 0, 0);
     private Color fadeColor = transparentColor;
 
@@ -118,5 +118,5 @@
             return false;
 
-        if(!(this.xIndex == xIndex && this.yIndex == yIndex))
+        if (!(this.xIndex == xIndex && this.yIndex == yIndex))
             return false;
 
@@ -130,5 +130,5 @@
 
         // This happens if you zoom outside the world
-        if(width == 0 || height == 0)
+        if (width == 0 || height == 0)
             return false;
 
@@ -141,6 +141,6 @@
         }
 
-        BufferedImage img = reImg == null?null:reImg.get();
-        if(img != null && img.getWidth() == width && img.getHeight() == height && fadeColor.equals(newFadeColor)) {
+        BufferedImage img = reImg == null ? null : reImg.get();
+        if (img != null && img.getWidth() == width && img.getHeight() == height && fadeColor.equals(newFadeColor)) {
             g.drawImage(img, x, y, null);
             return true;
@@ -152,5 +152,5 @@
 
         try {
-            if(img != null) {
+            if (img != null) {
                 img.flush();
             }
@@ -163,9 +163,9 @@
             // traditional rendering is as fast at these zoom levels, so it's no loss.
             // Also prevent caching if we're out of memory soon
-            if(width > 2000 || height > 2000 || width*height*multipl > freeMem) {
+            if (width > 2000 || height > 2000 || width*height*multipl > freeMem) {
                 fallbackDraw(g, getImage(), x, y, width, height, alphaChannel);
             } else {
                 // We haven't got a saved resized copy, so resize and cache it
-                img = new BufferedImage(width, height, alphaChannel?BufferedImage.TYPE_INT_ARGB:BufferedImage.TYPE_3BYTE_BGR);
+                img = new BufferedImage(width, height, alphaChannel ? BufferedImage.TYPE_INT_ARGB : BufferedImage.TYPE_3BYTE_BGR);
                 img.getGraphics().drawImage(getImage(),
                         0, 0, width, height, // dest
@@ -179,5 +179,5 @@
                 reImg = new SoftReference<>(img);
             }
-        } catch(Exception e) {
+        } catch (Exception e) {
             fallbackDraw(g, getImage(), x, y, width, height, alphaChannel);
         }
@@ -216,5 +216,5 @@
     private void writeObject(ObjectOutputStream out) throws IOException {
         out.writeObject(state);
-        if(getImage() == null) {
+        if (getImage() == null) {
             out.writeBoolean(false);
             out.writeObject(null);
Index: trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java	(revision 8510)
@@ -353,5 +353,5 @@
         setExtendedUrl(url);
         ImageryType t = ImageryType.fromString(type);
-        this.cookies=cookies;
+        this.cookies = cookies;
         this.eulaAcceptanceRequired = eulaAcceptanceRequired;
         if (t != null) {
@@ -664,6 +664,6 @@
                 serverProjections = new ArrayList<>();
                 Matcher m = Pattern.compile(".*\\{PROJ\\(([^)}]+)\\)\\}.*").matcher(url.toUpperCase(Locale.ENGLISH));
-                if(m.matches()) {
-                    for(String p : m.group(1).split(","))
+                if (m.matches()) {
+                    for (String p : m.group(1).split(","))
                         serverProjections.add(p);
                 }
@@ -708,9 +708,9 @@
     public void setName(String language, String name) {
         boolean isdefault = LanguageInfo.getJOSMLocaleCode(null).equals(language);
-        if(LanguageInfo.isBetterLanguage(langName, language)) {
+        if (LanguageInfo.isBetterLanguage(langName, language)) {
             this.name = isdefault ? tr(name) : name;
             this.langName = language;
         }
-        if(origName == null || isdefault) {
+        if (origName == null || isdefault) {
             this.origName = name;
         }
@@ -827,5 +827,5 @@
     public void setDescription(String language, String description) {
         boolean isdefault = LanguageInfo.getJOSMLocaleCode(null).equals(language);
-        if(LanguageInfo.isBetterLanguage(langDescription, language)) {
+        if (LanguageInfo.isBetterLanguage(langDescription, language)) {
             this.description = isdefault ? tr(description) : description;
             this.langDescription = language;
@@ -916,5 +916,5 @@
     public String getExtendedUrl() {
         return imageryType.getTypeString() + (defaultMaxZoom != 0
-            ? "["+(defaultMinZoom != 0 ? defaultMinZoom+",":"")+defaultMaxZoom+"]" : "") + ":" + url;
+            ? "["+(defaultMinZoom != 0 ? defaultMinZoom+"," : "")+defaultMaxZoom+"]" : "") + ":" + url;
     }
 
Index: trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java	(revision 8510)
@@ -220,5 +220,5 @@
 
         // automatically update user entries with same id as a default entry
-        for (int i=0; i<layers.size(); i++) {
+        for (int i = 0; i < layers.size(); i++) {
             ImageryInfo info = layers.get(i);
             if (info.getId() == null) {
Index: trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java	(revision 8510)
@@ -79,5 +79,5 @@
 
     public static void loadBookmarks() {
-        for(Collection<String> c : Main.pref.getArray("imagery.offsets",
+        for (Collection<String> c : Main.pref.getArray("imagery.offsets",
                 Collections.<Collection<String>>emptySet())) {
             allBookmarks.add(new OffsetBookmark(c));
@@ -106,10 +106,10 @@
             center = Main.getProjection().eastNorth2latlon(Main.map.mapView.getCenter());
         } else {
-            center = new LatLon(0,0);
+            center = new LatLon(0, 0);
         }
         OffsetBookmark nb = new OffsetBookmark(
                 Main.getProjection().toCode(), layer.getInfo().getName(),
                 name, layer.getDx(), layer.getDy(), center.lon(), center.lat());
-        for (ListIterator<OffsetBookmark> it = allBookmarks.listIterator();it.hasNext();) {
+        for (ListIterator<OffsetBookmark> it = allBookmarks.listIterator(); it.hasNext();) {
             OffsetBookmark b = it.next();
             if (b.isUsable(layer) && name.equals(b.name)) {
Index: trunk/src/org/openstreetmap/josm/data/imagery/Shape.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/Shape.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/imagery/Shape.java	(revision 8510)
@@ -29,5 +29,5 @@
             throw new IllegalArgumentException(MessageFormat.format("Even number of doubles expected in string, got {0}: {1}",
                     components.length, asString));
-        for (int i=0; i<components.length; i+=2) {
+        for (int i = 0; i < components.length; i += 2) {
             addPoint(components[i], components[i+1]);
         }
Index: trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java	(revision 8510)
@@ -105,5 +105,5 @@
     @Override
     public Tile getTile(TileSource source, int x, int y, int z) {
-        return createTileLoaderJob(new Tile(source,x, y, z)).getTile();
+        return createTileLoaderJob(new Tile(source, x, y, z)).getTile();
     }
 
@@ -135,7 +135,7 @@
      */
     public void cancelOutstandingTasks() {
-        for(Runnable r: downloadExecutor.getQueue()) {
+        for (Runnable r: downloadExecutor.getQueue()) {
             if (downloadExecutor.remove(r) && r instanceof TMSCachedTileLoaderJob) {
-                ((TMSCachedTileLoaderJob)r).handleJobCancellation();
+                ((TMSCachedTileLoaderJob) r).handleJobCancellation();
             }
         }
Index: trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java	(revision 8510)
@@ -45,8 +45,7 @@
     private volatile URL url;
 
-
     // we need another deduplication of Tile Loader listeners, as for each submit, new TMSCachedTileLoaderJob was created
     // that way, we reduce calls to tileLoadingFinished, and general CPU load due to surplus Map repaints
-    private static final ConcurrentMap<String,Set<TileLoaderListener>> inProgress = new ConcurrentHashMap<>();
+    private static final ConcurrentMap<String, Set<TileLoaderListener>> inProgress = new ConcurrentHashMap<>();
 
     /**
@@ -177,5 +176,5 @@
 
         try {
-            if(!tile.isLoaded()) { //if someone else already loaded tile, skip all the handling
+            if (!tile.isLoaded()) { //if someone else already loaded tile, skip all the handling
                 tile.finishLoading(); // whatever happened set that loading has finished
                 // set tile metadata
@@ -186,5 +185,5 @@
                 }
 
-                switch(result){
+                switch(result) {
                 case SUCCESS:
                     handleNoTileAtZoom();
@@ -215,5 +214,5 @@
             // always check, if there is some listener interested in fact, that tile has finished loading
             if (listeners != null) { // listeners might be null, if some other thread notified already about success
-                for(TileLoaderListener l: listeners) {
+                for (TileLoaderListener l: listeners) {
                     l.tileLoadingFinished(tile, status);
                 }
@@ -224,5 +223,5 @@
             tile.setLoaded(false);
             if (listeners != null) { // listeners might be null, if some other thread notified already about success
-                for(TileLoaderListener l: listeners) {
+                for (TileLoaderListener l: listeners) {
                     l.tileLoadingFinished(tile, false);
                 }
Index: trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java	(revision 8510)
@@ -135,5 +135,5 @@
 
         for (Object propKey: layersIndex.keySet()) {
-            String s = (String)propKey;
+            String s = (String) propKey;
             if (url.equals(layersIndex.getProperty(s))) {
                 cacheDirName = s;
@@ -186,5 +186,5 @@
             WmsCacheType cacheEntries;
             try (InputStream is = new FileInputStream(indexFile)) {
-                cacheEntries = (WmsCacheType)unmarshaller.unmarshal(is);
+                cacheEntries = (WmsCacheType) unmarshaller.unmarshal(is);
             }
             totalFileSize = cacheEntries.getTotalFileSize();
@@ -440,7 +440,7 @@
             drawAtLeastOnce = true;
 
-            int xDiff = (int)((ce.east - east) * pixelPerDegree);
-            int yDiff = (int)((ce.north - north) * pixelPerDegree);
-            int size = (int)(pixelPerDegree / ce.pixelPerDegree  * tileSize);
+            int xDiff = (int) ((ce.east - east) * pixelPerDegree);
+            int yDiff = (int) ((ce.north - north) * pixelPerDegree);
+            int size = (int) (pixelPerDegree / ce.pixelPerDegree  * tileSize);
 
             int x = xDiff;
@@ -467,6 +467,6 @@
         double deltaLat = Math.abs(ll3.lat() - ll1.lat());
         double deltaLon = Math.abs(ll3.lon() - ll1.lon());
-        int precisionLat = Math.max(0, -(int)Math.ceil(Math.log10(deltaLat)) + 1);
-        int precisionLon = Math.max(0, -(int)Math.ceil(Math.log10(deltaLon)) + 1);
+        int precisionLat = Math.max(0, -(int) Math.ceil(Math.log10(deltaLat)) + 1);
+        int precisionLon = Math.max(0, -(int) Math.ceil(Math.log10(deltaLon)) + 1);
 
         String zoom = SystemOfMeasurement.METRIC.getDistText(ll1.greatCircleDistance(ll2));
@@ -493,5 +493,5 @@
             while (true) {
                 String result = String.format("%s_%." + precisionLat + "f_%." + precisionLon +"f%s.%s",
-                        zoom, ll1.lat(), ll1.lon(), counter==0?"":"_" + counter, extension);
+                        zoom, ll1.lat(), ll1.lon(), counter == 0 ? "" : "_" + counter, extension);
                 for (CacheEntry entry: projectionEntries.entries) {
                     if (entry.filename.equals(result)) {
@@ -528,5 +528,5 @@
             }
             entry = new CacheEntry(pixelPerDegree, east, north,
-                    tileSize,generateFileName(projectionEntries, pixelPerDegree, projection, east, north, mimeType));
+                    tileSize, generateFileName(projectionEntries, pixelPerDegree, projection, east, north, mimeType));
             entry.lastUsed = System.currentTimeMillis();
             entry.lastModified = entry.lastUsed;
Index: trunk/src/org/openstreetmap/josm/data/oauth/OsmPrivileges.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/oauth/OsmPrivileges.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/oauth/OsmPrivileges.java	(revision 8510)
@@ -13,28 +13,37 @@
         return allowWriteApi;
     }
+
     public void setAllowWriteApi(boolean allowWriteApi) {
         this.allowWriteApi = allowWriteApi;
     }
+
     public boolean isAllowWriteGpx() {
         return allowWriteGpx;
     }
+
     public void setAllowWriteGpx(boolean allowWriteGpx) {
         this.allowWriteGpx = allowWriteGpx;
     }
+
     public boolean isAllowReadGpx() {
         return allowReadGpx;
     }
+
     public void setAllowReadGpx(boolean allowReadGpx) {
         this.allowReadGpx = allowReadGpx;
     }
+
     public boolean isAllowReadPrefs() {
         return allowReadPrefs;
     }
+
     public void setAllowReadPrefs(boolean allowReadPrefs) {
         this.allowReadPrefs = allowReadPrefs;
     }
+
     public boolean isAllowWritePrefs() {
         return allowWritePrefs;
     }
+
     public void setAllowWritePrefs(boolean allowWritePrefs) {
         this.allowWritePrefs = allowWritePrefs;
Index: trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 8510)
@@ -107,5 +107,5 @@
         setKeys(other.getKeys());
         id = other.id;
-        if (id <=0) {
+        if (id <= 0) {
             // reset version and changeset id
             version = 0;
@@ -117,5 +117,5 @@
         }
         flags = other.flags;
-        user= other.user;
+        user = other.user;
         if (id > 0 && other.changesetId > 0) {
             // #4208: sometimes we cloned from other with id < 0 *and*
@@ -146,5 +146,5 @@
     public long getId() {
         long id = this.id;
-        return id >= 0?id:0;
+        return id >= 0 ? id : 0;
     }
 
@@ -289,5 +289,5 @@
     @Override
     public void setTimestamp(Date timestamp) {
-        this.timestamp = (int)(timestamp.getTime() / 1000);
+        this.timestamp = (int) (timestamp.getTime() / 1000);
     }
 
@@ -474,5 +474,5 @@
         String[] keys = this.keys;
         if (keys != null) {
-            for (int i=0; i<keys.length; i+=2) {
+            for (int i = 0; i < keys.length; i += 2) {
                 result.put(keys[i], keys[i + 1]);
             }
@@ -522,9 +522,9 @@
         else if (value == null) {
             remove(key);
-        } else if (keys == null){
+        } else if (keys == null) {
             keys = new String[] {key, value};
             keysChangedImpl(originalKeys);
         } else {
-            for (int i=0; i<keys.length;i+=2) {
+            for (int i = 0; i < keys.length; i += 2) {
                 if (keys[i].equals(key)) {
                     keys[i+1] = value;  // This modifies the keys array but it doesn't make it invalidate for any time so its ok (see note no top)
@@ -534,5 +534,5 @@
             }
             String[] newKeys = new String[keys.length + 2];
-            for (int i=0; i< keys.length;i+=2) {
+            for (int i = 0; i < keys.length; i += 2) {
                 newKeys[i] = keys[i];
                 newKeys[i+1] = keys[i+1];
@@ -562,6 +562,6 @@
         }
         String[] newKeys = new String[keys.length - 2];
-        int j=0;
-        for (int i=0; i < keys.length; i+=2) {
+        int j = 0;
+        for (int i = 0; i < keys.length; i += 2) {
             if (!keys[i].equals(key)) {
                 newKeys[j++] = keys[i];
@@ -599,5 +599,5 @@
         if (keys == null)
             return null;
-        for (int i=0; i<keys.length;i+=2) {
+        for (int i = 0; i < keys.length; i += 2) {
             if (keys[i].equals(key)) return keys[i+1];
         }
@@ -627,5 +627,5 @@
         if (keys == null)
             return null;
-        for (int i=0; i<keys.length;i+=2) {
+        for (int i = 0; i < keys.length; i += 2) {
             if (keys[i].equalsIgnoreCase(key)) return keys[i+1];
         }
@@ -643,5 +643,5 @@
             return Collections.emptySet();
         Set<String> result = new HashSet<>(keys.length / 2);
-        for (int i=0; i<keys.length; i+=2) {
+        for (int i = 0; i < keys.length; i += 2) {
             result.add(keys[i]);
         }
@@ -670,5 +670,5 @@
         if (key == null) return false;
         if (keys == null) return false;
-        for (int i=0; i< keys.length;i+=2) {
+        for (int i = 0; i < keys.length; i += 2) {
             if (keys[i].equals(key)) return true;
         }
@@ -701,5 +701,5 @@
     @Override
     public String getLocalName() {
-        for(String s : LanguageInfo.getLanguageCodes(null)) {
+        for (String s : LanguageInfo.getLanguageCodes(null)) {
             String val = get("name:" + s);
             if (val != null)
Index: trunk/src/org/openstreetmap/josm/data/osm/BBox.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/BBox.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/BBox.java	(revision 8510)
@@ -267,5 +267,5 @@
     @Override
     public int hashCode() {
-        return (int)(ymin * xmin);
+        return (int) (ymin * xmin);
     }
 
@@ -273,5 +273,5 @@
     public boolean equals(Object o) {
         if (o instanceof BBox) {
-            BBox b = (BBox)o;
+            BBox b = (BBox) o;
             return b.xmax == xmax && b.ymax == ymax
                     && b.xmin == xmin && b.ymin == ymin;
Index: trunk/src/org/openstreetmap/josm/data/osm/Changeset.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Changeset.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/Changeset.java	(revision 8510)
@@ -42,5 +42,5 @@
     private int commentsCount;
     /** the map of tags */
-    private Map<String,String> tags;
+    private Map<String, String> tags;
     /** indicates whether this changeset is incomplete. For an incomplete changeset we only know its id */
     private boolean incomplete;
@@ -159,5 +159,5 @@
     public Bounds getBounds() {
         if (min != null && max != null)
-            return new Bounds(min,max);
+            return new Bounds(min, max);
         return null;
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java	(revision 8510)
@@ -69,5 +69,5 @@
         GuiHelper.runInEDT(new Runnable() {
             @Override public void run() {
-                for(ChangesetCacheListener l: listeners) {
+                for (ChangesetCacheListener l: listeners) {
                     l.changesetCacheUpdated(e);
                 }
@@ -105,5 +105,5 @@
 
     public boolean contains(int id) {
-        if (id <=0) return false;
+        if (id <= 0) return false;
         return cache.get(id) != null;
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/ChangesetCacheEvent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/ChangesetCacheEvent.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/ChangesetCacheEvent.java	(revision 8510)
@@ -6,7 +6,9 @@
 public interface ChangesetCacheEvent {
     ChangesetCache getSource();
+
     Collection<Changeset> getAddedChangesets();
+
     Collection<Changeset> getRemovedChangesets();
+
     Collection<Changeset> getUpdatedChangesets();
-
 }
Index: trunk/src/org/openstreetmap/josm/data/osm/ChangesetDataSet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/ChangesetDataSet.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/ChangesetDataSet.java	(revision 8510)
@@ -25,4 +25,5 @@
     public static interface ChangesetDataSetEntry {
         public ChangesetModificationType getModificationType();
+
         public HistoryOsmPrimitive getPrimitive();
     }
@@ -40,6 +41,6 @@
      */
     public void put(HistoryOsmPrimitive primitive, ChangesetModificationType cmt) {
-        CheckParameterUtil.ensureParameterNotNull(primitive,"primitive");
-        CheckParameterUtil.ensureParameterNotNull(cmt,"cmt");
+        CheckParameterUtil.ensureParameterNotNull(primitive, "primitive");
+        CheckParameterUtil.ensureParameterNotNull(cmt, "cmt");
         primitives.put(primitive.getPrimitiveId(), primitive);
         modificationTypes.put(primitive.getPrimitiveId(), cmt);
@@ -115,5 +116,5 @@
      */
     public Set<HistoryOsmPrimitive> getPrimitivesByModificationType(ChangesetModificationType cmt) {
-        CheckParameterUtil.ensureParameterNotNull(cmt,"cmt");
+        CheckParameterUtil.ensureParameterNotNull(cmt, "cmt");
         Set<HistoryOsmPrimitive> ret = new HashSet<>();
         for (Entry<PrimitiveId, ChangesetModificationType> entry: modificationTypes.entrySet()) {
Index: trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DataSet.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/DataSet.java	(revision 8510)
@@ -254,5 +254,5 @@
      */
     public void addChangeSetTag(String k, String v) {
-        this.changeSetTags.put(k,v);
+        this.changeSetTags.put(k, v);
     }
 
@@ -526,5 +526,5 @@
      */
     public static void addSelectionListener(SelectionChangedListener listener) {
-        ((CopyOnWriteArrayList<SelectionChangedListener>)selListeners).addIfAbsent(listener);
+        ((CopyOnWriteArrayList<SelectionChangedListener>) selListeners).addIfAbsent(listener);
     }
 
@@ -542,5 +542,5 @@
      *
      */
-    public void fireSelectionChanged(){
+    public void fireSelectionChanged() {
         Collection<? extends OsmPrimitive> currentSelection = getAllSelected();
         for (SelectionChangedListener l : selListeners) {
@@ -698,5 +698,5 @@
      */
     public void setHighlightedVirtualNodes(Collection<WaySegment> waySegments) {
-        if(highlightedVirtualNodes.isEmpty() && waySegments.isEmpty())
+        if (highlightedVirtualNodes.isEmpty() && waySegments.isEmpty())
             return;
 
@@ -711,5 +711,5 @@
      */
     public void setHighlightedWaySegments(Collection<WaySegment> waySegments) {
-        if(highlightedWaySegments.isEmpty() && waySegments.isEmpty())
+        if (highlightedWaySegments.isEmpty() && waySegments.isEmpty())
             return;
 
@@ -889,5 +889,5 @@
                 List<Node> newNodes = new ArrayList<>();
                 for (Node n: w.getNodes()) {
-                    newNodes.add((Node)primMap.get(n));
+                    newNodes.add((Node) primMap.get(n));
                 }
                 newWay.setNodes(newNodes);
@@ -903,5 +903,5 @@
             }
             for (Relation r : relations) {
-                Relation newRelation = (Relation)primMap.get(r);
+                Relation newRelation = (Relation) primMap.get(r);
                 List<RelationMember> newMembers = new ArrayList<>();
                 for (RelationMember rm: r.getMembers()) {
@@ -1016,5 +1016,5 @@
                 Iterator<RelationMember> it = members.iterator();
                 boolean removed = false;
-                while(it.hasNext()) {
+                while (it.hasNext()) {
                     RelationMember member = it.next();
                     if (member.getMember().equals(primitive)) {
@@ -1046,5 +1046,5 @@
         try {
             if (referencedPrimitive instanceof Node) {
-                result.addAll(unlinkNodeFromWays((Node)referencedPrimitive));
+                result.addAll(unlinkNodeFromWays((Node) referencedPrimitive));
             }
             result.addAll(unlinkPrimitiveFromRelations(referencedPrimitive));
@@ -1078,5 +1078,5 @@
         for (OsmPrimitive primitive: node.getReferrers()) {
             if (primitive instanceof Way) {
-                reindexWay((Way)primitive);
+                reindexWay((Way) primitive);
             } else {
                 reindexRelation((Relation) primitive);
@@ -1094,5 +1094,5 @@
         if (!way.getBBox().equals(before)) {
             for (OsmPrimitive primitive: way.getReferrers()) {
-                reindexRelation((Relation)primitive);
+                reindexRelation((Relation) primitive);
             }
         }
Index: trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 8510)
@@ -141,5 +141,5 @@
 
     protected void fixIncomplete(Way other) {
-        Way myWay = (Way)getMergeTarget(other);
+        Way myWay = (Way) getMergeTarget(other);
         if (myWay == null)
             throw new RuntimeException(tr("Missing merge target for way with id {0}", other.getUniqueId()));
@@ -174,5 +174,5 @@
         do {
             flag = false;
-            for (Iterator<OsmPrimitive> it = objectsToDelete.iterator();it.hasNext();) {
+            for (Iterator<OsmPrimitive> it = objectsToDelete.iterator(); it.hasNext();) {
                 OsmPrimitive target = it.next();
                 OsmPrimitive source = sourceDataSet.getPrimitiveById(target.getPrimitiveId());
@@ -234,5 +234,5 @@
      */
     private void mergeNodeList(Way source) {
-        Way target = (Way)getMergeTarget(source);
+        Way target = (Way) getMergeTarget(source);
         if (target == null)
             throw new IllegalStateException(tr("Missing merge target for way with id {0}", source.getUniqueId()));
@@ -240,5 +240,5 @@
         List<Node> newNodes = new ArrayList<>(source.getNodesCount());
         for (Node sourceNode : source.getNodes()) {
-            Node targetNode = (Node)getMergeTarget(sourceNode);
+            Node targetNode = (Node) getMergeTarget(sourceNode);
             if (targetNode != null) {
                 newNodes.add(targetNode);
@@ -363,10 +363,10 @@
             // this have to be resolved manually.
             //
-            addConflict(target,source);
+            addConflict(target, source);
         } else if (!target.hasEqualSemanticAttributes(source)) {
             // target is modified and is not semantically equal with source. Can't automatically
             // resolve the differences
             // =>  create a conflict
-            addConflict(target,source);
+            addConflict(target, source);
         } else {
             // clone from other. mergeFrom will mainly copy
Index: trunk/src/org/openstreetmap/josm/data/osm/DefaultChangesetCacheEvent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/DefaultChangesetCacheEvent.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/DefaultChangesetCacheEvent.java	(revision 8510)
@@ -25,12 +25,15 @@
         return Collections.unmodifiableCollection(added);
     }
+
     @Override
     public Collection<Changeset> getRemovedChangesets() {
         return Collections.unmodifiableCollection(removed);
     }
+
     @Override
     public ChangesetCache getSource() {
         return source;
     }
+
     @Override
     public Collection<Changeset> getUpdatedChangesets() {
Index: trunk/src/org/openstreetmap/josm/data/osm/FilterMatcher.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/FilterMatcher.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/FilterMatcher.java	(revision 8510)
@@ -85,5 +85,5 @@
 
             Match compiled = SearchCompiler.compile(filter.text, filter.caseSensitive, filter.regexSearch);
-            this.match = filter.inverted?new Not(compiled):compiled;
+            this.match = filter.inverted ? new Not(compiled) : compiled;
             this.isInverted = filter.inverted;
         }
Index: trunk/src/org/openstreetmap/josm/data/osm/Hash.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Hash.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/Hash.java	(revision 8510)
@@ -11,5 +11,5 @@
  * @author nenik
  */
-public interface Hash<K,T> {
+public interface Hash<K, T> {
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/osm/INode.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/INode.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/INode.java	(revision 8510)
@@ -8,6 +8,9 @@
 
     LatLon getCoor();
+
     void setCoor(LatLon coor);
+
     EastNorth getEastNorth();
+
     void setEastNorth(EastNorth eastNorth);
 }
Index: trunk/src/org/openstreetmap/josm/data/osm/IPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/IPrimitive.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/IPrimitive.java	(revision 8510)
@@ -12,26 +12,45 @@
 
     boolean isModified();
+
     void setModified(boolean modified);
+
     boolean isVisible();
+
     void setVisible(boolean visible);
+
     boolean isDeleted();
+
     void setDeleted(boolean deleted);
+
     boolean isIncomplete();
+
     boolean isNewOrUndeleted();
+
     long getId();
+
     PrimitiveId getPrimitiveId();
+
     int getVersion();
+
     void setOsmId(long id, int version);
+
     User getUser();
+
     void setUser(User user);
+
     Date getTimestamp();
+
     void setTimestamp(Date timestamp);
+
     boolean isTimestampEmpty();
+
     int getChangesetId();
+
     void setChangesetId(int changesetId);
 
     void accept(PrimitiveVisitor visitor);
+
     String getName();
+
     String getLocalName();
-
 }
Index: trunk/src/org/openstreetmap/josm/data/osm/IRelation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/IRelation.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/IRelation.java	(revision 8510)
@@ -5,7 +5,9 @@
 
     int getMembersCount();
+
     long getMemberId(int idx);
+
     String getRole(int idx);
+
     OsmPrimitiveType getMemberType(int idx);
-
 }
Index: trunk/src/org/openstreetmap/josm/data/osm/IWay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/IWay.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/IWay.java	(revision 8510)
@@ -5,6 +5,7 @@
 
     int getNodesCount();
+
     long getNodeId(int idx);
+
     boolean isClosed();
-
 }
Index: trunk/src/org/openstreetmap/josm/data/osm/MultipolygonBuilder.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/MultipolygonBuilder.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/MultipolygonBuilder.java	(revision 8510)
@@ -203,5 +203,5 @@
             while (true) {
                 boolean curWayReverse = prevNode == curWay.lastNode();
-                Node nextNode = (curWayReverse) ? curWay.firstNode(): curWay.lastNode();
+                Node nextNode = (curWayReverse) ? curWay.firstNode() : curWay.lastNode();
 
                 //add cur way to the list
@@ -222,5 +222,5 @@
 
                 Way nextWay = null;
-                for(Way way: adjacentWays) {
+                for (Way way: adjacentWays) {
                     if (way != curWay) {
                         nextWay = way;
@@ -306,5 +306,5 @@
         final int noBuckets = (boundaryWays.size() + bucketsize - 1) / bucketsize;
         final boolean singleThread = THREAD_POOL.a == 1 || noBuckets == 1;
-        for (int i=0; i<noBuckets; i++) {
+        for (int i = 0; i < noBuckets; i++) {
             int from = i*bucketsize;
             int to = Math.min((i+1)*bucketsize, boundaryWays.size());
@@ -404,5 +404,5 @@
         @Override
         public List<PolygonLevel> call() throws Exception {
-            for (int i = from; i<to; i++) {
+            for (int i = from; i < to; i++) {
                 if (processOuterWay(0, input, output, input.get(i)) == null) {
                     return null;
Index: trunk/src/org/openstreetmap/josm/data/osm/NameFormatter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/NameFormatter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/NameFormatter.java	(revision 8510)
@@ -6,10 +6,15 @@
 public interface NameFormatter {
     String format(Node node);
+
     String format(Way way);
+
     String format(Relation relation);
+
     String format(Changeset changeset);
 
     Comparator<Node> getNodeComparator();
+
     Comparator<Way> getWayComparator();
+
     Comparator<Relation> getRelationComparator();
 }
Index: trunk/src/org/openstreetmap/josm/data/osm/Node.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Node.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/Node.java	(revision 8510)
@@ -70,5 +70,5 @@
     public final LatLon getCoor() {
         if (!isLatLonKnown()) return null;
-        return new LatLon(lat,lon);
+        return new LatLon(lat, lon);
     }
 
@@ -223,5 +223,5 @@
         try {
             super.cloneFrom(osm);
-            setCoor(((Node)osm).getCoor());
+            setCoor(((Node) osm).getCoor());
         } finally {
             writeUnlock(locked);
@@ -246,5 +246,5 @@
             super.mergeFrom(other);
             if (!other.isIncomplete()) {
-                setCoor(((Node)other).getCoor());
+                setCoor(((Node) other).getCoor());
             }
         } finally {
@@ -257,5 +257,5 @@
         try {
             super.load(data);
-            setCoor(((NodeData)data).getCoor());
+            setCoor(((NodeData) data).getCoor());
         } finally {
             writeUnlock(locked);
@@ -284,5 +284,5 @@
         if (!super.hasEqualSemanticAttributes(other))
             return false;
-        Node n = (Node)other;
+        Node n = (Node) other;
         LatLon coor = getCoor();
         LatLon otherCoor = n.getCoor();
Index: trunk/src/org/openstreetmap/josm/data/osm/NodeData.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/NodeData.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/NodeData.java	(revision 8510)
@@ -37,5 +37,5 @@
     @Override
     public LatLon getCoor() {
-        return isLatLonKnown() ? new LatLon(lat,lon) : null;
+        return isLatLonKnown() ? new LatLon(lat, lon) : null;
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/NoteData.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/NoteData.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/NoteData.java	(revision 8510)
@@ -193,5 +193,5 @@
      */
     public synchronized void createNote(LatLon location, String text) {
-        if(text == null || text.isEmpty()) {
+        if (text == null || text.isEmpty()) {
             throw new IllegalArgumentException("Comment can not be blank when creating a note");
         }
Index: trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 8510)
@@ -122,5 +122,5 @@
         if (list == null) return Collections.emptyList();
         List<T> ret = new LinkedList<>();
-        for(OsmPrimitive p: list) {
+        for (OsmPrimitive p: list) {
             if (type.isInstance(p)) {
                 ret.add(type.cast(p));
@@ -144,5 +144,5 @@
         Set<T> ret = new LinkedHashSet<>();
         if (set != null) {
-            for(OsmPrimitive p: set) {
+            for (OsmPrimitive p: set) {
                 if (type.isInstance(p)) {
                     ret.add(type.cast(p));
@@ -626,6 +626,6 @@
 
     private boolean isOuterMemberOfMultipolygon(OsmPrimitive ref) {
-        if (ref instanceof Relation && ref.isSelected() && ((Relation)ref).isMultipolygon()) {
-            for (RelationMember rm : ((Relation)ref).getMembersFor(Collections.singleton(this))) {
+        if (ref instanceof Relation && ref.isSelected() && ((Relation) ref).isMultipolygon()) {
+            for (RelationMember rm : ((Relation) ref).getMembersFor(Collections.singleton(this))) {
                 if ("outer".equals(rm.getRole())) {
                     return true;
@@ -965,12 +965,12 @@
         } else if (referrers instanceof OsmPrimitive) {
             if (referrers != referrer) {
-                referrers = new OsmPrimitive[] {(OsmPrimitive)referrers, referrer};
+                referrers = new OsmPrimitive[] {(OsmPrimitive) referrers, referrer};
             }
         } else {
-            for (OsmPrimitive primitive:(OsmPrimitive[])referrers) {
+            for (OsmPrimitive primitive:(OsmPrimitive[]) referrers) {
                 if (primitive == referrer)
                     return;
             }
-            referrers = Utils.addInArrayCopy((OsmPrimitive[])referrers, referrer);
+            referrers = Utils.addInArrayCopy((OsmPrimitive[]) referrers, referrer);
         }
     }
@@ -986,7 +986,7 @@
             }
         } else if (referrers instanceof OsmPrimitive[]) {
-            OsmPrimitive[] orig = (OsmPrimitive[])referrers;
+            OsmPrimitive[] orig = (OsmPrimitive[]) referrers;
             int idx = -1;
-            for (int i=0; i<orig.length; i++) {
+            for (int i = 0; i < orig.length; i++) {
                 if (orig[i] == referrer) {
                     idx = i;
@@ -1034,10 +1034,10 @@
         if (referrers != null) {
             if (referrers instanceof OsmPrimitive) {
-                OsmPrimitive ref = (OsmPrimitive)referrers;
+                OsmPrimitive ref = (OsmPrimitive) referrers;
                 if (ref.dataSet == dataSet) {
                     result.add(ref);
                 }
             } else {
-                for (OsmPrimitive o:(OsmPrimitive[])referrers) {
+                for (OsmPrimitive o:(OsmPrimitive[]) referrers) {
                     if (dataSet == o.dataSet) {
                         result.add(o);
@@ -1058,5 +1058,5 @@
      * @param visitor the visitor. Ignored, if null.
      */
-    public void visitReferrers(Visitor visitor){
+    public void visitReferrers(Visitor visitor) {
         if (visitor == null) return;
         if (this.referrers == null)
@@ -1088,8 +1088,8 @@
         checkDataset();
         if (referrers instanceof OsmPrimitive)
-            return n<=1 && referrers instanceof Way && ((OsmPrimitive)referrers).dataSet == dataSet;
+            return n <= 1 && referrers instanceof Way && ((OsmPrimitive) referrers).dataSet == dataSet;
         else {
-            int counter=0;
-            for (OsmPrimitive o : (OsmPrimitive[])referrers) {
+            int counter = 0;
+            for (OsmPrimitive o : (OsmPrimitive[]) referrers) {
                 if (dataSet == o.dataSet && o instanceof Way) {
                     if (++counter >= n)
@@ -1100,5 +1100,4 @@
         }
     }
-
 
     /*-----------------
@@ -1153,5 +1152,5 @@
             setIncomplete(other.isIncomplete());
             flags = other.flags;
-            user= other.user;
+            user = other.user;
             changesetId = other.changesetId;
         } finally {
@@ -1218,5 +1217,5 @@
                 && version == other.version
                 && isVisible() == other.isVisible()
-                && (user == null ? other.user==null : user==other.user)
+                && (user == null ? other.user == null : user == other.user)
                 && changesetId == other.changesetId;
     }
@@ -1305,7 +1304,8 @@
      * An primitive is equal to its incomplete counter part.
      */
-    @Override public boolean equals(Object obj) {
+    @Override
+    public boolean equals(Object obj) {
         if (obj instanceof OsmPrimitive)
-            return ((OsmPrimitive)obj).id == id && obj.getClass() == getClass();
+            return ((OsmPrimitive) obj).id == id && obj.getClass() == getClass();
         return false;
     }
@@ -1316,6 +1316,7 @@
      * An primitive has the same hashcode as its incomplete counterpart.
      */
-    @Override public final int hashCode() {
-        return (int)id;
+    @Override
+    public final int hashCode() {
+        return (int) id;
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveType.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveType.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveType.java	(revision 8510)
@@ -66,5 +66,5 @@
     public static OsmPrimitiveType from(String value) {
         if (value == null) return null;
-        for (OsmPrimitiveType type: values()){
+        for (OsmPrimitiveType type: values()) {
             if (type.getAPIName().equalsIgnoreCase(value))
                 return type;
Index: trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmUtils.java	(revision 8510)
@@ -30,5 +30,5 @@
 
     public static Boolean getOsmBoolean(String value) {
-        if(value == null) return null;
+        if (value == null) return null;
         String lowerValue = value.toLowerCase(Locale.ENGLISH);
         if (TRUE_VALUES.contains(lowerValue)) return Boolean.TRUE;
Index: trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java	(revision 8510)
@@ -56,7 +56,7 @@
     public static <T extends PrimitiveData> List<T> getFilteredList(Collection<T> list, OsmPrimitiveType type) {
         List<T> ret = new ArrayList<>();
-        for(PrimitiveData p: list) {
+        for (PrimitiveData p: list) {
             if (type.getDataClass().isInstance(p)) {
-                ret.add((T)p);
+                ret.add((T) p);
             }
         }
Index: trunk/src/org/openstreetmap/josm/data/osm/PrimitiveDeepCopy.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/PrimitiveDeepCopy.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/PrimitiveDeepCopy.java	(revision 8510)
@@ -64,4 +64,5 @@
                 (firstIteration ? directlyAdded : referenced).add(n.save());
             }
+
             @Override
             public void visit(Way w) {
@@ -74,4 +75,5 @@
                 }
             }
+
             @Override
             public void visit(Relation r) {
Index: trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 8510)
@@ -179,6 +179,6 @@
 
         boolean matches(final T o, final BBox search_bbox) {
-            if (o instanceof Node){
-                final LatLon latLon = ((Node)o).getCoor();
+            if (o instanceof Node) {
+                final LatLon latLon = ((Node) o).getCoor();
                 // node without coords -> bbox[0,0,0,0]
                 return search_bbox.bounds(latLon != null ? latLon : LatLon.ZERO);
Index: trunk/src/org/openstreetmap/josm/data/osm/Relation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Relation.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/Relation.java	(revision 8510)
@@ -232,5 +232,5 @@
             super.cloneFrom(osm);
             // It's not necessary to clone members as RelationMember class is immutable
-            setMembers(((Relation)osm).getMembers());
+            setMembers(((Relation) osm).getMembers());
         } finally {
             writeUnlock(locked);
@@ -295,5 +295,5 @@
         if (!super.hasEqualSemanticAttributes(other))
             return false;
-        Relation r = (Relation)other;
+        Relation r = (Relation) other;
         return Arrays.equals(members, r.members);
     }
@@ -460,5 +460,5 @@
             BBox result = null;
             for (RelationMember rm:members) {
-                BBox box = rm.isRelation()?rm.getRelation().calculateBBox(visitedRelations):rm.getMember().getBBox();
+                BBox box = rm.isRelation() ? rm.getRelation().calculateBBox(visitedRelations) : rm.getMember().getBBox();
                 if (box != null) {
                     if (result == null) {
Index: trunk/src/org/openstreetmap/josm/data/osm/RelationMember.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/RelationMember.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/RelationMember.java	(revision 8510)
@@ -94,5 +94,5 @@
      */
     public Relation getRelation() {
-        return (Relation)member;
+        return (Relation) member;
     }
 
@@ -103,5 +103,5 @@
      */
     public Way getWay() {
-        return (Way)member;
+        return (Way) member;
     }
 
@@ -112,5 +112,5 @@
      */
     public Node getNode() {
-        return (Node)member;
+        return (Node) member;
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/RelationMemberData.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/RelationMemberData.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/RelationMemberData.java	(revision 8510)
@@ -9,5 +9,5 @@
 
     public RelationMemberData(String role, OsmPrimitiveType type, long id) {
-        this.role = role == null?"":role;
+        this.role = role == null ? "" : role;
         this.memberType = type;
         this.memberId = id;
Index: trunk/src/org/openstreetmap/josm/data/osm/RelationToChildReference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/RelationToChildReference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/RelationToChildReference.java	(revision 8510)
@@ -18,5 +18,5 @@
         Set<RelationToChildReference> references = new HashSet<>();
         for (Relation parent: parents) {
-            for (int i=0; i < parent.getMembersCount(); i++) {
+            for (int i = 0; i < parent.getMembersCount(); i++) {
                 if (parent.getMember(i).refersTo(child)) {
                     references.add(new RelationToChildReference(parent, i, parent.getMember(i)));
@@ -87,4 +87,5 @@
         return result;
     }
+
     @Override
     public boolean equals(Object obj) {
Index: trunk/src/org/openstreetmap/josm/data/osm/Storage.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Storage.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/Storage.java	(revision 8510)
@@ -75,5 +75,5 @@
         @Override
         public int getHashCode(PrimitiveId k) {
-            return (int)k.getUniqueId() ^ k.getType().hashCode();
+            return (int) k.getUniqueId() ^ k.getType().hashCode();
         }
 
@@ -85,5 +85,5 @@
     }
 
-    private final Hash<? super T,? super T> hash;
+    private final Hash<? super T, ? super T> hash;
     private T[] data;
     private int mask;
@@ -109,5 +109,5 @@
     }
 
-    public Storage(Hash<? super T,? super T> ha) {
+    public Storage(Hash<? super T, ? super T> ha) {
         this(ha, DEFAULT_CAPACITY, false);
     }
@@ -121,5 +121,5 @@
     }
 
-    public Storage(Hash<? super T,? super T> ha, boolean safeIterator) {
+    public Storage(Hash<? super T, ? super T> ha, boolean safeIterator) {
         this(ha, DEFAULT_CAPACITY, safeIterator);
     }
@@ -140,5 +140,5 @@
     public Storage(Hash<? super T, ? super T> ha, int capacity, boolean safeIterator) {
         this.hash = ha;
-        int cap = 1 << (int)(Math.ceil(Math.log(capacity/loadFactor) / Math.log(2)));
+        int cap = 1 << (int) (Math.ceil(Math.log(capacity/loadFactor) / Math.log(2)));
         @SuppressWarnings("unchecked") T[] newData = (T[]) new Object[cap];
         data = newData;
@@ -195,5 +195,5 @@
         modCount++;
         size = 0;
-        for (int i = 0; i<data.length; i++) {
+        for (int i = 0; i < data.length; i++) {
             data[i] = null;
         }
@@ -257,5 +257,5 @@
     }
 
-    public <K> Map<K,T> foreignKey(Hash<K,? super T> h) {
+    public <K> Map<K, T> foreignKey(Hash<K, ? super T> h) {
         return new FMap<>(h);
     }
@@ -278,5 +278,5 @@
      * where such an entry can be stored.
      */
-    private <K> int getBucket(Hash<K,? super T> ha, K key) {
+    private <K> int getBucket(Hash<K, ? super T> ha, K key) {
         T entry;
         int hcode = rehash(ha.getHashCode(key));
@@ -309,5 +309,5 @@
             // because the entry safely belongs to <previous_null+1,hole>
             if ((bucket < right && (right <= hole || hole <= bucket)) ||
-                    (right <=hole && hole <= bucket)) {
+                    (right <= hole && hole <= bucket)) {
 
                 data[hole] = data[bucket];
@@ -348,10 +348,11 @@
      * hashCode and equals.
      */
-    public static <O> Hash<O,O> defaultHash() {
-        return new Hash<O,O>() {
+    public static <O> Hash<O, O> defaultHash() {
+        return new Hash<O, O>() {
             @Override
             public int getHashCode(O t) {
                 return t.hashCode();
             }
+
             @Override
             public boolean equals(O t1, O t2) {
@@ -373,8 +374,8 @@
      */
 
-    private final class FMap<K> implements Map<K,T> {
-        private Hash<K,? super T> fHash;
-
-        private FMap(Hash<K,? super T> h) {
+    private final class FMap<K> implements Map<K, T> {
+        private Hash<K, ? super T> fHash;
+
+        private FMap(Hash<K, ? super T> h) {
             fHash = h;
         }
@@ -488,5 +489,4 @@
     }
 
-
     private final class Iter implements Iterator<T> {
         private final int mods;
Index: trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/TagCollection.java	(revision 8510)
@@ -73,11 +73,11 @@
      * @return the tag collection
      */
-    public static TagCollection from(Map<String,String> tags) {
+    public static TagCollection from(Map<String, String> tags) {
         TagCollection ret = new TagCollection();
         if (tags == null) return ret;
-        for (Entry<String,String> entry: tags.entrySet()) {
-            String key = entry.getKey() == null? "" : entry.getKey();
+        for (Entry<String, String> entry: tags.entrySet()) {
+            String key = entry.getKey() == null ? "" : entry.getKey();
             String value = entry.getValue() == null ? "" : entry.getValue();
-            ret.add(new Tag(key,value));
+            ret.add(new Tag(key, value));
         }
         return ret;
@@ -199,5 +199,5 @@
      * @param tag the tag to add
      */
-    public final void add(Tag tag){
+    public final void add(Tag tag) {
         if (tag == null) return;
         if (tags.contains(tag)) return;
@@ -213,5 +213,5 @@
     public final void add(Collection<Tag> tags) {
         if (tags == null) return;
-        for (Tag tag: tags){
+        for (Tag tag: tags) {
             add(tag);
         }
@@ -269,7 +269,7 @@
      */
     public void removeByKey(String key) {
-        if (key  == null) return;
+        if (key == null) return;
         Iterator<Tag> it = tags.iterator();
-        while(it.hasNext()) {
+        while (it.hasNext()) {
             if (it.next().matchesKey(key)) {
                 it.remove();
@@ -461,5 +461,5 @@
         if (keys == null)
             return ret;
-        for(String key : keys) {
+        for (String key : keys) {
             if (key != null) {
                 ret.add(getTagsFor(key));
@@ -520,5 +520,5 @@
         for (Tag tag: tags) {
             Integer v = counters.get(tag.getKey());
-            counters.put(tag.getKey(),(v==null) ? 1 : v+1);
+            counters.put(tag.getKey(), (v == null) ? 1 : v+1);
         }
         Set<String> ret = new HashSet<>();
@@ -718,5 +718,5 @@
     public TagCollection emptyTagsForKeysMissingIn(TagCollection other) {
         TagCollection ret = new TagCollection();
-        for(String key: this.minus(other).getKeys()) {
+        for (String key: this.minus(other).getKeys()) {
             ret.add(new Tag(key));
         }
@@ -778,5 +778,4 @@
     }
 
-
     @Override
     public String toString() {
Index: trunk/src/org/openstreetmap/josm/data/osm/Tagged.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Tagged.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/Tagged.java	(revision 8510)
@@ -17,5 +17,5 @@
      * @param keys the map of key value pairs. If null, reset to the empty map.
      */
-    void setKeys(Map<String,String> keys);
+    void setKeys(Map<String, String> keys);
 
     /**
@@ -24,5 +24,5 @@
      * @return the map of key/value pairs
      */
-    Map<String,String> getKeys();
+    Map<String, String> getKeys();
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/osm/User.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/User.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/User.java	(revision 8510)
@@ -29,5 +29,5 @@
      * the map of known users
      */
-    private static Map<Long,User> userMap = new HashMap<>();
+    private static Map<Long, User> userMap = new HashMap<>();
 
     /**
@@ -49,7 +49,7 @@
      */
     public static synchronized User createLocalUser(String name) {
-        for(long i = -1; i >= uidCounter; --i) {
+        for (long i = -1; i >= uidCounter; --i) {
             User olduser = getById(i);
-            if(olduser != null && olduser.hasName(name))
+            if (olduser != null && olduser.hasName(name))
                 return olduser;
         }
Index: trunk/src/org/openstreetmap/josm/data/osm/UserInfo.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/UserInfo.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/UserInfo.java	(revision 8510)
@@ -35,34 +35,45 @@
         return id;
     }
+
     public void setId(int id) {
         this.id = id;
     }
+
     public String getDisplayName() {
         return displayName;
     }
+
     public void setDisplayName(String displayName) {
         this.displayName = displayName;
     }
+
     public Date getAccountCreated() {
         return accountCreated;
     }
+
     public void setAccountCreated(Date accountCreated) {
         this.accountCreated = accountCreated;
     }
+
     public LatLon getHome() {
         return home;
     }
+
     public void setHome(LatLon home) {
         this.home = home;
     }
+
     public String getDescription() {
         return description;
     }
+
     public void setDescription(String description) {
         this.description = description;
     }
+
     public List<String> getLanguages() {
         return languages;
     }
+
     public void setLanguages(List<String> languages) {
         this.languages = languages;
Index: trunk/src/org/openstreetmap/josm/data/osm/Way.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Way.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/Way.java	(revision 8510)
@@ -84,7 +84,7 @@
         Node last = null;
         int count = nodes.size();
-        for(int i = 0; i < count && count > 2;) {
+        for (int i = 0; i < count && count > 2;) {
             Node n = nodes.get(i);
-            if(last == n) {
+            if (last == n) {
                 nodes.remove(i);
                 --count;
@@ -173,5 +173,5 @@
 
         Node[] nodes = this.nodes;
-        for (int i=0; i<nodes.length; i++) {
+        for (int i = 0; i < nodes.length; i++) {
             if (nodes[i].equals(node)) {
                 if (i > 0)
@@ -192,6 +192,6 @@
      * @since 3348
      */
-    public List<Pair<Node,Node>> getNodePairs(boolean sort) {
-        List<Pair<Node,Node>> chunkSet = new ArrayList<>();
+    public List<Pair<Node, Node>> getNodePairs(boolean sort) {
+        List<Pair<Node, Node>> chunkSet = new ArrayList<>();
         if (isIncomplete()) return chunkSet;
         Node lastN = null;
@@ -202,5 +202,5 @@
                 continue;
             }
-            Pair<Node,Node> np = new Pair<>(lastN, n);
+            Pair<Node, Node> np = new Pair<>(lastN, n);
             if (sort) {
                 Pair.sort(np);
@@ -293,5 +293,5 @@
             List<Node> newNodes = new ArrayList<>(wayData.getNodes().size());
             for (Long nodeId : wayData.getNodes()) {
-                Node node = (Node)getDataSet().getPrimitiveById(nodeId, OsmPrimitiveType.NODE);
+                Node node = (Node) getDataSet().getPrimitiveById(nodeId, OsmPrimitiveType.NODE);
                 if (node != null) {
                     newNodes.add(node);
@@ -321,5 +321,5 @@
         try {
             super.cloneFrom(osm);
-            Way otherWay = (Way)osm;
+            Way otherWay = (Way) osm;
             setNodes(otherWay.getNodes());
         } finally {
@@ -330,5 +330,5 @@
     @Override
     public String toString() {
-        String nodesDesc = isIncomplete()?"(incomplete)":"nodes=" + Arrays.toString(nodes);
+        String nodesDesc = isIncomplete() ? "(incomplete)" : "nodes=" + Arrays.toString(nodes);
         return "{Way id=" + getUniqueId() + " version=" + getVersion()+ " " + getFlagsAsString()  + " " + nodesDesc + "}";
     }
@@ -340,7 +340,7 @@
         if (!super.hasEqualSemanticAttributes(other))
             return false;
-        Way w = (Way)other;
+        Way w = (Way) other;
         if (getNodesCount() != w.getNodesCount()) return false;
-        for (int i=0; i<getNodesCount(); i++) {
+        for (int i = 0; i < getNodesCount(); i++) {
             if (!getNode(i).hasEqualSemanticAttributes(w.getNode(i)))
                 return false;
@@ -426,5 +426,5 @@
      */
     public void addNode(Node n) {
-        if (n==null) return;
+        if (n == null) return;
 
         boolean locked = writeLock();
@@ -453,5 +453,5 @@
      */
     public void addNode(int offs, Node n) throws IndexOutOfBoundsException {
-        if (n==null) return;
+        if (n == null) return;
 
         boolean locked = writeLock();
@@ -510,5 +510,5 @@
         if (this.nodes.length >= 4 && isClosed()) {
             Node distinctNode = null;
-            for (int i=1; i<nodes.length-1; i++) {
+            for (int i = 1; i < nodes.length-1; i++) {
                 if (distinctNode == null && nodes[i] != nodes[0]) {
                     distinctNode = nodes[i];
Index: trunk/src/org/openstreetmap/josm/data/osm/WaySegment.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/WaySegment.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/WaySegment.java	(revision 8510)
@@ -42,5 +42,5 @@
      * @return the second node
      */
-    public Node getSecondNode(){
+    public Node getSecondNode() {
         return way.getNode(lowerIndex + 1);
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java	(revision 8510)
@@ -122,5 +122,5 @@
         @Override
         public boolean equals(Object o) {
-            return o instanceof ListenerInfo && ((ListenerInfo)o).listener == listener;
+            return o instanceof ListenerInfo && ((ListenerInfo) o).listener == listener;
         }
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/event/SelectionEventManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/event/SelectionEventManager.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/event/SelectionEventManager.java	(revision 8510)
@@ -40,5 +40,5 @@
         @Override
         public boolean equals(Object o) {
-            return o instanceof ListenerInfo && ((ListenerInfo)o).listener == listener;
+            return o instanceof ListenerInfo && ((ListenerInfo) o).listener == listener;
         }
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/history/History.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/History.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/History.java	(revision 8510)
@@ -32,5 +32,5 @@
             }
         }
-        return new History(history.id, history.type,out);
+        return new History(history.id, history.type, out);
     }
 
@@ -96,5 +96,5 @@
                 }
             );
-        return new History(id, type,copy);
+        return new History(id, type, copy);
     }
 
@@ -232,5 +232,5 @@
     public boolean contains(long version) {
         for (HistoryOsmPrimitive primitive: versions) {
-            if (primitive.matches(id,version))
+            if (primitive.matches(id, version))
                 return true;
         }
@@ -247,5 +247,5 @@
     public HistoryOsmPrimitive getByVersion(long version) {
         for (HistoryOsmPrimitive primitive: versions) {
-            if (primitive.matches(id,version))
+            if (primitive.matches(id, version))
                 return primitive;
         }
@@ -265,7 +265,7 @@
         if (h.versions.isEmpty())
             return null;
-        if (h.get(0).getTimestamp().compareTo(date)> 0)
+        if (h.get(0).getTimestamp().compareTo(date) > 0)
             return null;
-        for (int i = 1; i < h.versions.size();i++) {
+        for (int i = 1; i < h.versions.size(); i++) {
             if (h.get(i-1).getTimestamp().compareTo(date) <= 0
                     && h.get(i).getTimestamp().compareTo(date) >= 0)
Index: trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java	(revision 8510)
@@ -90,5 +90,5 @@
      * type <code>type</code>, and version <code>version</code>
      */
-    public HistoryOsmPrimitive get(long id, OsmPrimitiveType type, long version){
+    public HistoryOsmPrimitive get(long id, OsmPrimitiveType type, long version) {
         if (id <= 0)
             throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0 expected, got {1}", "id", id));
@@ -204,8 +204,10 @@
         /* irrelevant in this context */
     }
+
     @Override
     public void layerAdded(Layer newLayer) {
         /* irrelevant in this context */
     }
+
     @Override
     public void layerRemoved(Layer oldLayer) {
Index: trunk/src/org/openstreetmap/josm/data/osm/history/HistoryNameFormatter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/HistoryNameFormatter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/HistoryNameFormatter.java	(revision 8510)
@@ -4,5 +4,7 @@
 public interface HistoryNameFormatter {
     String format(HistoryNode node);
+
     String format(HistoryWay node);
+
     String format(HistoryRelation node);
 }
Index: trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/HistoryOsmPrimitive.java	(revision 8510)
@@ -128,10 +128,13 @@
         return visible;
     }
+
     public User getUser() {
         return user;
     }
+
     public long getChangesetId() {
         return changesetId;
     }
+
     public Date getTimestamp() {
         return timestamp;
@@ -171,5 +174,5 @@
     }
 
-    public Map<String,String> getTags() {
+    public Map<String, String> getTags() {
         return Collections.unmodifiableMap(tags);
     }
@@ -189,5 +192,5 @@
      * @param tags the tags. May be null.
      */
-    public void setTags(Map<String,String> tags) {
+    public void setTags(Map<String, String> tags) {
         if (tags == null) {
             this.tags = new HashMap<>();
Index: trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java	(revision 8510)
@@ -112,5 +112,6 @@
     public RelationMemberData getRelationMember(int idx) throws IndexOutOfBoundsException  {
         if (idx < 0 || idx >= members.size())
-            throw new IndexOutOfBoundsException(MessageFormat.format("Parameter {0} not in range 0..{1}. Got ''{2}''.", "idx", members.size(),idx));
+            throw new IndexOutOfBoundsException(
+                    MessageFormat.format("Parameter {0} not in range 0..{1}. Got ''{2}''.", "idx", members.size(), idx));
         return members.get(idx);
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/history/HistoryWay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/history/HistoryWay.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/history/HistoryWay.java	(revision 8510)
@@ -99,5 +99,5 @@
     public long getNodeId(int idx) throws IndexOutOfBoundsException {
         if (idx < 0 || idx >= nodeIds.size())
-            throw new IndexOutOfBoundsException(tr("Parameter {0} not in range 0..{1}. Got ''{2}''.", "idx", nodeIds.size(),idx));
+            throw new IndexOutOfBoundsException(tr("Parameter {0} not in range 0..{1}. Got ''{2}''.", "idx", nodeIds.size(), idx));
         return nodeIds.get(idx);
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java	(revision 8510)
@@ -65,5 +65,5 @@
         if (latlon != null) {
             if (latlon instanceof CachedLatLon) {
-                visit(((CachedLatLon)latlon).getEastNorth());
+                visit(((CachedLatLon) latlon).getEastNorth());
             } else {
                 visit(Main.getProjection().latlon2eastNorth(latlon));
@@ -179,6 +179,6 @@
     }
 
-
-    @Override public String toString() {
+    @Override
+    public String toString() {
         return "BoundingXYVisitor["+bounds+"]";
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitor.java	(revision 8510)
@@ -95,5 +95,5 @@
         RelationData clone;
         if (isAlreadyRemembered(r)) {
-            clone = (RelationData)mappedPrimitives.get(r);
+            clone = (RelationData) mappedPrimitives.get(r);
         } else {
             clone = r.save();
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java	(revision 8510)
@@ -77,5 +77,5 @@
             } else {
                 long x = 0, y = 0;
-                outcodeOut = outcode0 != 0 ? outcode0: outcode1;
+                outcodeOut = outcode0 != 0 ? outcode0 : outcode1;
                 if ((outcodeOut & OUT_TOP) > 0) {
                     x = x1 + (x2 - x1) * (ymax - y1)/(y2 - y1);
@@ -84,5 +84,5 @@
                     x = x1 + (x2 - x1) * (ymin - y1)/(y2 - y1);
                     y = ymin;
-                } else if ((outcodeOut & OUT_RIGHT)> 0) {
+                } else if ((outcodeOut & OUT_RIGHT) > 0) {
                     y = y1 + (y2 - y1) * (xmax - x1)/(x2 - x1);
                     x = xmax;
@@ -104,5 +104,5 @@
         while (!done);
 
-        if(accept) {
+        if (accept) {
             p1 = new Point((int) x1, (int) y1);
             p2 = new Point((int) x2, (int) y2);
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java	(revision 8510)
@@ -121,7 +121,7 @@
     }
 
-    private void activateMapRenderer(String rendererClassName){
+    private void activateMapRenderer(String rendererClassName) {
         Class<?> c = loadRendererClass(rendererClassName);
-        if (c == null){
+        if (c == null) {
             Main.error(tr("Can''t activate map renderer class ''{0}'', because the class wasn''t found.", rendererClassName));
             Main.error(tr("Activating the standard map renderer instead."));
@@ -208,5 +208,5 @@
         if (!isRegistered(renderer)) return;
         Iterator<Descriptor> it = descriptors.iterator();
-        while(it.hasNext()) {
+        while (it.hasNext()) {
             Descriptor d = it.next();
             if (d.getRenderer().getName().equals(renderer.getName())) {
@@ -262,9 +262,9 @@
      */
     public AbstractMapRenderer createActiveRenderer(Graphics2D g, NavigatableComponent viewport, boolean isInactiveMode)
-            throws MapRendererFactoryException{
+            throws MapRendererFactoryException {
         try {
             Constructor<?> c = activeRenderer.getConstructor(new Class<?>[]{Graphics2D.class, NavigatableComponent.class, boolean.class});
             return AbstractMapRenderer.class.cast(c.newInstance(g, viewport, isInactiveMode));
-        } catch(NoSuchMethodException | IllegalArgumentException | InstantiationException | IllegalAccessException e){
+        } catch (NoSuchMethodException | IllegalArgumentException | InstantiationException | IllegalAccessException e) {
             throw new MapRendererFactoryException(e);
         } catch (InvocationTargetException e) {
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/PaintColors.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/PaintColors.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/PaintColors.java	(revision 8510)
@@ -21,12 +21,12 @@
     CONNECTION(marktr("Node: connection"), Color.yellow),
     TAGGED(marktr("Node: tagged"), new Color(204, 255, 255)), // light cyan
-    DEFAULT_WAY(marktr("way"),  new Color(0,0,128)), // dark blue
-    RELATION(marktr("relation"), new Color(0,128,128)), // teal
-    UNTAGGED_WAY(marktr("untagged way"), new Color(0,128,0)), // dark green
+    DEFAULT_WAY(marktr("way"),  new Color(0, 0, 128)), // dark blue
+    RELATION(marktr("relation"), new Color(0, 128, 128)), // teal
+    UNTAGGED_WAY(marktr("untagged way"), new Color(0, 128, 0)), // dark green
     BACKGROUND(marktr("background"), Color.BLACK),
     HIGHLIGHT(marktr("highlight"), SELECTED.get()),
     HIGHLIGHT_WIREFRAME(marktr("highlight wireframe"), Color.orange),
 
-    UNTAGGED(marktr("untagged"),Color.GRAY),
+    UNTAGGED(marktr("untagged"), Color.GRAY),
     TEXT(marktr("text"), Color.WHITE),
     AREA_TEXT(marktr("areatext"), Color.LIGHT_GRAY);
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 8510)
@@ -149,5 +149,5 @@
             int yCurrent0 = current.y - (int) Math.round(offset * dxNext / lenNext);
 
-            if (idx==0) {
+            if (idx == 0) {
                 ++idx;
                 prev = current;
@@ -172,6 +172,6 @@
                 int m = dxNext*(yCurrent0 - yPrev0) - dyNext*(xCurrent0 - xPrev0);
 
-                int cx = xPrev0 + (int) Math.round((double)m * dxPrev / det);
-                int cy = yPrev0 + (int) Math.round((double)m * dyPrev / det);
+                int cx = xPrev0 + (int) Math.round((double) m * dxPrev / det);
+                int cy = yPrev0 + (int) Math.round((double) m * dyPrev / det);
                 ++idx;
                 prev = current;
@@ -238,5 +238,5 @@
     }
 
-    private static Map<Font,Boolean> IS_GLYPH_VECTOR_DOUBLE_TRANSLATION_BUG = new HashMap<>();
+    private static Map<Font, Boolean> IS_GLYPH_VECTOR_DOUBLE_TRANSLATION_BUG = new HashMap<>();
 
     /**
@@ -335,5 +335,5 @@
         super(g, nc, isInactiveMode);
 
-        if (nc!=null) {
+        if (nc != null) {
             Component focusOwner = FocusManager.getCurrentManager().getFocusOwner();
             useWiderHighlight = !(focusOwner instanceof AbstractButton || focusOwner == nc);
@@ -364,5 +364,5 @@
         g.draw(path);
 
-        if(!isInactiveMode && useStrokes && dashes != null) {
+        if (!isInactiveMode && useStrokes && dashes != null) {
             g.setColor(dashedColor);
             g.setStroke(dashes);
@@ -486,6 +486,6 @@
                 final double h = pb.height - nb.getHeight();
 
-                final int x2 = pb.x + (int)(w/2.0);
-                final int y2 = pb.y + (int)(h/2.0);
+                final int x2 = pb.x + (int) (w/2.0);
+                final int y2 = pb.y + (int) (h/2.0);
 
                 final int nbw = (int) nb.getWidth();
@@ -498,8 +498,8 @@
                 if (!labelOK) {
                     // if center position (C) is not inside osm shape, try naively some other positions as follows:
-                    final int x1 = pb.x + (int)(  w/4.0);
-                    final int x3 = pb.x + (int)(3*w/4.0);
-                    final int y1 = pb.y + (int)(  h/4.0);
-                    final int y3 = pb.y + (int)(3*h/4.0);
+                    final int x1 = pb.x + (int)   (w/4.0);
+                    final int x3 = pb.x + (int) (3*w/4.0);
+                    final int y1 = pb.y + (int)   (h/4.0);
+                    final int y3 = pb.y + (int) (3*h/4.0);
                     // +-----------+
                     // |  5  1  6  |
@@ -526,6 +526,6 @@
                 if (labelOK) {
                     Font defaultFont = g.getFont();
-                    int x = (int)(centeredNBounds.getMinX() - nb.getMinX());
-                    int y = (int)(centeredNBounds.getMinY() - nb.getMinY());
+                    int x = (int) (centeredNBounds.getMinX() - nb.getMinX());
+                    int y = (int) (centeredNBounds.getMinY() - nb.getMinY());
                     displayText(null, name, x, y, osm.isDisabled(), text);
                     g.setFont(defaultFont);
@@ -707,10 +707,10 @@
     @Override
     public void drawNode(Node n, Color color, int size, boolean fill) {
-        if(size <= 0 && !n.isHighlighted())
+        if (size <= 0 && !n.isHighlighted())
             return;
 
         Point p = nc.getPoint(n);
 
-        if(n.isHighlighted()) {
+        if (n.isHighlighted()) {
             drawPointHighlight(p, size);
         }
@@ -737,5 +737,5 @@
 
         final int w = img.getWidth(), h = img.getHeight();
-        if(n.isHighlighted()) {
+        if (n.isHighlighted()) {
             drawPointHighlight(p, Math.max(w, h));
         }
@@ -768,5 +768,5 @@
         int radius = s.size / 2;
 
-        if(n.isHighlighted()) {
+        if (n.isHighlighted()) {
             drawPointHighlight(p, s.size);
         }
@@ -861,10 +861,10 @@
      */
     private void drawPathHighlight(GeneralPath path, BasicStroke line) {
-        if(path == null)
+        if (path == null)
             return;
         g.setColor(highlightColorTransparent);
         float w = line.getLineWidth() + highlightLineWidth;
-        if (useWiderHighlight) w+=widerHighlight;
-        while(w >= line.getLineWidth()) {
+        if (useWiderHighlight) w += widerHighlight;
+        while (w >= line.getLineWidth()) {
             g.setStroke(new BasicStroke(w, line.getEndCap(), line.getLineJoin(), line.getMiterLimit()));
             g.draw(path);
@@ -879,6 +879,6 @@
         g.setColor(highlightColorTransparent);
         int s = size + highlightPointRadius;
-        if (useWiderHighlight) s+=widerHighlight;
-        while(s >= size) {
+        if (useWiderHighlight) s += widerHighlight;
+        while (s >= size) {
             int r = (int) Math.floor(s/2d);
             g.fillRoundRect(p.x-r, p.y-r, s, s, r, r);
@@ -890,10 +890,10 @@
         // rotate image with direction last node in from to, and scale down image to 16*16 pixels
         Image smallImg = ImageProvider.createRotatedImage(img, angle, new Dimension(16, 16));
-        int w = smallImg.getWidth(null), h=smallImg.getHeight(null);
-        g.drawImage(smallImg, (int)(pVia.x+vx+vx2)-w/2, (int)(pVia.y+vy+vy2)-h/2, nc);
+        int w = smallImg.getWidth(null), h = smallImg.getHeight(null);
+        g.drawImage(smallImg, (int) (pVia.x+vx+vx2)-w/2, (int) (pVia.y+vy+vy2)-h/2, nc);
 
         if (selected) {
             g.setColor(isInactiveMode ? inactiveColor : relationSelectedColor);
-            g.drawRect((int)(pVia.x+vx+vx2)-w/2-2,(int)(pVia.y+vy+vy2)-h/2-2, w+4, h+4);
+            g.drawRect((int) (pVia.x+vx+vx2)-w/2-2, (int) (pVia.y+vy+vy2)-h/2-2, w+4, h+4);
         }
     }
@@ -906,10 +906,10 @@
         /* find the "from", "via" and "to" elements */
         for (RelationMember m : r.getMembers()) {
-            if(m.getMember().isIncomplete())
+            if (m.getMember().isIncomplete())
                 return;
             else {
-                if(m.isWay()) {
+                if (m.isWay()) {
                     Way w = m.getWay();
-                    if(w.getNodesCount() < 2) {
+                    if (w.getNodesCount() < 2) {
                         continue;
                     }
@@ -917,21 +917,21 @@
                     switch(m.getRole()) {
                     case "from":
-                        if(fromWay == null) {
+                        if (fromWay == null) {
                             fromWay = w;
                         }
                         break;
                     case "to":
-                        if(toWay == null) {
+                        if (toWay == null) {
                             toWay = w;
                         }
                         break;
                     case "via":
-                        if(via == null) {
+                        if (via == null) {
                             via = w;
                         }
                     }
-                } else if(m.isNode()) {
+                } else if (m.isNode()) {
                     Node n = m.getNode();
-                    if("via".equals(m.getRole()) && via == null) {
+                    if ("via".equals(m.getRole()) && via == null) {
                         via = n;
                     }
@@ -944,7 +944,7 @@
 
         Node viaNode;
-        if(via instanceof Node) {
+        if (via instanceof Node) {
             viaNode = (Node) via;
-            if(!fromWay.isFirstLastNode(viaNode))
+            if (!fromWay.isFirstLastNode(viaNode))
                 return;
         } else {
@@ -955,6 +955,6 @@
 
             String onewayviastr = viaWay.get("oneway");
-            if(onewayviastr != null) {
-                if("-1".equals(onewayviastr)) {
+            if (onewayviastr != null) {
+                if ("-1".equals(onewayviastr)) {
                     onewayvia = Boolean.TRUE;
                     Node tmp = firstNode;
@@ -969,5 +969,5 @@
             }
 
-            if(fromWay.isFirstLastNode(firstNode)) {
+            if (fromWay.isFirstLastNode(firstNode)) {
                 viaNode = firstNode;
             } else if (!onewayvia && fromWay.isFirstLastNode(lastNode)) {
@@ -979,5 +979,5 @@
         /* find the "direct" nodes before the via node */
         Node fromNode;
-        if(fromWay.firstNode() == via) {
+        if (fromWay.firstNode() == via) {
             fromNode = fromWay.getNode(1);
         } else {
@@ -992,5 +992,5 @@
            away from the "via" node along the first segment of the "from" way)
          */
-        double distanceFromVia=14;
+        double distanceFromVia = 14;
         double dx = pFrom.x >= pVia.x ? pFrom.x - pVia.x : pVia.x - pFrom.x;
         double dy = pFrom.y >= pVia.y ? pFrom.y - pVia.y : pVia.y - pFrom.y;
@@ -1007,8 +1007,8 @@
         double vy = distanceFromVia * Math.sin(fromAngle);
 
-        if(pFrom.x < pVia.x) {
+        if (pFrom.x < pVia.x) {
             vx = -vx;
         }
-        if(pFrom.y < pVia.y) {
+        if (pFrom.y < pVia.y) {
             vy = -vy;
         }
@@ -1018,11 +1018,11 @@
            90degrees away from the first segment of the "from" way)
          */
-        double distanceFromWay=10;
+        double distanceFromWay = 10;
         double vx2 = 0;
         double vy2 = 0;
         double iconAngle = 0;
 
-        if(pFrom.x >= pVia.x && pFrom.y >= pVia.y) {
-            if(!leftHandTraffic) {
+        if (pFrom.x >= pVia.x && pFrom.y >= pVia.y) {
+            if (!leftHandTraffic) {
                 vx2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg - 90));
                 vy2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg - 90));
@@ -1033,6 +1033,6 @@
             iconAngle = 270+fromAngleDeg;
         }
-        if(pFrom.x < pVia.x && pFrom.y >= pVia.y) {
-            if(!leftHandTraffic) {
+        if (pFrom.x < pVia.x && pFrom.y >= pVia.y) {
+            if (!leftHandTraffic) {
                 vx2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg));
                 vy2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg));
@@ -1043,6 +1043,6 @@
             iconAngle = 90-fromAngleDeg;
         }
-        if(pFrom.x < pVia.x && pFrom.y < pVia.y) {
-            if(!leftHandTraffic) {
+        if (pFrom.x < pVia.x && pFrom.y < pVia.y) {
+            if (!leftHandTraffic) {
                 vx2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg + 90));
                 vy2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg + 90));
@@ -1053,6 +1053,6 @@
             iconAngle = 90+fromAngleDeg;
         }
-        if(pFrom.x >= pVia.x && pFrom.y < pVia.y) {
-            if(!leftHandTraffic) {
+        if (pFrom.x >= pVia.x && pFrom.y < pVia.y) {
+            if (!leftHandTraffic) {
                 vx2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg + 180));
                 vy2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg + 180));
@@ -1096,5 +1096,5 @@
             poly.addPoint(p.x, p.y);
 
-            if(lastPoint != null) {
+            if (lastPoint != null) {
                 dx = p.x - lastPoint.x;
                 dy = p.y - lastPoint.y;
@@ -1149,5 +1149,5 @@
             double bestDistanceToCenter = Double.MAX_VALUE;
             double bestQuality = -1;
-            for (int i=0; i<longHalfSegmentStart.size(); i++) {
+            for (int i = 0; i < longHalfSegmentStart.size(); i++) {
                 double start = longHalfSegmentStart.get(i);
                 double end = longHalfSegmentEnd.get(i);
@@ -1215,5 +1215,5 @@
         GlyphVector gv = text.font.layoutGlyphVector(frc, chars, 0, chars.length, dirFlag);
 
-        for (int i=0; i<gv.getNumGlyphs(); ++i) {
+        for (int i = 0; i < gv.getNumGlyphs(); ++i) {
             Rectangle2D rect = gv.getGlyphLogicalBounds(i).getBounds2D();
             double t = tStart + offsetSign * (rect.getX() + rect.getWidth()/2) / pathLength;
@@ -1271,5 +1271,5 @@
                     continue;
                 }
-                if(highlightSegs == null) {
+                if (highlightSegs == null) {
                     highlightSegs = new GeneralPath();
                 }
@@ -1333,5 +1333,5 @@
 
                             while (dist < segmentLength) {
-                                for (int i=0; i<2; ++i) {
+                                for (int i = 0; i < 2; ++i) {
                                     float onewaySize = i == 0 ? 3f : 2f;
                                     GeneralPath onewayPath = i == 0 ? onewayArrowsCasing : onewayArrows;
@@ -1361,5 +1361,5 @@
             lastPoint = p;
         }
-        if(way.isHighlighted()) {
+        if (way.isHighlighted()) {
             drawPathHighlight(path, line);
         }
@@ -1499,5 +1499,5 @@
             MapCSSStyleSource.STYLE_SOURCE_LOCK.readLock().lock();
             try {
-                for (int i = from; i<to; i++) {
+                for (int i = from; i < to; i++) {
                     OsmPrimitive osm = input.get(i);
                     if (osm.isDrawable()) {
@@ -1601,5 +1601,5 @@
             final int noBuckets = (prims.size() + bucketsize - 1) / bucketsize;
             final boolean singleThread = THREAD_POOL.a == 1 || noBuckets == 1;
-            for (int i=0; i<noBuckets; i++) {
+            for (int i = 0; i < noBuckets; i++) {
                 int from = i*bucketsize;
                 int to = Math.min((i+1)*bucketsize, prims.size());
@@ -1636,5 +1636,5 @@
             highlightWaySegments = data.getHighlightedWaySegments();
 
-            long timeStart=0, timePhase1=0, timeFinished;
+            long timeStart = 0, timePhase1 = 0, timeFinished;
             if (Main.isTraceEnabled()) {
                 timeStart = System.currentTimeMillis();
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java	(revision 8510)
@@ -170,5 +170,5 @@
         List<Way> untaggedWays = new ArrayList<>();
 
-        for (final Way way : data.searchWays(bbox)){
+        for (final Way way : data.searchWays(bbox)) {
             if (way.isDrawable() && !ds.isSelected(way) && !way.isDisabledAndHidden()) {
                 if (way.isHighlighted()) {
@@ -186,5 +186,5 @@
         List<Way> specialWays = new ArrayList<>(untaggedWays);
         specialWays.addAll(highlightedWays);
-        for (final Way way : specialWays){
+        for (final Way way : specialWays) {
             way.accept(this);
         }
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java	(revision 8510)
@@ -95,17 +95,17 @@
             Collection<String> literals;
             literals = Main.pref.getCollection(PREF_KEY_OUTER_ROLES);
-            if (literals != null && !literals.isEmpty()){
+            if (literals != null && !literals.isEmpty()) {
                 setNormalized(literals, outerExactRoles);
             }
             literals = Main.pref.getCollection(PREF_KEY_OUTER_ROLE_PREFIXES);
-            if (literals != null && !literals.isEmpty()){
+            if (literals != null && !literals.isEmpty()) {
                 setNormalized(literals, outerRolePrefixes);
             }
             literals = Main.pref.getCollection(PREF_KEY_INNER_ROLES);
-            if (literals != null && !literals.isEmpty()){
+            if (literals != null && !literals.isEmpty()) {
                 setNormalized(literals, innerExactRoles);
             }
             literals = Main.pref.getCollection(PREF_KEY_INNER_ROLE_PREFIXES);
-            if (literals != null && !literals.isEmpty()){
+            if (literals != null && !literals.isEmpty()) {
                 setNormalized(literals, innerRolePrefixes);
             }
@@ -117,5 +117,5 @@
                     PREF_KEY_INNER_ROLES.equals(evt.getKey()) ||
                     PREF_KEY_OUTER_ROLE_PREFIXES.equals(evt.getKey()) ||
-                    PREF_KEY_OUTER_ROLES.equals(evt.getKey())){
+                    PREF_KEY_OUTER_ROLES.equals(evt.getKey())) {
                 initFromPreferences();
             }
@@ -149,8 +149,9 @@
      */
     private static MultipolygonRoleMatcher roleMatcher;
+
     private static synchronized MultipolygonRoleMatcher getMultipolygonRoleMatcher() {
         if (roleMatcher == null) {
             roleMatcher = new MultipolygonRoleMatcher();
-            if (Main.pref != null){
+            if (Main.pref != null) {
                 roleMatcher.initFromPreferences();
                 Main.pref.addPreferenceChangeListener(roleMatcher);
@@ -302,5 +303,6 @@
                 if (ds == null) {
                     // DataSet still not found. This should not happen, but a warning does no harm
-                    Main.warn("DataSet not found while resetting nodes in Multipolygon. This should not happen, you may report it to JOSM developers.");
+                    Main.warn("DataSet not found while resetting nodes in Multipolygon. " +
+                            "This should not happen, you may report it to JOSM developers.");
                 } else if (wayIds.size() == 1) {
                     Way w = (Way) ds.getPrimitiveById(wayIds.iterator().next(), OsmPrimitiveType.WAY);
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/MultipolygonCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/MultipolygonCache.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/MultipolygonCache.java	(revision 8510)
@@ -210,5 +210,5 @@
                         pd.nodeMoved((NodeMovedEvent) event);
                     } else if (event instanceof WayNodesChangedEvent) {
-                        pd.wayNodesChanged((WayNodesChangedEvent)event);
+                        pd.wayNodesChanged((WayNodesChangedEvent) event);
                     }
                 }
Index: trunk/src/org/openstreetmap/josm/data/preferences/ColorProperty.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/preferences/ColorProperty.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/preferences/ColorProperty.java	(revision 8510)
@@ -42,5 +42,5 @@
      */
     public static String getColorKey(String colName) {
-        return colName == null ? null : colName.toLowerCase(Locale.ENGLISH).replaceAll("[^a-z0-9]+",".");
+        return colName == null ? null : colName.toLowerCase(Locale.ENGLISH).replaceAll("[^a-z0-9]+", ".");
     }
 
Index: trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 8510)
@@ -352,5 +352,5 @@
             return new CentricDatum(null, null, ellps);
         boolean is3Param = true;
-        for (int i = 3; i<towgs84Param.size(); i++) {
+        for (int i = 3; i < towgs84Param.size(); i++) {
             if (towgs84Param.get(i) != 0) {
                 is3Param = false;
Index: trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/projection/Ellipsoid.java	(revision 8510)
@@ -29,10 +29,10 @@
      */
     public static final Ellipsoid AustSA = Ellipsoid.create_a_rf(6378160.0, 298.25);
-    
+
     /**
      * Bessel 1841 ellipsoid
      */
     public static final Ellipsoid Bessel1841 = Ellipsoid.create_a_rf(6377397.155, 299.1528128);
-    
+
     /**
      * Clarke 1866 ellipsoid
@@ -251,5 +251,5 @@
         double v1 = 1-e*Math.sin(phi);
         double v2 = 1+e*Math.sin(phi);
-        return Math.log(Math.tan(Math.PI/4+phi/2)*Math.pow(v1/v2,e/2));
+        return Math.log(Math.tan(Math.PI/4+phi/2)*Math.pow(v1/v2, e/2));
     }
 
@@ -262,5 +262,5 @@
         double v1 = 1-e*Math.sin(phi);
         double v2 = 1+e*Math.sin(phi);
-        return Math.log(Math.tan(Math.PI/4+phi/2)*Math.pow(v1/v2,e/2));
+        return Math.log(Math.tan(Math.PI/4+phi/2)*Math.pow(v1/v2, e/2));
     }
 
@@ -275,9 +275,9 @@
         double lati = lat0;
         double lati1 = 1.0; // random value to start the iterative processus
-        while(Math.abs(lati1-lati)>=epsilon) {
+        while (Math.abs(lati1-lati) >= epsilon) {
             lati = lati1;
             double v1 = 1+e*Math.sin(lati);
             double v2 = 1-e*Math.sin(lati);
-            lati1 = 2*Math.atan(Math.pow(v1/v2,e/2)*Math.exp(latIso))-Math.PI/2;
+            lati1 = 2*Math.atan(Math.pow(v1/v2, e/2)*Math.exp(latIso))-Math.PI/2;
         }
         return lati1;
Index: trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java	(revision 8510)
@@ -312,5 +312,5 @@
         NTV2SubGrid[] clone = new NTV2SubGrid[topLevelSubGrid.length];
         for (int i = 0; i < topLevelSubGrid.length; i++) {
-            clone[i] = (NTV2SubGrid)topLevelSubGrid[i].clone();
+            clone[i] = (NTV2SubGrid) topLevelSubGrid[i].clone();
         }
         return clone;
Index: trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java	(revision 8510)
@@ -105,6 +105,6 @@
         readBytes(in, b8);
         lonInterval = NTV2Util.getDouble(b8, bigEndian);
-        lonColumnCount = 1 + (int)((maxLon - minLon) / lonInterval);
-        latRowCount = 1 + (int)((maxLat - minLat) / latInterval);
+        lonColumnCount = 1 + (int) ((maxLon - minLon) / lonInterval);
+        latRowCount = 1 + (int) ((maxLat - minLat) / latInterval);
         readBytes(in, b8);
         readBytes(in, b8);
@@ -121,6 +121,5 @@
         for (int i = 0; i < nodeCount; i++) {
             // Read the grid file byte after byte. This is a workaround about a bug in
-            // certain VM which are not able to read byte blocks when the resource file is
-            // in a .jar file (Pieren)
+            // certain VM which are not able to read byte blocks when the resource file is in a .jar file (Pieren)
             readBytes(in, b1); b4[0] = b1[0];
             readBytes(in, b1); b4[1] = b1[0];
@@ -211,6 +210,6 @@
      */
     private final double interpolate(float a, float b, float c, float d, double x, double y) {
-        return a + (((double)b - (double)a) * x) + (((double)c - (double)a) * y) +
-        (((double)a + (double)d - b - c) * x * y);
+        return a + (((double) b - (double) a) * x) + (((double) c - (double) a) * y) +
+        (((double) a + (double) d - b - c) * x * y);
     }
 
@@ -225,6 +224,6 @@
      */
     public void interpolateGridShift(NTV2GridShift gs) {
-        int lonIndex = (int)((gs.getLonPositiveWestSeconds() - minLon) / lonInterval);
-        int latIndex = (int)((gs.getLatSeconds() - minLat) / latInterval);
+        int lonIndex = (int) ((gs.getLonPositiveWestSeconds() - minLon) / lonInterval);
+        int latIndex = (int) ((gs.getLatSeconds() - minLat) / latInterval);
 
         double x = (gs.getLonPositiveWestSeconds() - (minLon + (lonInterval * lonIndex))) / lonInterval;
@@ -331,10 +330,10 @@
         NTV2SubGrid clone = null;
         try {
-            clone = (NTV2SubGrid)super.clone();
+            clone = (NTV2SubGrid) super.clone();
             // Do a deep clone of the sub grids
             if (subGrid != null) {
                 clone.subGrid = new NTV2SubGrid[subGrid.length];
                 for (int i = 0; i < subGrid.length; i++) {
-                    clone.subGrid[i] = (NTV2SubGrid)subGrid[i].clone();
+                    clone.subGrid[i] = (NTV2SubGrid) subGrid[i].clone();
                 }
             }
@@ -344,4 +343,5 @@
         return clone;
     }
+
     /**
      * Get maximum latitude value
Index: trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2Util.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2Util.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2Util.java	(revision 8510)
@@ -100,5 +100,5 @@
             j = getIntLE(b, 0);
         }
-        long l = ((long)i << 32) |
+        long l = ((long) i << 32) |
         (j & 0x00000000FFFFFFFFL);
         return Double.longBitsToDouble(l);
Index: trunk/src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java	(revision 8510)
@@ -31,4 +31,5 @@
     public abstract static class Parameters {
         public final double latitudeOrigin;
+
         public Parameters(double latitudeOrigin) {
             this.latitudeOrigin = latitudeOrigin;
@@ -45,4 +46,5 @@
         public final double standardParallel1;
         public final double standardParallel2;
+
         public Parameters2SP(double latitudeOrigin, double standardParallel1, double standardParallel2) {
             super(latitudeOrigin);
@@ -163,5 +165,5 @@
     @Override
     public double[] invproject(double east, double north) {
-        double r = sqrt(pow(east,2) + pow(north-r0, 2));
+        double r = sqrt(pow(east, 2) + pow(north-r0, 2));
         double gamma = atan(east / (r0-north));
         double lambda = gamma/n;
Index: trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 8510)
@@ -168,5 +168,5 @@
                 pathDir.mkdirs();
             }
-        } catch (Exception e){
+        } catch (Exception e) {
             Main.error(e);
         }
@@ -242,5 +242,5 @@
 
     private static void applyPrefs(Map<String, Test> tests, boolean beforeUpload) {
-        for(String testName : Main.pref.getCollection(beforeUpload
+        for (String testName : Main.pref.getCollection(beforeUpload
         ? ValidatorPreference.PREF_SKIP_TESTS_BEFORE_UPLOAD : ValidatorPreference.PREF_SKIP_TESTS)) {
             Test test = tests.get(testName);
Index: trunk/src/org/openstreetmap/josm/data/validation/TestError.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/TestError.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/TestError.java	(revision 8510)
@@ -317,5 +317,5 @@
                 v.visit((WaySegment) o);
             } else if (o instanceof List<?>) {
-                v.visit((List<Node>)o);
+                v.visit((List<Node>) o);
             }
         }
@@ -366,9 +366,15 @@
 
     @Override public void primitivesAdded(PrimitivesAddedEvent event) {}
+
     @Override public void tagsChanged(TagsChangedEvent event) {}
+
     @Override public void nodeMoved(NodeMovedEvent event) {}
+
     @Override public void wayNodesChanged(WayNodesChangedEvent event) {}
+
     @Override public void relationMembersChanged(RelationMembersChangedEvent event) {}
+
     @Override public void otherDatasetChange(AbstractDatasetChangedEvent event) {}
+
     @Override public void dataChanged(DataChangedEvent event) {}
 
Index: trunk/src/org/openstreetmap/josm/data/validation/ValidatorVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/ValidatorVisitor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/ValidatorVisitor.java	(revision 8510)
@@ -10,6 +10,9 @@
 public interface ValidatorVisitor {
     void visit(TestError error);
+
     void visit(OsmPrimitive p);
+
     void visit(WaySegment ws);
+
     void visit(List<Node> nodes);
 }
Index: trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java	(revision 8510)
@@ -115,5 +115,5 @@
      */
     public static DomainValidator getInstance(boolean allowLocal) {
-       if(allowLocal) {
+       if (allowLocal) {
           return DOMAIN_VALIDATOR_WITH_LOCAL;
        }
@@ -138,5 +138,5 @@
         if (groups != null && groups.length > 0) {
             return isValidTld(groups[0]);
-        } else if(allowLocal) {
+        } else if (allowLocal) {
             if (hostnameRegex.isValid(domain)) {
                return true;
@@ -154,5 +154,5 @@
      */
     public boolean isValidTld(String tld) {
-        if(allowLocal && isValidLocalTld(tld)) {
+        if (allowLocal && isValidLocalTld(tld)) {
            return true;
         }
Index: trunk/src/org/openstreetmap/josm/data/validation/routines/EmailValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/routines/EmailValidator.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/routines/EmailValidator.java	(revision 8510)
@@ -88,5 +88,5 @@
      */
     public static EmailValidator getInstance(boolean allowLocal) {
-        if(allowLocal) {
+        if (allowLocal) {
            return EMAIL_VALIDATOR_WITH_LOCAL;
         }
Index: trunk/src/org/openstreetmap/josm/data/validation/routines/InetAddressValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/routines/InetAddressValidator.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/routines/InetAddressValidator.java	(revision 8510)
@@ -82,5 +82,5 @@
             try {
                 iIpSegment = Integer.parseInt(ipSegment);
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 return false;
             }
Index: trunk/src/org/openstreetmap/josm/data/validation/routines/RegexValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/routines/RegexValidator.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/routines/RegexValidator.java	(revision 8510)
@@ -107,5 +107,5 @@
         }
         patterns = new Pattern[regexs.length];
-        int flags = caseSensitive ? 0: Pattern.CASE_INSENSITIVE;
+        int flags = caseSensitive ? 0 : Pattern.CASE_INSENSITIVE;
         for (int i = 0; i < regexs.length; i++) {
             if (regexs[i] == null || regexs[i].isEmpty()) {
Index: trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java	(revision 8510)
@@ -405,5 +405,5 @@
 
         String extra = authorityMatcher.group(PARSE_AUTHORITY_EXTRA);
-        if (extra != null && !extra.trim().isEmpty()){
+        if (extra != null && !extra.trim().isEmpty()) {
             return false;
         }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java	(revision 8510)
@@ -55,10 +55,13 @@
             this(code, Collections.singleton(p), message);
         }
+
         public AddressError(int code, Collection<OsmPrimitive> collection, String message) {
             this(code, collection, message, null, null);
         }
+
         public AddressError(int code, Collection<OsmPrimitive> collection, String message, String description, String englishDescription) {
             this(code, Severity.WARNING, collection, message, description, englishDescription);
         }
+
         public AddressError(int code, Severity severity, Collection<OsmPrimitive> collection, String message, String description,
                 String englishDescription) {
@@ -207,5 +210,5 @@
             centroid = ((Node) house).getEastNorth();
         } else if (house instanceof Way) {
-            List<Node> nodes = ((Way)house).getNodes();
+            List<Node> nodes = ((Way) house).getNodes();
             if (house.hasKey(ADDR_INTERPOLATION)) {
                 for (Node n : nodes) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java	(revision 8510)
@@ -40,5 +40,5 @@
 
     /** All way segments, grouped by cells */
-    private Map<Point2D,List<WaySegment>> cellSegments;
+    private Map<Point2D, List<WaySegment>> cellSegments;
     /** The already detected errors */
     private Set<WaySegment> errorSegments;
@@ -181,5 +181,6 @@
      */
     public CrossingWays(String title) {
-        super(title, tr("This test checks if two roads, railways, waterways or buildings crosses in the same layer, but are not connected by a node."));
+        super(title, tr("This test checks if two roads, railways, waterways or buildings crosses in the same layer, " +
+                "but are not connected by a node."));
     }
 
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 8510)
@@ -121,5 +121,4 @@
     }
 
-
     @SuppressWarnings("unchecked")
     @Override
@@ -163,18 +162,15 @@
         List<TestError> errors = new ArrayList<>();
 
-        MultiMap<Map<String,String>, OsmPrimitive> mm = new MultiMap<>();
+        MultiMap<Map<String, String>, OsmPrimitive> mm = new MultiMap<>();
         for (Node n: nodes) {
             mm.put(n.getKeys(), n);
         }
 
-        Map<String,Boolean> typeMap=new HashMap<>();
+        Map<String, Boolean> typeMap = new HashMap<>();
         String[] types = {"none", "highway", "railway", "waterway", "boundary", "power", "natural", "landuse", "building"};
 
-
-        // check whether we have multiple nodes at the same position with
-        // the same tag set
-        //
-        for (Iterator<Map<String,String>> it = mm.keySet().iterator(); it.hasNext();) {
-            Map<String,String> tagSet = it.next();
+        // check whether we have multiple nodes at the same position with the same tag set
+        for (Iterator<Map<String, String>> it = mm.keySet().iterator(); it.hasNext();) {
+            Map<String, String> tagSet = it.next();
             if (mm.get(tagSet).size() > 1) {
 
@@ -184,16 +180,16 @@
 
                 for (OsmPrimitive p : mm.get(tagSet)) {
-                    if (p.getType()==OsmPrimitiveType.NODE) {
+                    if (p.getType() == OsmPrimitiveType.NODE) {
                         Node n = (Node) p;
-                        List<OsmPrimitive> lp=n.getReferrers();
+                        List<OsmPrimitive> lp = n.getReferrers();
                         for (OsmPrimitive sp: lp) {
-                            if (sp.getType()==OsmPrimitiveType.WAY) {
+                            if (sp.getType() == OsmPrimitiveType.WAY) {
                                 boolean typed = false;
-                                Way w=(Way) sp;
+                                Way w = (Way) sp;
                                 Map<String, String> keys = w.getKeys();
                                 for (String type: typeMap.keySet()) {
                                     if (keys.containsKey(type)) {
                                         typeMap.put(type, true);
-                                        typed=true;
+                                        typed = true;
                                     }
                                 }
@@ -207,5 +203,5 @@
                 }
 
-                int nbType=0;
+                int nbType = 0;
                 for (Entry<String, Boolean> entry: typeMap.entrySet()) {
                     if (entry.getValue()) {
@@ -214,5 +210,5 @@
                 }
 
-                if (nbType>1) {
+                if (nbType > 1) {
                     String msg = marktr("Mixed type duplicated nodes");
                     errors.add(new TestError(
@@ -364,5 +360,5 @@
                 // object to keep track of the nodes at this position.
                 //
-                Node n1 = (Node)potentialDuplicates.get(n);
+                Node n1 = (Node) potentialDuplicates.get(n);
                 List<Node> nodes = new ArrayList<>(2);
                 nodes.add(n1);
@@ -372,5 +368,5 @@
                 // we have multiple nodes at the same position.
                 //
-                List<Node> nodes = (List<Node>)potentialDuplicates.get(n);
+                List<Node> nodes = (List<Node>) potentialDuplicates.get(n);
                 nodes.add(n);
             }
@@ -413,5 +409,5 @@
         }
 
-        return null;// undoRedo handling done in mergeNodes
+        return null; // undoRedo handling done in mergeNodes
     }
 
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java	(revision 8510)
@@ -55,5 +55,5 @@
         @Override
         public int hashCode() {
-            return role.hashCode()+(int)relId+tags.hashCode()+type.hashCode()+coor.hashCode();
+            return role.hashCode()+(int) relId+tags.hashCode()+type.hashCode()+coor.hashCode();
         }
 
@@ -62,5 +62,5 @@
             if (!(obj instanceof RelMember)) return false;
             RelMember rm = (RelMember) obj;
-            return rm.role.equals(role) && rm.type.equals(type) && rm.relId==relId && rm.tags.equals(tags) && rm.coor.equals(coor);
+            return rm.role.equals(role) && rm.type.equals(type) && rm.relId == relId && rm.tags.equals(tags) && rm.coor.equals(coor);
         }
 
@@ -233,5 +233,5 @@
         for (OsmPrimitive osm : sel)
             if (osm instanceof Relation && !osm.isDeleted()) {
-                relFix.add((Relation)osm);
+                relFix.add((Relation) osm);
             }
 
@@ -296,5 +296,5 @@
         for (OsmPrimitive osm : sel)
             if (osm instanceof Relation) {
-                relations.add((Relation)osm);
+                relations.add((Relation) osm);
             }
 
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java	(revision 8510)
@@ -67,11 +67,14 @@
     private static class WayPairNoTags {
         private final List<LatLon> coor;
+
         public WayPairNoTags(List<LatLon> coor) {
             this.coor = coor;
         }
+
         @Override
         public int hashCode() {
             return coor.hashCode();
         }
+
         @Override
         public boolean equals(Object obj) {
@@ -125,16 +128,16 @@
             if (sameway.size() > 1) {
                 //Report error only if at least some tags are different, as otherwise the error was already reported as duplicated ways
-                Map<String, String> tags0=null;
-                boolean skip=true;
+                Map<String, String> tags0 = null;
+                boolean skip = true;
 
                 for (OsmPrimitive o : sameway) {
-                    if (tags0==null) {
-                        tags0=o.getKeys();
+                    if (tags0 == null) {
+                        tags0 = o.getKeys();
                         removeUninterestingKeys(tags0);
                     } else {
-                        Map<String, String> tagsCmp=o.getKeys();
+                        Map<String, String> tagsCmp = o.getKeys();
                         removeUninterestingKeys(tagsCmp);
                         if (!tagsCmp.equals(tags0)) {
-                            skip=false;
+                            skip = false;
                             break;
                         }
@@ -158,5 +161,5 @@
      */
     public void removeUninterestingKeys(Map<String, String> wkeys) {
-        for(String key : OsmPrimitive.getDiscardableKeys()) {
+        for (String key : OsmPrimitive.getDiscardableKeys()) {
             wkeys.remove(key);
         }
@@ -207,5 +210,5 @@
             int lowestIndex = 0;
             long lowestNodeId = wNodes.get(0).getUniqueId();
-            for (int i=1; i<wNodes.size(); i++) {
+            for (int i = 1; i < wNodes.size(); i++) {
                 if (wNodes.get(i).getUniqueId() < lowestNodeId) {
                     lowestNodeId = wNodes.get(i).getUniqueId();
@@ -213,8 +216,8 @@
                 }
             }
-            for (int i=lowestIndex; i<wNodes.size()-1; i++) {
+            for (int i = lowestIndex; i < wNodes.size()-1; i++) {
                 wNodesToUse.add(wNodes.get(i));
             }
-            for (int i=0; i<lowestIndex; i++) {
+            for (int i = 0; i < lowestIndex; i++) {
                 wNodesToUse.add(wNodes.get(i));
             }
@@ -241,5 +244,5 @@
         for (OsmPrimitive osm : sel) {
             if (osm instanceof Way && !osm.isDeleted()) {
-                ways.add((Way)osm);
+                ways.add((Way) osm);
             }
         }
@@ -301,5 +304,5 @@
 
         //Do not automatically fix same ways with different tags
-        if (testError.getCode()!=DUPLICATE_WAY) return false;
+        if (testError.getCode() != DUPLICATE_WAY) return false;
 
         // We fix it only if there is no more than one way that is relation member.
@@ -309,5 +312,5 @@
         for (OsmPrimitive osm : sel) {
             if (osm instanceof Way) {
-                ways.add((Way)osm);
+                ways.add((Way) osm);
             }
         }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/InternetTags.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/InternetTags.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/InternetTags.java	(revision 8510)
@@ -132,5 +132,5 @@
             String errMsg = validator.getErrorMessage();
             // Special treatment to allow URLs without protocol. See UrlValidator#isValid
-            if (tr("URL contains an invalid protocol: {0}", (String)null).equals(errMsg)) {
+            if (tr("URL contains an invalid protocol: {0}", (String) null).equals(errMsg)) {
                 String proto = validator instanceof EmailValidator ? "mailto://" : "http://";
                 return doValidateTag(p, k, proto+value, validator, code);
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/LongSegment.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/LongSegment.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/LongSegment.java	(revision 8510)
@@ -35,5 +35,5 @@
     public void visit(Way w) {
         Double length = w.getLongestSegmentLength();
-        if(length > maxlength) {
+        if (length > maxlength) {
             length /= 1000.0;
             errors.add(new TestError(this, Severity.WARNING, tr("Long segments"),
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 8510)
@@ -424,5 +424,5 @@
         static String insertArguments(Selector matchingSelector, String s, OsmPrimitive p) {
             if (s != null && matchingSelector instanceof Selector.ChildOrParentSelector) {
-                return insertArguments(((Selector.ChildOrParentSelector)matchingSelector).right, s, p);
+                return insertArguments(((Selector.ChildOrParentSelector) matchingSelector).right, s, p);
             } else if (s == null || !(matchingSelector instanceof GeneralSelector)) {
                 return s;
@@ -583,5 +583,5 @@
             for (Selector s : rule.selectors) {
                 if (s instanceof AbstractSelector) {
-                    for (Condition c : ((AbstractSelector)s).getConditions()) {
+                    for (Condition c : ((AbstractSelector) s).getConditions()) {
                         if (c instanceof ClassCondition) {
                             result.add(((ClassCondition) c).id);
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 8510)
@@ -79,5 +79,5 @@
         for (Test t : OsmValidator.getEnabledTests(false)) {
             if (t instanceof UnclosedWays) {
-                keysCheckedByAnotherTest.addAll(((UnclosedWays)t).getCheckedKeys());
+                keysCheckedByAnotherTest.addAll(((UnclosedWays) t).getCheckedKeys());
                 break;
             }
@@ -94,5 +94,5 @@
         GeneralPath result = new GeneralPath();
         result.moveTo((float) nodes.get(0).getCoor().lat(), (float) nodes.get(0).getCoor().lon());
-        for (int i=1; i<nodes.size(); i++) {
+        for (int i = 1; i < nodes.size(); i++) {
             Node n = nodes.get(i);
             result.lineTo((float) n.getCoor().lat(), (float) n.getCoor().lon());
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java	(revision 8510)
@@ -40,5 +40,6 @@
     public NameMismatch() {
         super(tr("Missing name:* translation"),
-            tr("This test finds multilingual objects whose ''name'' attribute is not equal to some ''name:*'' attribute and not a composition of ''name:*'' attributes, e.g., Italia - Italien - Italy."));
+            tr("This test finds multilingual objects whose ''name'' attribute is not equal to some ''name:*'' attribute " +
+                    "and not a composition of ''name:*'' attributes, e.g., Italia - Italien - Italy."));
     }
 
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java	(revision 8510)
@@ -63,5 +63,5 @@
                         "    r.getErrors = function() {return [];};" +
                         "    return r;" +
-                        "  } catch(err) {" +
+                        "  } catch (err) {" +
                         "    return {" +
                         "      getWarnings: function() {return [];}," +
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java	(revision 8510)
@@ -40,5 +40,5 @@
 
     /** Bag of all way segments */
-    private MultiMap<Pair<Node,Node>, WaySegment> nodePairs;
+    private MultiMap<Pair<Node, Node>, WaySegment> nodePairs;
 
     protected static final int OVERLAPPING_HIGHWAY = 101;
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java	(revision 8510)
@@ -122,5 +122,5 @@
             List<List<Node>> nodesLists = new ArrayList<>();
             if (station instanceof Way) {
-                nodesLists.add(((Way)station).getNodes());
+                nodesLists.add(((Way) station).getNodes());
             } else if (station instanceof Relation) {
                 Multipolygon polygon = MultipolygonCache.getInstance().get(Main.map.mapView, (Relation) station);
@@ -147,5 +147,5 @@
             if (it.hasNext()) {
                 return new ChangePropertyCommand(it.next(),
-                        "power", towerPoleTagMap.get(((PowerLineError)testError).line));
+                        "power", towerPoleTagMap.get(((PowerLineError) testError).line));
             }
         }
@@ -155,5 +155,5 @@
     @Override
     public boolean isFixable(TestError testError) {
-        return testError instanceof PowerLineError && towerPoleTagMap.containsKey(((PowerLineError)testError).line);
+        return testError instanceof PowerLineError && towerPoleTagMap.containsKey(((PowerLineError) testError).line);
     }
 
@@ -207,4 +207,5 @@
     protected class PowerLineError extends TestError {
         private final Way line;
+
         public PowerLineError(Node n, Way line) {
             super(PowerLines.this, Severity.WARNING,
@@ -212,4 +213,5 @@
             this.line = line;
         }
+
         public final Node getNode() {
             // primitives list can be empty if all primitives have been purged
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 8510)
@@ -85,10 +85,11 @@
 
     private static class RolePreset {
+        private final List<Role> roles;
+        private final String name;
+
         public RolePreset(List<Role> roles, String name) {
             this.roles = roles;
             this.name = name;
         }
-        private final List<Role> roles;
-        private final String name;
     }
 
@@ -118,5 +119,5 @@
 
     private Map<String, RoleInfo> buildRoleInfoMap(Relation n) {
-        Map<String,RoleInfo> map = new HashMap<>();
+        Map<String, RoleInfo> map = new HashMap<>();
         for (RelationMember m : n.getMembers()) {
             String role = m.getRole();
@@ -150,5 +151,5 @@
             }
             if (matches && r != null) {
-                for(Role role: r.roles) {
+                for (Role role: r.roles) {
                     String key = role.key;
                     List<Role> roleGroup = null;
@@ -213,5 +214,5 @@
                     // verify if preset accepts such member
                     OsmPrimitive primitive = member.getMember();
-                    if(!primitive.isUsable()) {
+                    if (!primitive.isUsable()) {
                         // if member is not usable (i.e. not present in working set)
                         // we can't verify expression - so we just skip it
@@ -219,5 +220,5 @@
                     } else {
                         // verify expression
-                        if(r.memberExpression.match(primitive)) {
+                        if (r.memberExpression.match(primitive)) {
                             return true;
                         } else {
@@ -283,5 +284,5 @@
 
         // verify role counts based on whole role sets
-        for(RolePreset rp: allroles.values()) {
+        for (RolePreset rp: allroles.values()) {
             for (Role r: rp.roles) {
                 String keyname = r.key;
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java	(revision 8510)
@@ -37,5 +37,5 @@
 
     /** All ways, grouped by cells */
-    private Map<Point2D,List<Way>> cellWays;
+    private Map<Point2D, List<Way>> cellWays;
     /** The already detected errors */
     private MultiMap<Way, Way> errorWays;
@@ -130,5 +130,5 @@
         if (m == 0)
             return n;
-        d = new int[n + 1][m + 1];
+        d = new int[n+1][m+1];
 
         // Step 2
@@ -198,5 +198,5 @@
         // check plain strings
         int distance = getLevenshteinDistance(name, name2);
-        boolean similar = distance>0 && distance<=2;
+        boolean similar = distance > 0 && distance <= 2;
 
         // try all rules
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 8510)
@@ -265,5 +265,5 @@
             }
             // TODO directionKeys are no longer in OsmPrimitive (search pattern is used instead)
-            /*  for(String a : OsmPrimitive.getDirectionKeys())
+            /*  for (String a : OsmPrimitive.getDirectionKeys())
                 presetsValueData.add(a);
              */
@@ -345,15 +345,15 @@
                 withErrors.put(p, "ICK");
             }
-            if (checkValues && (value!=null && value.length() > 255) && !withErrors.contains(p, "LV")) {
+            if (checkValues && (value != null && value.length() > 255) && !withErrors.contains(p, "LV")) {
                 errors.add(new TestError(this, Severity.ERROR, tr("Tag value longer than allowed"),
                         tr(s, key), MessageFormat.format(s, key), LONG_VALUE, p));
                 withErrors.put(p, "LV");
             }
-            if (checkKeys && (key!=null && key.length() > 255) && !withErrors.contains(p, "LK")) {
+            if (checkKeys && (key != null && key.length() > 255) && !withErrors.contains(p, "LK")) {
                 errors.add(new TestError(this, Severity.ERROR, tr("Tag key longer than allowed"),
                         tr(s, key), MessageFormat.format(s, key), LONG_KEY, p));
                 withErrors.put(p, "LK");
             }
-            if (checkValues && (value==null || value.trim().isEmpty()) && !withErrors.contains(p, "EV")) {
+            if (checkValues && (value == null || value.trim().isEmpty()) && !withErrors.contains(p, "EV")) {
                 errors.add(new TestError(this, Severity.WARNING, tr("Tags with empty values"),
                         tr(s, key), MessageFormat.format(s, key), EMPTY_VALUES, p));
@@ -392,10 +392,10 @@
                 }
                 for (String a : ignoreDataEquals) {
-                    if(key.equals(a)) {
+                    if (key.equals(a)) {
                         ignore = true;
                     }
                 }
                 for (String a : ignoreDataEndsWith) {
-                    if(key.endsWith(a)) {
+                    if (key.endsWith(a)) {
                         ignore = true;
                     }
@@ -508,9 +508,9 @@
         a.anchor = GridBagConstraints.EAST;
 
-        testPanel.add(new JLabel(name+" :"), GBC.eol().insets(3,0,0,0));
+        testPanel.add(new JLabel(name+" :"), GBC.eol().insets(3, 0, 0, 0));
 
         prefCheckKeys = new JCheckBox(tr("Check property keys."), Main.pref.getBoolean(PREF_CHECK_KEYS, true));
         prefCheckKeys.setToolTipText(tr("Validate that property keys are valid checking against list of words."));
-        testPanel.add(prefCheckKeys, GBC.std().insets(20,0,0,0));
+        testPanel.add(prefCheckKeys, GBC.std().insets(20, 0, 0, 0));
 
         prefCheckKeysBeforeUpload = new JCheckBox();
@@ -520,5 +520,5 @@
         prefCheckComplex = new JCheckBox(tr("Use complex property checker."), Main.pref.getBoolean(PREF_CHECK_COMPLEX, true));
         prefCheckComplex.setToolTipText(tr("Validate property values and tags using complex rules."));
-        testPanel.add(prefCheckComplex, GBC.std().insets(20,0,0,0));
+        testPanel.add(prefCheckComplex, GBC.std().insets(20, 0, 0, 0));
 
         prefCheckComplexBeforeUpload = new JCheckBox();
@@ -547,5 +547,5 @@
         prefCheckValues = new JCheckBox(tr("Check property values."), Main.pref.getBoolean(PREF_CHECK_VALUES, true));
         prefCheckValues.setToolTipText(tr("Validate that property values are valid checking against presets."));
-        testPanel.add(prefCheckValues, GBC.std().insets(20,0,0,0));
+        testPanel.add(prefCheckValues, GBC.std().insets(20, 0, 0, 0));
 
         prefCheckValuesBeforeUpload = new JCheckBox();
@@ -555,5 +555,5 @@
         prefCheckFixmes = new JCheckBox(tr("Check for FIXMES."), Main.pref.getBoolean(PREF_CHECK_FIXMES, true));
         prefCheckFixmes.setToolTipText(tr("Looks for nodes or ways with FIXME in any property value."));
-        testPanel.add(prefCheckFixmes, GBC.std().insets(20,0,0,0));
+        testPanel.add(prefCheckFixmes, GBC.std().insets(20, 0, 0, 0));
 
         prefCheckFixmesBeforeUpload = new JCheckBox();
@@ -667,10 +667,11 @@
             private Pattern getPattern(String str) throws PatternSyntaxException {
                 if (str.endsWith("/i"))
-                    return Pattern.compile(str.substring(1,str.length()-2), Pattern.CASE_INSENSITIVE);
+                    return Pattern.compile(str.substring(1, str.length()-2), Pattern.CASE_INSENSITIVE);
                 if (str.endsWith("/"))
-                    return Pattern.compile(str.substring(1,str.length()-1));
+                    return Pattern.compile(str.substring(1, str.length()-1));
 
                 throw new IllegalStateException();
             }
+
             public CheckerElement(String exp) throws PatternSyntaxException {
                 Matcher m = Pattern.compile("(.+)([!=]=)(.+)").matcher(exp);
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java	(revision 8510)
@@ -174,5 +174,5 @@
 
         for (OsmPrimitive parent: w.getReferrers()) {
-            if (parent instanceof Relation && ((Relation)parent).isMultipolygon())
+            if (parent instanceof Relation && ((Relation) parent).isMultipolygon())
                 return;
         }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(revision 8510)
@@ -423,5 +423,5 @@
             return ret;
         for (int i = 1; i < size; ++i) {
-            if(i < size-1) {
+            if (i < size-1) {
                 addNode(w.getNode(i), middlenodes);
             }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java	(revision 8510)
@@ -127,5 +127,5 @@
                         OsmPrimitive member = m.getMember();
                         if (member instanceof Way && member.isUsable() && !member.isTagged()) {
-                            waysUsedInRelations.add((Way)member);
+                            waysUsedInRelations.add((Way) member);
                         }
                     }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/WayConnectedToArea.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/WayConnectedToArea.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/WayConnectedToArea.java	(revision 8510)
@@ -40,5 +40,5 @@
         List<OsmPrimitive> r = w.firstNode().getReferrers();
         for (OsmPrimitive p : r) {
-            if(p != w && p.hasKey("highway")) {
+            if (p != w && p.hasKey("highway")) {
                 hasway = true;
                 break;
@@ -53,5 +53,5 @@
         r = w.lastNode().getReferrers();
         for (OsmPrimitive p : r) {
-            if(p != w && p.hasKey("highway")) {
+            if (p != w && p.hasKey("highway")) {
                 hasway = true;
                 break;
Index: trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java	(revision 8510)
@@ -382,5 +382,5 @@
                         }
                     } else { // escaped value content is an entity name
-                        if(mapNameToValue == null) {
+                        if (mapNameToValue == null) {
                             mapNameToValue = new HashMap<>();
                             for (String[] pair : ARRAY)
Index: trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/data/validation/util/ValUtil.java	(revision 8510)
@@ -33,5 +33,5 @@
      * @return A list with all the cells the way starts or ends
      */
-    public static List<List<Way>> getWaysInCell(Way w, Map<Point2D,List<Way>> cellWays) {
+    public static List<List<Way>> getWaysInCell(Way w, Map<Point2D, List<Way>> cellWays) {
         if (w.getNodesCount() == 0)
             return Collections.emptyList();
Index: trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java	(revision 8510)
@@ -192,5 +192,5 @@
      * @see JOptionPane#ERROR_MESSAGE
      */
-    public static void showMessageDialog(String preferenceKey, Component parent, Object message, String title,int messageType) {
+    public static void showMessageDialog(String preferenceKey, Component parent, Object message, String title, int messageType) {
         if (getDialogReturnValue(preferenceKey) == Integer.MAX_VALUE)
             return;
Index: trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/DefaultNameFormatter.java	(revision 8510)
@@ -75,5 +75,5 @@
         if (hook == null) return;
         if (!formatHooks.contains(hook)) {
-            formatHooks.add(0,hook);
+            formatHooks.add(0, hook);
         }
     }
@@ -157,11 +157,11 @@
                 if (n == null) {
                     String s;
-                    if((s = node.get("addr:housename")) != null) {
+                    if ((s = node.get("addr:housename")) != null) {
                         /* I18n: name of house as parameter */
                         n = tr("House {0}", s);
                     }
-                    if(n == null && (s = node.get("addr:housenumber")) != null) {
+                    if (n == null && (s = node.get("addr:housenumber")) != null) {
                         String t = node.get("addr:street");
-                        if(t != null) {
+                        if (t != null) {
                             /* I18n: house number, street as parameter, number should remain
                         before street for better visibility */
@@ -256,11 +256,11 @@
                 if (n == null) {
                     String s;
-                    if((s = way.get("addr:housename")) != null) {
+                    if ((s = way.get("addr:housename")) != null) {
                         /* I18n: name of house as parameter */
                         n = tr("House {0}", s);
                     }
-                    if(n == null && (s = way.get("addr:housenumber")) != null) {
+                    if (n == null && (s = way.get("addr:housenumber")) != null) {
                         String t = way.get("addr:street");
-                        if(t != null) {
+                        if (t != null) {
                             /* I18n: house number, street as parameter, number should remain
                         before street for better visibility */
@@ -272,6 +272,6 @@
                     }
                 }
-                if(n == null && way.get("building") != null) n = tr("building");
-                if(n == null || n.isEmpty()) {
+                if (n == null && way.get("building") != null) n = tr("building");
+                if (n == null || n.isEmpty()) {
                     n = String.valueOf(way.getId());
                 }
@@ -402,5 +402,5 @@
 
             if (r1.getMembersCount() != r2.getMembersCount())
-                return (r1.getMembersCount() > r2.getMembersCount())?1:-1;
+                return (r1.getMembersCount() > r2.getMembersCount()) ? 1 : -1;
 
             int comp = Boolean.valueOf(r1.hasIncompleteMembers()).compareTo(Boolean.valueOf(r2.hasIncompleteMembers()));
@@ -496,5 +496,5 @@
     @Override
     public String format(Changeset changeset) {
-        return tr("Changeset {0}",changeset.getId());
+        return tr("Changeset {0}", changeset.getId());
     }
 
@@ -526,5 +526,5 @@
             String value = tags.get(key);
             while (!value.isEmpty()) {
-                sb.append(value.substring(0,Math.min(50, value.length())));
+                sb.append(value.substring(0, Math.min(50, value.length())));
                 if (value.length() > 50) {
                     sb.append("<br>");
Index: trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/ExceptionDialogUtil.java	(revision 8510)
@@ -439,10 +439,10 @@
 
         if (e instanceof ChangesetClosedException) {
-            explainChangesetClosedException((ChangesetClosedException)e);
+            explainChangesetClosedException((ChangesetClosedException) e);
             return;
         }
 
         if (e instanceof MissingOAuthAccessTokenException) {
-            explainMissingOAuthAccessTokenException((MissingOAuthAccessTokenException)e);
+            explainMissingOAuthAccessTokenException((MissingOAuthAccessTokenException) e);
             return;
         }
Index: trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 8510)
@@ -107,5 +107,5 @@
 
     // For easy access when inherited
-    protected transient Insets contentInsets = new Insets(10,5,0,5);
+    protected transient Insets contentInsets = new Insets(10, 5, 0, 5);
     protected List<JButton> buttons = new ArrayList<>();
 
@@ -174,5 +174,5 @@
     public ExtendedDialog setButtonIcons(String[] buttonIcons) {
         bIcons = new Icon[buttonIcons.length];
-        for (int i=0; i<buttonIcons.length; ++i) {
+        for (int i = 0; i < buttonIcons.length; ++i) {
             bIcons[i] = ImageProvider.get(buttonIcons[i]);
         }
@@ -320,8 +320,9 @@
         JPanel buttonsPanel = new JPanel(new GridBagLayout());
 
-        for (int i=0; i < bTexts.length; i++) {
+        for (int i = 0; i < bTexts.length; i++) {
             final int final_i = i;
             Action action = new AbstractAction(bTexts[i]) {
-                @Override public void actionPerformed(ActionEvent evt) {
+                @Override
+                public void actionPerformed(ActionEvent evt) {
                     buttonAction(final_i, evt);
                 }
@@ -332,5 +333,5 @@
                 defaultButton = button;
             }
-            if(bIcons != null && bIcons[i] != null) {
+            if (bIcons != null && bIcons[i] != null) {
                 button.setIcon(bIcons[i]);
             }
@@ -339,10 +340,10 @@
             }
 
-            buttonsPanel.add(button, GBC.std().insets(2,2,2,2));
+            buttonsPanel.add(button, GBC.std().insets(2, 2, 2, 2));
             buttons.add(button);
         }
         if (showHelpButton) {
-            buttonsPanel.add(new JButton(new HelpAction()), GBC.std().insets(2,2,2,2));
-            HelpUtil.setHelpContext(getRootPane(),helpTopic);
+            buttonsPanel.add(new JButton(new HelpAction()), GBC.std().insets(2, 2, 2, 2));
+            HelpUtil.setHelpContext(getRootPane(), helpTopic);
         }
 
@@ -358,5 +359,5 @@
         if (icon != null) {
             JLabel iconLbl = new JLabel(icon);
-            gc.insets = new Insets(10,10,10,10);
+            gc.insets = new Insets(10, 10, 10, 10);
             gc.anchor = GridBagConstraints.NORTH;
             gc.weighty = 1.0;
@@ -382,5 +383,5 @@
             gc.gridy = y++;
             gc.anchor = GridBagConstraints.LINE_START;
-            gc.insets = new Insets(5,contentInsets.left,5,contentInsets.right);
+            gc.insets = new Insets(5, contentInsets.left, 5, contentInsets.right);
             cp.add(togglePanel, gc);
         }
@@ -388,5 +389,5 @@
         gc.gridy = y++;
         gc.anchor = GridBagConstraints.CENTER;
-            gc.insets = new Insets(5,5,5,5);
+            gc.insets = new Insets(5, 5, 5, 5);
         cp.add(buttonsPanel, gc);
         if (placeContentInScrollPane) {
@@ -406,13 +407,13 @@
         boolean limitedInHeight = d.height > x.height;
 
-        if(x.width  > 0 && d.width  > x.width) {
+        if (x.width  > 0 && d.width  > x.width) {
             d.width  = x.width;
         }
-        if(x.height > 0 && d.height > x.height) {
+        if (x.height > 0 && d.height > x.height) {
             d.height = x.height;
         }
 
         // We have a vertical scrollbar and enough space to prevent a horizontal one
-        if(!limitedInWidth && limitedInHeight) {
+        if (!limitedInWidth && limitedInHeight) {
             d.width += new JScrollBar().getPreferredSize().width;
         }
@@ -493,5 +494,5 @@
         // Ensure all required variables are available
         if (!rememberSizePref.isEmpty() && defaultWindowGeometry != null) {
-            if(visible) {
+            if (visible) {
                 initWindowGeometry().applySafe(this);
             } else if (isShowing()) { // should fix #6438, #6981, #8295
Index: trunk/src/org/openstreetmap/josm/gui/FileDrop.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 8510)
@@ -97,5 +97,5 @@
                 new FileDrop.Listener() {
                     @Override
-                    public void filesDropped(File[] files){
+                    public void filesDropped(File[] files) {
                         // start asynchronous loading of files
                         OpenFileAction.OpenFileTask task = new OpenFileAction.OpenFileTask(Arrays.asList(files), null);
@@ -142,5 +142,5 @@
                 Class.forName("java.awt.dnd.DnDConstants");
                 support = true;
-            } catch(Exception e) {
+            } catch (Exception e) {
                 support = false;
             }
@@ -151,5 +151,6 @@
 
     // BEGIN 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
-    private static final String ZERO_CHAR_STRING = "" + (char)0;
+    private static final String ZERO_CHAR_STRING = "" + (char) 0;
+
     private static File[] createFileArray(BufferedReader bReader) {
         try {
@@ -183,5 +184,5 @@
         try {
             dt.addDropTargetListener(dropListener);
-        } catch(TooManyListenersException e) {
+        } catch (TooManyListenersException e) {
             Main.error(e);
             Main.warn("FileDrop: Drop will not work due to previous error. Do you have another listener attached?");
@@ -230,5 +231,5 @@
         // See if any of the flavors are a file list
         int i = 0;
-        while(!ok && i < flavors.length) {
+        while (!ok && i < flavors.length) {
             // BEGIN 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
             // Is the flavor a file list?
@@ -350,5 +351,5 @@
 
                     // Get a useful list
-                    List<?> fileList = (List<?>)tr.getTransferData(DataFlavor.javaFileListFlavor);
+                    List<?> fileList = (List<?>) tr.getTransferData(DataFlavor.javaFileListFlavor);
 
                     // Convert list to array
@@ -486,5 +487,5 @@
      *
      *      TransferableObject.Fetcher fetcher = new TransferableObject.Fetcher()
-     *      {   public Object getObject(){ return myObj; }
+     *      {   public Object getObject() { return myObj; }
      *      }; // end fetcher
      *
Index: trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java	(revision 8510)
@@ -144,5 +144,5 @@
                 final JButton b = new JButton(spec.text);
                 b.setIcon(spec.icon);
-                b.setToolTipText(spec.tooltipText == null? "" : spec.tooltipText);
+                b.setToolTipText(spec.tooltipText == null ? "" : spec.tooltipText);
                 if (helpTopic != null) {
                     HelpUtil.setHelpContext(b, helpTopic);
@@ -220,5 +220,5 @@
         JButton defaultButton = null;
         if (options != null && defaultOption != null) {
-            for (int i=0; i< options.length; i++) {
+            for (int i = 0; i < options.length; i++) {
                 if (options[i] == defaultOption) {
                     defaultButton = buttons.get(i);
@@ -261,5 +261,5 @@
                 if (defaultOption != null && options != null && options.length > 0) {
                     int i;
-                    for (i=0; i<options.length;i++) {
+                    for (i = 0; i < options.length; i++) {
                         if (options[i] == defaultOption) {
                             break;
@@ -275,5 +275,6 @@
             }
         });
-        dialog.getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0), "close");
+        dialog.getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
+                KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "close");
         dialog.getRootPane().getActionMap().put("close", new AbstractAction() {
             @Override
@@ -285,8 +286,8 @@
 
         if (options != null) {
-            for (int i=0; i < options.length;i++) {
+            for (int i = 0; i < options.length; i++) {
                 final DefaultAction action = new DefaultAction(dialog, pane, i);
                 buttons.get(i).addActionListener(action);
-                buttons.get(i).getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), "enter");
+                buttons.get(i).getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "enter");
                 buttons.get(i).getActionMap().put("enter", action);
             }
@@ -294,5 +295,5 @@
             final DefaultAction action = new DefaultAction(dialog, pane, 0);
             buttons.get(0).addActionListener(action);
-            buttons.get(0).getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), "enter");
+            buttons.get(0).getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "enter");
             buttons.get(0).getActionMap().put("enter", action);
         }
@@ -304,5 +305,5 @@
         }
         dialog.setVisible(true);
-        return (Integer)pane.getValue();
+        return (Integer) pane.getValue();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/HideableButton.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/HideableButton.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/HideableButton.java	(revision 8510)
@@ -10,10 +10,17 @@
 interface HideableButton {
     void applyButtonHiddenPreferences();
+
     void setButtonHidden(boolean b);
+
     void showButton();
+
     void hideButton();
+
     String getActionName();
+
     Icon getIcon();
+
     boolean isButtonVisible();
+
     void setShowHideButtonListener(ShowHideButtonListener l);
 }
Index: trunk/src/org/openstreetmap/josm/gui/IconToggleButton.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/IconToggleButton.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/IconToggleButton.java	(revision 8510)
@@ -51,5 +51,5 @@
         action.addPropertyChangeListener(this);
 
-        addMouseListener(new MouseAdapter(){
+        addMouseListener(new MouseAdapter() {
             @Override public void mousePressed(MouseEvent e) {
                 groupbutton = e.getX() > getWidth()/2 && e.getY() > getHeight()/2;
@@ -63,8 +63,8 @@
     public void propertyChange(PropertyChangeEvent evt) {
         if ("active".equals(evt.getPropertyName())) {
-            setSelected((Boolean)evt.getNewValue());
+            setSelected((Boolean) evt.getNewValue());
             requestFocusInWindow();
         } else if ("selected".equals(evt.getPropertyName())) {
-            setSelected((Boolean)evt.getNewValue());
+            setSelected((Boolean) evt.getNewValue());
         }
     }
@@ -84,5 +84,5 @@
         String s = (String) getSafeActionValue("toolbar");
         if (s == null) {
-            if (getAction()!=null) {
+            if (getAction() != null) {
                 s = getAction().getClass().getName();
             }
@@ -119,5 +119,5 @@
     public void setButtonHidden(boolean b) {
         setVisible(!b);
-        if (listener!=null) { // if someone wants to know about changes of visibility
+        if (listener != null) { // if someone wants to know about changes of visibility
             if (!b) listener.buttonShown(); else listener.buttonHidden();
         }
Index: trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java	(revision 8510)
@@ -65,4 +65,5 @@
             Main.toolbar.register(this);
         }
+
         @Override
         public void actionPerformed(ActionEvent e) {
@@ -74,5 +75,5 @@
             Component source = null;
             if (e.getSource() instanceof Component) {
-                source = (Component)e.getSource();
+                source = (Component) e.getSource();
             }
             JPopupMenu popup = new JPopupMenu();
@@ -196,5 +197,5 @@
             // add all items of submenu if they will fit on screen
             int n = subMenu.getItemCount();
-            for (int i=0; i<n; i++) {
+            for (int i = 0; i < n; i++) {
                 addDynamic(subMenu.getItem(i).getAction());
             }
@@ -205,5 +206,5 @@
     }
 
-    private JMenuItem getNewOffsetMenu(){
+    private JMenuItem getNewOffsetMenu() {
         if (!Main.isDisplayingMapView()) {
             offsetAction.setEnabled(false);
@@ -216,9 +217,9 @@
         }
         offsetAction.setEnabled(true);
-        JMenu newMenu = new JMenu(trc("layer","Offset"));
+        JMenu newMenu = new JMenu(trc("layer", "Offset"));
         newMenu.setIcon(ImageProvider.get("mapmode", "adjustimg"));
         newMenu.setAction(offsetAction);
         if (layers.size() == 1)
-            return (JMenuItem)layers.iterator().next().getOffsetMenuItem(newMenu);
+            return (JMenuItem) layers.iterator().next().getOffsetMenuItem(newMenu);
         for (ImageryLayer layer : layers) {
             JMenuItem layerMenu = layer.getOffsetMenuItem();
@@ -266,11 +267,11 @@
         for (Object item : dynamicItems) {
             if (item instanceof JMenuItem) {
-                remove((JMenuItem)item);
+                remove((JMenuItem) item);
             }
             if (item instanceof MenuComponent) {
-                remove((MenuComponent)item);
+                remove((MenuComponent) item);
             }
             if (item instanceof Component) {
-                remove((Component)item);
+                remove((Component) item);
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 8510)
@@ -102,5 +102,5 @@
         l.add(ImageProvider.get("logo").getImage());
         mainFrame.setIconImages(l);
-        mainFrame.addWindowListener(new WindowAdapter(){
+        mainFrame.addWindowListener(new WindowAdapter() {
             @Override
             public void windowClosing(final WindowEvent arg0) {
@@ -532,5 +532,5 @@
      */
     private static void checkIPv6() {
-        if("auto".equals(Main.pref.get("prefer.ipv6", "auto"))) {
+        if ("auto".equals(Main.pref.get("prefer.ipv6", "auto"))) {
              new Thread(new Runnable() { /* this may take some time (DNS, Connect) */
                 public void run() {
@@ -540,12 +540,12 @@
                         /* Use the check result from last run of the software, as after the test, value
                            changes have no effect anymore */
-                        if(wasv6) {
+                        if (wasv6) {
                             Utils.updateSystemProperty("java.net.preferIPv6Addresses", "true");
                         }
-                        for(InetAddress a : InetAddress.getAllByName("josm.openstreetmap.de")) {
-                            if(a instanceof Inet6Address) {
-                                if(a.isReachable(1000)) {
+                        for (InetAddress a : InetAddress.getAllByName("josm.openstreetmap.de")) {
+                            if (a instanceof Inet6Address) {
+                                if (a.isReachable(1000)) {
                                     Utils.updateSystemProperty("java.net.preferIPv6Addresses", "true");
-                                    if(!wasv6) {
+                                    if (!wasv6) {
                                         Main.info(tr("Detected useable IPv6 network, prefering IPv6 over IPv4 after next restart."));
                                     } else {
@@ -562,5 +562,5 @@
                         }
                     }
-                    if(wasv6 && !hasv6) {
+                    if (wasv6 && !hasv6) {
                         Main.info(tr("Detected no useable IPv6 network, prefering IPv4 over IPv6 after next restart."));
                     }
Index: trunk/src/org/openstreetmap/josm/gui/MainMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 8510)
@@ -146,4 +146,6 @@
 public class MainMenu extends JMenuBar {
 
+    public static enum WINDOW_MENU_GROUP { ALWAYS, TOGGLE_DIALOG, VOLATILE }
+
     /* File menu */
     /** File / New Layer **/
@@ -383,5 +385,4 @@
      */
     public final JMenu windowMenu = addMenu(marktr("Windows"), KeyEvent.VK_W, 10, ht("/Menu/Windows"));
-    public static enum WINDOW_MENU_GROUP { ALWAYS, TOGGLE_DIALOG, VOLATILE }
 
     /**
@@ -418,14 +419,16 @@
     public static final MenuListener menuSeparatorHandler = new MenuListener() {
         @Override
-        public void menuCanceled(MenuEvent arg0) {}
-        @Override
-        public void menuDeselected(MenuEvent arg0) {}
+        public void menuCanceled(MenuEvent e) {}
+
+        @Override
+        public void menuDeselected(MenuEvent e) {}
+
         @Override
         public void menuSelected(MenuEvent a) {
-            if(!(a.getSource() instanceof JMenu))
+            if (!(a.getSource() instanceof JMenu))
                 return;
             final JPopupMenu m = ((JMenu) a.getSource()).getPopupMenu();
-            for(int i=0; i < m.getComponentCount()-1; i++) {
-                if(!(m.getComponent(i) instanceof JSeparator)) {
+            for (int i = 0; i < m.getComponentCount()-1; i++) {
+                if (!(m.getComponent(i) instanceof JSeparator)) {
                     continue;
                 }
@@ -434,5 +437,5 @@
             }
             // hide separator at the end of the menu
-            if(m.getComponent(m.getComponentCount()-1) instanceof JSeparator) {
+            if (m.getComponent(m.getComponentCount()-1) instanceof JSeparator) {
                 ((JSeparator) m.getComponent(m.getComponentCount()-1)).setVisible(false);
             }
@@ -574,19 +577,19 @@
     /** finds the correct insertion index for a given group and adds separators if necessary */
     private static int getInsertionIndexForGroup(JMenu menu, int group) {
-        if(group < 0)
+        if (group < 0)
             return -1;
         // look for separator that *ends* the group (or stop at end of menu)
         int i;
-        for(i=0; i < menu.getItemCount() && group >= 0; i++) {
-            if(menu.getItem(i) == null) {
+        for (i = 0; i < menu.getItemCount() && group >= 0; i++) {
+            if (menu.getItem(i) == null) {
                 group--;
             }
         }
         // insert before separator that ends the group
-        if(group < 0) {
+        if (group < 0) {
             i--;
         }
         // not enough separators have been found, add them
-        while(group > 0) {
+        while (group > 0) {
             menu.addSeparator();
             group--;
@@ -616,6 +619,4 @@
      */
     public MainMenu() {
-        JMenuItem current;
-
         moreToolsMenu.setVisible(false);
         dataMenu.setVisible(false);
@@ -671,6 +672,6 @@
         add(editMenu, purge, true);
         editMenu.addSeparator();
-        add(editMenu,merge);
-        add(editMenu,mergeSelected);
+        add(editMenu, merge);
+        add(editMenu, mergeSelected);
         editMenu.addSeparator();
         add(editMenu, search);
@@ -704,5 +705,5 @@
         viewportFollowToggleAction.addButtonModel(vft.getModel());
 
-        if(Main.platform.canFullscreen()) {
+        if (Main.platform.canFullscreen()) {
             // -- fullscreen toggle action
             fullscreenToggleAction = new FullscreenToggleAction();
@@ -797,6 +798,6 @@
         helpMenu.addSeparator();
 
-        current = helpMenu.add(help); // FIXME why is help not a JosmAction?
-        current.setAccelerator(Shortcut.registerShortcut("system:help", tr("Help"), KeyEvent.VK_F1,
+        // FIXME why is help not a JosmAction?
+        helpMenu.add(help).setAccelerator(Shortcut.registerShortcut("system:help", tr("Help"), KeyEvent.VK_F1,
                 Shortcut.DIRECT).getKeyStroke());
         add(helpMenu, about);
@@ -885,5 +886,5 @@
      */
     private void findMenuItems(final JMenu menu, final String textToFind, final List<JMenuItem> result) {
-        for (int i=0; i<menu.getItemCount(); i++) {
+        for (int i = 0; i < menu.getItemCount(); i++) {
             JMenuItem menuItem = menu.getItem(i);
             if (menuItem == null) continue;
@@ -922,4 +923,5 @@
     static class PresetsMenuEnabler implements MapView.LayerChangeListener {
         private JMenu presetsMenu;
+
         public PresetsMenuEnabler(JMenu presetsMenu) {
             MapView.addLayerChangeListener(this);
@@ -960,7 +962,7 @@
                 // On ENTER selected menu item must be triggered
                 MenuElement[] selection = MenuSelectionManager.defaultManager().getSelectedPath();
-                if(selection.length > 1) {
+                if (selection.length > 1) {
                     MenuElement selectedElement = selection[selection.length-1];
-                    if(selectedElement instanceof JMenuItem) {
+                    if (selectedElement instanceof JMenuItem) {
                         JMenuItem selectedItem = (JMenuItem) selectedElement;
                         Action menuAction = selectedItem.getAction();
@@ -1027,5 +1029,5 @@
 
             List<JMenuItem> searchResult = mainMenu.findMenuItems(currentSearchText);
-            if(searchResult.isEmpty()) {
+            if (searchResult.isEmpty()) {
                 // Nothing found
                 hideMenu();
@@ -1033,5 +1035,5 @@
             }
 
-            if(searchResult.size() > 20) {
+            if (searchResult.size() > 20) {
                 // Too many items found...
                 searchResult = searchResult.subList(0, 20);
Index: trunk/src/org/openstreetmap/josm/gui/MapFrame.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 8510)
@@ -123,4 +123,5 @@
     private final JButton listAllToggleDialogsButton = new JButton(listAllDialogsAction);
     private final JButton listAllMapModesButton = new JButton(listAllMapModesAction);
+
     {
         listAllDialogsAction.setButton(listAllToggleDialogsButton);
@@ -170,5 +171,5 @@
      */
     public MapFrame(JPanel contentPane, ViewportData viewportData) {
-        setSize(400,400);
+        setSize(400, 400);
         setLayout(new BorderLayout());
 
@@ -216,7 +217,7 @@
 
         dialogsPanel.setLayout(new BoxLayout(dialogsPanel, BoxLayout.Y_AXIS));
-        dialogsPanel.setPreferredSize(new Dimension(Main.pref.getInteger("toggleDialogs.width",DEF_TOGGLE_DLG_WIDTH), 0));
+        dialogsPanel.setPreferredSize(new Dimension(Main.pref.getInteger("toggleDialogs.width", DEF_TOGGLE_DLG_WIDTH), 0));
         dialogsPanel.setMinimumSize(new Dimension(24, 0));
-        mapView.setMinimumSize(new Dimension(10,0));
+        mapView.setMinimumSize(new Dimension(10, 0));
 
         // toolBarActions, map mode buttons
@@ -252,5 +253,5 @@
         MapView.addLayerChangeListener(this);
 
-        boolean unregisterTab = Shortcut.findShortcut(KeyEvent.VK_TAB, 0)!=null;
+        boolean unregisterTab = Shortcut.findShortcut(KeyEvent.VK_TAB, 0) != null;
         if (unregisterTab) {
             for (JComponent c: allDialogButtons) c.setFocusTraversalKeysEnabled(false);
@@ -262,5 +263,5 @@
 
     public boolean selectSelectTool(boolean onlyIfModeless) {
-        if(onlyIfModeless && !Main.pref.getBoolean("modeless", false))
+        if (onlyIfModeless && !Main.pref.getBoolean("modeless", false))
             return false;
 
@@ -269,5 +270,5 @@
 
     public boolean selectDrawTool(boolean onlyIfModeless) {
-        if(onlyIfModeless && !Main.pref.getBoolean("modeless", false))
+        if (onlyIfModeless && !Main.pref.getBoolean("modeless", false))
             return false;
 
@@ -276,5 +277,5 @@
 
     public boolean selectZoomTool(boolean onlyIfModeless) {
-        if(onlyIfModeless && !Main.pref.getBoolean("modeless", false))
+        if (onlyIfModeless && !Main.pref.getBoolean("modeless", false))
             return false;
 
@@ -293,10 +294,10 @@
         for (int i = 0; i < toolBarActions.getComponentCount(); ++i) {
             if (toolBarActions.getComponent(i) instanceof Destroyable) {
-                ((Destroyable)toolBarActions.getComponent(i)).destroy();
+                ((Destroyable) toolBarActions.getComponent(i)).destroy();
             }
         }
         for (int i = 0; i < toolBarToggle.getComponentCount(); ++i) {
             if (toolBarToggle.getComponent(i) instanceof Destroyable) {
-                ((Destroyable)toolBarToggle.getComponent(i)).destroy();
+                ((Destroyable) toolBarToggle.getComponent(i)).destroy();
             }
         }
@@ -308,5 +309,5 @@
 
     public Action getDefaultButtonAction() {
-        return ((AbstractButton)toolBarActions.getComponent(0)).getAction();
+        return ((AbstractButton) toolBarActions.getComponent(0)).getAction();
     }
 
@@ -340,6 +341,4 @@
         return button;
     }
-
-
 
     public void addMapMode(IconToggleButton b) {
@@ -431,5 +430,5 @@
          */
         if (Main.pref.getBoolean("sidetoolbar.toggledialogs.visible", true)) {
-            ((JToolBar)sideToolBar).addSeparator(new Dimension(0,18));
+            ((JToolBar) sideToolBar).addSeparator(new Dimension(0, 18));
             toolBarToggle.setAlignmentX(0.5f);
             toolBarToggle.setBorder(null);
@@ -446,60 +445,12 @@
          * sideToolBar: add dynamic popup menu
          */
-        sideToolBar.setComponentPopupMenu(new JPopupMenu() {
-            private static final int staticMenuEntryCount = 2;
-            private JCheckBoxMenuItem doNotHide = new JCheckBoxMenuItem(new AbstractAction(tr("Do not hide toolbar")) {
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    boolean sel = ((JCheckBoxMenuItem) e.getSource()).getState();
-                    Main.pref.put("sidetoolbar.always-visible", sel);
-                }
-            });
-            {
-                addPopupMenuListener(new PopupMenuListener() {
-                    @Override
-                    public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
-                        final Object src = ((JPopupMenu)e.getSource()).getInvoker();
-                        if (src instanceof IconToggleButton) {
-                            insert(new Separator(), 0);
-                            insert(new AbstractAction() {
-                                {
-                                    putValue(NAME, tr("Hide this button"));
-                                    putValue(SHORT_DESCRIPTION, tr("Click the arrow at the bottom to show it again."));
-        }
-                                @Override
-                                public void actionPerformed(ActionEvent e) {
-                                    ((IconToggleButton)src).setButtonHidden(true);
-                                    validateToolBarsVisibility();
-                                }
-                            }, 0);
-                        }
-                        doNotHide.setSelected(Main.pref.getBoolean("sidetoolbar.always-visible", true));
-                    }
-                    @Override
-                    public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
-                        while (getComponentCount() > staticMenuEntryCount) {
-                            remove(0);
-                        }
-                    }
-                    @Override
-                    public void popupMenuCanceled(PopupMenuEvent e) {}
-                });
-
-                add(new AbstractAction(tr("Hide edit toolbar")) {
-                    @Override
-                    public void actionPerformed(ActionEvent e) {
-                        Main.pref.put("sidetoolbar.visible", false);
-                    }
-                });
-                add(doNotHide);
-            }
-        });
-        ((JToolBar)sideToolBar).setFloatable(false);
-        sideToolBar.setBorder(BorderFactory.createEmptyBorder(0,1,0,1));
+        sideToolBar.setComponentPopupMenu(new SideToolbarPopupMenu());
+        ((JToolBar) sideToolBar).setFloatable(false);
+        sideToolBar.setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 1));
 
         /**
          * sideToolBar: decide scroll- and visibility
          */
-        if(Main.pref.getBoolean("sidetoolbar.scrollable", true)) {
+        if (Main.pref.getBoolean("sidetoolbar.scrollable", true)) {
             final ScrollViewport svp = new ScrollViewport(sideToolBar, ScrollViewport.VERTICAL_DIRECTION);
             svp.addMouseWheelListener(new MouseWheelListener() {
@@ -535,9 +486,61 @@
     }
 
+    private final class SideToolbarPopupMenu extends JPopupMenu {
+        private static final int staticMenuEntryCount = 2;
+        private JCheckBoxMenuItem doNotHide = new JCheckBoxMenuItem(new AbstractAction(tr("Do not hide toolbar")) {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                boolean sel = ((JCheckBoxMenuItem) e.getSource()).getState();
+                Main.pref.put("sidetoolbar.always-visible", sel);
+            }
+        });
+        {
+            addPopupMenuListener(new PopupMenuListener() {
+                @Override
+                public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
+                    final Object src = ((JPopupMenu) e.getSource()).getInvoker();
+                    if (src instanceof IconToggleButton) {
+                        insert(new Separator(), 0);
+                        insert(new AbstractAction() {
+                            {
+                                putValue(NAME, tr("Hide this button"));
+                                putValue(SHORT_DESCRIPTION, tr("Click the arrow at the bottom to show it again."));
+                            }
+
+                            @Override
+                            public void actionPerformed(ActionEvent e) {
+                                ((IconToggleButton) src).setButtonHidden(true);
+                                validateToolBarsVisibility();
+                            }
+                        }, 0);
+                    }
+                    doNotHide.setSelected(Main.pref.getBoolean("sidetoolbar.always-visible", true));
+                }
+
+                @Override
+                public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
+                    while (getComponentCount() > staticMenuEntryCount) {
+                        remove(0);
+                    }
+                }
+
+                @Override
+                public void popupMenuCanceled(PopupMenuEvent e) {}
+            });
+
+            add(new AbstractAction(tr("Hide edit toolbar")) {
+                @Override
+                public void actionPerformed(ActionEvent e) {
+                    Main.pref.put("sidetoolbar.visible", false);
+                }
+            });
+            add(doNotHide);
+        }
+    }
+
     class ListAllButtonsAction extends AbstractAction {
 
         private JButton button;
         private transient Collection<? extends HideableButton> buttons;
-
 
         public ListAllButtonsAction(Collection<? extends HideableButton> buttons) {
@@ -564,4 +567,5 @@
                         putValue(SHORT_DESCRIPTION, tr("Hide or show this toggle button"));
                     }
+
                     @Override
                     public void actionPerformed(ActionEvent e) {
@@ -607,6 +611,6 @@
         rememberToggleDialogWidth();
         dialogsPanel.setVisible(visible);
-        splitPane.setDividerLocation(visible?splitPane.getWidth()-Main.pref.getInteger("toggleDialogs.width",DEF_TOGGLE_DLG_WIDTH):0);
-        splitPane.setDividerSize(visible?5:0);
+        splitPane.setDividerLocation(visible ? splitPane.getWidth()-Main.pref.getInteger("toggleDialogs.width", DEF_TOGGLE_DLG_WIDTH) : 0);
+        splitPane.setDividerSize(visible ? 5 : 0);
     }
 
@@ -625,5 +629,5 @@
     public void removeTopPanel(Class<?> type) {
         int n = leftPanel.getComponentCount();
-        for (int i=0; i<n; i++) {
+        for (int i = 0; i < n; i++) {
             Component c = leftPanel.getComponent(i);
             if (type.isInstance(c)) {
@@ -640,5 +644,5 @@
     public <T> T getTopPanel(Class<T> type) {
         int n = leftPanel.getComponentCount();
-        for (int i=0; i<n; i++) {
+        for (int i = 0; i < n; i++) {
             Component c = leftPanel.getComponent(i);
             if (type.isInstance(c))
@@ -734,5 +738,5 @@
             // if no action is selected - try to select default action
             Action defaultMode = getDefaultButtonAction();
-            if (defaultMode instanceof MapMode && ((MapMode)defaultMode).layerIsSupported(newLayer)) {
+            if (defaultMode instanceof MapMode && ((MapMode) defaultMode).layerIsSupported(newLayer)) {
                 mode = (MapMode) defaultMode;
             }
Index: trunk/src/org/openstreetmap/josm/gui/MapMover.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapMover.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/MapMover.java	(revision 8510)
@@ -37,7 +37,9 @@
     private final class ZoomerAction extends AbstractAction {
         private final String action;
+
         public ZoomerAction(String action) {
             this.action = action;
         }
+
         @Override
         public void actionPerformed(ActionEvent e) {
@@ -45,5 +47,5 @@
                 Point mouse = nc.getMousePosition();
                 if (mouse == null)
-                    mouse = new Point((int)nc.getBounds().getCenterX(), (int)nc.getBounds().getCenterY());
+                    mouse = new Point((int) nc.getBounds().getCenterX(), (int) nc.getBounds().getCenterY());
                 MouseWheelEvent we = new MouseWheelEvent(nc, e.getID(), e.getWhen(), e.getModifiers(), mouse.x, mouse.y, 0, false,
                         MouseWheelEvent.WHEEL_UNIT_SCROLL, 1, ",".equals(action) ? -1 : 1);
@@ -245,5 +247,5 @@
                 for (KeyStroke key : inputKeys) {
                     Object binding = inputMap.get(key);
-                    if (binding instanceof String && ((String)binding).startsWith("MapMover.")) {
+                    if (binding instanceof String && ((String) binding).startsWith("MapMover.")) {
                         inputMap.remove(key);
                     }
@@ -254,5 +256,5 @@
             if (actionsKeys != null) {
                 for (Object key : actionsKeys) {
-                    if (key instanceof String && ((String)key).startsWith("MapMover.")) {
+                    if (key instanceof String && ((String) key).startsWith("MapMover.")) {
                         actionMap.remove(key);
                     }
Index: trunk/src/org/openstreetmap/josm/gui/MapScaler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapScaler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/MapScaler.java	(revision 8510)
@@ -22,5 +22,5 @@
     public MapScaler(NavigatableComponent mv) {
         this.mv = mv;
-        setSize(100+PADDING_RIGHT,30);
+        setSize(100+PADDING_RIGHT, 30);
         setOpaque(false);
     }
@@ -37,5 +37,5 @@
         g.drawLine(24, 3, 24, 7);
         g.drawLine(74, 3, 74, 7);
-        g.drawString(text, (int)(100-bound.getWidth()/2), 23);
+        g.drawString(text, (int) (100-bound.getWidth()/2), 23);
         g.drawString("0", 0, 23);
     }
Index: trunk/src/org/openstreetmap/josm/gui/MapSlider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapSlider.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/MapSlider.java	(revision 8510)
@@ -42,15 +42,15 @@
         int zoom = 0;
 
-        while(zoom <= 150) {
+        while (zoom <= 150) {
             e /= 1.1;
             n /= 1.1;
-            if(e < cur_e && n < cur_n) {
+            if (e < cur_e && n < cur_n) {
                 break;
             }
             ++zoom;
         }
-        preventChange=true;
+        preventChange = true;
         setValue(zoom);
-        preventChange=false;
+        preventChange = false;
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/MapStatus.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 8510)
@@ -218,5 +218,5 @@
         @Override
         public boolean equals(Object obj) {
-            return obj instanceof StatusTextHistory && ((StatusTextHistory)obj).id == id;
+            return obj instanceof StatusTextHistory && ((StatusTextHistory) obj).id == id;
         }
 
@@ -264,5 +264,5 @@
                     if (ds != null) {
                         // This is not perfect, if current dataset was changed during execution, the lock would be useless
-                        if(isAtOldPosition && middleMouseDown) {
+                        if (isAtOldPosition && middleMouseDown) {
                             // Write lock is necessary when selecting in popupCycleSelection
                             // locks can not be upgraded -> if do read lock here and write lock later
@@ -321,5 +321,5 @@
                 } finally {
                     if (ds != null) {
-                        if(isAtOldPosition && middleMouseDown) {
+                        if (isAtOldPosition && middleMouseDown) {
                             ds.endUpdate();
                         } else {
@@ -377,5 +377,5 @@
 
                     // Do nothing, if required data is missing
-                    if(ms.mousePos == null || mv.center == null) {
+                    if (ms.mousePos == null || mv.center == null) {
                         continue;
                     }
@@ -419,5 +419,5 @@
             // Display the popup to the left of the cursor if it would be cut
             // off on its right, but only if more space is available
-            if(xPos + w > scrn.width && xPos > scrn.width/2) {
+            if (xPos + w > scrn.width && xPos > scrn.width/2) {
                 xPos = p.x + ms.mousePos.x - 4 - w;
             }
@@ -425,5 +425,5 @@
             // Move the popup up if it would be cut off at its bottom but do not
             // move it off screen on the top
-            if(yPos + h > scrn.height - 5) {
+            if (yPos + h > scrn.height - 5) {
                 yPos = Math.max(5, scrn.height - h - 5);
             }
@@ -459,11 +459,11 @@
             OsmPrimitive nextSelected = null;
             for (final OsmPrimitive osm : osms) {
-                if(firstItem == null) {
+                if (firstItem == null) {
                     firstItem = osm;
                 }
-                if(firstSelected != null && nextSelected == null) {
+                if (firstSelected != null && nextSelected == null) {
                     nextSelected = osm;
                 }
-                if(firstSelected == null && ds.isSelected(osm)) {
+                if (firstSelected == null && ds.isSelected(osm)) {
                     firstSelected = osm;
                 }
@@ -473,5 +473,5 @@
             // pressed. Cannot use "setSelected()" because it will cause a
             // fireSelectionChanged event which is unnecessary at this point.
-            if((mods & MouseEvent.SHIFT_DOWN_MASK) == 0) {
+            if ((mods & MouseEvent.SHIFT_DOWN_MASK) == 0) {
                 ds.clearSelection();
             }
@@ -480,5 +480,5 @@
             if (firstSelected != null) {
                 ds.clearSelection(firstSelected);
-                if(nextSelected != null) {
+                if (nextSelected != null) {
                     ds.addSelected(nextSelected);
                 }
@@ -493,9 +493,9 @@
         private void popupHidePopup() {
             popupLabels = null;
-            if(popup == null)
+            if (popup == null)
                 return;
             final Popup staticPopup = popup;
             popup = null;
-            EventQueue.invokeLater(new Runnable(){
+            EventQueue.invokeLater(new Runnable() {
                @Override
                public void run() {
@@ -512,8 +512,8 @@
         private void popupShowPopup(Popup newPopup, List<JLabel> lbls) {
             final Popup staticPopup = newPopup;
-            if(this.popup != null) {
+            if (this.popup != null) {
                 // If an old popup exists, remove it when the new popup has been drawn to keep flickering to a minimum
                 final Popup staticOldPopup = this.popup;
-                EventQueue.invokeLater(new Runnable(){
+                EventQueue.invokeLater(new Runnable() {
                     @Override
                     public void run() {
@@ -524,5 +524,5 @@
             } else {
                 // There is no old popup
-                EventQueue.invokeLater(new Runnable(){
+                EventQueue.invokeLater(new Runnable() {
                      @Override
                      public void run() {
@@ -540,7 +540,7 @@
          */
         private void popupUpdateLabels() {
-            if(this.popup == null || this.popupLabels == null)
+            if (this.popup == null || this.popupLabels == null)
                 return;
-            for(JLabel l : this.popupLabels) {
+            for (JLabel l : this.popupLabels) {
                 l.validate();
             }
@@ -556,5 +556,5 @@
         private void popupSetLabelColors(JLabel lbl, OsmPrimitive osm) {
             DataSet ds = Main.main.getCurrentDataSet();
-            if(ds.isSelected(osm)) {
+            if (ds.isSelected(osm)) {
                 lbl.setBackground(SystemColor.textHighlight);
                 lbl.setForeground(SystemColor.textHighlightText);
@@ -586,5 +586,5 @@
             }
 
-            if(osm.getUser() != null) {
+            if (osm.getUser() != null) {
                 text.append(" [").append(tr("User:")).append(' ').append(osm.getUser().getName()).append(']');
             }
@@ -613,5 +613,5 @@
             l.setHorizontalAlignment(JLabel.LEFT);
             l.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
-            l.addMouseListener(new MouseAdapter(){
+            l.addMouseListener(new MouseAdapter() {
                 @Override
                 public void mouseEntered(MouseEvent e) {
@@ -619,8 +619,10 @@
                     l.setForeground(SystemColor.infoText);
                 }
+
                 @Override
                 public void mouseExited(MouseEvent e) {
                     popupSetLabelColors(l, osm);
                 }
+
                 @Override
                 public void mouseClicked(MouseEvent e) {
@@ -632,15 +634,17 @@
             });
             // Sometimes the mouseEntered event is not catched, thus the label
-            // will not be highlighted, making it confusing. The MotionListener
-            // can correct this defect.
+            // will not be highlighted, making it confusing. The MotionListener can correct this defect.
             l.addMouseMotionListener(new MouseMotionListener() {
-                 @Override public void mouseMoved(MouseEvent e) {
+                 @Override
+                 public void mouseMoved(MouseEvent e) {
                     l.setBackground(SystemColor.info);
                     l.setForeground(SystemColor.infoText);
-                }
-                 @Override public void mouseDragged(MouseEvent e) {
+                 }
+
+                 @Override
+                 public void mouseDragged(MouseEvent e) {
                     l.setBackground(SystemColor.info);
                     l.setForeground(SystemColor.infoText);
-                }
+                 }
             });
             return l;
@@ -665,9 +669,9 @@
          public void eventDispatched(AWTEvent event) {
             if (event instanceof InputEvent &&
-                    ((InputEvent)event).getComponent() == mv) {
+                    ((InputEvent) event).getComponent() == mv) {
                 synchronized (collector) {
-                    mouseState.modifiers = ((InputEvent)event).getModifiersEx();
+                    mouseState.modifiers = ((InputEvent) event).getModifiersEx();
                     if (event instanceof MouseEvent) {
-                        mouseState.mousePos = ((MouseEvent)event).getPoint();
+                        mouseState.mousePos = ((MouseEvent) event).getPoint();
                     }
                     collector.notifyAll();
@@ -762,5 +766,5 @@
                 @Override
                 public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
-                    Component invoker = ((JPopupMenu)e.getSource()).getInvoker();
+                    Component invoker = ((JPopupMenu) e.getSource()).getInvoker();
                     jumpButton.setVisible(latText.equals(invoker) || lonText.equals(invoker));
                     String currentSOM = ProjectionPreference.PROP_SYSTEM_OF_MEASUREMENT.get();
@@ -772,8 +776,10 @@
                     doNotHide.setSelected(Main.pref.getBoolean("statusbar.always-visible", true));
                 }
+
                 @Override
                 public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
                     // Do nothing
                 }
+
                 @Override
                 public void popupMenuCanceled(PopupMenuEvent e) {
@@ -806,9 +812,10 @@
 
         // Listen for mouse movements and set the position text field
-        mv.addMouseMotionListener(new MouseMotionListener(){
+        mv.addMouseMotionListener(new MouseMotionListener() {
             @Override
             public void mouseDragged(MouseEvent e) {
                 mouseMoved(e);
             }
+
             @Override
             public void mouseMoved(MouseEvent e) {
@@ -818,5 +825,5 @@
                 if ((e.getModifiersEx() & MouseEvent.CTRL_DOWN_MASK) == 0) {
                     CoordinateFormat mCord = CoordinateFormat.getDefaultFormat();
-                    LatLon p = mv.getLatLon(e.getX(),e.getY());
+                    LatLon p = mv.getLatLon(e.getX(), e.getY());
                     latText.setText(p.latToString(mCord));
                     lonText.setText(p.lonToString(mCord));
@@ -826,5 +833,5 @@
 
         setLayout(new GridBagLayout());
-        setBorder(BorderFactory.createEmptyBorder(1,2,1,2));
+        setBorder(BorderFactory.createEmptyBorder(1, 2, 1, 2));
 
         latText.setInheritsPopupMenu(true);
@@ -835,8 +842,8 @@
 
         add(latText, GBC.std());
-        add(lonText, GBC.std().insets(3,0,0,0));
-        add(headingText, GBC.std().insets(3,0,0,0));
-        add(angleText, GBC.std().insets(3,0,0,0));
-        add(distText, GBC.std().insets(3,0,0,0));
+        add(lonText, GBC.std().insets(3, 0, 0, 0));
+        add(headingText, GBC.std().insets(3, 0, 0, 0));
+        add(angleText, GBC.std().insets(3, 0, 0, 0));
+        add(distText, GBC.std().insets(3, 0, 0, 0));
 
         if (Main.pref.getBoolean("statusbar.change-system-of-measurement-on-click", true)) {
@@ -848,5 +855,5 @@
                     if (!e.isPopupTrigger() && e.getButton() == MouseEvent.BUTTON1) {
                         String som = ProjectionPreference.PROP_SYSTEM_OF_MEASUREMENT.get();
-                        String newsom = soms.get((soms.indexOf(som)+1)%soms.size());
+                        String newsom = soms.get((soms.indexOf(som)+1) % soms.size());
                         updateSystemOfMeasurement(newsom);
                     }
@@ -866,6 +873,6 @@
 
         helpText.setEditable(false);
-        add(nameText, GBC.std().insets(3,0,0,0));
-        add(helpText, GBC.std().insets(3,0,0,0).fill(GBC.HORIZONTAL));
+        add(nameText, GBC.std().insets(3, 0, 0, 0));
+        add(helpText, GBC.std().insets(3, 0, 0, 0).fill(GBC.HORIZONTAL));
 
         progressBar.setMaximum(PleaseWaitProgressMonitor.PROGRESS_BAR_MAX);
@@ -873,5 +880,5 @@
         GBC gbc = GBC.eol();
         gbc.ipadx = 100;
-        add(progressBar,gbc);
+        add(progressBar, gbc);
         progressBar.addMouseListener(new MouseAdapter() {
             @Override
Index: trunk/src/org/openstreetmap/josm/gui/MapView.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 8510)
@@ -247,7 +247,7 @@
         initialViewport = viewportData;
         Main.pref.addPreferenceChangeListener(this);
-        final boolean unregisterTab = Shortcut.findShortcut(KeyEvent.VK_TAB, 0)!=null;
-
-        addComponentListener(new ComponentAdapter(){
+        final boolean unregisterTab = Shortcut.findShortcut(KeyEvent.VK_TAB, 0) != null;
+
+        addComponentListener(new ComponentAdapter() {
             @Override public void componentResized(ComponentEvent e) {
                 removeComponentListener(this);
@@ -260,5 +260,5 @@
                 MapScaler scaler = new MapScaler(MapView.this);
                 add(scaler);
-                scaler.setLocation(10,30);
+                scaler.setLocation(10, 30);
 
                 mapMover = new MapMover(MapView.this, contentPane);
@@ -271,8 +271,11 @@
         //store the last mouse action
         this.addMouseMotionListener(new MouseMotionListener() {
-            @Override public void mouseDragged(MouseEvent e) {
+            @Override
+            public void mouseDragged(MouseEvent e) {
                 mouseMoved(e);
             }
-            @Override public void mouseMoved(MouseEvent e) {
+
+            @Override
+            public void mouseMoved(MouseEvent e) {
                 lastMEvent = e;
             }
@@ -286,5 +289,5 @@
         });
 
-        if (Shortcut.findShortcut(KeyEvent.VK_TAB, 0)!=null) {
+        if (Shortcut.findShortcut(KeyEvent.VK_TAB, 0) != null) {
             setFocusTraversalKeysEnabled(false);
         }
@@ -313,5 +316,5 @@
             return;
         }
-        for (int i=layers.size()-1; i>= 0; i--) {
+        for (int i = layers.size()-1; i >= 0; i--) {
             if (layers.get(i) instanceof OsmDataLayer) {
                 if (i == layers.size()-1) {
@@ -337,5 +340,5 @@
 
         if (layer instanceof GpxLayer) {
-            addGpxLayer((GpxLayer)layer);
+            addGpxLayer((GpxLayer) layer);
         } else if (layers.isEmpty()) {
             layers.add(layer);
@@ -354,5 +357,5 @@
         boolean isOsmDataLayer = layer instanceof OsmDataLayer;
         if (isOsmDataLayer) {
-            ((OsmDataLayer)layer).addLayerStateChangeListener(this);
+            ((OsmDataLayer) layer).addLayerStateChangeListener(this);
         }
         boolean callSetActiveLayer = isOsmDataLayer || activeLayer == null;
@@ -440,5 +443,5 @@
 
         if (layer instanceof OsmDataLayer) {
-            ((OsmDataLayer)layer).removeLayerPropertyChangeListener(this);
+            ((OsmDataLayer) layer).removeLayerPropertyChangeListener(this);
         }
 
@@ -455,9 +458,10 @@
 
     public void setVirtualNodesEnabled(boolean enabled) {
-        if(virtualNodesEnabled != enabled) {
+        if (virtualNodesEnabled != enabled) {
             virtualNodesEnabled = enabled;
             repaint();
         }
     }
+
     public boolean isVirtualNodesEnabled() {
         return virtualNodesEnabled;
@@ -531,5 +535,5 @@
     private void paintLayer(Layer layer, Graphics2D g, Bounds box) {
         if (layer.getOpacity() < 1) {
-            g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,(float)layer.getOpacity()));
+            g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, (float) layer.getOpacity()));
         }
         layer.paint(g, this, box);
@@ -583,5 +587,5 @@
         lastViewID == getViewID() && lastClipBounds.contains(g.getClipBounds());
         if (canUseBuffer) {
-            for (int i=0; i<nonChangedLayers.size(); i++) {
+            for (int i = 0; i < nonChangedLayers.size(); i++) {
                 if (visibleLayers.get(i) != nonChangedLayers.get(i)) {
                     canUseBuffer = false;
@@ -609,6 +613,6 @@
             g2.fillRect(0, 0, getWidth(), getHeight());
 
-            for (int i=0; i<nonChangedLayersCount; i++) {
-                paintLayer(visibleLayers.get(i),g2, box);
+            for (int i = 0; i < nonChangedLayersCount; i++) {
+                paintLayer(visibleLayers.get(i), g2, box);
             }
         } else {
@@ -617,6 +621,6 @@
                 Graphics2D g2 = nonChangedLayersBuffer.createGraphics();
                 g2.setClip(g.getClip());
-                for (int i=nonChangedLayers.size(); i<nonChangedLayersCount; i++) {
-                    paintLayer(visibleLayers.get(i),g2, box);
+                for (int i = nonChangedLayers.size(); i < nonChangedLayersCount; i++) {
+                    paintLayer(visibleLayers.get(i), g2, box);
                 }
             }
@@ -625,5 +629,5 @@
         nonChangedLayers.clear();
         changedLayer = null;
-        for (int i=0; i<nonChangedLayersCount; i++) {
+        for (int i = 0; i < nonChangedLayersCount; i++) {
             nonChangedLayers.add(visibleLayers.get(i));
         }
@@ -633,6 +637,6 @@
         tempG.drawImage(nonChangedLayersBuffer, 0, 0, null);
 
-        for (int i=nonChangedLayersCount; i<visibleLayers.size(); i++) {
-            paintLayer(visibleLayers.get(i),tempG, box);
+        for (int i = nonChangedLayersCount; i < visibleLayers.size(); i++) {
+            paintLayer(visibleLayers.get(i), tempG, box);
         }
 
@@ -653,20 +657,20 @@
         path.moveTo(p.x, p.y);
         double max = b.getMax().lat();
-        for(; lat <= max; lat += 1.0) {
+        for (; lat <= max; lat += 1.0) {
             p = getPoint(new LatLon(lat >= max ? max : lat, lon));
             path.lineTo(p.x, p.y);
         }
         lat = max; max = b.getMax().lon();
-        for(; lon <= max; lon += 1.0) {
+        for (; lon <= max; lon += 1.0) {
             p = getPoint(new LatLon(lat, lon >= max ? max : lon));
             path.lineTo(p.x, p.y);
         }
         lon = max; max = b.getMinLat();
-        for(; lat >= max; lat -= 1.0) {
+        for (; lat >= max; lat -= 1.0) {
             p = getPoint(new LatLon(lat <= max ? max : lat, lon));
             path.lineTo(p.x, p.y);
         }
         lat = max; max = b.getMinLon();
-        for(; lon >= max; lon -= 1.0) {
+        for (; lon >= max; lon -= 1.0) {
             p = getPoint(new LatLon(lat, lon <= max ? max : lon));
             path.lineTo(p.x, p.y);
@@ -743,5 +747,5 @@
 
     private void setEditLayer(List<Layer> layersList) {
-        OsmDataLayer newEditLayer = layersList.contains(editLayer)?editLayer:null;
+        OsmDataLayer newEditLayer = layersList.contains(editLayer) ? editLayer : null;
         OsmDataLayer oldEditLayer = editLayer;
 
@@ -803,5 +807,5 @@
          * order. This way it works as visual clue for new users */
         for (final AbstractButton b: Main.map.allMapModeButtons) {
-            MapMode mode = (MapMode)b.getAction();
+            MapMode mode = (MapMode) b.getAction();
             if (mode.layerIsSupported(layer)) {
                 Main.registerActionShortcut(mode, mode.getShortcut()); //fix #6876
@@ -866,5 +870,5 @@
             repaint();
         } else if (evt.getPropertyName().equals(Layer.OPACITY_PROP)) {
-            Layer l = (Layer)evt.getSource();
+            Layer l = (Layer) evt.getSource();
             if (l.isVisible()) {
                 changedLayer = l;
@@ -873,5 +877,5 @@
         } else if (evt.getPropertyName().equals(OsmDataLayer.REQUIRES_SAVE_TO_DISK_PROP)
                 || evt.getPropertyName().equals(OsmDataLayer.REQUIRES_UPLOAD_TO_SERVER_PROP)) {
-            OsmDataLayer layer = (OsmDataLayer)evt.getSource();
+            OsmDataLayer layer = (OsmDataLayer) evt.getSource();
             if (layer == getEditLayer()) {
                 refreshTitle();
@@ -896,5 +900,5 @@
     }
 
-    private transient SelectionChangedListener repaintSelectionChangedListener = new SelectionChangedListener(){
+    private transient SelectionChangedListener repaintSelectionChangedListener = new SelectionChangedListener() {
         @Override
         public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
Index: trunk/src/org/openstreetmap/josm/gui/MenuScroller.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MenuScroller.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/MenuScroller.java	(revision 8510)
@@ -58,5 +58,5 @@
         if (menu != null) {
             // Compute max height of current screen
-            int maxHeight = WindowGeometry.getMaxDimensionOnScreen(menu).height - ((JFrame)Main.parent).getInsets().top;
+            int maxHeight = WindowGeometry.getMaxDimensionOnScreen(menu).height - ((JFrame) Main.parent).getInsets().top;
 
             // Remove top fixed part height
@@ -87,5 +87,5 @@
                 // Increase scroll count to take into account upper items that will be displayed
                 // after firstIndex is updated
-                for (int i=startIndex-1; i >= 0 && height <= maxHeight; i--, result++) {
+                for (int i = startIndex-1; i >= 0 && height <= maxHeight; i--, result++) {
                     height += menuItems[i].getPreferredSize().height;
                 }
@@ -351,5 +351,5 @@
             }
 
-            int allowedHeight = WindowGeometry.getMaxDimensionOnScreen(menu).height - ((JFrame)Main.parent).getInsets().top;
+            int allowedHeight = WindowGeometry.getMaxDimensionOnScreen(menu).height - ((JFrame) Main.parent).getInsets().top;
 
             boolean mustSCroll = allItemsHeight > allowedHeight;
Index: trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 8510)
@@ -256,6 +256,6 @@
         int w = getWidth()/2;
         int h = getHeight()/2;
-        LatLon ll1 = getLatLon(w-50,h);
-        LatLon ll2 = getLatLon(w+50,h);
+        LatLon ll1 = getLatLon(w-50, h);
+        LatLon ll2 = getLatLon(w+50, h);
         return ll1.greatCircleDistance(ll2);
     }
@@ -325,5 +325,5 @@
 
     public LatLon getLatLon(double x, double y) {
-        return getLatLon((int)x, (int)y);
+        return getLatLon((int) x, (int) y);
     }
 
@@ -346,5 +346,5 @@
         double deltaNorth = (northMax - northMin) / 10;
 
-        for (int i=0; i < 10; i++) {
+        for (int i = 0; i < 10; i++) {
             result.extend(Main.getProjection().eastNorth2latlon(new EastNorth(eastMin + i * deltaEast, northMin)));
             result.extend(Main.getProjection().eastNorth2latlon(new EastNorth(eastMin + i * deltaEast, northMax)));
@@ -379,5 +379,5 @@
             return new Point();
         else if (latlon instanceof CachedLatLon)
-            return getPoint2D(((CachedLatLon)latlon).getEastNorth());
+            return getPoint2D(((CachedLatLon) latlon).getEastNorth());
         else
             return getPoint2D(getProjection().latlon2eastNorth(latlon));
@@ -447,5 +447,5 @@
         }
         if (changed) {
-            newCenter = Projections.project(new LatLon(lat,lon));
+            newCenter = Projections.project(new LatLon(lat, lon));
         }
         int width = getWidth()/2;
@@ -535,8 +535,8 @@
             final EastNorth finalNewCenter = newCenter;
 
-            new Thread(){
+            new Thread() {
                 @Override
                 public void run() {
-                    for (int i=0; i<frames; i++) {
+                    for (int i = 0; i < frames; i++) {
                         // FIXME - not use zoom history here
                         zoomTo(oldCenter.interpolate(finalNewCenter, (i+1) / frames));
@@ -1263,5 +1263,5 @@
         Collection<OsmPrimitive> sel;
         DataSet ds = getCurrentDataSet();
-        if (use_selected && ds!=null) {
+        if (use_selected && ds != null) {
             sel = ds.getSelected();
         } else {
@@ -1270,5 +1270,5 @@
         OsmPrimitive osm = getNearestNode(p, predicate, use_selected, sel);
 
-        if (isPrecedenceNode((Node)osm, p, use_selected)) return osm;
+        if (isPrecedenceNode((Node) osm, p, use_selected)) return osm;
         WaySegment ws;
         if (use_selected) {
@@ -1292,5 +1292,5 @@
             // is p closer to the middle of wayseg  than  to the nearest node?
             if (wp1.distanceSq(wp2) < maxWaySegLenSq &&
-                    p.distanceSq(project(0.5, wp1, wp2)) < p.distanceSq(getPoint2D((Node)osm))) {
+                    p.distanceSq(project(0.5, wp1, wp2)) < p.distanceSq(getPoint2D((Node) osm))) {
                 osm = ws.way;
             }
@@ -1432,5 +1432,5 @@
         CRC32 id = new CRC32();
         id.update(x.getBytes(StandardCharsets.UTF_8));
-        return (int)id.getValue();
+        return (int) id.getValue();
     }
 
@@ -1466,4 +1466,5 @@
         private final Cursor cursor;
         private final Object object;
+
         public CursorInfo(Cursor c, Object o) {
             cursor = c;
@@ -1480,5 +1481,5 @@
         if (!cursors.isEmpty()) {
             CursorInfo l = cursors.getLast();
-            if(l != null && l.cursor == cursor && l.object == reference)
+            if (l != null && l.cursor == cursor && l.object == reference)
                 return;
             stripCursors(reference);
@@ -1513,6 +1514,6 @@
     private void stripCursors(Object reference) {
         LinkedList<CursorInfo> c = new LinkedList<>();
-        for(CursorInfo i : cursors) {
-            if(i.object != reference) {
+        for (CursorInfo i : cursors) {
+            if (i.object != reference) {
                 c.add(i);
             }
Index: trunk/src/org/openstreetmap/josm/gui/NotificationManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/NotificationManager.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/NotificationManager.java	(revision 8510)
@@ -302,5 +302,5 @@
             comp.addMouseListener(listener);
             if (comp instanceof Container) {
-                for (Component c: ((Container)comp).getComponents()) {
+                for (Component c: ((Container) comp).getComponents()) {
                     addMouseListenerToAllChildComponents(c, listener);
                 }
Index: trunk/src/org/openstreetmap/josm/gui/OsmPrimitivRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/OsmPrimitivRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/OsmPrimitivRenderer.java	(revision 8510)
@@ -72,12 +72,12 @@
     private Component renderer(Component def, OsmPrimitive value) {
         if (value != null && def instanceof JLabel) {
-            ((JLabel)def).setText(getComponentText(value));
+            ((JLabel) def).setText(getComponentText(value));
             ImageIcon icon = ImageProvider.get(value.getDisplayType());
             if (icon != null) {
-                ((JLabel)def).setIcon(icon);
+                ((JLabel) def).setIcon(icon);
             } else {
                 Main.warn("Null icon for "+value.getDisplayType());
             }
-            ((JLabel)def).setToolTipText(getComponentToolTipText(value));
+            ((JLabel) def).setToolTipText(getComponentToolTipText(value));
         }
         return def;
@@ -93,7 +93,7 @@
     private Component renderer(Component def, HistoryOsmPrimitive value) {
         if (value != null && def instanceof JLabel) {
-            ((JLabel)def).setText(value.getDisplayName(DefaultNameFormatter.getInstance()));
-            ((JLabel)def).setIcon(ImageProvider.get(value.getType()));
-            ((JLabel)def).setToolTipText(formatter.buildDefaultToolTip(value));
+            ((JLabel) def).setText(value.getDisplayName(DefaultNameFormatter.getInstance()));
+            ((JLabel) def).setIcon(ImageProvider.get(value.getType()));
+            ((JLabel) def).setToolTipText(formatter.buildDefaultToolTip(value));
         }
         return def;
Index: trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java	(revision 8510)
@@ -38,5 +38,5 @@
     private JButton btnInBackground;
     /** the text area and the scroll pane for the log */
-    private final JosmTextArea taLog = new JosmTextArea(5,50);
+    private final JosmTextArea taLog = new JosmTextArea(5, 50);
     private  JScrollPane spLog;
 
@@ -44,5 +44,5 @@
         setLayout(new GridBagLayout());
         JPanel pane = new JPanel(new GridBagLayout());
-        pane.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
+        pane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
         pane.add(currentAction, GBC.eol().fill(GBC.HORIZONTAL));
         pane.add(customText, GBC.eol().fill(GBC.HORIZONTAL));
@@ -69,13 +69,16 @@
             @Override
             public void componentHidden(ComponentEvent e) {}
+
             @Override
             public void componentMoved(ComponentEvent e) {}
+
             @Override
             public void componentShown(ComponentEvent e) {}
+
             @Override
             public void componentResized(ComponentEvent ev) {
                 int w = getWidth();
-                if(w > 200) {
-                    Main.pref.putInteger("progressdialog.size",w);
+                if (w > 200) {
+                    Main.pref.putInteger("progressdialog.size", w);
                 }
             }
@@ -111,5 +114,5 @@
     @Override
     public void setCustomText(String text) {
-        if(text == null || text.trim().isEmpty()) {
+        if (text == null || text.trim().isEmpty()) {
             customText.setVisible(false);
             adjustLayout();
Index: trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java	(revision 8510)
@@ -78,5 +78,5 @@
     public PleaseWaitRunnable(String title, ProgressMonitor progressMonitor, boolean ignoreException) {
         this.title = title;
-        this.progressMonitor = progressMonitor == null?new PleaseWaitProgressMonitor(title):progressMonitor;
+        this.progressMonitor = progressMonitor == null ? new PleaseWaitProgressMonitor(title) : progressMonitor;
         this.ignoreException = ignoreException;
     }
@@ -109,5 +109,5 @@
                 progressMonitor.setProgressTaskId(oldTaskId);
                 if (progressMonitor instanceof PleaseWaitProgressMonitor) {
-                    ((PleaseWaitProgressMonitor)progressMonitor).close();
+                    ((PleaseWaitProgressMonitor) progressMonitor).close();
                 }
                 if (EventQueue.isDispatchThread()) {
Index: trunk/src/org/openstreetmap/josm/gui/PopupMenuHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/PopupMenuHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/PopupMenuHandler.java	(revision 8510)
@@ -26,8 +26,8 @@
     // Managed menu
     private final JPopupMenu menu;
-    
+
     /**
      * Constructs a new {@code RelationActionMenuHandler} for the specified popup menu.
-     * 
+     *
      * @param menu The menu to be managed
      */
@@ -46,5 +46,5 @@
     /**
      * Appends a new menu item to the end of the menu which dispatches the specified <code>Action</code> object.
-     * 
+     *
      * @param a the <code>Action</code> to add to the menu
      * @return the new menu item
@@ -63,5 +63,5 @@
     /**
      * Removes the menu item which dispatches the specified <code>Action</code> object.
-     * 
+     *
      * @param a the <code>Action</code> to remove from the menu
      * @see JPopupMenu#remove(int)
@@ -73,5 +73,5 @@
             }
             MenuElement[] elements = menu.getSubElements();
-            for (int i=0; i<elements.length; i++) {
+            for (int i = 0; i < elements.length; i++) {
                 if (elements[i] instanceof JMenuItem) {
                     if (((JMenuItem) elements[i]).getAction() == a) {
@@ -103,5 +103,5 @@
         menu.removePopupMenuListener(l);
     }
-    
+
     /**
      * Returns all enabled primitive actions.
@@ -112,5 +112,5 @@
         return Collections.unmodifiableCollection(primitiveActions);
     }
-    
+
     /**
      * Specifies the working set of primitives for all primitive actions.
Index: trunk/src/org/openstreetmap/josm/gui/ScrollViewport.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ScrollViewport.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/ScrollViewport.java	(revision 8510)
@@ -91,5 +91,5 @@
             button = new JButton();
             button.addMouseListener(new ScrollViewPortMouseListener(UP_DIRECTION));
-            button.setPreferredSize(new Dimension(10,10));
+            button.setPreferredSize(new Dimension(10, 10));
             button.setIcon(ImageProvider.get("svpUp"));
             add(button, BorderLayout.NORTH);
@@ -101,5 +101,5 @@
             button = new JButton();
             button.addMouseListener(new ScrollViewPortMouseListener(DOWN_DIRECTION));
-            button.setPreferredSize(new Dimension(10,10));
+            button.setPreferredSize(new Dimension(10, 10));
             button.setIcon(ImageProvider.get("svpDown"));
             add(button, BorderLayout.SOUTH);
@@ -111,5 +111,5 @@
             button = new JButton();
             button.addMouseListener(new ScrollViewPortMouseListener(LEFT_DIRECTION));
-            button.setPreferredSize(new Dimension(10,10));
+            button.setPreferredSize(new Dimension(10, 10));
             button.setIcon(ImageProvider.get("svpLeft"));
             add(button, BorderLayout.WEST);
@@ -121,5 +121,5 @@
             button = new JButton();
             button.addMouseListener(new ScrollViewPortMouseListener(RIGHT_DIRECTION));
-            button.setPreferredSize(new Dimension(10,10));
+            button.setPreferredSize(new Dimension(10, 10));
             button.setIcon(ImageProvider.get("svpRight"));
             add(button, BorderLayout.EAST);
@@ -169,4 +169,5 @@
         scroll(deltaX, deltaY);
     }
+
     public synchronized void scroll(int deltaX, int deltaY) {
         if (component == null)
Index: trunk/src/org/openstreetmap/josm/gui/SelectionManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/SelectionManager.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/SelectionManager.java	(revision 8510)
@@ -124,5 +124,5 @@
         eventSource.addMouseMotionListener(this);
         selectionEndedListener.addPropertyChangeListener(this);
-        eventSource.addPropertyChangeListener("scale", new PropertyChangeListener(){
+        eventSource.addPropertyChangeListener("scale", new PropertyChangeListener() {
             @Override
             public void propertyChange(PropertyChangeEvent evt) {
@@ -261,7 +261,7 @@
             /* Keep the aspect ratio by growing the rectangle; the
              * rectangle is always under the cursor. */
-            double aspectRatio = (double)nc.getWidth()/nc.getHeight();
-            if ((double)w/h < aspectRatio) {
-                int neww = (int)(h*aspectRatio);
+            double aspectRatio = (double) nc.getWidth()/nc.getHeight();
+            if ((double) w/h < aspectRatio) {
+                int neww = (int) (h*aspectRatio);
                 if (mousePos.x < mousePosStart.x) {
                     x += w - neww;
@@ -269,5 +269,5 @@
                 w = neww;
             } else {
-                int newh = (int)(w/aspectRatio);
+                int newh = (int) (w/aspectRatio);
                 if (mousePos.y < mousePosStart.y) {
                     y += h - newh;
@@ -277,5 +277,5 @@
         }
 
-        return new Rectangle(x,y,w,h);
+        return new Rectangle(x, y, w, h);
     }
 
@@ -285,5 +285,5 @@
     @Override
     public void propertyChange(PropertyChangeEvent evt) {
-        if ("active".equals(evt.getPropertyName()) && !(Boolean)evt.getNewValue() && mousePosStart != null) {
+        if ("active".equals(evt.getPropertyName()) && !(Boolean) evt.getNewValue() && mousePosStart != null) {
             paintRect();
             mousePosStart = null;
@@ -375,8 +375,11 @@
     @Override
     public void mouseClicked(MouseEvent e) {}
+
     @Override
     public void mouseEntered(MouseEvent e) {}
+
     @Override
     public void mouseExited(MouseEvent e) {}
+
     @Override
     public void mouseMoved(MouseEvent e) {}
Index: trunk/src/org/openstreetmap/josm/gui/ShowHideButtonListener.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ShowHideButtonListener.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/ShowHideButtonListener.java	(revision 8510)
@@ -9,4 +9,5 @@
 public interface ShowHideButtonListener {
     public void buttonShown();
+
     public void buttonHidden();
 }
Index: trunk/src/org/openstreetmap/josm/gui/SideButton.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/SideButton.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/SideButton.java	(revision 8510)
@@ -37,5 +37,5 @@
     public SideButton(Action action, boolean usename) {
         super(action);
-        if(!usename) {
+        if (!usename) {
             setText(null);
             fixIcon(action);
@@ -83,9 +83,9 @@
         setLayout(new BorderLayout());
         setIconTextGap(2);
-        setMargin(new Insets(0,0,0,0));
+        setMargin(new Insets(0, 0, 0, 0));
     }
 
     public void createArrow(ActionListener listener) {
-        setMargin(new Insets(0,0,0,0));
+        setMargin(new Insets(0, 0, 0, 0));
         BasicArrowButton arrowButton = new BasicArrowButton(SwingConstants.SOUTH, null, null, Color.BLACK, null);
         arrowButton.setBorder(BorderFactory.createEmptyBorder());
Index: trunk/src/org/openstreetmap/josm/gui/SplashScreen.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/SplashScreen.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/SplashScreen.java	(revision 8510)
@@ -56,5 +56,5 @@
 
         // Add a nice border to the main splash screen
-        JPanel contentPane = (JPanel)this.getContentPane();
+        JPanel contentPane = (JPanel) this.getContentPane();
         Border margin = new EtchedBorder(1, Color.white, Color.gray);
         contentPane.setBorder(margin);
@@ -342,9 +342,9 @@
             gc.weightx = 1.0;
             gc.weighty = 0.0;
-            gc.insets = new Insets(5,0,0,0);
+            gc.insets = new Insets(5, 0, 0, 0);
             add(lblTaskTitle = new JLabel(labelHtml), gc);
 
             gc.gridy = 1;
-            gc.insets = new Insets(15,0,0,0);
+            gc.insets = new Insets(15, 0, 0, 0);
             add(progressBar = new JProgressBar(JProgressBar.HORIZONTAL), gc);
             progressBar.setIndeterminate(true);
Index: trunk/src/org/openstreetmap/josm/gui/bbox/SizeButton.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/bbox/SizeButton.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/bbox/SizeButton.java	(revision 8510)
@@ -28,5 +28,5 @@
     private final SlippyMapBBoxChooser slippyMapBBoxChooser;
 
-    public SizeButton(SlippyMapBBoxChooser slippyMapBBoxChooser){
+    public SizeButton(SlippyMapBBoxChooser slippyMapBBoxChooser) {
         this.slippyMapBBoxChooser = slippyMapBBoxChooser;
         enlargeImage = ImageProvider.get("view-fullscreen");
@@ -49,10 +49,10 @@
     @Override
     protected void paintComponent(Graphics g) {
-        if(isEnlarged) {
-            if(shrinkImage != null)
-                g.drawImage(shrinkImage.getImage(),x,y, null);
+        if (isEnlarged) {
+            if (shrinkImage != null)
+                g.drawImage(shrinkImage.getImage(), x, y, null);
         } else {
-            if(enlargeImage != null)
-                g.drawImage(enlargeImage.getImage(),x,y, null);
+            if (enlargeImage != null)
+                g.drawImage(enlargeImage.getImage(), x, y, null);
         }
     }
@@ -68,6 +68,6 @@
 
     public boolean hit(Point point) {
-        if(x < point.x && point.x < x + enlargeImage.getIconWidth()) {
-            if(y < point.y && point.y < y + enlargeImage.getIconHeight()) {
+        if (x < point.x && point.x < x + enlargeImage.getIconWidth()) {
+            if (y < point.y && point.y < y + enlargeImage.getIconHeight()) {
                 return true;
             }
Index: trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java	(revision 8510)
@@ -99,5 +99,4 @@
 
     private static CopyOnWriteArrayList<TileSourceProvider> providers = new CopyOnWriteArrayList<>();
-
     static {
         addTileSourceProvider(new TileSourceProvider() {
@@ -143,5 +142,5 @@
         uncachedLoader = new OsmTileLoader(this);
         uncachedLoader.headers.putAll(headers);
-        setZoomContolsVisible(Main.pref.getBoolean("slippy_map_chooser.zoomcontrols",false));
+        setZoomContolsVisible(Main.pref.getBoolean("slippy_map_chooser.zoomcontrols", false));
         setMapMarkerVisible(false);
         setMinimumSize(new Dimension(350, 350 / 2));
Index: trunk/src/org/openstreetmap/josm/gui/bbox/SourceButton.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/bbox/SourceButton.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/bbox/SourceButton.java	(revision 8510)
@@ -51,5 +51,5 @@
         shrinkImage = ImageProvider.get("layer-switcher-minimize");
 
-        hiddenDimension= new Dimension(enlargeImage.getIconWidth(), enlargeImage.getIconHeight());
+        hiddenDimension = new Dimension(enlargeImage.getIconWidth(), enlargeImage.getIconHeight());
         setPreferredSize(hiddenDimension);
 
@@ -104,5 +104,5 @@
                 g.fillRoundRect(0, 0, barWidth + shrinkImage.getIconWidth(),
                         sources.length * LAYER_HEIGHT + TOP_PADDING + BOTTOM_PADDING, 10, 10);
-                for (int i=0; i<sources.length; i++) {
+                for (int i = 0; i < sources.length; i++) {
                     g.setColor(Color.WHITE);
                     g.fillOval(LEFT_PADDING, TOP_PADDING + i * LAYER_HEIGHT + 6, radioButtonSize, radioButtonSize);
@@ -127,11 +127,10 @@
         this.isEnlarged = !this.isEnlarged;
         calculateShownDimension();
-        setPreferredSize(isEnlarged?shownDimension:hiddenDimension);
+        setPreferredSize(isEnlarged ? shownDimension : hiddenDimension);
         revalidate();
     }
 
-
     public void setCurrentMap(TileSource tileSource) {
-        for (int i=0; i<sources.length; i++) {
+        for (int i = 0; i < sources.length; i++) {
             if (sources[i].equals(tileSource)) {
                 currentMap = i;
Index: trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 8510)
@@ -114,5 +114,5 @@
         gc.weighty = 1.0;
         gc.fill = GridBagConstraints.BOTH;
-        gc.insets = new Insets(2,2,2,2);
+        gc.insets = new Insets(2, 2, 2, 2);
         add(mapViewer = new TileBoundsMapView(), gc);
         mapViewer.setFocusable(false);
@@ -202,5 +202,5 @@
         public void propertyChange(PropertyChangeEvent evt) {
             if (!evt.getPropertyName().equals(TileGridInputPanel.TILE_BOUNDS_PROP)) return;
-            TileBounds tb = (TileBounds)evt.getNewValue();
+            TileBounds tb = (TileBounds) evt.getNewValue();
             Bounds oldValue = TileSelectionBBoxChooser.this.bbox;
             TileSelectionBBoxChooser.this.bbox = convertTileBoundsToBoundingBox(tb);
@@ -243,5 +243,5 @@
             JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT));
             pnl.add(new JLabel(tr("Zoom level:")));
-            pnl.add(spZoomLevel = new JSpinner(new SpinnerNumberModel(0,0,18,1)));
+            pnl.add(spZoomLevel = new JSpinner(new SpinnerNumberModel(0, 0, 18, 1)));
             spZoomLevel.addChangeListener(new ZomeLevelChangeHandler());
             spZoomLevel.addChangeListener(tileBoundsBuilder);
@@ -251,5 +251,5 @@
         protected JPanel buildTileGridInputPanel() {
             JPanel pnl = new JPanel(new GridBagLayout());
-            pnl.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
+            pnl.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
             GridBagConstraints gc = new GridBagConstraints();
             gc.anchor = GridBagConstraints.NORTHWEST;
@@ -324,5 +324,5 @@
         protected void build() {
             setLayout(new BorderLayout());
-            setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+            setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
             add(buildTextPanel(), BorderLayout.NORTH);
             add(buildTileGridInputPanel(), BorderLayout.CENTER);
@@ -330,5 +330,5 @@
             Set<AWTKeyStroke> forwardKeys = new HashSet<>(getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS));
             forwardKeys.add(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0));
-            setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,forwardKeys);
+            setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, forwardKeys);
         }
 
@@ -343,10 +343,10 @@
             tb.zoomLevel = (Integer) spZoomLevel.getValue();
             tb.min = new Point(
-                    Math.max(0,lonToTileX(tb.zoomLevel, bbox.getMinLon())),
-                    Math.max(0,latToTileY(tb.zoomLevel, bbox.getMaxLat() - 0.00001))
+                    Math.max(0, lonToTileX(tb.zoomLevel, bbox.getMinLon())),
+                    Math.max(0, latToTileY(tb.zoomLevel, bbox.getMaxLat() - 0.00001))
             );
             tb.max = new Point(
-                    Math.max(0,lonToTileX(tb.zoomLevel, bbox.getMaxLon())),
-                    Math.max(0,latToTileY(tb.zoomLevel, bbox.getMinLat() - 0.00001))
+                    Math.max(0, lonToTileX(tb.zoomLevel, bbox.getMaxLon())),
+                    Math.max(0, latToTileY(tb.zoomLevel, bbox.getMinLat() - 0.00001))
             );
             doFireTileBoundChanged = false;
@@ -359,10 +359,10 @@
             double l = lat / 180 * Math.PI;
             double pf = Math.log(Math.tan(l) + (1/Math.cos(l)));
-            return (int) ((1<<(zoom-1)) * (Math.PI - pf) / Math.PI);
+            return (int) ((1 << (zoom-1)) * (Math.PI - pf) / Math.PI);
         }
 
         public static int lonToTileX(int zoom, double lon) {
             if ((zoom < 3) || (zoom > 18)) return -1;
-            return (int) ((1<<(zoom-3)) * (lon + 180.0) / 45.0);
+            return (int) ((1 << (zoom-3)) * (lon + 180.0) / 45.0);
         }
 
@@ -378,5 +378,5 @@
         public void propertyChange(PropertyChangeEvent evt) {
             if (evt.getPropertyName().equals(TileAddressInputPanel.TILE_BOUNDS_PROP)) {
-                TileBounds tb = (TileBounds)evt.getNewValue();
+                TileBounds tb = (TileBounds) evt.getNewValue();
                 setTileBounds(tb);
                 fireTileBoundsChanged(tb);
@@ -392,5 +392,5 @@
             @Override
             public void stateChanged(ChangeEvent e) {
-                int zoomLevel = (Integer)spZoomLevel.getValue();
+                int zoomLevel = (Integer) spZoomLevel.getValue();
                 valMaxX.setZoomLevel(zoomLevel);
                 valMaxY.setZoomLevel(zoomLevel);
@@ -408,5 +408,5 @@
                 Point min = new Point(valMinX.getTileIndex(), valMinY.getTileIndex());
                 Point max = new Point(valMaxX.getTileIndex(), valMaxY.getTileIndex());
-                int zoomlevel = (Integer)spZoomLevel.getValue();
+                int zoomlevel = (Integer) spZoomLevel.getValue();
                 TileBounds tb = new TileBounds(min, max, zoomlevel);
                 fireTileBoundsChanged(tb);
@@ -461,5 +461,5 @@
             gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 0.0;
-            gc.insets = new Insets(0,0,2,2);
+            gc.insets = new Insets(0, 0, 2, 2);
             pnl.add(new JLabel(tr("Tile address:")), gc);
 
@@ -475,5 +475,5 @@
             ApplyTileAddressAction applyTileAddressAction = new ApplyTileAddressAction();
             JButton btn = new JButton(applyTileAddressAction);
-            btn.setBorder(BorderFactory.createEmptyBorder(1,1,1,1));
+            btn.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
             pnl.add(btn, gc);
             tfTileAddress.addActionListener(applyTileAddressAction);
@@ -487,5 +487,5 @@
             gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 1.0;
-            gc.insets = new Insets(0,0,5,0);
+            gc.insets = new Insets(0, 0, 5, 0);
             add(buildTextPanel(), gc);
 
@@ -501,9 +501,9 @@
 
         public TileAddressInputPanel() {
-            setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+            setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
             build();
         }
 
-        protected void fireTileBoundsChanged(TileBounds tb){
+        protected void fireTileBoundsChanged(TileBounds tb) {
             firePropertyChange(TILE_BOUNDS_PROP, null, tb);
         }
@@ -545,5 +545,5 @@
             try {
                 zoom = Integer.parseInt(m.group(1));
-            } catch(NumberFormatException e){
+            } catch (NumberFormatException e) {
                 return false;
             }
@@ -553,5 +553,5 @@
             try {
                 x = Integer.parseInt(m.group(2));
-            } catch(NumberFormatException e){
+            } catch (NumberFormatException e) {
                 return false;
             }
@@ -560,10 +560,10 @@
             try {
                 y = Integer.parseInt(m.group(3));
-            } catch(NumberFormatException e){
+            } catch (NumberFormatException e) {
                 return false;
             }
             if (y < 0 || y >= Math.pow(2, zoom)) return false;
 
-            tileBounds = new TileBounds(new Point(x,y), new Point(x,y), zoom);
+            tileBounds = new TileBounds(new Point(x, y), new Point(x, y), zoom);
             return true;
         }
@@ -609,5 +609,5 @@
                     tileIndex = Integer.parseInt(value);
                 }
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 return false;
             }
@@ -641,6 +641,6 @@
         private TileBounds() {
             zoomLevel = 0;
-            min = new Point(0,0);
-            max = new Point(0,0);
+            min = new Point(0, 0);
+            max = new Point(0, 0);
         }
 
@@ -672,9 +672,9 @@
             TileLoader loader = tileController.getTileLoader();
             if (loader instanceof OsmTileLoader) {
-                ((OsmTileLoader)loader).headers.put("User-Agent", Version.getInstance().getFullAgentString());
-            }
-        }
-
-        public void setBoundingBox(Bounds bbox){
+                ((OsmTileLoader) loader).headers.put("User-Agent", Version.getInstance().getFullAgentString());
+            }
+        }
+
+        public void setBoundingBox(Bounds bbox) {
             if (bbox == null) {
                 min = null;
Index: trunk/src/org/openstreetmap/josm/gui/conflict/ConflictColors.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/ConflictColors.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/ConflictColors.java	(revision 8510)
@@ -11,11 +11,11 @@
 public enum ConflictColors implements ColorKey {
 
-    BGCOLOR_NO_CONFLICT(marktr("Conflict background: no conflict"), new Color(234,234,234)),
-    BGCOLOR_DECIDED(marktr("Conflict background: decided"), new Color(217,255,217)),
-    BGCOLOR_UNDECIDED(marktr("Conflict background: undecided"), new Color(255,197,197)),
+    BGCOLOR_NO_CONFLICT(marktr("Conflict background: no conflict"), new Color(234, 234, 234)),
+    BGCOLOR_DECIDED(marktr("Conflict background: decided"), new Color(217, 255, 217)),
+    BGCOLOR_UNDECIDED(marktr("Conflict background: undecided"), new Color(255, 197, 197)),
     BGCOLOR_DROP(marktr("Conflict background: drop"), Color.white),
-    BGCOLOR_KEEP(marktr("Conflict background: keep"), new Color(217,255,217)),
-    BGCOLOR_COMBINED(marktr("Conflict background: combined"), new Color(217,255,217)),
-    BGCOLOR_SELECTED(marktr("Conflict background: selected"), new Color(143,170,255)),
+    BGCOLOR_KEEP(marktr("Conflict background: keep"), new Color(217, 255, 217)),
+    BGCOLOR_COMBINED(marktr("Conflict background: combined"), new Color(217, 255, 217)),
+    BGCOLOR_SELECTED(marktr("Conflict background: selected"), new Color(143, 170, 255)),
 
     FGCOLOR_UNDECIDED(marktr("Conflict foreground: undecided"), Color.black),
@@ -23,6 +23,6 @@
     FGCOLOR_KEEP(marktr("Conflict foreground: keep"), Color.black),
 
-    BGCOLOR_EMPTY_ROW(marktr("Conflict background: empty row"), new Color(234,234,234)),
-    BGCOLOR_FROZEN(marktr("Conflict background: frozen"), new Color(234,234,234)),
+    BGCOLOR_EMPTY_ROW(marktr("Conflict background: empty row"), new Color(234, 234, 234)),
+    BGCOLOR_FROZEN(marktr("Conflict background: frozen"), new Color(234, 234, 234)),
     BGCOLOR_PARTICIPATING_IN_COMPARISON(marktr("Conflict background: in comparison"), Color.black),
     FGCOLOR_PARTICIPATING_IN_COMPARISON(marktr("Conflict foreground: in comparison"), Color.white),
@@ -30,18 +30,18 @@
     FGCOLOR(marktr("Conflict foreground"), Color.black),
 
-    BGCOLOR_NOT_IN_OPPOSITE(marktr("Conflict background: not in opposite"), new Color(255,197,197)),
-    BGCOLOR_IN_OPPOSITE(marktr("Conflict background: in opposite"), new Color(255,234,213)),
-    BGCOLOR_SAME_POSITION_IN_OPPOSITE(marktr("Conflict background: same position in opposite"), new Color(217,255,217)),
+    BGCOLOR_NOT_IN_OPPOSITE(marktr("Conflict background: not in opposite"), new Color(255, 197, 197)),
+    BGCOLOR_IN_OPPOSITE(marktr("Conflict background: in opposite"), new Color(255, 234, 213)),
+    BGCOLOR_SAME_POSITION_IN_OPPOSITE(marktr("Conflict background: same position in opposite"), new Color(217, 255, 217)),
 
-    BGCOLOR_TAG_KEEP_ONE (marktr("Conflict background: keep one tag"), new Color(217,255,217)),
+    BGCOLOR_TAG_KEEP_ONE (marktr("Conflict background: keep one tag"), new Color(217, 255, 217)),
     FGCOLOR_TAG_KEEP_ONE (marktr("Conflict foreground: keep one tag"), Color.black),
     BGCOLOR_TAG_KEEP_NONE(marktr("Conflict background: drop tag"), Color.lightGray),
     FGCOLOR_TAG_KEEP_NONE(marktr("Conflict foreground: drop tag"), Color.black),
-    BGCOLOR_TAG_KEEP_ALL (marktr("Conflict background: keep all tags"), new Color(255,234,213)),
+    BGCOLOR_TAG_KEEP_ALL (marktr("Conflict background: keep all tags"), new Color(255, 234, 213)),
     FGCOLOR_TAG_KEEP_ALL (marktr("Conflict foreground: keep all tags"), Color.black),
-    BGCOLOR_TAG_SUM_ALL_NUM(marktr("Conflict background: sum all numeric tags"), new Color(255,234,213)),
+    BGCOLOR_TAG_SUM_ALL_NUM(marktr("Conflict background: sum all numeric tags"), new Color(255, 234, 213)),
     FGCOLOR_TAG_SUM_ALL_NUM(marktr("Conflict foreground: sum all numeric tags"), Color.black),
 
-    BGCOLOR_MEMBER_KEEP  (marktr("Conflict background: keep member"), new Color(217,255,217)),
+    BGCOLOR_MEMBER_KEEP  (marktr("Conflict background: keep member"), new Color(217, 255, 217)),
     FGCOLOR_MEMBER_KEEP  (marktr("Conflict foreground: keep member"), Color.black),
     BGCOLOR_MEMBER_REMOVE(marktr("Conflict background: remove member"), Color.lightGray),
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java	(revision 8510)
@@ -171,5 +171,5 @@
     public void propertyChange(PropertyChangeEvent evt) {
         if (evt.getPropertyName().equals(TagMergeModel.PROP_NUM_UNDECIDED_TAGS)) {
-            int newValue = (Integer)evt.getNewValue();
+            int newValue = (Integer) evt.getNewValue();
             if (newValue == 0) {
                 tabbedPane.setTitleAt(1, tr("Tags"));
@@ -184,5 +184,5 @@
             updateResolvedCompletely();
         } else if (evt.getPropertyName().equals(ListMergeModel.FROZEN_PROP)) {
-            boolean frozen = (Boolean)evt.getNewValue();
+            boolean frozen = (Boolean) evt.getNewValue();
             if (evt.getSource() == nodeListMerger.getModel() && my instanceof Way) {
                 if (frozen) {
@@ -192,5 +192,5 @@
                 } else {
                     tabbedPane.setTitleAt(2, tr("Nodes(with conflicts)"));
-                    tabbedPane.setToolTipTextAt(2,tr("Pending conflicts in the node list of this way"));
+                    tabbedPane.setToolTipTextAt(2, tr("Pending conflicts in the node list of this way"));
                     tabbedPane.setIconAt(2, mergeIncomplete);
                 }
@@ -208,5 +208,5 @@
             updateResolvedCompletely();
         } else if (evt.getPropertyName().equals(PropertiesMergeModel.RESOLVED_COMPLETELY_PROP)) {
-            boolean resolved = (Boolean)evt.getNewValue();
+            boolean resolved = (Boolean) evt.getNewValue();
             if (resolved) {
                 tabbedPane.setTitleAt(0, tr("Properties"));
@@ -242,16 +242,16 @@
 
         if (my instanceof Node) {
-            tabbedPane.setEnabledAt(2,false);
-            tabbedPane.setEnabledAt(3,false);
+            tabbedPane.setEnabledAt(2, false);
+            tabbedPane.setEnabledAt(3, false);
         } else if (my instanceof Way) {
             nodeListMerger.populate(conflict);
             tabbedPane.setEnabledAt(2, true);
             tabbedPane.setEnabledAt(3, false);
-            tabbedPane.setTitleAt(3,tr("Members"));
+            tabbedPane.setTitleAt(3, tr("Members"));
             tabbedPane.setIconAt(3, null);
         } else if (my instanceof Relation) {
             relationMemberMerger.populate(conflict);
             tabbedPane.setEnabledAt(2, false);
-            tabbedPane.setTitleAt(2,tr("Nodes"));
+            tabbedPane.setTitleAt(2, tr("Nodes"));
             tabbedPane.setIconAt(2, null);
             tabbedPane.setEnabledAt(3, true);
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/IConflictResolver.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/IConflictResolver.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/IConflictResolver.java	(revision 8510)
@@ -8,5 +8,5 @@
 
     void deletePrimitive(boolean deleted);
+
     void populate(Conflict<? extends OsmPrimitive> conflict);
-
 }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java	(revision 8510)
@@ -139,5 +139,5 @@
             PrimitiveId id = mergedMap.get(entry);
             if (id == null && entry instanceof OsmPrimitive) {
-                id = mergedMap.get(((OsmPrimitive)entry).getPrimitiveId());
+                id = mergedMap.get(((OsmPrimitive) entry).getPrimitiveId());
             }
             if (id != null) {
@@ -208,5 +208,5 @@
 
     public void addPropertyChangeListener(PropertyChangeListener listener) {
-        synchronized(listeners) {
+        synchronized (listeners) {
             if (listener != null && !listeners.contains(listener)) {
                 listeners.add(listener);
@@ -216,5 +216,5 @@
 
     public void removePropertyChangeListener(PropertyChangeListener listener) {
-        synchronized(listeners) {
+        synchronized (listeners) {
             if (listener != null && listeners.contains(listener)) {
                 listeners.remove(listener);
@@ -224,5 +224,5 @@
 
     protected void fireFrozenChanged(boolean oldValue, boolean newValue) {
-        synchronized(listeners) {
+        synchronized (listeners) {
             PropertyChangeEvent evt = new PropertyChangeEvent(this, FROZEN_PROP, oldValue, newValue);
             for (PropertyChangeListener listener: listeners) {
@@ -355,5 +355,5 @@
     protected void alertCopyFailedForDeletedPrimitives(List<PrimitiveId> deletedIds) {
         List<String> items = new ArrayList<>();
-        for (int i=0; i<Math.min(MAX_DELETED_PRIMITIVE_IN_DIALOG, deletedIds.size()); i++) {
+        for (int i = 0; i < Math.min(MAX_DELETED_PRIMITIVE_IN_DIALOG, deletedIds.size()); i++) {
             items.add(deletedIds.get(i).toString());
         }
@@ -402,5 +402,5 @@
 
         int[] rows = new int[entries.get(source).size()];
-        for (int i=0; i<rows.length; i++) {
+        for (int i = 0; i < rows.length; i++) {
             rows[i] = i;
         }
@@ -525,5 +525,5 @@
             // can't move down
             return;
-        for (int i = rows.length-1; i>=0;i--) {
+        for (int i = rows.length-1; i >= 0; i--) {
             int row = rows[i];
             T n = mergedEntries.get(row);
@@ -551,5 +551,5 @@
         List<T> mergedEntries = getMergedEntries();
 
-        for (int i = rows.length-1; i>=0;i--) {
+        for (int i = rows.length-1; i >= 0; i--) {
             mergedEntries.remove(rows[i]);
         }
@@ -569,5 +569,5 @@
         if (getMyEntriesSize() != getTheirEntriesSize())
             return false;
-        for (int i=0; i < getMyEntriesSize(); i++) {
+        for (int i = 0; i < getMyEntriesSize(); i++) {
             if (!isEqualEntry(getMyEntries().get(i), getTheirEntries().get(i)))
                 return false;
@@ -617,5 +617,5 @@
         @Override
         public void setValueAt(Object value, int row, int col) {
-            ListMergeModel.this.setValueAt(this, value,row,col);
+            ListMergeModel.this.setValueAt(this, value, row, col);
         }
 
@@ -712,5 +712,5 @@
                 return (OsmPrimitive) value;
             } else if (value instanceof RelationMember) {
-                return ((RelationMember)value).getMember();
+                return ((RelationMember) value).getMember();
             } else {
                 Main.error("Unknown object type: "+value);
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java	(revision 8510)
@@ -82,5 +82,7 @@
 
     protected abstract JScrollPane buildMyElementsTable();
+
     protected abstract JScrollPane buildMergedElementsTable();
+
     protected abstract JScrollPane buildTheirElementsTable();
 
@@ -268,5 +270,5 @@
         gc.weightx = 0.0;
         gc.weighty = 0.0;
-        gc.insets = new Insets(10,0,0,0);
+        gc.insets = new Insets(10, 0, 0, 0);
         lblMyVersion = new JLabel(tr("My version"));
         lblMyVersion.setToolTipText(tr("List of elements in my dataset, i.e. the local dataset"));
@@ -295,5 +297,5 @@
         gc.weightx = 0.33;
         gc.weighty = 0.0;
-        gc.insets = new Insets(0,0,0,0);
+        gc.insets = new Insets(0, 0, 0, 0);
         JCheckBox cbLockMyScrolling = new JCheckBox();
         cbLockMyScrolling.setName("checkbox.lockmyscrolling");
@@ -321,5 +323,5 @@
         gc.weightx = 0.33;
         gc.weighty = 1.0;
-        gc.insets = new Insets(0,0,0,0);
+        gc.insets = new Insets(0, 0, 0, 0);
         JScrollPane pane = buildMyElementsTable();
         lblMyVersion.setLabelFor(pane);
@@ -809,5 +811,5 @@
                         public void propertyChange(PropertyChangeEvent evt) {
                             if (evt.getPropertyName().equals(PROP_SELECTED)) {
-                                btn.setSelected((Boolean)evt.getNewValue());
+                                btn.setSelected((Boolean) evt.getNewValue());
                             }
                         }
@@ -828,5 +830,5 @@
                 model.setFrozen(false);
             }
-            boolean isSelected = (Boolean)getValue(PROP_SELECTED);
+            boolean isSelected = (Boolean) getValue(PROP_SELECTED);
             if (isSelected != (e.getStateChange() == ItemEvent.SELECTED)) {
                 putValue(PROP_SELECTED, e.getStateChange() == ItemEvent.SELECTED);
@@ -860,5 +862,5 @@
     public void propertyChange(PropertyChangeEvent evt) {
         if (evt.getPropertyName().equals(ListMergeModel.FROZEN_PROP)) {
-            handlePropertyChangeFrozen((Boolean)evt.getOldValue(), (Boolean)evt.getNewValue());
+            handlePropertyChangeFrozen((Boolean) evt.getOldValue(), (Boolean) evt.getNewValue());
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMerger.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMerger.java	(revision 8510)
@@ -59,7 +59,7 @@
     @Override
     public void populate(Conflict<? extends OsmPrimitive> conflict) {
-        Way myWay = (Way)conflict.getMy();
-        Way theirWay = (Way)conflict.getTheir();
-        ((NodeListMergeModel)model).populate(myWay, theirWay, conflict.getMergedMap());
+        Way myWay = (Way) conflict.getMy();
+        Way theirWay = (Way) conflict.getTheir();
+        ((NodeListMergeModel) model).populate(myWay, theirWay, conflict.getMergedMap());
         myEntriesTable.setLayer(findLayerFor(myWay));
         theirEntriesTable.setLayer(findLayerFor(theirWay));
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java	(revision 8510)
@@ -32,5 +32,5 @@
     public NodeListTableCellRenderer() {
         icon = ImageProvider.get("data", "node");
-        rowNumberBorder = BorderFactory.createEmptyBorder(0,4,0,0);
+        rowNumberBorder = BorderFactory.createEmptyBorder(0, 4, 0, 0);
         setOpaque(true);
     }
@@ -104,5 +104,5 @@
             int row, int column) {
 
-        Node node = (Node)value;
+        Node node = (Node) value;
         reset();
         if (node == null) {
@@ -111,5 +111,5 @@
             switch(column) {
             case 0:
-                renderRowId(getModel(table),row, isSelected);
+                renderRowId(getModel(table), row, isSelected);
                 break;
             case 1:
@@ -126,10 +126,10 @@
     /**
      * replies the model
-     * @param table  the table
+     * @param table the table
      * @return the table model
      */
     @SuppressWarnings("unchecked")
     protected ListMergeModel<Node>.EntriesTableModel getModel(JTable table) {
-        return (ListMergeModel<Node>.EntriesTableModel)table.getModel();
+        return (ListMergeModel<Node>.EntriesTableModel) table.getModel();
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java	(revision 8510)
@@ -128,6 +128,6 @@
         OsmPrimitive their = conflict.getTheir();
         if (my instanceof Node) {
-            myCoords = ((Node)my).getCoor();
-            theirCoords = ((Node)their).getCoor();
+            myCoords = ((Node) my).getCoor();
+            theirCoords = ((Node) their).getCoor();
         } else {
             myCoords = null;
@@ -138,6 +138,6 @@
         theirDeletedState = their.isDeleted();
 
-        myReferrers = my.getDataSet() == null?Collections.<OsmPrimitive>emptyList():my.getReferrers();
-        theirReferrers = their.getDataSet() == null?Collections.<OsmPrimitive>emptyList():their.getReferrers();
+        myReferrers = my.getDataSet() == null ? Collections.<OsmPrimitive>emptyList() : my.getReferrers();
+        theirReferrers = their.getDataSet() == null ? Collections.<OsmPrimitive>emptyList() : their.getReferrers();
 
         coordMergeDecision = UNDECIDED;
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java	(revision 8510)
@@ -78,5 +78,5 @@
         gc.weightx = 0.0;
         gc.weighty = 0.0;
-        gc.insets = new Insets(10,0,10,0);
+        gc.insets = new Insets(10, 0, 10, 0);
         JLabel lblMyVersion = new JLabel(tr("My version"));
         lblMyVersion.setToolTipText(tr("Properties in my dataset, i.e. the local dataset"));
@@ -108,5 +108,5 @@
         gc.weightx = 0.0;
         gc.weighty = 0.0;
-        gc.insets = new Insets(0,5,0,5);
+        gc.insets = new Insets(0, 5, 0, 5);
         add(new JLabel(tr("Coordinates:")), gc);
 
@@ -182,5 +182,5 @@
         gc.weightx = 0.0;
         gc.weighty = 0.0;
-        gc.insets = new Insets(0,5,0,5);
+        gc.insets = new Insets(0, 5, 0, 5);
         add(new JLabel(tr("Deleted State:")), gc);
 
@@ -258,5 +258,5 @@
         gc.weightx = 0.0;
         gc.weighty = 0.0;
-        gc.insets = new Insets(0,5,0,5);
+        gc.insets = new Insets(0, 5, 0, 5);
         add(new JLabel(tr("Referenced by:")), gc);
 
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberListMergeModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberListMergeModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberListMergeModel.java	(revision 8510)
@@ -48,7 +48,7 @@
         if (model == getMergedTableModel() && col == 1) {
             RelationMember memberOld = getMergedEntries().get(row);
-            RelationMember memberNew = new RelationMember((String)value,memberOld.getMember());
+            RelationMember memberNew = new RelationMember((String) value, memberOld.getMember());
             getMergedEntries().remove(row);
-            getMergedEntries().add(row,memberNew);
+            getMergedEntries().add(row, memberNew);
             fireModelDataChanged();
         }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMerger.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberMerger.java	(revision 8510)
@@ -60,7 +60,7 @@
     @Override
     public void populate(Conflict<? extends OsmPrimitive> conflict) {
-        Relation myRel = (Relation)conflict.getMy();
-        Relation theirRel = (Relation)conflict.getTheir();
-        ((RelationMemberListMergeModel)model).populate(myRel, theirRel, conflict.getMergedMap());
+        Relation myRel = (Relation) conflict.getMy();
+        Relation theirRel = (Relation) conflict.getTheir();
+        ((RelationMemberListMergeModel) model).populate(myRel, theirRel, conflict.getMergedMap());
         myEntriesTable.setLayer(findLayerFor(myRel));
         theirEntriesTable.setLayer(findLayerFor(theirRel));
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellEditor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellEditor.java	(revision 8510)
@@ -42,5 +42,5 @@
             return null;
 
-        RelationMember member = (RelationMember)value;
+        RelationMember member = (RelationMember) value;
 
         editor.setText(member.getRole());
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellRenderer.java	(revision 8510)
@@ -31,5 +31,5 @@
         setIcon(null);
         setOpaque(true);
-        rowNumberBorder = BorderFactory.createEmptyBorder(0,4,0,0);
+        rowNumberBorder = BorderFactory.createEmptyBorder(0, 4, 0, 0);
     }
 
@@ -116,5 +116,5 @@
             int row, int column) {
 
-        RelationMember member = (RelationMember)value;
+        RelationMember member = (RelationMember) value;
         reset();
         if (member == null) {
@@ -147,5 +147,5 @@
     @SuppressWarnings("unchecked")
     protected ListMergeModel<Node>.EntriesTableModel getModel(JTable table) {
-        return (ListMergeModel<Node>.EntriesTableModel)table.getModel();
+        return (ListMergeModel<Node>.EntriesTableModel) table.getModel();
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/MergedTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/MergedTableCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/MergedTableCellRenderer.java	(revision 8510)
@@ -24,5 +24,5 @@
     @Override
     protected void renderKey(TagMergeItem item, boolean isSelected) {
-        setBackgroundColor(item,isSelected);
+        setBackgroundColor(item, isSelected);
         if (MergeDecisionType.KEEP_MINE.equals(item.getMergeDecision()) && item.getMyTagValue() == null) {
             setText(tr("<undefined>"));
@@ -41,5 +41,5 @@
     @Override
     protected void renderValue(TagMergeItem item, boolean isSelected) {
-        setBackgroundColor(item,isSelected);
+        setBackgroundColor(item, isSelected);
         if (MergeDecisionType.KEEP_MINE.equals(item.getMergeDecision()) && item.getMyTagValue() == null) {
             setText(tr("<undefined>"));
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/MineTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/MineTableCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/MineTableCellRenderer.java	(revision 8510)
@@ -48,5 +48,5 @@
     @Override
     protected void renderValue(TagMergeItem item, boolean isSelected) {
-        setBackgroundColor(item,isSelected);
+        setBackgroundColor(item, isSelected);
         setTextColor(item);
         if (item.getMyTagValue() == null) {
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModel.java	(revision 8510)
@@ -49,5 +49,5 @@
 
     public void addPropertyChangeListener(PropertyChangeListener listener) {
-        synchronized(listeners) {
+        synchronized (listeners) {
             if (listener == null) return;
             if (listeners.contains(listener)) return;
@@ -57,5 +57,5 @@
 
     public void removePropertyChangeListener(PropertyChangeListener listener) {
-        synchronized(listeners) {
+        synchronized (listeners) {
             if (listener == null) return;
             if (!listeners.contains(listener)) return;
@@ -71,7 +71,7 @@
      */
     protected void fireNumUndecidedTagsChanged(int oldValue, int newValue) {
-        PropertyChangeEvent evt = new PropertyChangeEvent(this,PROP_NUM_UNDECIDED_TAGS,oldValue, newValue);
-        synchronized(listeners) {
-            for(PropertyChangeListener l : listeners) {
+        PropertyChangeEvent evt = new PropertyChangeEvent(this, PROP_NUM_UNDECIDED_TAGS, oldValue, newValue);
+        synchronized (listeners) {
+            for (PropertyChangeListener l : listeners) {
                 l.propertyChange(evt);
             }
@@ -85,6 +85,6 @@
      */
     protected void refreshNumUndecidedTags() {
-        int newValue=0;
-        for(TagMergeItem item: tagMergeItems) {
+        int newValue = 0;
+        for (TagMergeItem item: tagMergeItems) {
             if (MergeDecisionType.UNDECIDED.equals(item.getMergeDecision())) {
                 newValue++;
@@ -110,5 +110,5 @@
         keys.addAll(my.keySet());
         keys.addAll(their.keySet());
-        for(String key : keys) {
+        for (String key : keys) {
             String myValue = my.get(key);
             String theirValue = their.get(key);
@@ -214,5 +214,5 @@
 
     public int getFirstUndecided(int startIndex) {
-        for (int i=startIndex; i<tagMergeItems.size(); i++) {
+        for (int i = startIndex; i < tagMergeItems.size(); i++) {
             if (tagMergeItems.get(i).getMergeDecision() == MergeDecisionType.UNDECIDED)
                 return i;
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeTableCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeTableCellRenderer.java	(revision 8510)
@@ -31,5 +31,5 @@
             return this;
 
-        TagMergeItem item = (TagMergeItem)value;
+        TagMergeItem item = (TagMergeItem) value;
         switch(col) {
         case 0:
@@ -45,4 +45,3 @@
         return this;
     }
-
 }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMerger.java	(revision 8510)
@@ -131,5 +131,5 @@
         gc.weightx = 0.0;
         gc.weighty = 0.0;
-        gc.insets = new Insets(10,0,10,0);
+        gc.insets = new Insets(10, 0, 10, 0);
         JLabel lblMy = new JLabel(tr("My version (local dataset)"));
         add(lblMy, gc);
@@ -154,5 +154,5 @@
         gc.weightx = 0.0;
         gc.weighty = 0.0;
-        gc.insets = new Insets(0,0,0,0);
+        gc.insets = new Insets(0, 0, 0, 0);
         JLabel lblTheir = new JLabel(tr("Their version (server dataset)"));
         add(lblTheir, gc);
@@ -429,6 +429,6 @@
     public void deletePrimitive(boolean deleted) {
         // Use my entries, as it doesn't really matter
-        MergeDecisionType decision = deleted?MergeDecisionType.KEEP_MINE:MergeDecisionType.UNDECIDED;
-        for (int i=0; i<model.getRowCount(); i++) {
+        MergeDecisionType decision = deleted ? MergeDecisionType.KEEP_MINE : MergeDecisionType.UNDECIDED;
+        for (int i = 0; i < model.getRowCount(); i++) {
             model.decide(i, decision);
         }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TheirTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TheirTableCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TheirTableCellRenderer.java	(revision 8510)
@@ -48,5 +48,5 @@
     @Override
     protected void renderValue(TagMergeItem item, boolean isSelected) {
-        setBackgroundColor(item,isSelected);
+        setBackgroundColor(item, isSelected);
         setTextColor(item);
         if (item.getTheirTagValue() == null) {
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 8510)
@@ -280,5 +280,5 @@
             cmds.addAll(buildTagChangeCommand(targetPrimitive, allResolutions));
         }
-        for(String p : OsmPrimitive.getDiscardableKeys()) {
+        for (String p : OsmPrimitive.getDiscardableKeys()) {
             if (targetPrimitive.get(p) != null) {
                 cmds.add(new ChangePropertyCommand(targetPrimitive, p, null));
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellEditor.java	(revision 8510)
@@ -122,5 +122,5 @@
                     @Override
                     public void itemStateChanged(ItemEvent e) {
-                        if(e.getStateChange() == ItemEvent.SELECTED)
+                        if (e.getStateChange() == ItemEvent.SELECTED)
                             fireEditingStopped();
                     }
@@ -175,5 +175,5 @@
     @Override
     public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
-        MultiValueResolutionDecision decision = (MultiValueResolutionDecision)value;
+        MultiValueResolutionDecision decision = (MultiValueResolutionDecision) value;
         initEditor(decision);
         editor.requestFocus();
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRenderer.java	(revision 8510)
@@ -149,5 +149,5 @@
             return this;
 
-        MultiValueResolutionDecision decision = (MultiValueResolutionDecision)value;
+        MultiValueResolutionDecision decision = (MultiValueResolutionDecision) value;
         TagConflictResolverModel tagModel = (TagConflictResolverModel) table.getModel();
         boolean conflict = tagModel.getKeysWithConflicts().contains(tagModel.getKey(row));
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java	(revision 8510)
@@ -307,5 +307,5 @@
         case SUM_ALL_NUMERIC: return new Tag(getKey(), tags.getSummedValues(getKey()));
         case KEEP_ALL: return new Tag(getKey(), tags.getJoinedValues(getKey()));
-        case KEEP_ONE: return new Tag(getKey(),value);
+        case KEEP_ONE: return new Tag(getKey(), value);
         case KEEP_NONE: return new Tag(getKey(), "");
         case UNDECIDED:
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(revision 8510)
@@ -146,6 +146,6 @@
      * @param targetStatistics histogram of paste targets, number of primitives of each type in the paste target
      */
-    protected void initResolver(OsmPrimitiveType type, TagCollection tc, Map<OsmPrimitiveType,Integer> targetStatistics) {
-        resolvers.get(type).getModel().populate(tc,tc.getKeysWithMultipleValues());
+    protected void initResolver(OsmPrimitiveType type, TagCollection tc, Map<OsmPrimitiveType, Integer> targetStatistics) {
+        resolvers.get(type).getModel().populate(tc, tc.getKeysWithMultipleValues());
         resolvers.get(type).getModel().prepareDefaultTagDecisions();
         if (!tc.isEmpty() && targetStatistics.get(type) != null && targetStatistics.get(type) > 0) {
@@ -162,13 +162,13 @@
      */
     public void populate(TagCollection tagsForAllPrimitives, Map<OsmPrimitiveType, Integer> sourceStatistics,
-            Map<OsmPrimitiveType,Integer> targetStatistics) {
+            Map<OsmPrimitiveType, Integer> targetStatistics) {
         mode = Mode.RESOLVING_ONE_TAGCOLLECTION_ONLY;
-        tagsForAllPrimitives = tagsForAllPrimitives == null? new TagCollection() : tagsForAllPrimitives;
-        sourceStatistics = sourceStatistics == null ? new HashMap<OsmPrimitiveType, Integer>() :sourceStatistics;
+        tagsForAllPrimitives = tagsForAllPrimitives == null ? new TagCollection() : tagsForAllPrimitives;
+        sourceStatistics = sourceStatistics == null ? new HashMap<OsmPrimitiveType, Integer>() : sourceStatistics;
         targetStatistics = targetStatistics == null ? new HashMap<OsmPrimitiveType, Integer>() : targetStatistics;
 
         // init the resolver
         //
-        allPrimitivesResolver.getModel().populate(tagsForAllPrimitives,tagsForAllPrimitives.getKeysWithMultipleValues());
+        allPrimitivesResolver.getModel().populate(tagsForAllPrimitives, tagsForAllPrimitives.getKeysWithMultipleValues());
         allPrimitivesResolver.getModel().prepareDefaultTagDecisions();
 
@@ -192,5 +192,5 @@
 
     protected TagConflictResolver getResolver(int idx) {
-        return (TagConflictResolver)tpResolvers.getComponentAt(idx);
+        return (TagConflictResolver) tpResolvers.getComponentAt(idx);
     }
 
@@ -205,16 +205,16 @@
      */
     public void populate(TagCollection tagsForNodes, TagCollection tagsForWays, TagCollection tagsForRelations,
-            Map<OsmPrimitiveType,Integer> sourceStatistics, Map<OsmPrimitiveType, Integer> targetStatistics) {
+            Map<OsmPrimitiveType, Integer> sourceStatistics, Map<OsmPrimitiveType, Integer> targetStatistics) {
         tagsForNodes = (tagsForNodes == null) ? new TagCollection() : tagsForNodes;
         tagsForWays = (tagsForWays == null) ? new TagCollection() : tagsForWays;
         tagsForRelations = (tagsForRelations == null) ? new TagCollection() : tagsForRelations;
         if (tagsForNodes.isEmpty() && tagsForWays.isEmpty() && tagsForRelations.isEmpty()) {
-            populate(null,null,null);
+            populate(null, null, null);
             return;
         }
         tpResolvers.removeAll();
-        initResolver(OsmPrimitiveType.NODE,tagsForNodes, targetStatistics);
-        initResolver(OsmPrimitiveType.WAY,tagsForWays, targetStatistics);
-        initResolver(OsmPrimitiveType.RELATION,tagsForRelations, targetStatistics);
+        initResolver(OsmPrimitiveType.NODE, tagsForNodes, targetStatistics);
+        initResolver(OsmPrimitiveType.WAY, tagsForWays, targetStatistics);
+        initResolver(OsmPrimitiveType.RELATION, tagsForRelations, targetStatistics);
 
         pnlTagResolver.setLayout(new BorderLayout());
@@ -255,5 +255,5 @@
         }
 
-        for (int i =0; i < getNumResolverTabs(); i++) {
+        for (int i = 0; i < getNumResolverTabs(); i++) {
             if (!getResolver(i).getModel().isResolvedCompletely()) {
                 tpResolvers.setSelectedIndex(i);
@@ -328,5 +328,5 @@
             new WindowGeometry(
                     getClass().getName() + ".geometry",
-                    WindowGeometry.centerOnScreen(new Dimension(400,300))
+                    WindowGeometry.centerOnScreen(new Dimension(400, 300))
             ).applySafe(this);
         } else if (isShowing()) { // Avoid IllegalComponentStateException like in #8775
@@ -348,10 +348,10 @@
     public void propertyChange(PropertyChangeEvent evt) {
         if (evt.getPropertyName().equals(TagConflictResolverModel.NUM_CONFLICTS_PROP)) {
-            TagConflictResolverModel model = (TagConflictResolverModel)evt.getSource();
-            for (int i=0; i < tpResolvers.getTabCount();i++) {
-                TagConflictResolver resolver = (TagConflictResolver)tpResolvers.getComponentAt(i);
+            TagConflictResolverModel model = (TagConflictResolverModel) evt.getSource();
+            for (int i = 0; i < tpResolvers.getTabCount(); i++) {
+                TagConflictResolver resolver = (TagConflictResolver) tpResolvers.getComponentAt(i);
                 if (model == resolver.getModel()) {
                     tpResolvers.setIconAt(i,
-                            (Boolean)evt.getNewValue() ? iconResolved : iconUnresolved
+                            (Boolean) evt.getNewValue() ? iconResolved : iconUnresolved
 
                     );
@@ -445,4 +445,5 @@
             setFont(UIManager.getFont("Table.font"));
         }
+
         protected void renderNumTags(StatisticsInfo info) {
             if (info == null) return;
@@ -467,5 +468,5 @@
                 String msg = "";
                 switch(type) {
-                case NODE: msg = trn("{0} node", "{0} nodes", numPrimitives,numPrimitives); break;
+                case NODE: msg = trn("{0} node", "{0} nodes", numPrimitives, numPrimitives); break;
                 case WAY: msg = trn("{0} way", "{0} ways", numPrimitives, numPrimitives); break;
                 case RELATION: msg = trn("{0} relation", "{0} relations", numPrimitives, numPrimitives); break;
@@ -496,5 +497,5 @@
             if (row == 0) {
                 setFont(getFont().deriveFont(Font.BOLD));
-                setText((String)value);
+                setText((String) value);
             } else {
                 StatisticsInfo info = (StatisticsInfo) value;
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java	(revision 8510)
@@ -27,5 +27,5 @@
         this.pos  = pos;
         this.originalPrimitive = member.getMember();
-        this.role = member.hasRole()? member.getRole() : "";
+        this.role = member.hasRole() ? member.getRole() : "";
         this.decision = UNDECIDED;
     }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionEditor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionEditor.java	(revision 8510)
@@ -30,5 +30,5 @@
     public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
         setSelectedItem(value);
-        this.originalValue = (RelationMemberConflictDecisionType)value;
+        this.originalValue = (RelationMemberConflictDecisionType) value;
         return this;
     }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionRenderer.java	(revision 8510)
@@ -55,5 +55,5 @@
             setForeground(UIManager.getColor("Table.selectionForeground"));
         }
-        RelationMemberConflictDecisionType decision = (RelationMemberConflictDecisionType)value;
+        RelationMemberConflictDecisionType decision = (RelationMemberConflictDecisionType) value;
         cbDecisionTypes.setSelectedItem(decision);
         return cbDecisionTypes;
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolver.java	(revision 8510)
@@ -57,5 +57,5 @@
         gc.weighty = 0.0;
         gc.weightx = 1.0;
-        gc.insets = new Insets(5,5,5,5);
+        gc.insets = new Insets(5, 5, 5, 5);
         add(pnl, gc);
 
@@ -63,5 +63,5 @@
         gc.weighty = 1.0;
         gc.fill = GridBagConstraints.BOTH;
-        gc.insets = new Insets(0,0,0,0);
+        gc.insets = new Insets(0, 0, 0, 0);
         add(new JScrollPane(tblResolver = new RelationMemberConflictResolverTable(model)), gc);
         pnl = new JPanel();
@@ -72,5 +72,5 @@
         gc.weighty = 0.0;
         gc.fill = GridBagConstraints.HORIZONTAL;
-        add(pnl,gc);
+        add(pnl, gc);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java	(revision 8510)
@@ -117,8 +117,8 @@
         switch(column) {
         case 2: /* role */
-            d.setRole((String)value);
+            d.setRole((String) value);
             break;
         case 4: /* decision */
-            d.decide((RelationMemberConflictDecisionType)value);
+            d.decide((RelationMemberConflictDecisionType) value);
             refresh();
             break;
@@ -135,5 +135,5 @@
      */
     protected void populate(Relation relation, OsmPrimitive primitive) {
-        for (int i =0; i<relation.getMembersCount();i++) {
+        for (int i = 0; i < relation.getMembersCount(); i++) {
             if (relation.getMember(i).refersTo(primitive)) {
                 decisions.add(new RelationMemberConflictDecision(relation, i));
@@ -155,5 +155,5 @@
         for (Relation r : relations) {
             for (OsmPrimitive p: memberPrimitives) {
-                populate(r,p);
+                populate(r, p);
             }
         }
@@ -226,5 +226,5 @@
 
     protected RelationMemberConflictDecision getDecision(Relation relation, int pos) {
-        for(RelationMemberConflictDecision decision: decisions) {
+        for (RelationMemberConflictDecision decision: decisions) {
             if (decision.matches(relation, pos)) return decision;
         }
@@ -236,5 +236,5 @@
         modifiedRelation.setMembers(null);
         boolean isChanged = false;
-        for (int i=0; i < relation.getMembersCount(); i++) {
+        for (int i = 0; i < relation.getMembersCount(); i++) {
             final RelationMember member = relation.getMember(i);
             RelationMemberConflictDecision decision = getDecision(relation, i);
@@ -244,5 +244,5 @@
                 switch(decision.getDecision()) {
                 case KEEP:
-                    final RelationMember newMember = new RelationMember(decision.getRole(),newPrimitive);
+                    final RelationMember newMember = new RelationMember(decision.getRole(), newPrimitive);
                     modifiedRelation.addMember(newMember);
                     isChanged |= !member.equals(newMember);
@@ -281,5 +281,5 @@
 
     protected boolean isChanged(Relation relation, OsmPrimitive newPrimitive) {
-        for (int i=0; i < relation.getMembersCount(); i++) {
+        for (int i = 0; i < relation.getMembersCount(); i++) {
             RelationMemberConflictDecision decision = getDecision(relation, i);
             if (decision == null) {
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverTable.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverTable.java	(revision 8510)
@@ -40,5 +40,5 @@
         getActionMap().put("selectPreviousColumnCell", selectPreviousColumnCellAction);
 
-        setRowHeight((int)new JosmComboBox<String>().getPreferredSize().getHeight());
+        setRowHeight((int) new JosmComboBox<String>().getPreferredSize().getHeight());
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtil.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtil.java	(revision 8510)
@@ -35,5 +35,5 @@
         // remove irrelevant tags
         //
-        for(String key : OsmPrimitive.getDiscardableKeys()) {
+        for (String key : OsmPrimitive.getDiscardableKeys()) {
             tc.removeByKey(key);
         }
@@ -86,5 +86,5 @@
             // in the conflict dialog if necessary
             //
-            tc.add(new Tag(key,""));
+            tc.add(new Tag(key, ""));
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolver.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolver.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolver.java	(revision 8510)
@@ -34,5 +34,5 @@
     protected JPanel buildInfoPanel() {
         JPanel pnl = new JPanel();
-        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         pnl.setLayout(new GridBagLayout());
         GridBagConstraints gc = new GridBagConstraints();
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java	(revision 8510)
@@ -87,8 +87,8 @@
     public void rebuild() {
         if (tags == null) return;
-        for(String key: tags.getKeys()) {
+        for (String key: tags.getKeys()) {
             MultiValueResolutionDecision decision = new MultiValueResolutionDecision(tags.getTagsFor(key));
             if (decisions.get(key) == null) {
-                decisions.put(key,decision);
+                decisions.put(key, decision);
             }
         }
@@ -168,7 +168,7 @@
         MultiValueResolutionDecision decision = getDecision(row);
         if (value instanceof String) {
-            decision.keepOne((String)value);
+            decision.keepOne((String) value);
         } else if (value instanceof MultiValueDecisionType) {
-            MultiValueDecisionType type = (MultiValueDecisionType)value;
+            MultiValueDecisionType type = (MultiValueDecisionType) value;
             switch(type) {
             case KEEP_NONE:
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverTable.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverTable.java	(revision 8510)
@@ -40,7 +40,7 @@
         getActionMap().put("selectPreviousColumnCell", selectPreviousColumnCellAction);
 
-        ((MultiValueCellEditor)getColumnModel().getColumn(2).getCellEditor()).addNavigationListener(this);
+        ((MultiValueCellEditor) getColumnModel().getColumn(2).getCellEditor()).addNavigationListener(this);
 
-        setRowHeight((int)new JosmComboBox<String>().getPreferredSize().getHeight());
+        setRowHeight((int) new JosmComboBox<String>().getPreferredSize().getHeight());
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java	(revision 8510)
@@ -322,5 +322,5 @@
 
             DataSet ds = Main.main.getEditLayer().data;
-            selectObjectsByChangesetIds(ds,sel);
+            selectObjectsByChangesetIds(ds, sel);
         }
 
@@ -531,7 +531,7 @@
                         try {
                             future.get();
-                        } catch(InterruptedException e) {
+                        } catch (InterruptedException e) {
                             Main.warn("InterruptedException in "+getClass().getSimpleName()+" while downloading changeset header");
-                        } catch(ExecutionException e) {
+                        } catch (ExecutionException e) {
                             Main.error(e);
                             BugReportExceptionHandler.handleException(e.getCause());
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java	(revision 8510)
@@ -126,5 +126,5 @@
         wireUpdateEnabledStateUpdater(redoAction, redoTree);
 
-        scrollPane = (JScrollPane)createLayout(treesPanel, true, Arrays.asList(new SideButton[] {
+        scrollPane = (JScrollPane) createLayout(treesPanel, true, Arrays.asList(new SideButton[] {
             new SideButton(selectAction),
             new SideButton(undoAction),
@@ -141,7 +141,7 @@
                 boolean hasFocus) {
             super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
-            DefaultMutableTreeNode v = (DefaultMutableTreeNode)value;
+            DefaultMutableTreeNode v = (DefaultMutableTreeNode) value;
             if (v.getUserObject() instanceof JLabel) {
-                JLabel l = (JLabel)v.getUserObject();
+                JLabel l = (JLabel) v.getUserObject();
                 setIcon(l.getIcon());
                 setText(l.getText());
@@ -271,5 +271,5 @@
         List<Command> undoCommands = Main.main.undoRedo.commands;
         DefaultMutableTreeNode undoRoot = new DefaultMutableTreeNode();
-        for (int i=0; i<undoCommands.size(); ++i) {
+        for (int i = 0; i < undoCommands.size(); ++i) {
             undoRoot.add(getNodeForCommand(undoCommands.get(i), i));
         }
@@ -278,5 +278,5 @@
         List<Command> redoCommands = Main.main.undoRedo.redoCommands;
         DefaultMutableTreeNode redoRoot = new DefaultMutableTreeNode();
-        for (int i=0; i<redoCommands.size(); ++i) {
+        for (int i = 0; i < redoCommands.size(); ++i) {
             redoRoot.add(getNodeForCommand(redoCommands.get(i), i));
         }
@@ -326,5 +326,5 @@
         if (c.getChildren() != null) {
             List<PseudoCommand> children = new ArrayList<>(c.getChildren());
-            for (int i=0; i<children.size(); ++i) {
+            for (int i = 0; i < children.size(); ++i) {
                 node.add(getNodeForCommand(children.get(i), i));
             }
@@ -343,5 +343,5 @@
         return new FilteredCollection<>(
                 c.getParticipatingPrimitives(),
-                new Predicate<OsmPrimitive>(){
+                new Predicate<OsmPrimitive>() {
                     @Override
                     public boolean evaluate(OsmPrimitive o) {
@@ -369,7 +369,7 @@
          */
         public SelectAction() {
-            putValue(NAME,tr("Select"));
+            putValue(NAME, tr("Select"));
             putValue(SHORT_DESCRIPTION, tr("Selects the objects that take part in this command (unless currently deleted)"));
-            putValue(SMALL_ICON, ImageProvider.get("dialogs","select"));
+            putValue(SMALL_ICON, ImageProvider.get("dialogs", "select"));
         }
 
@@ -403,7 +403,7 @@
          */
         public SelectAndZoomAction() {
-            putValue(NAME,tr("Select and zoom"));
+            putValue(NAME, tr("Select and zoom"));
             putValue(SHORT_DESCRIPTION, tr("Selects the objects that take part in this command (unless currently deleted), then and zooms to it"));
-            putValue(SMALL_ICON, ImageProvider.get("dialogs/autoscale","selection"));
+            putValue(SMALL_ICON, ImageProvider.get("dialogs/autoscale", "selection"));
         }
 
@@ -438,5 +438,5 @@
             case UNDO:
                 tree = undoTree;
-                putValue(NAME,tr("Undo"));
+                putValue(NAME, tr("Undo"));
                 putValue(SHORT_DESCRIPTION, tr("Undo the selected and all later commands"));
                 putValue(SMALL_ICON, ImageProvider.get("undo"));
@@ -444,5 +444,5 @@
             case REDO:
                 tree = redoTree;
-                putValue(NAME,tr("Redo"));
+                putValue(NAME, tr("Redo"));
                 putValue(SHORT_DESCRIPTION, tr("Redo the selected and all earlier commands"));
                 putValue(SMALL_ICON, ImageProvider.get("redo"));
@@ -479,5 +479,5 @@
         public void updateEnabledState() {
             // do not allow execution if nothing is selected or a sub command was selected
-            setEnabled(!tree.isSelectionEmpty() && tree.getSelectionPath().getPathCount()==2);
+            setEnabled(!tree.isSelectionEmpty() && tree.getSelectionPath().getPathCount() == 2);
         }
     }
@@ -498,5 +498,5 @@
 
     private class CommandStackPopup extends JPopupMenu {
-        public CommandStackPopup(){
+        public CommandStackPopup() {
             add(selectAction);
             add(selectAndZoomAction);
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictDialog.java	(revision 8510)
@@ -100,5 +100,5 @@
         lstConflicts.setCellRenderer(new OsmPrimitivRenderer());
         lstConflicts.addMouseListener(new MouseEventHandler());
-        addListSelectionListener(new ListSelectionListener(){
+        addListSelectionListener(new ListSelectionListener() {
             @Override
             public void valueChanged(ListSelectionEvent e) {
@@ -242,4 +242,5 @@
                 g.drawRect(p.x-1, p.y-1, 2, 2);
             }
+
             public void visit(Node n1, Node n2) {
                 Point p1 = nc.getPoint(n1);
@@ -247,4 +248,5 @@
                 g.drawLine(p1.x, p1.y, p2.x, p2.y);
             }
+
             @Override
             public void visit(Way w) {
@@ -259,4 +261,5 @@
                 }
             }
+
             @Override
             public void visit(Relation e) {
@@ -346,7 +349,11 @@
 
     class MouseEventHandler extends PopupMenuLauncher {
+        /**
+         * Constructs a new {@code MouseEventHandler}.
+         */
         public MouseEventHandler() {
             super(popupMenu);
         }
+
         @Override public void mouseClicked(MouseEvent e) {
             if (isDoubleClick(e)) {
@@ -362,6 +369,9 @@
     class ConflictListModel implements ListModel<OsmPrimitive> {
 
-        private CopyOnWriteArrayList<ListDataListener> listeners;
-
+        private final CopyOnWriteArrayList<ListDataListener> listeners;
+
+        /**
+         * Constructs a new {@code ConflictListModel}.
+         */
         public ConflictListModel() {
             listeners = new CopyOnWriteArrayList<>();
@@ -407,5 +417,5 @@
         public int indexOf(OsmPrimitive my) {
             if (conflicts == null) return -1;
-            for (int i=0; i < conflicts.size();i++) {
+            for (int i = 0; i < conflicts.size(); i++) {
                 if (conflicts.get(i).isMatchingMy(my))
                     return i;
@@ -435,5 +445,5 @@
         @Override
         public void valueChanged(ListSelectionEvent e) {
-            ListSelectionModel model = (ListSelectionModel)e.getSource();
+            ListSelectionModel model = (ListSelectionModel) e.getSource();
             boolean enabled = model.getMinSelectionIndex() >= 0
             && model.getMaxSelectionIndex() >= model.getMinSelectionIndex();
@@ -461,5 +471,5 @@
         @Override
         public void valueChanged(ListSelectionEvent e) {
-            ListSelectionModel model = (ListSelectionModel)e.getSource();
+            ListSelectionModel model = (ListSelectionModel) e.getSource();
             boolean enabled = model.getMinSelectionIndex() >= 0
             && model.getMaxSelectionIndex() >= model.getMinSelectionIndex();
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java	(revision 8510)
@@ -53,5 +53,5 @@
     public void setVisible(boolean isVisible) {
         String geom = getClass().getName() + ".geometry";
-        if (isVisible){
+        if (isVisible) {
             toFront();
             new WindowGeometry(geom, WindowGeometry.centerInWindow(Main.parent,
@@ -267,5 +267,5 @@
     public void propertyChange(PropertyChangeEvent evt) {
         if (evt.getPropertyName().equals(ConflictResolver.MY_PRIMITIVE_PROP)) {
-            updateTitle((OsmPrimitive)evt.getNewValue());
+            updateTitle((OsmPrimitive) evt.getNewValue());
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/DeleteFromRelationConfirmationDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/DeleteFromRelationConfirmationDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/DeleteFromRelationConfirmationDialog.java	(revision 8510)
@@ -117,5 +117,5 @@
         } else {
             msg = tr("<html>Please confirm to remove <strong>{0} objects</strong> from <strong>{1} relations</strong>.</html>",
-                    numObjectsToDelete,numParentRelations);
+                    numObjectsToDelete, numParentRelations);
         }
         htmlPanel.getEditorPane().setText(msg);
@@ -169,5 +169,5 @@
                     WindowGeometry.centerInWindow(
                             Main.parent,
-                            new Dimension(400,200)
+                            new Dimension(400, 200)
                     )
             ).applySafe(this);
@@ -265,5 +265,5 @@
             case 3: return ref.getRole();
             default:
-                assert false: "Illegal column index";
+                assert false : "Illegal column index";
             }
             return null;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java	(revision 8510)
@@ -29,4 +29,5 @@
 
     private final JSplitPane parent;
+
     public DialogsPanel(JSplitPane parent) {
         this.parent = parent;
@@ -126,5 +127,5 @@
         JPanel p = panels.get(N-1); // current Panel (start with last one)
         int k = -1;                 // indicates that the current Panel index is N-1, but no default-view-Dialog has been added to this Panel yet.
-        for (int i=N-1; i >= 0; --i) {
+        for (int i = N-1; i >= 0; --i) {
             final ToggleDialog dlg = allDialogs.get(i);
             if (dlg.isDialogInDefaultView()) {
@@ -152,5 +153,5 @@
          */
         if (action == Action.ELEMENT_SHRINKS) {
-            for (int i=0; i<N; ++i) {
+            for (int i = 0; i < N; ++i) {
                 final ToggleDialog dlg = allDialogs.get(i);
                 if (dlg.isDialogInDefaultView()) {
@@ -209,5 +210,5 @@
             int D_m = 0;        // additional space needed by the small dialogs
             int D_p = 0;        // available space from the large dialogs
-            for (int i=0; i<N; ++i) {
+            for (int i = 0; i < N; ++i) {
                 final ToggleDialog dlg = allDialogs.get(i);
                 if (dlg.isDialogInDefaultView() && dlg != triggeredBy) {
@@ -224,5 +225,5 @@
             }
             /** adjust, without changing the sum */
-            for (int i=0; i<N; ++i) {
+            for (int i = 0; i < N; ++i) {
                 final ToggleDialog dlg = allDialogs.get(i);
                 if (dlg.isDialogInDefaultView() && dlg != triggeredBy) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java	(revision 8510)
@@ -98,5 +98,4 @@
             KeyEvent.VK_H, Shortcut.ALT_CTRL);
 
-
     protected final String[] columnToolTips = {
             Main.platform.makeTooltip(tr("Enable filter"), ENABLE_FILTER_SHORTCUT),
@@ -108,5 +107,5 @@
 
     protected void build() {
-        userTable = new JTable(filterModel){
+        userTable = new JTable(filterModel) {
             @Override
             protected JTableHeader createDefaultTableHeader() {
@@ -142,10 +141,11 @@
                 putValue(NAME, tr("Add"));
                 putValue(SHORT_DESCRIPTION,  tr("Add filter."));
-                putValue(SMALL_ICON, ImageProvider.get("dialogs","add"));
-            }
-            @Override
-            public void actionPerformed(ActionEvent e) {
-                Filter filter = (Filter)SearchAction.showSearchDialog(new Filter());
-                if(filter != null){
+                putValue(SMALL_ICON, ImageProvider.get("dialogs", "add"));
+            }
+
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                Filter filter = (Filter) SearchAction.showSearchDialog(new Filter());
+                if (filter != null) {
                     filterModel.addFilter(filter);
                 }
@@ -157,11 +157,12 @@
                 putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit"));
             }
+
             @Override
             public void actionPerformed(ActionEvent e) {
                 int index = userTable.getSelectionModel().getMinSelectionIndex();
-                if(index < 0) return;
+                if (index < 0) return;
                 Filter f = filterModel.getFilter(index);
-                Filter filter = (Filter)SearchAction.showSearchDialog(f);
-                if(filter != null){
+                Filter filter = (Filter) SearchAction.showSearchDialog(f);
+                if (filter != null) {
                     filterModel.setFilter(index, filter);
                 }
@@ -174,8 +175,9 @@
                 putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));
             }
+
             @Override
             public void actionPerformed(ActionEvent e) {
                 int index = userTable.getSelectionModel().getMinSelectionIndex();
-                if(index < 0) return;
+                if (index < 0) return;
                 filterModel.removeFilter(index);
             }
@@ -187,8 +189,9 @@
                 putValue(SMALL_ICON, ImageProvider.get("dialogs", "up"));
             }
+
             @Override
             public void actionPerformed(ActionEvent e) {
                 int index = userTable.getSelectionModel().getMinSelectionIndex();
-                if(index < 0) return;
+                if (index < 0) return;
                 filterModel.moveUpFilter(index);
                 userTable.getSelectionModel().setSelectionInterval(index-1, index-1);
@@ -202,8 +205,9 @@
                 putValue(SMALL_ICON, ImageProvider.get("dialogs", "down"));
             }
+
             @Override
             public void actionPerformed(ActionEvent e) {
                 int index = userTable.getSelectionModel().getMinSelectionIndex();
-                if(index < 0) return;
+                if (index < 0) return;
                 filterModel.moveDownFilter(index);
                 userTable.getSelectionModel().setSelectionInterval(index+1, index+1);
@@ -216,5 +220,5 @@
             public void actionPerformed(ActionEvent e) {
                 int index = userTable.getSelectedRow();
-                if (index<0) return;
+                if (index < 0) return;
                 Filter filter = filterModel.getFilter(index);
                 filterModel.setValueAt(!filter.enable, index, FilterTableModel.COL_ENABLED);
@@ -227,5 +231,5 @@
             public void actionPerformed(ActionEvent e) {
                 int index = userTable.getSelectedRow();
-                if (index<0) return;
+                if (index < 0) return;
                 Filter filter = filterModel.getFilter(index);
                 filterModel.setValueAt(!filter.hiding, index, FilterTableModel.COL_HIDING);
@@ -247,6 +251,6 @@
     static class StringRenderer extends DefaultTableCellRenderer {
         @Override
-        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,int row,int column) {
-            FilterTableModel model = (FilterTableModel)table.getModel();
+        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
+            FilterTableModel model = (FilterTableModel) table.getModel();
             Component cell = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
             cell.setEnabled(model.isCellEnabled(row, column));
@@ -257,7 +261,7 @@
     static class BooleanRenderer extends JCheckBox implements TableCellRenderer {
         @Override
-        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,int row,int column) {
-            FilterTableModel model = (FilterTableModel)table.getModel();
-            setSelected(value != null && (Boolean)value);
+        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
+            FilterTableModel model = (FilterTableModel) table.getModel();
+            setSelected(value != null && (Boolean) value);
             setEnabled(model.isCellEnabled(row, column));
             setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
@@ -300,9 +304,9 @@
 
             if (p instanceof Way) {
-                for (OsmPrimitive n: ((Way)p).getNodes()) {
+                for (OsmPrimitive n: ((Way) p).getNodes()) {
                     stack.push(n);
                 }
             } else if (p instanceof Relation) {
-                for (RelationMember rm: ((Relation)p).getMembers()) {
+                for (RelationMember rm: ((Relation) p).getMembers()) {
                     stack.push(rm.getMember());
                 }
@@ -362,5 +366,5 @@
      * @return the filtermodel
      */
-    public FilterTableModel getFilterModel(){
+    public FilterTableModel getFilterModel() {
         return filterModel;
     }
@@ -379,5 +383,5 @@
             List<MultikeyInfo> result = new ArrayList<>();
 
-            for (int i=0; i<filterModel.getRowCount(); i++) {
+            for (int i = 0; i < filterModel.getRowCount(); i++) {
                 Filter filter = filterModel.getFilter(i);
                 MultikeyInfo info = new MultikeyInfo(i, filter.text);
@@ -399,5 +403,4 @@
                 return null;
         }
-
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java	(revision 8510)
@@ -127,5 +127,5 @@
         ds.beginUpdate();
         try {
-            for (int i=0; i<2; i++) {
+            for (int i = 0; i < 2; i++) {
                 for (OsmPrimitive primitive: primitives) {
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/LatLonDialog.java	(revision 8510)
@@ -39,5 +39,5 @@
 
 public class LatLonDialog extends ExtendedDialog {
-    private static final Color BG_COLOR_ERROR = new Color(255,224,224);
+    private static final Color BG_COLOR_ERROR = new Color(255, 224, 224);
 
     public JTabbedPane tabs;
@@ -72,11 +72,11 @@
     protected JPanel buildLatLon() {
         JPanel pnl = new JPanel(new GridBagLayout());
-        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
-
-        pnl.add(new JLabel(tr("Coordinates:")), GBC.std().insets(0,10,5,0));
+        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+
+        pnl.add(new JLabel(tr("Coordinates:")), GBC.std().insets(0, 10, 5, 0));
         tfLatLon = new JosmTextField(24);
-        pnl.add(tfLatLon, GBC.eol().insets(0,10,0,0).fill(GBC.HORIZONTAL).weight(1.0, 0.0));
-
-        pnl.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0,5,0,5));
+        pnl.add(tfLatLon, GBC.eol().insets(0, 10, 0, 0).fill(GBC.HORIZONTAL).weight(1.0, 0.0));
+
+        pnl.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0, 5, 0, 5));
 
         pnl.add(new HtmlPanel(
@@ -123,12 +123,12 @@
     private JPanel buildEastNorth() {
         JPanel pnl = new JPanel(new GridBagLayout());
-        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
-
-        pnl.add(new JLabel(tr("Projected coordinates:")), GBC.std().insets(0,10,5,0));
+        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+
+        pnl.add(new JLabel(tr("Projected coordinates:")), GBC.std().insets(0, 10, 5, 0));
         tfEastNorth = new JosmTextField(24);
 
-        pnl.add(tfEastNorth, GBC.eol().insets(0,10,0,0).fill(GBC.HORIZONTAL).weight(1.0, 0.0));
-
-        pnl.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0,5,0,5));
+        pnl.add(tfEastNorth, GBC.eol().insets(0, 10, 0, 0).fill(GBC.HORIZONTAL).weight(1.0, 0.0));
+
+        pnl.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0, 5, 0, 5));
 
         pnl.add(new HtmlPanel(
@@ -179,5 +179,5 @@
     public void setCoordinates(LatLon ll) {
         if (ll == null) {
-            ll = new LatLon(0,0);
+            ll = new LatLon(0, 0);
         }
         this.latLonCoordinates = ll;
@@ -227,8 +227,8 @@
         //
         NumberFormat f = NumberFormat.getNumberInstance();
-        Number n=null;
+        Number n = null;
         ParsePosition pp = new ParsePosition(0);
-        n = f.parse(input,pp);
-        if (pp.getErrorIndex() >= 0 || pp.getIndex()<input.length()) {
+        n = f.parse(input, pp);
+        if (pp.getErrorIndex() >= 0 || pp.getIndex() < input.length()) {
             // fall back - try to parse with the english locale
             //
@@ -236,8 +236,8 @@
             f = NumberFormat.getNumberInstance(Locale.ENGLISH);
             n = f.parse(input, pp);
-            if (pp.getErrorIndex() >= 0 || pp.getIndex()<input.length())
+            if (pp.getErrorIndex() >= 0 || pp.getIndex() < input.length())
                 return null;
         }
-        return n== null ? null : n.doubleValue();
+        return n == null ? null : n.doubleValue();
     }
 
@@ -257,5 +257,5 @@
             setOkEnabled(false);
         } else {
-            clearErrorFeedback(tfLatLon,tr("Please enter a GPS coordinates"));
+            clearErrorFeedback(tfLatLon, tr("Please enter a GPS coordinates"));
             latLonCoordinates = latLon;
             setOkEnabled(true);
@@ -275,5 +275,5 @@
             setOkEnabled(false);
         } else {
-            clearErrorFeedback(tfEastNorth,tr("Please enter a Easting and Northing"));
+            clearErrorFeedback(tfEastNorth, tr("Please enter a Easting and Northing"));
             eastNorthCoordinates = en;
             setOkEnabled(true);
@@ -334,8 +334,9 @@
             Component c = e.getComponent();
             if (c instanceof JosmTextField) {
-                JosmTextField tf = (JosmTextField)c;
+                JosmTextField tf = (JosmTextField) c;
                 tf.selectAll();
             }
         }
+
         @Override
         public void focusLost(FocusEvent e) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 8510)
@@ -121,7 +121,9 @@
     private final class ToggleLayerIndexVisibility extends AbstractAction {
         private int layerIndex = -1;
+
         public ToggleLayerIndexVisibility(int layerIndex) {
             this.layerIndex = layerIndex;
         }
+
         @Override
         public void actionPerformed(ActionEvent e) {
@@ -145,5 +147,5 @@
                 KeyEvent.VK_6, KeyEvent.VK_7, KeyEvent.VK_8, KeyEvent.VK_9, KeyEvent.VK_0};
 
-        for(int i=0; i < 10; i++) {
+        for (int i = 0; i < 10; i++) {
             visibilityToggleShortcuts[i] = Shortcut.registerShortcut("subwindow:layers:toggleLayer" + (i+1),
                     tr("Toggle visibility of layer: {0}", i+1), k[i], Shortcut.ALT);
@@ -223,4 +225,5 @@
                         layerList.repaint();
                     }
+
                     @Override
                     public void refresh() {
@@ -233,10 +236,10 @@
         MoveUpAction moveUpAction = new MoveUpAction();
         adaptTo(moveUpAction, model);
-        adaptTo(moveUpAction,selectionModel);
+        adaptTo(moveUpAction, selectionModel);
 
         // -- move down action
         MoveDownAction moveDownAction = new MoveDownAction();
         adaptTo(moveDownAction, model);
-        adaptTo(moveDownAction,selectionModel);
+        adaptTo(moveDownAction, selectionModel);
 
         // -- activate action
@@ -261,5 +264,5 @@
         MergeAction mergeLayerAction = new MergeAction();
         adaptTo(mergeLayerAction, model);
-        adaptTo(mergeLayerAction,selectionModel);
+        adaptTo(mergeLayerAction, selectionModel);
 
         // -- duplicate layer action
@@ -273,5 +276,5 @@
         adaptTo(deleteLayerAction, selectionModel);
         getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
-                KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0),"delete"
+                KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "delete"
                 );
         getActionMap().put("delete", deleteLayerAction);
@@ -369,5 +372,5 @@
     @Override
     public void destroy() {
-        for(int i=0; i < 10; i++) {
+        for (int i = 0; i < 10; i++) {
             Main.unregisterActionShortcut(visibilityToggleActions[i], visibilityToggleShortcuts[i]);
         }
@@ -389,5 +392,5 @@
          */
         public DeleteLayerAction() {
-            putValue(SMALL_ICON,ImageProvider.get("dialogs", "delete"));
+            putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));
             putValue(SHORT_DESCRIPTION, tr("Delete the selected layers."));
             putValue(NAME, tr("Delete"));
@@ -464,5 +467,5 @@
         @Override
         public void actionPerformed(ActionEvent e) {
-            for(Layer l : model.getSelectedLayers()) {
+            for (Layer l : model.getSelectedLayers()) {
                 l.toggleVisible();
             }
@@ -559,5 +562,5 @@
                 @Override
                 public void stateChanged(ChangeEvent e) {
-                    setOpacity((double)slider.getValue()/100);
+                    setOpacity((double) slider.getValue()/100);
                 }
             });
@@ -570,5 +573,5 @@
                 layer.setOpacity(value);
             } else {
-                for(Layer layer: model.getSelectedLayers()) {
+                for (Layer layer: model.getSelectedLayers()) {
                     layer.setOpacity(value);
                 }
@@ -582,5 +585,5 @@
                 double opacity = 0;
                 List<Layer> layers = model.getSelectedLayers();
-                for(Layer layer: layers) {
+                for (Layer layer: layers) {
                     opacity += layer.getOpacity();
                 }
@@ -591,5 +594,5 @@
         @Override
         public void actionPerformed(ActionEvent e) {
-            slider.setValue((int)Math.round(getOpacity()*100));
+            slider.setValue((int) Math.round(getOpacity()*100));
             if (e.getSource() == opacityButton) {
                 popup.show(opacityButton, 0, opacityButton.getHeight());
@@ -858,5 +861,5 @@
             }
             if (layer instanceof OsmDataLayer) {
-                OsmDataLayer oldLayer = (OsmDataLayer)layer;
+                OsmDataLayer oldLayer = (OsmDataLayer) layer;
                 // Translators: "Copy of {layer name}"
                 String newName = tr("Copy of {0}", oldLayer.getName());
@@ -917,4 +920,8 @@
         private final ImageIcon iconEyeTranslucent;
         private boolean isTranslucent;
+
+        /**
+         * Constructs a new {@code LayerVisibleCheckBox}.
+         */
         public LayerVisibleCheckBox() {
             setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
@@ -940,5 +947,5 @@
             boolean visible = layer.isVisible();
             setSelected(visible);
-            setTranslucent(layer.getOpacity()<1.0);
+            setTranslucent(layer.getOpacity() < 1.0);
             setToolTipText(visible ? tr("layer is currently visible (click to hide layer)") : tr("layer is currently hidden (click to show layer)"));
         }
@@ -947,4 +954,8 @@
     private static class ActiveLayerCellRenderer implements TableCellRenderer {
         private final JCheckBox cb;
+
+        /**
+         * Constructs a new {@code ActiveLayerCellRenderer}.
+         */
         public ActiveLayerCellRenderer() {
             cb = new ActiveLayerCheckBox();
@@ -962,4 +973,8 @@
     private static class LayerVisibleCellRenderer implements TableCellRenderer {
         private final LayerVisibleCheckBox cb;
+
+        /**
+         * Constructs a new {@code LayerVisibleCellRenderer}.
+         */
         public LayerVisibleCellRenderer() {
             this.cb = new LayerVisibleCheckBox();
@@ -969,5 +984,5 @@
         public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
             if (value != null) {
-                cb.updateStatus((Layer)value);
+                cb.updateStatus((Layer) value);
             }
             return cb;
@@ -977,4 +992,5 @@
     private static class LayerVisibleCellEditor extends DefaultCellEditor {
         private final LayerVisibleCheckBox cb;
+
         public LayerVisibleCellEditor(LayerVisibleCheckBox cb) {
             super(cb);
@@ -984,5 +1000,5 @@
         @Override
         public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
-            cb.updateStatus((Layer)value);
+            cb.updateStatus((Layer) value);
             return cb;
         }
@@ -1000,18 +1016,18 @@
             if (value == null)
                 return this;
-            Layer layer = (Layer)value;
-            JLabel label = (JLabel)super.getTableCellRendererComponent(table,
+            Layer layer = (Layer) value;
+            JLabel label = (JLabel) super.getTableCellRendererComponent(table,
                     layer.getName(), isSelected, hasFocus, row, column);
             if (isActiveLayer(layer)) {
                 label.setFont(label.getFont().deriveFont(Font.BOLD));
             }
-            if(Main.pref.getBoolean("dialog.layer.colorname", true)) {
+            if (Main.pref.getBoolean("dialog.layer.colorname", true)) {
                 Color c = layer.getColor(false);
-                if(c != null) {
+                if (c != null) {
                     Color oc = null;
-                    for(Layer l : model.getLayers()) {
+                    for (Layer l : model.getLayers()) {
                         oc = l.getColor(false);
-                        if(oc != null) {
-                            if(oc.equals(c)) {
+                        if (oc != null) {
+                            if (oc.equals(c)) {
                                 oc = null;
                             } else {
@@ -1021,9 +1037,9 @@
                     }
                     /* not more than one color, don't use coloring */
-                    if(oc == null) {
+                    if (oc == null) {
                         c = null;
                     }
                 }
-                if(c == null) {
+                if (c == null) {
                     c = Main.pref.getUIColor(isSelected ? "Table.selectionForeground" : "Table.foreground");
                 }
@@ -1229,5 +1245,5 @@
             List<Layer> selected = new ArrayList<>();
             List<Layer> layers = getLayers();
-            for (int i=0; i<layers.size(); i++) {
+            for (int i = 0; i < layers.size(); i++) {
                 if (selectionModel.isSelectedIndex(i)) {
                     selected.add(layers.get(i));
@@ -1238,13 +1254,11 @@
 
         /**
-         * Replies a the list of indices of the selected rows. Never null,
-         * but may be empty.
-         *
-         * @return  the list of indices of the selected rows. Never null,
-         * but may be empty.
+         * Replies a the list of indices of the selected rows. Never null, but may be empty.
+         *
+         * @return  the list of indices of the selected rows. Never null, but may be empty.
          */
         public List<Integer> getSelectedRows() {
             List<Integer> selected = new ArrayList<>();
-            for (int i=0; i<getLayers().size();i++) {
+            for (int i = 0; i < getLayers().size(); i++) {
                 if (selectionModel.isSelectedIndex(i)) {
                     selected.add(i);
@@ -1532,5 +1546,5 @@
                         int idx = getLayers().indexOf(oldLayer);
                         if (idx >= 0) {
-                            fireTableRowsUpdated(idx,idx);
+                            fireTableRowsUpdated(idx, idx);
                         }
                     }
@@ -1539,5 +1553,5 @@
                         int idx = getLayers().indexOf(newLayer);
                         if (idx >= 0) {
-                            fireTableRowsUpdated(idx,idx);
+                            fireTableRowsUpdated(idx, idx);
                         }
                     }
@@ -1563,5 +1577,5 @@
         public void propertyChange(PropertyChangeEvent evt) {
             if (evt.getSource() instanceof Layer) {
-                Layer layer = (Layer)evt.getSource();
+                Layer layer = (Layer) evt.getSource();
                 final int idx = getLayers().indexOf(layer);
                 if (idx < 0) return;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListPopup.java	(revision 8510)
@@ -80,17 +80,17 @@
                     separatorAdded = true;
                     actions.add(a);
-                } else if (a instanceof LayerAction && ((LayerAction)a).supportLayers(selectedLayers)) {
+                } else if (a instanceof LayerAction && ((LayerAction) a).supportLayers(selectedLayers)) {
                     separatorAdded = false;
-                    if(a instanceof MultiLayerAction)
-                        a = ((MultiLayerAction)a).getMultiLayerAction(selectedLayers);
+                    if (a instanceof MultiLayerAction)
+                        a = ((MultiLayerAction) a).getMultiLayerAction(selectedLayers);
                     actions.add(a);
                 }
             }
             // This will usually add no action, because if some action support all selected layers then it was probably used also in first layer
-            for (int i=1; i<selectedLayers.size(); i++) {
+            for (int i = 1; i < selectedLayers.size(); i++) {
                 separatorAdded = false;
                 for (Action a: selectedLayers.get(i).getMenuEntries()) {
                     if (a instanceof LayerAction && !(a instanceof MultiLayerAction)
-                    && ((LayerAction)a).supportLayers(selectedLayers) && !actions.contains(a)) {
+                    && ((LayerAction) a).supportLayers(selectedLayers) && !actions.contains(a)) {
                         if (!separatorAdded) {
                             separatorAdded = true;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/LogShowDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/LogShowDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/LogShowDialog.java	(revision 8510)
@@ -41,5 +41,5 @@
         lbl.setFont(lbl.getFont().deriveFont(0, 14));
 
-        p.add(lbl, GBC.eol().insets(5,0,5,0));
+        p.add(lbl, GBC.eol().insets(5, 0, 5, 0));
         JosmEditorPane txt = new JosmEditorPane();
         txt.setContentType("text/html");
@@ -52,7 +52,7 @@
         JScrollPane sp = new JScrollPane(txt);
         sp.setOpaque(false);
-        sp.setPreferredSize(new Dimension(600,300));
+        sp.setPreferredSize(new Dimension(600, 300));
 
-        p.add(sp, GBC.eop().insets(5,15,0,0).fill(GBC.HORIZONTAL));
+        p.add(sp, GBC.eop().insets(5, 15, 0, 0).fill(GBC.HORIZONTAL));
 
         return p;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 8510)
@@ -139,8 +139,8 @@
             }
         });
-        cbWireframe.setBorder(new EmptyBorder(new Insets(1,1,1,1)));
+        cbWireframe.setBorder(new EmptyBorder(new Insets(1, 1, 1, 1)));
 
         tblStyles = new StylesTable(model);
-        tblStyles.setSelectionModel(selectionModel= new DefaultListSelectionModel());
+        tblStyles.setSelectionModel(selectionModel = new DefaultListSelectionModel());
         tblStyles.addMouseListener(new PopupMenuHandler());
         tblStyles.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
@@ -302,5 +302,5 @@
 
         @Override
-        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,int row,int column) {
+        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
             if (value == null)
                 return this;
@@ -318,5 +318,5 @@
                 return this;
             StyleSource s = (StyleSource) value;
-            JLabel label = (JLabel)super.getTableCellRendererComponent(table,
+            JLabel label = (JLabel) super.getTableCellRendererComponent(table,
                     s.getDisplayString(), isSelected, hasFocus, row, column);
             label.setIcon(s.getIcon());
@@ -371,5 +371,5 @@
         public MoveUpDownAction(boolean isDown) {
             increment = isDown ? 1 : -1;
-            putValue(NAME, isDown?tr("Down"):tr("Up"));
+            putValue(NAME, isDown ? tr("Down") : tr("Up"));
             putValue(SMALL_ICON, isDown ? ImageProvider.get("dialogs", "down") : ImageProvider.get("dialogs", "up"));
             putValue(SHORT_DESCRIPTION, isDown ? tr("Move the selected entry one row down.") : tr("Move the selected entry one row up."));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java	(revision 8510)
@@ -147,5 +147,5 @@
             addCommentAction.setEnabled(false);
             reopenAction.setEnabled(false);
-        } else if (noteData.getSelectedNote().getState() == State.open){
+        } else if (noteData.getSelectedNote().getState() == State.open) {
             closeAction.setEnabled(true);
             addCommentAction.setEnabled(true);
@@ -156,5 +156,5 @@
             reopenAction.setEnabled(true);
         }
-        if(noteData == null || !noteData.isModified()) {
+        if (noteData == null || !noteData.isModified()) {
             uploadAction.setEnabled(false);
         } else {
@@ -177,5 +177,5 @@
     public void layerAdded(Layer newLayer) {
         if (newLayer instanceof NoteLayer) {
-            noteData = ((NoteLayer)newLayer).getNoteData();
+            noteData = ((NoteLayer) newLayer).getNoteData();
             model.setData(noteData.getNotes());
             setNotes(noteData.getSortedNotes());
@@ -245,5 +245,5 @@
                 }
                 String toolTipText = userName + " @ " + dateFormat.format(note.getCreatedAt());
-                JLabel jlabel = (JLabel)comp;
+                JLabel jlabel = (JLabel) comp;
                 jlabel.setText(note.getId() + ": " +text);
                 ImageIcon icon;
@@ -304,5 +304,5 @@
          */
         public AddCommentAction() {
-            putValue(SHORT_DESCRIPTION,tr("Add comment"));
+            putValue(SHORT_DESCRIPTION, tr("Add comment"));
             putValue(NAME, tr("Comment"));
             putValue(SMALL_ICON, ICON_COMMENT);
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java	(revision 8510)
@@ -252,8 +252,13 @@
 
     @Override public void windowOpened(WindowEvent e) {}
+
     @Override public void windowClosing(WindowEvent e) {}
+
     @Override public void windowIconified(WindowEvent e) {}
+
     @Override public void windowDeiconified(WindowEvent e) {}
+
     @Override public void windowActivated(WindowEvent e) {}
+
     @Override public void windowDeactivated(WindowEvent e) {}
 }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 8510)
@@ -196,5 +196,5 @@
 
         //update highlights
-        if (highlightEnabled && focused==displaylist && Main.isDisplayingMapView()) {
+        if (highlightEnabled && focused == displaylist && Main.isDisplayingMapView()) {
             if (highlightHelper.highlightOnly(sel)) {
                 Main.map.mapView.repaint();
@@ -236,5 +236,5 @@
             return;
         }
-        OsmDataLayer l = (OsmDataLayer)layer;
+        OsmDataLayer l = (OsmDataLayer) layer;
         model.setRelations(l.data.getRelations());
         model.updateTitle();
@@ -352,5 +352,5 @@
     static class NewAction extends AbstractAction implements LayerChangeListener{
         public NewAction() {
-            putValue(SHORT_DESCRIPTION,tr("Create a new relation"));
+            putValue(SHORT_DESCRIPTION, tr("Create a new relation"));
             putValue(NAME, tr("New"));
             putValue(SMALL_ICON, ImageProvider.get("dialogs", "addrelation"));
@@ -359,5 +359,5 @@
 
         public void run() {
-            RelationEditor.getEditor(Main.main.getEditLayer(),null, null).setVisible(true);
+            RelationEditor.getEditor(Main.main.getEditLayer(), null, null).setVisible(true);
         }
 
@@ -418,5 +418,5 @@
             if (relations == null) {
                 selectionModel.clearSelection();
-                fireContentsChanged(this,0,getSize());
+                fireContentsChanged(this, 0, getSize());
                 return;
             }
@@ -446,5 +446,5 @@
                 }
 
-                Relation r = (Relation)p;
+                Relation r = (Relation) p;
                 if (relations.contains(r)) {
                     continue;
@@ -479,5 +479,5 @@
                     continue;
                 }
-                removedRelations.add((Relation)p);
+                removedRelations.add((Relation) p);
             }
             if (removedRelations.isEmpty())
@@ -545,5 +545,5 @@
         public List<Relation> getSelectedRelations() {
             List<Relation> ret = new ArrayList<>();
-            for (int i=0; i<getSize();i++) {
+            for (int i = 0; i < getSize(); i++) {
                 if (!selectionModel.isSelectedIndex(i)) {
                     continue;
@@ -569,5 +569,5 @@
                 Integer i = getVisibleRelationIndex(r);
                 if (i != null) {
-                    selectionModel.addSelectionInterval(i,i);
+                    selectionModel.addSelectionInterval(i, i);
                 }
             }
@@ -576,5 +576,5 @@
         private Integer getVisibleRelationIndex(Relation rel) {
             int i = getVisibleRelations().indexOf(rel);
-            if (i<0)
+            if (i < 0)
                 return null;
             return i;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 8510)
@@ -199,4 +199,5 @@
         private final HighlightHelper helper = new HighlightHelper();
         private boolean highlightEnabled = Main.pref.getBoolean("draw.target-highlight", true);
+
         public MouseEventHandler() {
             super(popupMenu);
@@ -295,5 +296,5 @@
             putValue(NAME, tr("Search"));
             putValue(SHORT_DESCRIPTION,   tr("Search for objects"));
-            putValue(SMALL_ICON, ImageProvider.get("dialogs","search"));
+            putValue(SMALL_ICON, ImageProvider.get("dialogs", "search"));
             updateEnabledState();
         }
@@ -330,5 +331,5 @@
         public void actionPerformed(ActionEvent e) {
             Collection<OsmPrimitive> sel = model.getSelected();
-            if (sel.isEmpty())return;
+            if (sel.isEmpty()) return;
             OsmDataLayer editLayer = Main.main.getEditLayer();
             if (editLayer == null) return;
@@ -395,5 +396,5 @@
 
         public ZoomToJOSMSelectionAction() {
-            putValue(NAME,tr("Zoom to selection"));
+            putValue(NAME, tr("Zoom to selection"));
             putValue(SHORT_DESCRIPTION, tr("Zoom to selection"));
             putValue(SMALL_ICON, ImageProvider.get("dialogs/autoscale", "selection"));
@@ -515,6 +516,6 @@
          */
         public void remember(Collection<? extends OsmPrimitive> selection) {
-            if (selection == null)return;
-            if (selection.isEmpty())return;
+            if (selection == null) return;
+            if (selection.isEmpty()) return;
             if (history == null) return;
             if (history.isEmpty()) {
@@ -524,6 +525,6 @@
             if (history.getFirst().equals(selection)) return;
             history.addFirst(selection);
-            for(int i = 1; i < history.size(); ++i) {
-                if(history.get(i).equals(selection)) {
+            for (int i = 1; i < history.size(); ++i) {
+                if (history.get(i).equals(selection)) {
                     history.remove(i);
                     break;
@@ -563,5 +564,5 @@
         public synchronized Collection<OsmPrimitive> getSelected() {
             Set<OsmPrimitive> sel = new HashSet<>();
-            for(int i=0; i< getSize();i++) {
+            for (int i = 0; i < getSize(); i++) {
                 if (selectionModel.isSelectedIndex(i)) {
                     sel.add(selection.get(i));
@@ -579,7 +580,7 @@
             selectionModel.clearSelection();
             if (sel == null) return;
-            for (OsmPrimitive p: sel){
+            for (OsmPrimitive p: sel) {
                 int i = selection.indexOf(p);
-                if (i >= 0){
+                if (i >= 0) {
                     selectionModel.addSelectionInterval(i, i);
                 }
@@ -643,8 +644,8 @@
             if (toUpdate.isEmpty()) return;
             Collection<OsmPrimitive> sel = getSelected();
-            for (OsmPrimitive p: toUpdate){
+            for (OsmPrimitive p: toUpdate) {
                 int i = selection.indexOf(p);
                 if (i >= 0) {
-                    super.fireContentsChanged(this, i,i);
+                    super.fireContentsChanged(this, i, i);
                 }
             }
@@ -816,10 +817,10 @@
             if (ways + nodes + relations == 0) {
                 text.append(tr("Unselectable now"));
-                this.sel=new ArrayList<>(); // empty selection
+                this.sel = new ArrayList<>(); // empty selection
             }
             DefaultNameFormatter df = DefaultNameFormatter.getInstance();
             if (ways + nodes + relations == 1) {
                 text.append(": ");
-                for(OsmPrimitive o : sel) {
+                for (OsmPrimitive o : sel) {
                     text.append(o.getDisplayName(df));
                 }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 8510)
@@ -101,4 +101,5 @@
             return preferencePrefix + ".buttonhiding";
         }
+
         @Override
         protected ButtonHidingType parse(String s) {
@@ -233,5 +234,5 @@
         setPreferredSize(new Dimension(0, preferredHeight));
         /** Override any minimum sizes of child elements so the user can resize freely */
-        setMinimumSize(new Dimension(0,0));
+        setMinimumSize(new Dimension(0, 0));
         this.preferredHeight = preferredHeight;
         toggleAction = new ToggleDialogAction(name, "dialogs/"+iconName, tooltip, shortcut);
@@ -396,7 +397,7 @@
             setContentVisible(false);
             setIsCollapsed(true);
-            setPreferredSize(new Dimension(0,20));
-            setMaximumSize(new Dimension(Integer.MAX_VALUE,20));
-            setMinimumSize(new Dimension(Integer.MAX_VALUE,20));
+            setPreferredSize(new Dimension(0, 20));
+            setMaximumSize(new Dimension(Integer.MAX_VALUE, 20));
+            setMinimumSize(new Dimension(Integer.MAX_VALUE, 20));
             titleBar.lblMinimized.setIcon(ImageProvider.get("misc", "minimized"));
         } else
@@ -411,5 +412,5 @@
             setContentVisible(true);
             setIsCollapsed(false);
-            setPreferredSize(new Dimension(0,preferredHeight));
+            setPreferredSize(new Dimension(0, preferredHeight));
             setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
             titleBar.lblMinimized.setIcon(ImageProvider.get("misc", "normal"));
@@ -444,5 +445,5 @@
     private void destroyComponents(Component component, boolean destroyItself) {
         if (component instanceof Container) {
-            for (Component c: ((Container)component).getComponents()) {
+            for (Component c: ((Container) component).getComponents()) {
                 destroyComponents(c, true);
             }
@@ -454,6 +455,5 @@
 
     /**
-     * Closes the detached dialog if this toggle dialog is currently displayed
-     * in a detached dialog.
+     * Closes the detached dialog if this toggle dialog is currently displayed in a detached dialog.
      *
      */
@@ -519,6 +519,6 @@
                 }
             };
-            lblTitleWeak.setPreferredSize(new Dimension(Integer.MAX_VALUE,20));
-            lblTitleWeak.setMinimumSize(new Dimension(0,20));
+            lblTitleWeak.setPreferredSize(new Dimension(Integer.MAX_VALUE, 20));
+            lblTitleWeak.setMinimumSize(new Dimension(0, 20));
             add(lblTitleWeak, GBC.std().fill(GBC.HORIZONTAL));
 
@@ -545,5 +545,5 @@
                 pref.setBorder(BorderFactory.createEmptyBorder());
                 pref.addActionListener(
-                        new ActionListener(){
+                        new ActionListener() {
                             @Override
                             @SuppressWarnings("unchecked")
@@ -567,5 +567,5 @@
             sticky.setBorder(BorderFactory.createEmptyBorder());
             sticky.addActionListener(
-                    new ActionListener(){
+                    new ActionListener() {
                         @Override
                         public void actionPerformed(ActionEvent e) {
@@ -582,5 +582,5 @@
             close.setBorder(BorderFactory.createEmptyBorder());
             close.addActionListener(
-                    new ActionListener(){
+                    new ActionListener() {
                         @Override
                         public void actionPerformed(ActionEvent e) {
@@ -633,7 +633,11 @@
 
         class MouseEventHandler extends PopupMenuLauncher {
+            /**
+             * Constructs a new {@code MouseEventHandler}.
+             */
             public MouseEventHandler() {
                 super(popupMenu);
             }
+
             @Override
             public void mouseClicked(MouseEvent e) {
@@ -659,5 +663,5 @@
             super(JOptionPane.getFrameForComponent(Main.parent));
             getContentPane().add(ToggleDialog.this);
-            addWindowListener(new WindowAdapter(){
+            addWindowListener(new WindowAdapter() {
                 @Override public void windowClosing(WindowEvent e) {
                     rememberGeometry();
@@ -677,8 +681,11 @@
             });
             addComponentListener(new ComponentAdapter() {
-                @Override public void componentMoved(ComponentEvent e) {
+                @Override
+                public void componentMoved(ComponentEvent e) {
                     rememberGeometry();
                 }
-                @Override public void componentResized(ComponentEvent e) {
+
+                @Override
+                public void componentResized(ComponentEvent e) {
                     rememberGeometry();
                 }
@@ -913,10 +920,10 @@
     @Override
     public void eventDispatched(AWTEvent event) {
-        if(isShowing() && !isCollapsed && isDocked && buttonHiding == ButtonHidingType.DYNAMIC) {
+        if (isShowing() && !isCollapsed && isDocked && buttonHiding == ButtonHidingType.DYNAMIC) {
             if (buttonsPanel != null) {
                 Rectangle b = this.getBounds();
                 b.setLocation(getLocationOnScreen());
-                if (b.contains(((MouseEvent)event).getLocationOnScreen())) {
-                    if(!buttonsPanel.isVisible()) {
+                if (b.contains(((MouseEvent) event).getLocationOnScreen())) {
+                    if (!buttonsPanel.isVisible()) {
                         buttonsPanel.setVisible(true);
                     }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/UserListDialog.java	(revision 8510)
@@ -150,5 +150,5 @@
         Layer layer = Main.main.getActiveLayer();
         if (layer instanceof OsmDataLayer) {
-            refresh(((OsmDataLayer)layer).data.getAllSelected());
+            refresh(((OsmDataLayer) layer).data.getAllSelected());
         }
 
@@ -208,5 +208,5 @@
             int num = Math.min(10, users.size());
             Iterator<User> it = users.iterator();
-            while(it.hasNext() && num > 0) {
+            while (it.hasNext() && num > 0) {
                 String url = createInfoUrl(it.next());
                 if (url == null) {
@@ -221,5 +221,5 @@
         protected String createInfoUrl(Object infoObject) {
             if (infoObject instanceof User) {
-                User user = (User)infoObject;
+                User user = (User) infoObject;
                 return Main.getBaseUserUrl() + "/" + Utils.encodeUrl(user.getName()).replaceAll("\\+", "%20");
             } else {
@@ -242,5 +242,5 @@
         @Override
         public void mouseClicked(MouseEvent e) {
-            if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount()==2) {
+            if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2) {
                 selectionUsersPrimitivesAction.select();
             }
@@ -249,6 +249,5 @@
 
     /**
-     * Action for selecting the primitives contributed by the currently selected
-     * users.
+     * Action for selecting the primitives contributed by the currently selected users.
      *
      */
@@ -257,14 +256,16 @@
         public int count;
         public double percent;
+
         UserInfo(User user, int count, double percent) {
-            this.user=user;
-            this.count=count;
+            this.user = user;
+            this.count = count;
             this.percent = percent;
         }
+
         @Override
         public int compareTo(UserInfo o) {
             if (count < o.count) return 1;
             if (count > o.count) return -1;
-            if (user== null || user.getName() == null) return 1;
+            if (user == null || user.getName() == null) return 1;
             if (o.user == null || o.user.getName() == null) return -1;
             return user.getName().compareTo(o.user.getName());
@@ -286,5 +287,5 @@
 
         public UserTableModel() {
-            setColumnIdentifiers(new String[]{tr("Author"),tr("# Objects"),"%"});
+            setColumnIdentifiers(new String[]{tr("Author"), tr("# Objects"), "%"});
             data = new ArrayList<>();
         }
@@ -304,9 +305,9 @@
 
         public void populate(Collection<? extends OsmPrimitive> primitives) {
-            Map<User,Integer> statistics = computeStatistics(primitives);
+            Map<User, Integer> statistics = computeStatistics(primitives);
             data.clear();
             if (primitives != null) {
                 for (Map.Entry<User, Integer> entry: statistics.entrySet()) {
-                    data.add(new UserInfo(entry.getKey(), entry.getValue(), (double)entry.getValue() /  (double)primitives.size()));
+                    data.add(new UserInfo(entry.getKey(), entry.getValue(), (double) entry.getValue() /  (double) primitives.size()));
                 }
             }
@@ -343,5 +344,5 @@
 
         public void selectPrimitivesOwnedBy(int[] rows) {
-            Set<User> users= new HashSet<>();
+            Set<User> users = new HashSet<>();
             for (int index: rows) {
                 users.add(data.get(index).user);
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java	(revision 8510)
@@ -120,5 +120,5 @@
                 putValue(NAME, tr("Fix"));
                 putValue(SHORT_DESCRIPTION,  tr("Fix the selected issue."));
-                putValue(SMALL_ICON, ImageProvider.get("dialogs","fix"));
+                putValue(SMALL_ICON, ImageProvider.get("dialogs", "fix"));
             }
             @Override
@@ -135,5 +135,5 @@
                     putValue(NAME, tr("Ignore"));
                     putValue(SHORT_DESCRIPTION,  tr("Ignore the selected issue next time."));
-                    putValue(SMALL_ICON, ImageProvider.get("dialogs","fix"));
+                    putValue(SMALL_ICON, ImageProvider.get("dialogs", "fix"));
                 }
                 @Override
@@ -207,5 +207,5 @@
                 Object nodeInfo = childNode.getUserObject();
                 if (nodeInfo instanceof TestError) {
-                    errorsToFix.add((TestError)nodeInfo);
+                    errorsToFix.add((TestError) nodeInfo);
                 }
             }
@@ -387,5 +387,5 @@
     public void activeLayerChange(Layer oldLayer, Layer newLayer) {
         if (newLayer instanceof OsmDataLayer) {
-            linkedLayer = (OsmDataLayer)newLayer;
+            linkedLayer = (OsmDataLayer) newLayer;
             tree.setErrorList(linkedLayer.validationErrors);
         }
@@ -439,5 +439,5 @@
         Object comp = tree.getLastSelectedPathComponent();
         if (comp instanceof DefaultMutableTreeNode) {
-            Object object = ((DefaultMutableTreeNode)comp).getUserObject();
+            Object object = ((DefaultMutableTreeNode) comp).getUserObject();
             if (object instanceof TestError) {
                 return (TestError) object;
@@ -569,5 +569,5 @@
         public FixTask(Collection<TestError> testErrors) {
             super(tr("Fixing errors ..."), false /* don't ignore exceptions */);
-            this.testErrors = testErrors == null ? new ArrayList<TestError>(): testErrors;
+            this.testErrors = testErrors == null ? new ArrayList<TestError>() : testErrors;
         }
 
@@ -605,5 +605,5 @@
             try {
                 monitor.setTicksCount(testErrors.size());
-                int i=0;
+                int i = 0;
                 SwingUtilities.invokeAndWait(new Runnable() {
                     @Override
@@ -615,5 +615,5 @@
                     for (TestError error: testErrors) {
                         i++;
-                        monitor.subTask(tr("Fixing ({0}/{1}): ''{2}''", i, testErrors.size(),error.getMessage()));
+                        monitor.subTask(tr("Fixing ({0}/{1}): ''{2}''", i, testErrors.size(), error.getMessage()));
                         if (this.canceled)
                             return;
@@ -639,5 +639,5 @@
                     }
                 });
-            } catch(InterruptedException | InvocationTargetException e) {
+            } catch (InterruptedException | InvocationTargetException e) {
                 // FIXME: signature of realRun should have a generic checked exception we
                 // could throw here
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManager.java	(revision 8510)
@@ -262,10 +262,10 @@
         );
         tblChangesets.addMouseListener(new MouseEventHandler());
-        tblChangesets.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), "showDetails");
+        tblChangesets.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "showDetails");
         tblChangesets.getActionMap().put("showDetails", new ShowDetailAction());
         model.getSelectionModel().addListSelectionListener(new ChangesetDetailViewSynchronizer());
 
         // activate DEL on the table
-        tblChangesets.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE,0), "removeFromCache");
+        tblChangesets.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "removeFromCache");
         tblChangesets.getActionMap().put("removeFromCache", actRemoveFromCacheAction);
 
@@ -291,5 +291,6 @@
 
         // make the dialog respond to ESC
-        getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0), "cancelAndClose");
+        getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
+                KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancelAndClose");
         getRootPane().getActionMap().put("cancelAndClose", new CancelAction());
 
@@ -312,5 +313,5 @@
                     WindowGeometry.centerInWindow(
                             getParent(),
-                            new Dimension(1000,600)
+                            new Dimension(1000, 600)
                     )
             ).applySafe(this);
@@ -370,5 +371,5 @@
         public QueryAction() {
             putValue(NAME, tr("Query"));
-            putValue(SMALL_ICON, ImageProvider.get("dialogs","search"));
+            putValue(SMALL_ICON, ImageProvider.get("dialogs", "search"));
             putValue(SHORT_DESCRIPTION, tr("Launch the dialog for querying changesets"));
             setEnabled(!Main.isOffline(OnlineResource.OSM_API));
@@ -480,5 +481,5 @@
         public void actionPerformed(ActionEvent arg0) {
             List<Changeset> selected = model.getSelectedChangesets();
-            ChangesetHeaderDownloadTask task =ChangesetHeaderDownloadTask.buildTaskForChangesets(ChangesetCacheManager.this,selected);
+            ChangesetHeaderDownloadTask task = ChangesetHeaderDownloadTask.buildTaskForChangesets(ChangesetCacheManager.this, selected);
             ChangesetCacheManager.getInstance().runDownloadTask(task);
         }
@@ -508,5 +509,5 @@
         @Override
         public void actionPerformed(ActionEvent arg0) {
-            ChangesetContentDownloadTask task = new ChangesetContentDownloadTask(ChangesetCacheManager.this,model.getSelectedChangesetIds());
+            ChangesetContentDownloadTask task = new ChangesetContentDownloadTask(ChangesetCacheManager.this, model.getSelectedChangesetIds());
             ChangesetCacheManager.getInstance().runDownloadTask(task);
         }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerModel.java	(revision 8510)
@@ -77,5 +77,5 @@
     public List<Changeset> getSelectedChangesets() {
         List<Changeset> ret = new ArrayList<>();
-        for (int i =0; i< data.size();i++) {
+        for (int i = 0; i < data.size(); i++) {
             Changeset cs = data.get(i);
             if (selectionModel.isSelectedIndex(i)) {
@@ -117,5 +117,5 @@
                 GuiHelper.runInEDTAndWait(new Runnable() {
                     @Override public void run() {
-                        selectionModel.addSelectionInterval(idx,idx);
+                        selectionModel.addSelectionInterval(idx, idx);
                     }
                 });
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableCellRenderer.java	(revision 8510)
@@ -51,5 +51,5 @@
         reset();
         renderColors(isSelected);
-        Changeset cs = (Changeset)value;
+        Changeset cs = (Changeset) value;
         switch(column) {
         case 0: /* id */ renderId(cs.getId()); break;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentDownloadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentDownloadTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentDownloadTask.java	(revision 8510)
@@ -134,9 +134,9 @@
      */
     protected void downloadChangeset(int changesetId) throws OsmTransferException {
-        synchronized(this) {
+        synchronized (this) {
             reader = new OsmServerChangesetReader();
         }
         Changeset cs = reader.readChangeset(changesetId, false, getProgressMonitor().createSubTaskMonitor(0, false));
-        synchronized(this) {
+        synchronized (this) {
             reader = null;
         }
@@ -166,5 +166,5 @@
         try {
             getProgressMonitor().setTicksCount(toDownload.size());
-            int i=0;
+            int i = 0;
             for (int id: toDownload) {
                 i++;
@@ -174,10 +174,10 @@
                 }
                 if (canceled) return;
-                synchronized(this) {
+                synchronized (this) {
                     reader = new OsmServerChangesetReader();
                 }
                 getProgressMonitor().setCustomText(tr("({0}/{1}) Downloading content for changeset {2}...", i, toDownload.size(), id));
                 ChangesetDataSet ds = reader.downloadChangeset(id, getProgressMonitor().createSubTaskMonitor(0, false));
-                synchronized(this) {
+                synchronized (this) {
                     reader = null;
                 }
@@ -188,5 +188,5 @@
                 getProgressMonitor().worked(1);
             }
-        } catch(OsmTransferCanceledException e) {
+        } catch (OsmTransferCanceledException e) {
             // the download was canceled by the user. This exception is caught if the
             // user canceled the authentication dialog.
@@ -194,5 +194,5 @@
             canceled = true;
             return;
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             if (canceled)
                 return;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentPanel.java	(revision 8510)
@@ -72,5 +72,5 @@
 
     protected void buildModels() {
-        DefaultListSelectionModel selectionModel =new DefaultListSelectionModel();
+        DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();
         model = new ChangesetContentTableModel(selectionModel);
         actDownloadContentAction = new DownloadChangesetContentAction();
@@ -127,5 +127,5 @@
 
     protected final void build() {
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         setLayout(new BorderLayout());
         buildModels();
@@ -167,7 +167,7 @@
     @Override
     public void propertyChange(PropertyChangeEvent evt) {
-        if(!evt.getPropertyName().equals(ChangesetCacheManagerModel.CHANGESET_IN_DETAIL_VIEW_PROP))
+        if (!evt.getPropertyName().equals(ChangesetCacheManagerModel.CHANGESET_IN_DETAIL_VIEW_PROP))
             return;
-        Changeset cs = (Changeset)evt.getNewValue();
+        Changeset cs = (Changeset) evt.getNewValue();
         setCurrentChangeset(cs);
     }
@@ -201,5 +201,5 @@
         public void actionPerformed(ActionEvent evt) {
             if (currentChangeset == null) return;
-            ChangesetContentDownloadTask task = new ChangesetContentDownloadTask(ChangesetContentPanel.this,currentChangeset.getId());
+            ChangesetContentDownloadTask task = new ChangesetContentDownloadTask(ChangesetContentPanel.this, currentChangeset.getId());
             ChangesetCacheManager.getInstance().runDownloadTask(task);
         }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentTableCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentTableCellRenderer.java	(revision 8510)
@@ -35,9 +35,9 @@
         switch(column) {
         case 0:
-            ChangesetModificationType type = (ChangesetModificationType)value;
+            ChangesetModificationType type = (ChangesetModificationType) value;
             renderModificationType(type);
             break;
         case 1:
-            HistoryOsmPrimitive primitive = (HistoryOsmPrimitive)value;
+            HistoryOsmPrimitive primitive = (HistoryOsmPrimitive) value;
             renderId(primitive.getId());
             break;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentTableModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentTableModel.java	(revision 8510)
@@ -54,5 +54,5 @@
     public Set<HistoryOsmPrimitive> getSelectedPrimitives() {
         Set<HistoryOsmPrimitive> ret = new HashSet<>();
-        for (int i=0;i < data.size();i++) {
+        for (int i = 0; i < data.size(); i++) {
             if (selectionModel.isSelectedIndex(i)) {
                 ret.add(data.get(i).getPrimitive());
@@ -156,4 +156,5 @@
             return modificationType;
         }
+
         @Override
         public HistoryOsmPrimitive getPrimitive() {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDetailPanel.java	(revision 8510)
@@ -52,5 +52,5 @@
 
     private final JosmTextField tfID        = new JosmTextField(10);
-    private final JosmTextArea  taComment   = new JosmTextArea(5,40);
+    private final JosmTextArea  taComment   = new JosmTextArea(5, 40);
     private final JosmTextField tfOpen      = new JosmTextField(10);
     private final JosmTextField tfUser      = new JosmTextField("");
@@ -111,5 +111,5 @@
         GridBagConstraints gc = new GridBagConstraints();
         gc.anchor = GridBagConstraints.FIRST_LINE_START;
-        gc.insets = new Insets(0,0,2,3);
+        gc.insets = new Insets(0, 0, 2, 3);
 
         //-- id
@@ -193,5 +193,5 @@
     protected final void build() {
         setLayout(new BorderLayout());
-        setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
+        setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
         add(buildDetailViewPanel(), BorderLayout.CENTER);
         add(buildActionButtonPanel(), BorderLayout.WEST);
@@ -261,5 +261,5 @@
         if (!evt.getPropertyName().equals(ChangesetCacheManagerModel.CHANGESET_IN_DETAIL_VIEW_PROP))
             return;
-        setCurrentChangeset((Changeset)evt.getNewValue());
+        setCurrentChangeset((Changeset) evt.getNewValue());
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDiscussionPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDiscussionPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDiscussionPanel.java	(revision 8510)
@@ -105,5 +105,5 @@
     protected final void build() {
         setLayout(new BorderLayout());
-        setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
+        setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
         add(buildActionButtonPanel(), BorderLayout.WEST);
         add(buildDiscussionPanel(), BorderLayout.CENTER);
@@ -157,5 +157,5 @@
         if (!evt.getPropertyName().equals(ChangesetCacheManagerModel.CHANGESET_IN_DETAIL_VIEW_PROP))
             return;
-        setCurrentChangeset((Changeset)evt.getNewValue());
+        setCurrentChangeset((Changeset) evt.getNewValue());
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDiscussionTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDiscussionTableCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDiscussionTableCellRenderer.java	(revision 8510)
@@ -27,13 +27,13 @@
         switch(column) {
         case 0:
-            renderDate((Date)value);
+            renderDate((Date) value);
             break;
         case 1:
-            renderUser((User)value);
+            renderUser((User) value);
             break;
         case 2:
             comp = new JosmTextArea((String) value);
-            ((JosmTextArea)comp).setLineWrap(true);
-            ((JosmTextArea)comp).setWrapStyleWord(true);
+            ((JosmTextArea) comp).setLineWrap(true);
+            ((JosmTextArea) comp).setWrapStyleWord(true);
             reset(comp, false);
             renderColors(comp, isSelected);
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDownloadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDownloadTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDownloadTask.java	(revision 8510)
@@ -8,5 +8,7 @@
 public interface ChangesetDownloadTask extends Runnable{
     Set<Changeset> getDownloadedChangesets();
+
     boolean isCanceled();
+
     boolean isFailed();
 }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetHeaderDownloadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetHeaderDownloadTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetHeaderDownloadTask.java	(revision 8510)
@@ -177,11 +177,11 @@
             try {
                 SwingUtilities.invokeAndWait(r);
-            } catch(InterruptedException e) {
+            } catch (InterruptedException e) {
                 Main.warn("InterruptedException in "+getClass().getSimpleName()+" while updating changeset cache");
-            } catch(InvocationTargetException e) {
+            } catch (InvocationTargetException e) {
                 Throwable t = e.getTargetException();
                 if (t instanceof RuntimeException) {
                     BugReportExceptionHandler.handleException(t);
-                } else if (t instanceof Exception){
+                } else if (t instanceof Exception) {
                     ExceptionUtil.explainException(e);
                 } else {
@@ -201,5 +201,5 @@
             downloadedChangesets.addAll(reader.readChangesets(idsToDownload, includeDiscussion,
                     getProgressMonitor().createSubTaskMonitor(0, false)));
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             if (canceled)
                 // ignore exception if canceled
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListModel.java	(revision 8510)
@@ -32,5 +32,5 @@
     public Set<Changeset> getSelectedChangesets() {
         Set<Changeset> ret = new HashSet<>();
-        for (int i=0; i < getSize(); i++) {
+        for (int i = 0; i < getSize(); i++) {
             if (selectionModel.isSelectedIndex(i)) {
                 ret.add(data.get(i));
@@ -42,5 +42,5 @@
     public Set<Integer> getSelectedChangesetIds() {
         Set<Integer> ret = new HashSet<>();
-        for (int i=0; i < getSize(); i++) {
+        for (int i = 0; i < getSize(); i++) {
             if (selectionModel.isSelectedIndex(i)) {
                 ret.add(data.get(i).getId());
@@ -58,5 +58,5 @@
                 continue;
             }
-            selectionModel.addSelectionInterval(idx,idx);
+            selectionModel.addSelectionInterval(idx, idx);
         }
     }
@@ -170,5 +170,5 @@
     public List<Changeset> getSelectedOpenChangesets() {
         List<Changeset> ret = new ArrayList<>();
-        for (int i=0; i< getSize(); i++) {
+        for (int i = 0; i < getSize(); i++) {
             if (selectionModel.isSelectedIndex(i)) {
                 Changeset cs = data.get(i);
@@ -187,5 +187,5 @@
     public void changesetCacheUpdated(ChangesetCacheEvent event) {
         Set<Changeset> sel = getSelectedChangesets();
-        for(Changeset cs: event.getAddedChangesets()) {
+        for (Changeset cs: event.getAddedChangesets()) {
             int idx = data.indexOf(cs);
             if (idx >= 0 && data.get(idx) != cs) {
@@ -193,5 +193,5 @@
             }
         }
-        for(Changeset cs: event.getUpdatedChangesets()) {
+        for (Changeset cs: event.getUpdatedChangesets()) {
             int idx = data.indexOf(cs);
             if (idx >= 0 && data.get(idx) != cs) {
@@ -199,5 +199,5 @@
             }
         }
-        for(Changeset cs: event.getRemovedChangesets()) {
+        for (Changeset cs: event.getRemovedChangesets()) {
             int idx = data.indexOf(cs);
             if (idx >= 0) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetTagsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetTagsPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetTagsPanel.java	(revision 8510)
@@ -24,5 +24,5 @@
     protected void build() {
         setLayout(new BorderLayout());
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         model = new TagEditorModel();
         TagTable tblTags = new TagTable(model);
@@ -53,5 +53,5 @@
         if (!evt.getPropertyName().equals(ChangesetCacheManagerModel.CHANGESET_IN_DETAIL_VIEW_PROP))
             return;
-        Changeset cs = (Changeset)evt.getNewValue();
+        Changeset cs = (Changeset) evt.getNewValue();
         if (cs == null) {
             model.clear();
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/SingleChangesetDownloadPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/SingleChangesetDownloadPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/SingleChangesetDownloadPanel.java	(revision 8510)
@@ -32,9 +32,9 @@
 
     protected void build() {
-        setLayout(new FlowLayout(FlowLayout.LEFT,0,0));
+        setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
         setBorder(
                 BorderFactory.createCompoundBorder(
                         BorderFactory.createLineBorder(Color.GRAY),
-                        BorderFactory.createEmptyBorder(0,3,0,3)
+                        BorderFactory.createEmptyBorder(0, 3, 0, 3)
                 )
         );
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java	(revision 8510)
@@ -60,5 +60,5 @@
         ItemListener stateChangeHandler = new RestrictionGroupStateChangeHandler();
         JPanel pnl  = new VerticallyScrollablePanel();
-        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         pnl.setLayout(new GridBagLayout());
         GridBagConstraints gc = new GridBagConstraints();
@@ -74,5 +74,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        pnl.add(new JMultilineLabel(tr("Select changesets owned by specific users")),gc);
+        pnl.add(new JMultilineLabel(tr("Select changesets owned by specific users")), gc);
 
         gc.gridy = 1;
@@ -93,5 +93,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        pnl.add(new JMultilineLabel(tr("Select changesets depending on whether they are open or closed")),gc);
+        pnl.add(new JMultilineLabel(tr("Select changesets depending on whether they are open or closed")), gc);
 
         gc.gridy = 3;
@@ -112,5 +112,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        pnl.add(new JMultilineLabel(tr("Select changesets based on the date/time they have been created or closed")),gc);
+        pnl.add(new JMultilineLabel(tr("Select changesets based on the date/time they have been created or closed")), gc);
 
         gc.gridy = 5;
@@ -132,5 +132,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        pnl.add(new JMultilineLabel(tr("Select only changesets related to a specific bounding box")),gc);
+        pnl.add(new JMultilineLabel(tr("Select only changesets related to a specific bounding box")), gc);
 
         gc.gridy = 7;
@@ -143,5 +143,5 @@
         gc.gridx = 0;
         gc.gridwidth = 2;
-        gc.fill  =GridBagConstraints.BOTH;
+        gc.fill = GridBagConstraints.BOTH;
         gc.weightx = 1.0;
         gc.weighty = 1.0;
@@ -289,8 +289,8 @@
             setLayout(new GridBagLayout());
             setBorder(BorderFactory.createCompoundBorder(
-                    BorderFactory.createEmptyBorder(3,3,3,3),
+                    BorderFactory.createEmptyBorder(3, 3, 3, 3),
                     BorderFactory.createCompoundBorder(
                             BorderFactory.createLineBorder(Color.GRAY),
-                            BorderFactory.createEmptyBorder(5,5,5,5)
+                            BorderFactory.createEmptyBorder(5, 5, 5, 5)
                     )
             ));
@@ -389,9 +389,9 @@
             gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 0.0;
-            gc.insets = new Insets(0,0,0,3);
+            gc.insets = new Insets(0, 0, 0, 3);
             pnl.add(new JLabel(tr("User ID:")), gc);
 
             gc.gridx = 1;
-            pnl.add(tfUid = new JosmTextField(10),gc);
+            pnl.add(tfUid = new JosmTextField(10), gc);
             SelectAllOnFocusGainedDecorator.decorate(tfUid);
             valUid = UidInputFieldValidator.decorate(tfUid);
@@ -409,9 +409,9 @@
             gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 0.0;
-            gc.insets = new Insets(0,0,0,3);
+            gc.insets = new Insets(0, 0, 0, 3);
             pnl.add(new JLabel(tr("User name:")), gc);
 
             gc.gridx = 1;
-            pnl.add(tfUserName = new JosmTextField(10),gc);
+            pnl.add(tfUserName = new JosmTextField(10), gc);
             SelectAllOnFocusGainedDecorator.decorate(tfUserName);
             valUserName = UserNameInputValidator.decorate(tfUserName);
@@ -427,8 +427,8 @@
             setLayout(new GridBagLayout());
             setBorder(BorderFactory.createCompoundBorder(
-                    BorderFactory.createEmptyBorder(3,3,3,3),
+                    BorderFactory.createEmptyBorder(3, 3, 3, 3),
                     BorderFactory.createCompoundBorder(
                             BorderFactory.createLineBorder(Color.GRAY),
-                            BorderFactory.createEmptyBorder(5,5,5,5)
+                            BorderFactory.createEmptyBorder(5, 5, 5, 5)
                     )
             ));
@@ -438,5 +438,5 @@
             gc.anchor = GridBagConstraints.NORTHWEST;
             gc.gridx = 0;
-            gc.fill= GridBagConstraints.HORIZONTAL;
+            gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 0.0;
             add(rbRestrictToMyself = new JRadioButton(), gc);
@@ -450,5 +450,5 @@
             gc.gridx = 0;
             gc.gridy = 1;
-            gc.fill= GridBagConstraints.HORIZONTAL;
+            gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 0.0;
             add(rbRestrictToUid = new JRadioButton(), gc);
@@ -458,5 +458,5 @@
             gc.fill =  GridBagConstraints.HORIZONTAL;
             gc.weightx = 1.0;
-            add(new JMultilineLabel(tr("Only changesets owned by the user with the following user ID")),gc);
+            add(new JMultilineLabel(tr("Only changesets owned by the user with the following user ID")), gc);
 
             gc.gridx = 1;
@@ -464,9 +464,9 @@
             gc.fill =  GridBagConstraints.HORIZONTAL;
             gc.weightx = 1.0;
-            add(buildUidInputPanel(),gc);
+            add(buildUidInputPanel(), gc);
 
             gc.gridx = 0;
             gc.gridy = 3;
-            gc.fill= GridBagConstraints.HORIZONTAL;
+            gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 0.0;
             add(rbRestrictToUserName = new JRadioButton(), gc);
@@ -474,13 +474,13 @@
 
             gc.gridx = 1;
-            gc.fill =  GridBagConstraints.HORIZONTAL;
-            gc.weightx = 1.0;
-            add(new JMultilineLabel(tr("Only changesets owned by the user with the following user name")),gc);
+            gc.fill = GridBagConstraints.HORIZONTAL;
+            gc.weightx = 1.0;
+            add(new JMultilineLabel(tr("Only changesets owned by the user with the following user name")), gc);
 
             gc.gridx = 1;
             gc.gridy = 4;
-            gc.fill =  GridBagConstraints.HORIZONTAL;
-            gc.weightx = 1.0;
-            add(buildUserNameInputPanel(),gc);
+            gc.fill = GridBagConstraints.HORIZONTAL;
+            gc.weightx = 1.0;
+            add(buildUserNameInputPanel(), gc);
 
             bgUserRestrictions = new ButtonGroup();
@@ -541,5 +541,4 @@
         }
 
-
         public boolean isValidChangesetQuery() {
             if (rbRestrictToUid.isSelected())
@@ -656,10 +655,10 @@
             gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 0.0;
-            gc.insets = new Insets(0,0,0,3);
+            gc.insets = new Insets(0, 0, 0, 3);
             pnl.add(new JLabel(tr("Date: ")), gc);
 
             gc.gridx = 1;
             gc.weightx = 0.7;
-            pnl.add(tfClosedAfterDate1 = new JosmTextField(),gc);
+            pnl.add(tfClosedAfterDate1 = new JosmTextField(), gc);
             SelectAllOnFocusGainedDecorator.decorate(tfClosedAfterDate1);
             valClosedAfterDate1 = DateValidator.decorate(tfClosedAfterDate1);
@@ -668,9 +667,9 @@
             gc.gridx = 2;
             gc.weightx = 0.0;
-            pnl.add(new JLabel(tr("Time:")),gc);
+            pnl.add(new JLabel(tr("Time:")), gc);
 
             gc.gridx = 3;
             gc.weightx = 0.3;
-            pnl.add(tfClosedAfterTime1 = new JosmTextField(),gc);
+            pnl.add(tfClosedAfterTime1 = new JosmTextField(), gc);
             SelectAllOnFocusGainedDecorator.decorate(tfClosedAfterTime1);
             valClosedAfterTime1 = TimeValidator.decorate(tfClosedAfterTime1);
@@ -684,5 +683,5 @@
             gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 0.0;
-            gc.insets = new Insets(0,0,0,3);
+            gc.insets = new Insets(0, 0, 0, 3);
             pnl.add(new JLabel(tr("Closed after - ")), gc);
 
@@ -690,10 +689,10 @@
             gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 0.0;
-            gc.insets = new Insets(0,0,0,3);
+            gc.insets = new Insets(0, 0, 0, 3);
             pnl.add(new JLabel(tr("Date:")), gc);
 
             gc.gridx = 2;
             gc.weightx = 0.7;
-            pnl.add(tfClosedAfterDate2 = new JosmTextField(),gc);
+            pnl.add(tfClosedAfterDate2 = new JosmTextField(), gc);
             SelectAllOnFocusGainedDecorator.decorate(tfClosedAfterDate2);
             valClosedAfterDate2 = DateValidator.decorate(tfClosedAfterDate2);
@@ -701,9 +700,9 @@
             gc.gridx = 3;
             gc.weightx = 0.0;
-            pnl.add(new JLabel(tr("Time:")),gc);
+            pnl.add(new JLabel(tr("Time:")), gc);
 
             gc.gridx = 4;
             gc.weightx = 0.3;
-            pnl.add(tfClosedAfterTime2 = new JosmTextField(),gc);
+            pnl.add(tfClosedAfterTime2 = new JosmTextField(), gc);
             SelectAllOnFocusGainedDecorator.decorate(tfClosedAfterTime2);
             valClosedAfterTime2 = TimeValidator.decorate(tfClosedAfterTime2);
@@ -714,5 +713,5 @@
             gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 0.0;
-            gc.insets = new Insets(0,0,0,3);
+            gc.insets = new Insets(0, 0, 0, 3);
             pnl.add(new JLabel(tr("Created before - ")), gc);
 
@@ -720,10 +719,10 @@
             gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 0.0;
-            gc.insets = new Insets(0,0,0,3);
+            gc.insets = new Insets(0, 0, 0, 3);
             pnl.add(new JLabel(tr("Date:")), gc);
 
             gc.gridx = 2;
             gc.weightx = 0.7;
-            pnl.add(tfCreatedBeforeDate = new JosmTextField(),gc);
+            pnl.add(tfCreatedBeforeDate = new JosmTextField(), gc);
             SelectAllOnFocusGainedDecorator.decorate(tfCreatedBeforeDate);
             valCreatedBeforeDate = DateValidator.decorate(tfCreatedBeforeDate);
@@ -732,9 +731,9 @@
             gc.gridx = 3;
             gc.weightx = 0.0;
-            pnl.add(new JLabel(tr("Time:")),gc);
+            pnl.add(new JLabel(tr("Time:")), gc);
 
             gc.gridx = 4;
             gc.weightx = 0.3;
-            pnl.add(tfCreatedBeforeTime = new JosmTextField(),gc);
+            pnl.add(tfCreatedBeforeTime = new JosmTextField(), gc);
             SelectAllOnFocusGainedDecorator.decorate(tfCreatedBeforeTime);
             valCreatedBeforeTime = TimeValidator.decorate(tfCreatedBeforeTime);
@@ -747,8 +746,8 @@
             setLayout(new GridBagLayout());
             setBorder(BorderFactory.createCompoundBorder(
-                    BorderFactory.createEmptyBorder(3,3,3,3),
+                    BorderFactory.createEmptyBorder(3, 3, 3, 3),
                     BorderFactory.createCompoundBorder(
                             BorderFactory.createLineBorder(Color.GRAY),
-                            BorderFactory.createEmptyBorder(5,5,5,5)
+                            BorderFactory.createEmptyBorder(5, 5, 5, 5)
                     )
             ));
@@ -759,10 +758,10 @@
             gc.anchor = GridBagConstraints.NORTHWEST;
             gc.gridx = 0;
-            gc.fill= GridBagConstraints.HORIZONTAL;
+            gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 0.0;
             add(rbClosedAfter = new JRadioButton(), gc);
 
             gc.gridx = 1;
-            gc.fill =  GridBagConstraints.HORIZONTAL;
+            gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 1.0;
             add(new JMultilineLabel(tr("Only changesets closed after the following date/time")), gc);
@@ -770,7 +769,7 @@
             gc.gridx = 1;
             gc.gridy = 1;
-            gc.fill =  GridBagConstraints.HORIZONTAL;
-            gc.weightx = 1.0;
-            add(buildClosedAfterInputPanel(),gc);
+            gc.fill = GridBagConstraints.HORIZONTAL;
+            gc.weightx = 1.0;
+            add(buildClosedAfterInputPanel(), gc);
 
             // -- changesets closed after a specific date/time and created before a specific date time
@@ -780,10 +779,10 @@
             gc.gridy = 2;
             gc.gridx = 0;
-            gc.fill= GridBagConstraints.HORIZONTAL;
+            gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 0.0;
             add(rbClosedAfterAndCreatedBefore = new JRadioButton(), gc);
 
             gc.gridx = 1;
-            gc.fill =  GridBagConstraints.HORIZONTAL;
+            gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 1.0;
             add(new JMultilineLabel(tr("Only changesets closed after and created before a specific date/time")), gc);
@@ -791,7 +790,7 @@
             gc.gridx = 1;
             gc.gridy = 3;
-            gc.fill =  GridBagConstraints.HORIZONTAL;
-            gc.weightx = 1.0;
-            add(buildClosedAfterAndCreatedBeforeInputPanel(),gc);
+            gc.fill = GridBagConstraints.HORIZONTAL;
+            gc.weightx = 1.0;
+            add(buildClosedAfterAndCreatedBeforeInputPanel(), gc);
 
             ButtonGroup bg = new ButtonGroup();
@@ -876,5 +875,4 @@
         }
 
-
         public void rememberSettings() {
             String prefRoot = "changeset-query.advanced.time-restrictions";
@@ -930,8 +928,8 @@
         public BBoxRestrictionPanel() {
             setBorder(BorderFactory.createCompoundBorder(
-                    BorderFactory.createEmptyBorder(3,3,3,3),
+                    BorderFactory.createEmptyBorder(3, 3, 3, 3),
                     BorderFactory.createCompoundBorder(
                             BorderFactory.createLineBorder(Color.GRAY),
-                            BorderFactory.createEmptyBorder(5,5,5,5)
+                            BorderFactory.createEmptyBorder(5, 5, 5, 5)
                     )
             ));
@@ -994,5 +992,5 @@
                     return;
                 }
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 feedbackInvalid(tr("The current value is not a valid user ID. Please enter an integer value > 0"));
                 return;
@@ -1008,5 +1006,5 @@
                 if (uid > 0) return uid;
                 return 0;
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 return 0;
             }
@@ -1163,5 +1161,5 @@
                 try {
                     return DateFormat.getTimeInstance(style, Locale.getDefault()).parse(getComponent().getText());
-                } catch(ParseException e) {
+                } catch (ParseException e) {
                     continue;
                 }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java	(revision 8510)
@@ -64,5 +64,5 @@
         gc.fill = GridBagConstraints.NONE;
         gc.anchor = GridBagConstraints.NORTHWEST;
-        gc.insets = new Insets(0,0,5,3);
+        gc.insets = new Insets(0, 0, 5, 3);
         pnl.add(rbQueries.get(BasicQuery.MOST_RECENT_CHANGESETS), gc);
 
@@ -100,5 +100,5 @@
         gc.gridy = 3;
         gc.gridwidth = 2;
-        gc.insets = new Insets(5,0,3,3);
+        gc.insets = new Insets(5, 0, 3, 3);
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 1.0;
@@ -111,5 +111,5 @@
         gc.gridy = 4;
         gc.gridwidth = 2;
-        gc.insets = new Insets(5,0,3,3);
+        gc.insets = new Insets(5, 0, 3, 3);
         gc.fill = GridBagConstraints.BOTH;
         gc.weightx = 1.0;
@@ -131,6 +131,6 @@
 
     protected final void build() {
-        setLayout(new BorderLayout(0,5));
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        setLayout(new BorderLayout(0, 5));
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         add(buildInfoPanel(), BorderLayout.NORTH);
         add(buildQueriesPanel(), BorderLayout.CENTER);
@@ -153,5 +153,6 @@
         if (JosmUserIdentityManager.getInstance().isAnonymous()) {
             rbQueries.get(BasicQuery.MY_OPEN_CHANGESETS).setEnabled(false);
-            lbl.setText(tr("<html>Download my open changesets<br><em>Disabled. Please enter your OSM user name in the preferences first.</em></html>"));
+            lbl.setText(tr("<html>Download my open changesets<br><em>Disabled. " +
+                    "Please enter your OSM user name in the preferences first.</em></html>"));
         } else {
             rbQueries.get(BasicQuery.MY_OPEN_CHANGESETS).setEnabled(true);
@@ -164,5 +165,6 @@
         if (!Main.isDisplayingMapView()) {
             rbQueries.get(BasicQuery.CHANGESETS_IN_MAP_VIEW).setEnabled(false);
-            lbl.setText(tr("<html>Download changesets in the current map view.<br><em>Disabled. There is currently no map view active.</em></html>"));
+            lbl.setText(tr("<html>Download changesets in the current map view.<br><em>Disabled. " +
+                    "There is currently no map view active.</em></html>"));
         } else {
             rbQueries.get(BasicQuery.CHANGESETS_IN_MAP_VIEW).setEnabled(true);
@@ -191,5 +193,5 @@
             try {
                 q = BasicQuery.valueOf(BasicQuery.class, value);
-            } catch(IllegalArgumentException e) {
+            } catch (IllegalArgumentException e) {
                 Main.warn(tr("Unexpected value for preference ''{0}'', got ''{1}''. Resetting to default query.",
                         "changeset-query.basic.query", value));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryDialog.java	(revision 8510)
@@ -145,5 +145,5 @@
                     WindowGeometry.centerInWindow(
                             getParent(),
-                            new Dimension(400,400)
+                            new Dimension(400, 400)
                     )
             ).applySafe(this);
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryTask.java	(revision 8510)
@@ -80,10 +80,10 @@
     protected void cancel() {
         canceled = true;
-        synchronized(this) {
+        synchronized (this) {
             if (userInfoReader != null) {
                 userInfoReader.cancel();
             }
         }
-        synchronized(this) {
+        synchronized (this) {
             if (changesetReader != null) {
                 changesetReader.cancel();
@@ -126,11 +126,11 @@
             try {
                 SwingUtilities.invokeAndWait(r);
-            } catch(InterruptedException e) {
+            } catch (InterruptedException e) {
                 Main.warn("InterruptedException in "+getClass().getSimpleName()+" while updating changeset cache");
-            } catch(InvocationTargetException e) {
+            } catch (InvocationTargetException e) {
                 Throwable t = e.getTargetException();
                 if (t instanceof RuntimeException) {
                     BugReportExceptionHandler.handleException(t);
-                } else if (t instanceof Exception){
+                } else if (t instanceof Exception) {
                     ExceptionUtil.explainException(e);
                 } else {
@@ -149,9 +149,9 @@
         getProgressMonitor().indeterminateSubTask(tr("Determine user id for current user..."));
 
-        synchronized(this) {
+        synchronized (this) {
             userInfoReader = new OsmServerUserInfoReader();
         }
-        UserInfo info = userInfoReader.fetchUserInfo(getProgressMonitor().createSubTaskMonitor(1,false));
-        synchronized(this) {
+        UserInfo info = userInfoReader.fetchUserInfo(getProgressMonitor().createSubTaskMonitor(1, false));
+        synchronized (this) {
             userInfoReader = null;
         }
@@ -175,6 +175,6 @@
             if (canceled) return;
             getProgressMonitor().indeterminateSubTask(tr("Query and download changesets ..."));
-            synchronized(this) {
-                changesetReader= new OsmServerChangesetReader();
+            synchronized (this) {
+                changesetReader = new OsmServerChangesetReader();
             }
             downloadedChangesets = new HashSet<>();
@@ -183,8 +183,8 @@
                 changesetReader = null;
             }
-        } catch(OsmTransferCanceledException e) {
+        } catch (OsmTransferCanceledException e) {
             // thrown if user cancel the authentication dialog
             canceled = true;
-        }  catch(OsmTransferException e) {
+        }  catch (OsmTransferException e) {
             if (canceled)
                 return;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java	(revision 8510)
@@ -40,5 +40,5 @@
         gc.weightx = 0.0;
         gc.fill = GridBagConstraints.HORIZONTAL;
-        gc.insets  = new Insets(0,0,0,5);
+        gc.insets  = new Insets(0, 0, 0, 5);
         pnl.add(new JLabel(tr("URL: ")), gc);
 
@@ -61,5 +61,5 @@
         gc.fill = GridBagConstraints.HORIZONTAL;
         pnl.add(lblValid = new JLabel(), gc);
-        lblValid.setPreferredSize(new Dimension(20,20));
+        lblValid.setPreferredSize(new Dimension(20, 20));
         return pnl;
     }
@@ -96,16 +96,16 @@
     protected final void build() {
         setLayout(new GridBagLayout());
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
 
         GridBagConstraints gc = new GridBagConstraints();
         gc.weightx = 1.0;
         gc.fill = GridBagConstraints.HORIZONTAL;
-        gc.insets = new Insets(0,0,10,0);
-        add(buildHelpPanel(),gc);
+        gc.insets = new Insets(0, 0, 10, 0);
+        add(buildHelpPanel(), gc);
 
         gc.gridy = 1;
         gc.weightx = 1.0;
         gc.fill = GridBagConstraints.HORIZONTAL;
-        add(buildURLPanel(),gc);
+        add(buildURLPanel(), gc);
 
         gc.gridy = 2;
@@ -113,5 +113,5 @@
         gc.weighty = 1.0;
         gc.fill = GridBagConstraints.BOTH;
-        add(new JPanel(),gc);
+        add(new JPanel(), gc);
     }
 
@@ -131,5 +131,5 @@
         try {
             url = new URL(text);
-        } catch(MalformedURLException e) {
+        } catch (MalformedURLException e) {
             return null;
         }
@@ -166,7 +166,8 @@
     class ChangetQueryUrlValidator implements DocumentListener {
         protected String getCurrentFeedback() {
-            String fb = (String)lblValid.getClientProperty("valid");
+            String fb = (String) lblValid.getClientProperty("valid");
             return fb == null ? "none" : fb;
         }
+
         protected void feedbackValid() {
             if ("valid".equals(getCurrentFeedback())) return;
@@ -201,4 +202,5 @@
             }
         }
+
         @Override
         public void changedUpdate(DocumentEvent e) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesCellRenderer.java	(revision 8510)
@@ -60,5 +60,5 @@
                         otherCount = v.size();
                     } else {
-                        blankCount = (Integer)v.get("");
+                        blankCount = (Integer) v.get("");
                         otherCount = v.size()-1;
                     }
@@ -75,5 +75,5 @@
                         sb.append(trn("{0} different", "{0} different", otherCount, otherCount));
                     }
-                    if(blankCount > 0) {
+                    if (blankCount > 0) {
                         /* I18n: properties display partial string joined with comma */
                         sb.append(trn(", {0} unset", ", {0} unset", blankCount, blankCount));
@@ -88,6 +88,6 @@
                 }
             }
-            ((JLabel)c).putClientProperty("html.disable", Boolean.TRUE); // Fix #8730
-            ((JLabel)c).setText(str);
+            ((JLabel) c).putClientProperty("html.disable", Boolean.TRUE); // Fix #8730
+            ((JLabel) c).setText(str);
             if (Main.pref.getBoolean("display.discardable-keys", false)) {
                 String key = null;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 8510)
@@ -188,5 +188,5 @@
     private final SelectMembersAction addMembersToSelectionAction = new SelectMembersAction(true);
 
-    private final transient HighlightHelper highlightHelper= new HighlightHelper();
+    private final transient HighlightHelper highlightHelper = new HighlightHelper();
 
     /**
@@ -225,6 +225,4 @@
     };
 
-    // <editor-fold defaultstate="collapsed" desc="Dialog construction and helper methods">
-
     /**
      * Create a new PropertiesDialog
@@ -246,8 +244,8 @@
         boolean top = Main.pref.getBoolean("properties.presets.top", true);
         bothTables.setLayout(new GridBagLayout());
-        if(top) {
+        if (top) {
             bothTables.add(presets, GBC.std().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2).anchor(GBC.NORTHWEST));
             double epsilon = Double.MIN_VALUE; // need to set a weight or else anchor value is ignored
-            bothTables.add(pluginHook, GBC.eol().insets(0,1,1,1).anchor(GBC.NORTHEAST).weight(epsilon, epsilon));
+            bothTables.add(pluginHook, GBC.eol().insets(0, 1, 1, 1).anchor(GBC.NORTHEAST).weight(epsilon, epsilon));
         }
         bothTables.add(selectSth, GBC.eol().fill().insets(10, 10, 10, 10));
@@ -256,5 +254,5 @@
         bothTables.add(membershipTable.getTableHeader(), GBC.eol().fill(GBC.HORIZONTAL));
         bothTables.add(membershipTable, GBC.eol().fill(GBC.BOTH));
-        if(!top) {
+        if (!top) {
             bothTables.add(presets, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 2, 5, 2));
         }
@@ -287,5 +285,5 @@
     private void buildTagsTable() {
         // setting up the tags table
-        tagData.setColumnIdentifiers(new String[]{tr("Key"),tr("Value")});
+        tagData.setColumnIdentifiers(new String[]{tr("Key"), tr("Value")});
         tagTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
         tagTable.getTableHeader().setReorderingAllowed(false);
@@ -297,5 +295,5 @@
 
     private void buildMembershipTable() {
-        membershipData.setColumnIdentifiers(new String[]{tr("Member Of"),tr("Role"),tr("Position")});
+        membershipData.setColumnIdentifiers(new String[]{tr("Member Of"), tr("Role"), tr("Position")});
         membershipTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
 
@@ -309,6 +307,6 @@
                     return this;
                 if (c instanceof JLabel) {
-                    JLabel label = (JLabel)c;
-                    Relation r = (Relation)value;
+                    JLabel label = (JLabel) c;
+                    Relation r = (Relation) value;
                     label.setText(r.getDisplayName(DefaultNameFormatter.getInstance()));
                     if (r.isDisabledAndHidden()) {
@@ -326,5 +324,5 @@
                     return this;
                 Component c = super.getTableCellRendererComponent(table, value, isSelected, false, row, column);
-                boolean isDisabledAndHidden = ((Relation)table.getValueAt(row, 0)).isDisabledAndHidden();
+                boolean isDisabledAndHidden = ((Relation) table.getValueAt(row, 0)).isDisabledAndHidden();
                 if (c instanceof JLabel) {
                     JLabel label = (JLabel) c;
@@ -342,7 +340,7 @@
                     boolean isSelected, boolean hasFocus, int row, int column) {
                 Component c = super.getTableCellRendererComponent(table, value, isSelected, false, row, column);
-                boolean isDisabledAndHidden = ((Relation)table.getValueAt(row, 0)).isDisabledAndHidden();
+                boolean isDisabledAndHidden = ((Relation) table.getValueAt(row, 0)).isDisabledAndHidden();
                 if (c instanceof JLabel) {
-                    JLabel label = (JLabel)c;
+                    JLabel label = (JLabel) c;
                     label.setText(((MemberInfo) table.getValueAt(row, 1)).getPositionString());
                     if (isDisabledAndHidden) {
@@ -416,5 +414,5 @@
                 if (Main.isDisplayingMapView()) {
                     int row = membershipTable.rowAtPoint(e.getPoint());
-                    if (row>=0) {
+                    if (row >= 0) {
                         if (highlightHelper.highlightOnly((Relation) membershipTable.getValueAt(row, 0))) {
                             Main.map.mapView.repaint();
@@ -462,13 +460,13 @@
         tagTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
                 .put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "onTableEnter");
-        tagTable.getActionMap().put("onTableEnter",editAction);
+        tagTable.getActionMap().put("onTableEnter", editAction);
         membershipTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
-                .put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),"onTableEnter");
-        membershipTable.getActionMap().put("onTableEnter",editAction);
+                .put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "onTableEnter");
+        membershipTable.getActionMap().put("onTableEnter", editAction);
 
         // INSERT button = addAction, open "add tag" dialog
         tagTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
-                .put(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, 0),"onTableInsert");
-        tagTable.getActionMap().put("onTableInsert",addAction);
+                .put(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, 0), "onTableInsert");
+        tagTable.getActionMap().put("onTableInsert", addAction);
 
         // unassign some standard shortcuts for JTable to allow upload / download / image browsing
@@ -480,6 +478,6 @@
 
         tagTable.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
-                .put(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK),"onCopy");
-        tagTable.getActionMap().put("onCopy",copyKeyValueAction);
+                .put(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK), "onCopy");
+        tagTable.getActionMap().put("onCopy", copyKeyValueAction);
 
         // allow using enter to add tags for all look&feel configurations
@@ -488,5 +486,5 @@
         // DEL button = deleteAction
         getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
-                KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0),"delete"
+                KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "delete"
                 );
         getActionMap().put("delete", deleteAction);
@@ -505,5 +503,5 @@
      */
     private void editMembership(int row) {
-        Relation relation = (Relation)membershipData.getValueAt(row, 0);
+        Relation relation = (Relation) membershipData.getValueAt(row, 0);
         Main.map.relationListDialog.selectRelation(relation);
         RelationEditor.getEditor(
@@ -515,5 +513,5 @@
 
     private int findRow(TableModel model, Object value) {
-        for (int i=0; i<model.getRowCount(); i++) {
+        for (int i = 0; i < model.getRowCount(); i++) {
             if (model.getValueAt(i, 0).equals(value))
                 return i;
@@ -529,8 +527,4 @@
         selectionChanged(null);
     }
-
-   // </editor-fold>
-
-    // <editor-fold defaultstate="collapsed" desc="Event listeners methods">
 
     @Override
@@ -596,8 +590,8 @@
         selectedTag = editHelper.getChangedKey(); // select last added or last edited key by default
         if (selectedTag == null && tagTable.getSelectedRowCount() == 1) {
-            selectedTag = (String)tagData.getValueAt(tagTable.getSelectedRow(), 0);
+            selectedTag = (String) tagData.getValueAt(tagTable.getSelectedRow(), 0);
         }
         if (membershipTable.getSelectedRowCount() == 1) {
-            selectedRelation = (Relation)membershipData.getValueAt(membershipTable.getSelectedRow(), 0);
+            selectedRelation = (Relation) membershipData.getValueAt(membershipTable.getSelectedRow(), 0);
         }
 
@@ -648,5 +642,5 @@
                     Relation r = (Relation) ref;
                     MemberInfo mi = roles.get(r);
-                    if(mi == null) {
+                    if (mi == null) {
                         mi = new MemberInfo(newSel);
                     }
@@ -696,12 +690,12 @@
         } else if (selectedRelation != null && (selectedIndex = findRow(membershipData, selectedRelation)) != -1) {
             membershipTable.changeSelection(selectedIndex, 0, false, false);
-        } else if(hasTags) {
+        } else if (hasTags) {
             tagTable.changeSelection(0, 0, false, false);
-        } else if(hasMemberships) {
+        } else if (hasMemberships) {
             membershipTable.changeSelection(0, 0, false, false);
         }
 
-        if(tagData.getRowCount() != 0 || membershipData.getRowCount() != 0) {
-            if(newSel.size() > 1) {
+        if (tagData.getRowCount() != 0 || membershipData.getRowCount() != 0) {
+            if (newSel.size() > 1) {
                 setTitle(tr("Objects: {2} / Tags: {0} / Memberships: {1}",
                     tagData.getRowCount(), membershipData.getRowCount(), newSel.size()));
@@ -734,8 +728,4 @@
     }
 
-    // </editor-fold>
-
-    // <editor-fold defaultstate="collapsed" desc="Methods that are called by plugins to extend fuctionality ">
-
     /**
      * Replies the tag popup menu handler.
@@ -777,12 +767,11 @@
     }
 
-    // </editor-fold>
-
-     /**
+    /**
      * Class that watches for mouse clicks
      * @author imi
      */
     public class MouseClickWatch extends MouseAdapter {
-        @Override public void mouseClicked(MouseEvent e) {
+        @Override
+        public void mouseClicked(MouseEvent e) {
             if (e.getClickCount() < 2) {
                 // single click, clear selection in other table not clicked in
@@ -812,5 +801,7 @@
             }
         }
-        @Override public void mousePressed(MouseEvent e) {
+
+        @Override
+        public void mousePressed(MouseEvent e) {
             if (e.getSource() == tagTable) {
                 membershipTable.clearSelection();
@@ -880,8 +871,11 @@
      */
     public static class ReadOnlyTableModel extends DefaultTableModel {
-        @Override public boolean isCellEditable(int row, int column) {
+        @Override
+        public boolean isCellEditable(int row, int column) {
             return false;
         }
-        @Override public Class<?> getColumnClass(int columnIndex) {
+
+        @Override
+        public Class<?> getColumnClass(int columnIndex) {
             return String.class;
         }
@@ -902,5 +896,5 @@
         }
 
-        protected void deleteTags(int[] rows){
+        protected void deleteTags(int[] rows) {
             // convert list of rows to HashMap (and find gap for nextKey)
             Map<String, String> tags = new HashMap<>(rows.length);
@@ -925,5 +919,5 @@
                     nextKeyIndex++;
                 }
-                nextKey = (String)tagData.getValueAt(nextKeyIndex, 0);
+                nextKey = (String) tagData.getValueAt(nextKeyIndex, 0);
             }
 
@@ -938,10 +932,10 @@
 
         protected void deleteFromRelation(int row) {
-            Relation cur = (Relation)membershipData.getValueAt(row, 0);
+            Relation cur = (Relation) membershipData.getValueAt(row, 0);
 
             Relation nextRelation = null;
             int rowCount = membershipTable.getRowCount();
             if (rowCount > 1) {
-                nextRelation = (Relation)membershipData.getValueAt(row + 1 < rowCount ? row + 1 : row - 1, 0);
+                nextRelation = (Relation) membershipData.getValueAt(row + 1 < rowCount ? row + 1 : row - 1, 0);
             }
 
@@ -954,5 +948,5 @@
             ed.showDialog();
 
-            if(ed.getValue() != 1)
+            if (ed.getValue() != 1)
                 return;
 
@@ -978,5 +972,5 @@
                 int[] rows = membershipTable.getSelectedRows();
                 // delete from last relation to conserve row numbers in the table
-                for (int i=rows.length-1; i>=0; i--) {
+                for (int i = rows.length-1; i >= 0; i--) {
                     deleteFromRelation(rows[i]);
                 }
@@ -1083,5 +1077,5 @@
                 } else if (membershipTable.getSelectedRowCount() == 1) {
                     row = membershipTable.getSelectedRow();
-                    String type = ((Relation)membershipData.getValueAt(row, 0)).get("type");
+                    String type = ((Relation) membershipData.getValueAt(row, 0)).get("type");
                     if (type != null) {
                         type = Utils.encodeUrl(type);
@@ -1101,5 +1095,5 @@
                 }
 
-                Main.worker.execute(new Runnable(){
+                Main.worker.execute(new Runnable() {
                     @Override public void run() {
                         try {
@@ -1108,5 +1102,5 @@
                             for (URI u : uris) {
                                 conn = Utils.openHttpConnection(u.toURL());
-                                conn.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
+                                conn.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect", 15)*1000);
 
                                 if (conn.getResponseCode() != 200) {
@@ -1122,5 +1116,5 @@
                                                 .replaceFirst("/wiki/", "/w/index.php?redirect=no&title=")
                                                 ).toURL());
-                                        conn.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
+                                        conn.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect", 15)*1000);
                                     }
 
@@ -1187,5 +1181,5 @@
                     return;
                 for (OsmPrimitive p : sel) {
-                    Collection<String> s = getString(p,key);
+                    Collection<String> s = getString(p, key);
                     if (s != null) {
                         values.addAll(s);
@@ -1201,4 +1195,7 @@
     class CopyValueAction extends AbstractCopyAction {
 
+        /**
+         * Constructs a new {@code CopyValueAction}.
+         */
         public CopyValueAction() {
             putValue(NAME, tr("Copy Value"));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 8510)
@@ -153,5 +153,5 @@
 
         String key = tagData.getValueAt(row, 0).toString();
-        objKey=key;
+        objKey = key;
 
         @SuppressWarnings("unchecked")
@@ -262,5 +262,5 @@
             @Override
             public Component getListCellRendererComponent(JList<? extends AutoCompletionListItem> list,
-                    AutoCompletionListItem value, int index, boolean isSelected,  boolean cellHasFocus){
+                    AutoCompletionListItem value, int index, boolean isSelected,  boolean cellHasFocus) {
                 Component c = def.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
                 if (c instanceof JLabel) {
@@ -280,6 +280,6 @@
 
         private EditTagDialog(String key, Map<String, Integer> map, final boolean initialFocusOnKey) {
-            super(Main.parent, trn("Change value?", "Change values?", map.size()), new String[] {tr("OK"),tr("Cancel")});
-            setButtonIcons(new String[] {"ok","cancel"});
+            super(Main.parent, trn("Change value?", "Change values?", map.size()), new String[] {tr("OK"), tr("Cancel")});
+            setButtonIcons(new String[] {"ok", "cancel"});
             setCancelButton(2);
             configureContextsensitiveHelp("/Dialog/EditValue", true /* show help button */);
@@ -307,5 +307,5 @@
             keys.setSelectedItem(key);
 
-            p.add(Box.createVerticalStrut(5),GBC.eol());
+            p.add(Box.createVerticalStrut(5), GBC.eol());
             p.add(new JLabel(tr("Key")), GBC.std());
             p.add(Box.createHorizontalStrut(10), GBC.std());
@@ -315,5 +315,5 @@
             Collections.sort(valueList, usedValuesAwareComparator);
 
-            final String selection= m.size()!=1?tr("<different>"):m.entrySet().iterator().next().getKey();
+            final String selection = m.size() != 1 ? tr("<different>") : m.entrySet().iterator().next().getKey();
 
             values = new AutoCompletingComboBox(selection);
@@ -324,5 +324,5 @@
             values.setSelectedItem(selection);
             values.getEditor().setItem(selection);
-            p.add(Box.createVerticalStrut(5),GBC.eol());
+            p.add(Box.createVerticalStrut(5), GBC.eol());
             p.add(new JLabel(tr("Value")), GBC.std());
             p.add(Box.createHorizontalStrut(10), GBC.std());
@@ -496,5 +496,5 @@
         protected FocusAdapter addFocusAdapter(final AutoCompletionManager autocomplete, final Comparator<AutoCompletionListItem> comparator) {
            // get the combo box' editor component
-           JTextComponent editor = (JTextComponent)values.getEditor().getEditorComponent();
+           JTextComponent editor = (JTextComponent) values.getEditor().getEditorComponent();
            // Refresh the values model when focus is gained
            FocusAdapter focus = new FocusAdapter() {
@@ -508,5 +508,5 @@
                    values.setPossibleACItems(valueList);
                    values.getEditor().selectAll();
-                   objKey=key;
+                   objKey = key;
                }
            };
@@ -517,8 +517,8 @@
         protected JPopupMenu popupMenu = new JPopupMenu() {
             private JCheckBoxMenuItem fixTagLanguageCb = new JCheckBoxMenuItem(
-                new AbstractAction(tr("Use English language for tag by default")){
+                new AbstractAction(tr("Use English language for tag by default")) {
                 @Override
                 public void actionPerformed(ActionEvent e) {
-                    boolean use=((JCheckBoxMenuItem) e.getSource()).getState();
+                    boolean use = ((JCheckBoxMenuItem) e.getSource()).getState();
                     PROPERTY_FIX_TAG_LOCALE.put(use);
                     keys.setFixedLocale(use);
@@ -539,6 +539,6 @@
 
         public AddTagsDialog() {
-            super(Main.parent, tr("Add value?"), new String[] {tr("OK"),tr("Cancel")});
-            setButtonIcons(new String[] {"ok","cancel"});
+            super(Main.parent, tr("Add value?"), new String[] {tr("OK"), tr("Cancel")});
+            setButtonIcons(new String[] {"ok", "cancel"});
             setCancelButton(2);
             configureContextsensitiveHelp("/Dialog/AddValue", true /* show help button */);
@@ -549,5 +549,5 @@
 
             mainPanel.add(new JLabel("<html>"+trn("This will change up to {0} object.",
-                "This will change up to {0} objects.", sel.size(),sel.size())
+                "This will change up to {0} objects.", sel.size(), sel.size())
                 +"<br><br>"+tr("Please select a key")), GBC.eol().fill(GBC.HORIZONTAL));
 
@@ -624,8 +624,8 @@
             });
             JCheckBoxMenuItem rememberLastTags = new JCheckBoxMenuItem(
-                new AbstractAction(tr("Remember last used tags after a restart")){
+                new AbstractAction(tr("Remember last used tags after a restart")) {
                 @Override
                 public void actionPerformed(ActionEvent e) {
-                    boolean sel=((JCheckBoxMenuItem) e.getSource()).getState();
+                    boolean sel = ((JCheckBoxMenuItem) e.getSource()).getState();
                     PROPERTY_REMEMBER_TAGS.put(sel);
                     if (sel) saveTagsIfNeeded();
@@ -650,5 +650,5 @@
             lines.add(code(KeyEvent.getKeyModifiersText(KeyEvent.SHIFT_MASK)+"+"+KeyEvent.getKeyText(KeyEvent.VK_ENTER))
                     +tr("to add without closing the dialog"));
-            sc = Shortcut.findShortcut(KeyEvent.VK_1, commandDownMask|KeyEvent.SHIFT_DOWN_MASK);
+            sc = Shortcut.findShortcut(KeyEvent.VK_1, commandDownMask | KeyEvent.SHIFT_DOWN_MASK);
             if (sc != null) {
                 lines.add(code(sc.getKeyText()) + tr("to add first suggestion without closing the dialog"));
@@ -667,5 +667,5 @@
             try {
                 int v = Integer.parseInt(s);
-                if (v>=0 && v<=MAX_LRU_TAGS_NUMBER) {
+                if (v >= 0 && v <= MAX_LRU_TAGS_NUMBER) {
                     PROPERTY_RECENT_TAGS_NUMBER.put(v);
                     return;
@@ -762,5 +762,5 @@
                             action.actionPerformed(null);
                             // add tags and close window on double-click
-                            if (e.getClickCount()>1) {
+                            if (e.getClickCount() > 1) {
                                 buttonAction(0, null); // emulate OK click and close the dialog
                             }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 8510)
@@ -94,9 +94,9 @@
 
         // ---
-        DownloadAllChildRelationsAction downloadAction= new DownloadAllChildRelationsAction();
+        DownloadAllChildRelationsAction downloadAction = new DownloadAllChildRelationsAction();
         pnl.add(new JButton(downloadAction));
 
         // ---
-        DownloadSelectedAction downloadSelectedAction= new DownloadSelectedAction();
+        DownloadSelectedAction downloadSelectedAction = new DownloadSelectedAction();
         childTree.addTreeSelectionListener(downloadSelectedAction);
         pnl.add(new JButton(downloadSelectedAction));
@@ -161,8 +161,8 @@
     protected Dialog getParentDialog() {
         Component c  = this;
-        while(c != null && !(c instanceof Dialog)) {
+        while (c != null && !(c instanceof Dialog)) {
             c = c.getParent();
         }
-        return (Dialog)c;
+        return (Dialog) c;
     }
 
@@ -190,6 +190,6 @@
             // do not launch more than 10 relation editors in parallel
             //
-            for (int i=0; i < Math.min(selection.length,10);i++) {
-                Relation r = (Relation)selection[i].getLastPathComponent();
+            for (int i = 0; i < Math.min(selection.length, 10); i++) {
+                Relation r = (Relation) selection[i].getLastPathComponent();
                 if (r.isIncomplete()) {
                     continue;
@@ -225,5 +225,5 @@
 
         public void run() {
-            Main.worker.submit(new DownloadAllChildrenTask(getParentDialog(), (Relation)model.getRoot()));
+            Main.worker.submit(new DownloadAllChildrenTask(getParentDialog(), (Relation) model.getRoot()));
         }
 
@@ -262,5 +262,5 @@
                 relations.add((Relation) aSelection.getLastPathComponent());
             }
-            Main.worker.submit(new DownloadRelationSetTask(getParentDialog(),relations));
+            Main.worker.submit(new DownloadRelationSetTask(getParentDialog(), relations));
         }
 
@@ -293,7 +293,7 @@
         }
 
-        protected void refreshView(Relation relation){
-            for (int i=0; i < childTree.getRowCount(); i++) {
-                Relation reference = (Relation)childTree.getPathForRow(i).getLastPathComponent();
+        protected void refreshView(Relation relation) {
+            for (int i = 0; i < childTree.getRowCount(); i++) {
+                Relation reference = (Relation) childTree.getPathForRow(i).getLastPathComponent();
                 if (reference == relation) {
                     model.refreshNode(childTree.getPathForRow(i));
@@ -398,5 +398,5 @@
         protected void realRun() throws SAXException, IOException, OsmTransferException {
             try {
-                while(!relationsToDownload.isEmpty() && !canceled) {
+                while (!relationsToDownload.isEmpty() && !canceled) {
                     Relation r = relationsToDownload.pop();
                     if (r.isNew()) {
@@ -411,5 +411,5 @@
                         dataSet = reader.parseOsm(progressMonitor
                                 .createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));
-                    } catch(OsmApiException e) {
+                    } catch (OsmApiException e) {
                         if (e.getResponseCode() == HttpURLConnection.HTTP_GONE) {
                             warnBecauseOfDeletedRelation(r);
@@ -463,5 +463,5 @@
             try {
                 Iterator<Relation> it = relations.iterator();
-                while(it.hasNext() && !canceled) {
+                while (it.hasNext() && !canceled) {
                     Relation r = it.next();
                     if (r.isNew()) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java	(revision 8510)
@@ -41,5 +41,5 @@
     public DownloadRelationMemberTask(Relation parent, Collection<OsmPrimitive> children, OsmDataLayer curLayer, Dialog dialog) {
         super(tr("Download relation members"), new PleaseWaitProgressMonitor(dialog), false /* don't ignore exception */);
-        if(parent != null)
+        if (parent != null)
             this.parents.add(parent);
         this.children = children;
@@ -49,5 +49,5 @@
     public DownloadRelationMemberTask(Relation parent, Collection<OsmPrimitive> children, OsmDataLayer curLayer) {
         super(tr("Download relation members"), false /* don't ignore exception */);
-        if(parent != null)
+        if (parent != null)
             this.parents.add(parent);
         this.children = children;
@@ -73,5 +73,5 @@
     protected void cancel() {
         canceled = true;
-        synchronized(this) {
+        synchronized (this) {
             if (objectReader != null) {
                 objectReader.cancel();
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java	(revision 8510)
@@ -53,5 +53,5 @@
     protected void cancel() {
         canceled = true;
-        synchronized(this) {
+        synchronized (this) {
             if (objectReader != null) {
                 objectReader.cancel();
@@ -73,5 +73,5 @@
         try {
             final DataSet allDownloads = new DataSet();
-            int i=0;
+            int i = 0;
             getProgressMonitor().setTicksCount(relations.size());
             for (Relation relation: relations) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 8510)
@@ -229,5 +229,5 @@
         selectionTable.setFocusable(false);
         memberTableModel.setSelectedMembers(selectedMembers);
-        HelpUtil.setHelpContext(getRootPane(),ht("/Dialog/RelationEditor"));
+        HelpUtil.setHelpContext(getRootPane(), ht("/Dialog/RelationEditor"));
     }
 
@@ -376,5 +376,5 @@
         tfRole.setEnabled(memberTable.getSelectedRowCount() > 0);
         SideButton btnApply = new SideButton(setRoleAction);
-        btnApply.setPreferredSize(new Dimension(20,20));
+        btnApply.setPreferredSize(new Dimension(20, 20));
         btnApply.setText("");
         p3.add(btnApply);
@@ -445,5 +445,5 @@
     protected JPanel buildSelectionTablePanel() {
         JPanel pnl = new JPanel(new BorderLayout());
-        MemberRoleCellEditor ce = (MemberRoleCellEditor)memberTable.getColumnModel().getColumn(0).getCellEditor();
+        MemberRoleCellEditor ce = (MemberRoleCellEditor) memberTable.getColumnModel().getColumn(0).getCellEditor();
         selectionTable = new SelectionTable(selectionTableModel, new SelectionTableColumnModel(memberTableModel));
         selectionTable.setMemberTableModel(memberTableModel);
@@ -539,8 +539,8 @@
 
         InputMap inputMap = memberTable.getInputMap(MemberTable.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
-        inputMap.put((KeyStroke) removeSelectedAction.getValue(AbstractAction.ACCELERATOR_KEY),"removeSelected");
-        inputMap.put((KeyStroke) moveUpAction.getValue(AbstractAction.ACCELERATOR_KEY),"moveUp");
-        inputMap.put((KeyStroke) moveDownAction.getValue(AbstractAction.ACCELERATOR_KEY),"moveDown");
-        inputMap.put((KeyStroke) downloadIncompleteMembersAction.getValue(AbstractAction.ACCELERATOR_KEY),"downloadIncomplete");
+        inputMap.put((KeyStroke) removeSelectedAction.getValue(AbstractAction.ACCELERATOR_KEY), "removeSelected");
+        inputMap.put((KeyStroke) moveUpAction.getValue(AbstractAction.ACCELERATOR_KEY), "moveUp");
+        inputMap.put((KeyStroke) moveDownAction.getValue(AbstractAction.ACCELERATOR_KEY), "moveDown");
+        inputMap.put((KeyStroke) downloadIncompleteMembersAction.getValue(AbstractAction.ACCELERATOR_KEY), "downloadIncomplete");
 
         return tb;
@@ -615,5 +615,5 @@
             sortBelowButton.setVisible(ExpertToggleAction.isExpert());
             RelationDialogManager.getRelationDialogManager().positionOnScreen(this);
-            if(windowMenuItem == null) {
+            if (windowMenuItem == null) {
                 addToWindowMenu();
             }
@@ -626,5 +626,5 @@
             memberTableModel.unregister();
             memberTable.unlinkAsListener();
-            if(windowMenuItem != null) {
+            if (windowMenuItem != null) {
                 Main.main.menu.windowMenu.remove(windowMenuItem);
                 windowMenuItem = null;
@@ -686,9 +686,8 @@
     }
 
-
     private void registerCopyPasteAction(AbstractAction action, Object actionName, KeyStroke shortcut) {
         int mods = shortcut.getModifiers();
         int code = shortcut.getKeyCode();
-        if (code!=KeyEvent.VK_INSERT && (mods == 0 || mods == InputEvent.SHIFT_DOWN_MASK)) {
+        if (code != KeyEvent.VK_INSERT && (mods == 0 || mods == InputEvent.SHIFT_DOWN_MASK)) {
             Main.info(tr("Sorry, shortcut \"{0}\" can not be enabled in Relation editor dialog"), shortcut);
             return;
@@ -841,5 +840,5 @@
                 List<OsmPrimitive> toAdd = filterConfirmedPrimitives(selectionTableModel.getSelection());
                 memberTableModel.addMembersAtBeginning(toAdd);
-            } catch(AddAbortException ex) {
+            } catch (AddAbortException ex) {
                 // do nothing
             }
@@ -868,5 +867,5 @@
                 List<OsmPrimitive> toAdd = filterConfirmedPrimitives(selectionTableModel.getSelection());
                 memberTableModel.addMembersAtEnd(toAdd);
-            } catch(AddAbortException ex) {
+            } catch (AddAbortException ex) {
                 // do nothing
             }
@@ -898,5 +897,5 @@
                 memberTableModel.addMembersBeforeIdx(toAdd, memberTableModel
                         .getSelectionModel().getMinSelectionIndex());
-            } catch(AddAbortException ex) {
+            } catch (AddAbortException ex) {
                 // do nothing
             }
@@ -934,5 +933,5 @@
                 memberTableModel.addMembersAfterIdx(toAdd, memberTableModel
                         .getSelectionModel().getMaxSelectionIndex());
-            } catch(AddAbortException ex) {
+            } catch (AddAbortException ex) {
                 // do nothing
             }
@@ -1249,5 +1248,5 @@
             if (newRelation.getMembersCount() == 0 && !newRelation.hasKeys())
                 return;
-            Main.main.undoRedo.add(new AddCommand(getLayer(),newRelation));
+            Main.main.undoRedo.add(new AddCommand(getLayer(), newRelation));
 
             // make sure everybody is notified about the changes
@@ -1279,5 +1278,5 @@
             memberTableModel.applyToRelation(editedRelation);
             Conflict<Relation> conflict = new Conflict<>(getRelation(), editedRelation);
-            Main.main.undoRedo.add(new ConflictAddCommand(getLayer(),conflict));
+            Main.main.undoRedo.add(new ConflictAddCommand(getLayer(), conflict));
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberRoleCellEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberRoleCellEditor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberRoleCellEditor.java	(revision 8510)
@@ -31,5 +31,5 @@
         this.relation = relation;
         editor = new AutoCompletingTextField(0, false);
-        editor.setBorder(BorderFactory.createEmptyBorder(1,1,1,1));
+        editor.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
         autoCompletionList = new AutoCompletionList();
         editor.setAutoCompletionList(autoCompletionList);
@@ -40,5 +40,5 @@
             Object value, boolean isSelected, int row, int column) {
 
-        String role = (String)value;
+        String role = (String) value;
         editor.setText(role);
         autoCompletionList.clear();
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java	(revision 8510)
@@ -66,5 +66,5 @@
      */
     protected void init() {
-        MemberRoleCellEditor ce = (MemberRoleCellEditor)getColumnModel().getColumn(0).getCellEditor();
+        MemberRoleCellEditor ce = (MemberRoleCellEditor) getColumnModel().getColumn(0).getCellEditor();
         setRowHeight(ce.getEditor().getPreferredSize().height);
         setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
@@ -104,7 +104,7 @@
 
     @Override
-    public Dimension getPreferredSize(){
+    public Dimension getPreferredSize() {
         Container c = getParent();
-        while(c != null && !(c instanceof JViewport)) {
+        while (c != null && !(c instanceof JViewport)) {
             c = c.getParent();
         }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableCellRenderer.java	(revision 8510)
@@ -19,8 +19,8 @@
 public abstract class MemberTableCellRenderer extends JLabel implements TableCellRenderer {
     public static final Color BGCOLOR_EMPTY_ROW = new Color(234, 234, 234);
-    public static final Color BGCOLOR_IN_JOSM_SELECTION = new Color(235,255,177);
+    public static final Color BGCOLOR_IN_JOSM_SELECTION = new Color(235, 255, 177);
 
     public static final Color BGCOLOR_NOT_IN_OPPOSITE = new Color(255, 197, 197);
-    public static final Color BGCOLOR_DOUBLE_ENTRY = new Color(254,226,214);
+    public static final Color BGCOLOR_DOUBLE_ENTRY = new Color(254, 226, 214);
 
     /**
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableLinkedCellRenderer.java	(revision 8510)
@@ -34,5 +34,5 @@
         this.value = (WayConnectionType) value;
         renderForeground(isSelected);
-        setToolTipText(((WayConnectionType)value).getToolTip());
+        setToolTipText(((WayConnectionType) value).getToolTip());
         renderBackground(getModel(table), null, isSelected);
         return this;
@@ -45,11 +45,11 @@
             return;
 
-        int ymax=this.getSize().height - 1;
+        int ymax = this.getSize().height - 1;
         int xloop = 10;
         int xowloop = 0;
-        if(value.isOnewayLoopForwardPart) {
+        if (value.isOnewayLoopForwardPart) {
             xowloop = -3;
         }
-        if(value.isOnewayLoopBackwardPart) {
+        if (value.isOnewayLoopBackwardPart) {
             xowloop = 3;
         }
@@ -66,5 +66,5 @@
         if (value.linkPrev) {
             g.setColor(Color.black);
-            if(value.isOnewayHead) {
+            if (value.isOnewayHead) {
                 g.fillRect(xoff - 1, 0, 3, 1);
             } else {
@@ -76,10 +76,10 @@
                 g.setColor(Color.black);
                 y1 = 5;
-                g.drawImage(corners,xoff,y1-3,xoff+3,y1, 0,0,3,3, new Color(0,0,0,0), null);
-                g.drawImage(corners,xoff+xloop-2,y1-3,xoff+xloop+1,y1, 2,0,5,3, new Color(0,0,0,0), null);
-                g.drawLine(xoff+3,y1-3,xoff+xloop-3,y1-3);
+                g.drawImage(corners, xoff, y1-3, xoff+3, y1, 0, 0, 3, 3, new Color(0, 0, 0, 0), null);
+                g.drawImage(corners, xoff+xloop-2, y1-3, xoff+xloop+1, y1, 2, 0, 5, 3, new Color(0, 0, 0, 0), null);
+                g.drawLine(xoff+3, y1-3, xoff+xloop-3, y1-3);
             } else {
                 g.setColor(Color.red);
-                if(value.isOnewayHead) {
+                if (value.isOnewayHead) {
                     g.drawRect(xoff-1, p - 3 - w, w, w);
                 } else {
@@ -92,5 +92,5 @@
         if (value.linkNext) {
             g.setColor(Color.black);
-            if(value.isOnewayTail) {
+            if (value.isOnewayTail) {
                 g.fillRect(xoff - 1, ymax, 3, 1);
             } else {
@@ -104,9 +104,9 @@
                 g.fillRect(xoff-1, y2+2, 3, 3);
                 g.drawLine(xoff, y2, xoff, y2+2);
-                g.drawImage(corners,xoff+xloop-2,y2+1,xoff+xloop+1,y2+4, 2,2,5,5, new Color(0,0,0,0), null);
-                g.drawLine(xoff+3-1,y2+3,xoff+xloop-3,y2+3);
+                g.drawImage(corners, xoff+xloop-2, y2+1, xoff+xloop+1, y2+4, 2, 2, 5, 5, new Color(0, 0, 0, 0), null);
+                g.drawLine(xoff+3-1, y2+3, xoff+xloop-3, y2+3);
             } else {
                 g.setColor(Color.red);
-                if(value.isOnewayTail) {
+                if (value.isOnewayTail) {
                     g.drawRect(xoff-1, ymax - p + 3, w, w);
                 } else {
@@ -134,5 +134,5 @@
         }
 
-        if(value.isOnewayTail){
+        if (value.isOnewayTail) {
             setDotted(g);
             y2 = ymax - 7;
@@ -151,5 +151,5 @@
         }
 
-        if (!value.isOnewayLoopForwardPart && !value.isOnewayLoopBackwardPart){
+        if (!value.isOnewayLoopForwardPart && !value.isOnewayLoopBackwardPart) {
             g.drawLine(xoff, y1, xoff, y2);
         }
@@ -179,5 +179,5 @@
 
         if (value.isOnewayLoopBackwardPart && value.isOnewayLoopForwardPart) {
-            if(arrow == arrowDown) {
+            if (arrow == arrowDown) {
                 arrow = arrowUp;
             } else if (arrow == arrowUp) {
@@ -192,5 +192,5 @@
 
     private void setDotted(Graphics g) {
-        ((Graphics2D)g).setStroke(new BasicStroke(
+        ((Graphics2D) g).setStroke(new BasicStroke(
                 1f,
                 BasicStroke.CAP_BUTT,
@@ -202,5 +202,5 @@
 
     private void unsetDotted(Graphics g) {
-        ((Graphics2D)g).setStroke(new BasicStroke());
+        ((Graphics2D) g).setStroke(new BasicStroke());
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 8510)
@@ -113,4 +113,5 @@
         // ignore
     }
+
     @Override
     public void primitivesAdded(PrimitivesAddedEvent event) {
@@ -137,5 +138,5 @@
         //
         Collection<RelationMember> sel = getSelectedMembers();
-        for (int i=0; i < members.size();i++) {
+        for (int i = 0; i < members.size(); i++) {
             if (members.get(i).getMember() == event.getPrimitive()) {
                 fireTableCellUpdated(i, 1 /* the column with the primitive name */);
@@ -649,8 +650,8 @@
         getSelectionModel().setValueIsAdjusting(true);
         getSelectionModel().clearSelection();
-        for (int i=0; i< members.size();i++) {
+        for (int i = 0; i < members.size(); i++) {
             RelationMember m = members.get(i);
             if (primitives.contains(m.getMember())) {
-                this.getSelectionModel().addSelectionInterval(i,i);
+                this.getSelectionModel().addSelectionInterval(i, i);
             }
         }
@@ -700,5 +701,5 @@
             newMembers = new ArrayList<>();
             boolean inserted = false;
-            for (int i=0; i < members.size(); i++) {
+            for (int i = 0; i < members.size(); i++) {
                 if (selectedIndices.contains(i)) {
                     if (!inserted) {
@@ -760,5 +761,5 @@
             List<RelationMember> newMembers = new ArrayList<>(members);
 
-            for (int i=0; i < selectedIndices.size(); i++) {
+            for (int i = 0; i < selectedIndices.size(); i++) {
                 newMembers.set(selectedIndices.get(i), members.get(selectedIndicesReversed.get(i)));
             }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java	(revision 8510)
@@ -192,5 +192,5 @@
                 );
             }
-        } catch(Exception e) {
+        } catch (Exception e) {
             if (canceled) {
                 Main.warn(tr("Ignoring exception because task was canceled. Exception: {0}", e.toString()));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowser.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowser.java	(revision 8510)
@@ -148,5 +148,5 @@
 
         protected void refreshEnabled() {
-            setEnabled(referrers.getSelectionModel().getMinSelectionIndex() >=0);
+            setEnabled(referrers.getSelectionModel().getMinSelectionIndex() >= 0);
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationDialogManager.java	(revision 8510)
@@ -60,4 +60,5 @@
             return result;
         }
+
         @Override
         public boolean equals(Object obj) {
@@ -99,5 +100,5 @@
      * constructor
      */
-    public RelationDialogManager(){
+    public RelationDialogManager() {
         openDialogs = new HashMap<>();
     }
@@ -190,9 +191,9 @@
         if (!(oldLayer instanceof OsmDataLayer))
             return;
-        OsmDataLayer dataLayer = (OsmDataLayer)oldLayer;
-
-        Iterator<Entry<DialogContext,RelationEditor>> it = openDialogs.entrySet().iterator();
-        while(it.hasNext()) {
-            Entry<DialogContext,RelationEditor> entry = it.next();
+        OsmDataLayer dataLayer = (OsmDataLayer) oldLayer;
+
+        Iterator<Entry<DialogContext, RelationEditor>> it = openDialogs.entrySet().iterator();
+        while (it.hasNext()) {
+            Entry<DialogContext, RelationEditor> entry = it.next();
             if (entry.getKey().matchesLayer(dataLayer)) {
                 RelationEditor editor = entry.getValue();
@@ -216,5 +217,5 @@
     @Override
     public void windowClosed(WindowEvent e) {
-        RelationEditor editor = (RelationEditor)e.getWindow();
+        RelationEditor editor = (RelationEditor) e.getWindow();
         for (Iterator<Entry<DialogContext, RelationEditor>> it = openDialogs.entrySet().iterator(); it.hasNext();) {
             if (editor.equals(it.next().getValue())) {
@@ -258,5 +259,5 @@
         if (!openDialogs.isEmpty()) {
             Point corner = editor.getLocation();
-            while(hasEditorWithCloseUpperLeftCorner(corner, editor)) {
+            while (hasEditorWithCloseUpperLeftCorner(corner, editor)) {
                 // shift a little, so that the dialogs are not exactly on top of each other
                 corner.x += 20;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java	(revision 8510)
@@ -46,5 +46,5 @@
      * constructor
      */
-    public RelationTree(){
+    public RelationTree() {
         super();
         build();
@@ -67,8 +67,8 @@
     protected Dialog getParentDialog() {
         Component c = RelationTree.this;
-        while(c != null && !(c instanceof Dialog)) {
+        while (c != null && !(c instanceof Dialog)) {
             c = c.getParent();
         }
-        return (Dialog)c;
+        return (Dialog) c;
     }
 
@@ -89,11 +89,10 @@
         public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
             TreePath path  = event.getPath();
-            Relation parent = (Relation)event.getPath().getLastPathComponent();
+            Relation parent = (Relation) event.getPath().getLastPathComponent();
             if (!parent.isIncomplete() || parent.isNew())
                 // we don't load complete  or new relations
                 return;
             // launch the download task
-            //
-            Main.worker.submit(new RelationLoader(getParentDialog(),parent, path));
+            Main.worker.submit(new RelationLoader(getParentDialog(), parent, path));
         }
     }
@@ -121,4 +120,5 @@
             this.path = path;
         }
+
         @Override
         protected void cancel() {
@@ -140,5 +140,5 @@
                 Main.main.getEditLayer().getConflicts().add(visitor.getConflicts());
             }
-            final RelationTreeModel model = (RelationTreeModel)getModel();
+            final RelationTreeModel model = (RelationTreeModel) getModel();
             SwingUtilities.invokeLater(
                     new Runnable() {
@@ -157,5 +157,5 @@
                 ds = reader.parseOsm(progressMonitor
                         .createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));
-            } catch(Exception e) {
+            } catch (Exception e) {
                 if (canceled) {
                     Main.warn(tr("Ignoring exception because task was canceled. Exception: {0}", e.toString()));
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeCellRenderer.java	(revision 8510)
@@ -20,5 +20,5 @@
  */
 public class RelationTreeCellRenderer extends JLabel implements TreeCellRenderer {
-    public static final Color BGCOLOR_SELECTED = new Color(143,170,255);
+    public static final Color BGCOLOR_SELECTED = new Color(143, 170, 255);
 
     /** the relation icon */
@@ -72,5 +72,5 @@
 
         renderIcon();
-        renderValue((Relation)value);
+        renderValue((Relation) value);
         renderBackground(selected);
         return this;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeModel.java	(revision 8510)
@@ -69,5 +69,5 @@
         if (parent == null) return 0;
         int count = 0;
-        for(RelationMember member : parent.getMembers()) {
+        for (RelationMember member : parent.getMembers()) {
             if (member.isRelation()) {
                 count++;
@@ -88,5 +88,5 @@
     protected Relation getRelationChildByIdx(Relation parent, int idx) {
         if (parent == null) return null;
-        int count=0;
+        int count = 0;
         for (RelationMember member : parent.getMembers()) {
             if (!(member.isRelation())) {
@@ -191,15 +191,15 @@
     @Override
     public Object getChild(Object parent, int index) {
-        return getRelationChildByIdx((Relation)parent, index);
+        return getRelationChildByIdx((Relation) parent, index);
     }
 
     @Override
     public int getChildCount(Object parent) {
-        return getNumRelationChildren((Relation)parent);
+        return getNumRelationChildren((Relation) parent);
     }
 
     @Override
     public int getIndexOfChild(Object parent, Object child) {
-        return getIndexForRelationChild((Relation)parent, (Relation)child);
+        return getIndexForRelationChild((Relation) parent, (Relation) child);
     }
 
@@ -211,5 +211,5 @@
     @Override
     public boolean isLeaf(Object node) {
-        Relation r = (Relation)node;
+        Relation r = (Relation) node;
         if (r.isIncomplete()) return false;
         return getNumRelationChildren(r) == 0;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableCellRenderer.java	(revision 8510)
@@ -19,6 +19,6 @@
  */
 public class SelectionTableCellRenderer extends JLabel implements TableCellRenderer {
-    public static final Color BGCOLOR_DOUBLE_ENTRY = new Color(254,226,214);
-    public static final Color BGCOLOR_SINGLE_ENTRY = new Color(235,255,177);
+    public static final Color BGCOLOR_DOUBLE_ENTRY = new Color(254, 226, 214);
+    public static final Color BGCOLOR_SINGLE_ENTRY = new Color(235, 255, 177);
 
     /**
@@ -72,6 +72,6 @@
             return this;
 
-        renderBackground((OsmPrimitive)value, isSelected);
-        renderPrimitive((OsmPrimitive)value);
+        renderBackground((OsmPrimitive) value, isSelected);
+        renderPrimitive((OsmPrimitive) value);
         return this;
     }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java	(revision 8510)
@@ -68,5 +68,5 @@
         }
         if (newLayer == layer) {
-            cache.addAll(((OsmDataLayer)newLayer).data.getAllSelected());
+            cache.addAll(((OsmDataLayer) newLayer).data.getAllSelected());
         }
         fireTableDataChanged();
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java	(revision 8510)
@@ -35,5 +35,6 @@
         public final Map<Integer, Set<Node>> ways = new TreeMap<>();
         public final boolean oneWay;
-        public NodesWays(boolean oneWay){
+
+        public NodesWays(boolean oneWay) {
             this.oneWay = oneWay;
         }
@@ -62,6 +63,6 @@
 
     public static Node firstOnewayNode(RelationMember m) {
-        if(!m.isWay()) return null;
-        if("backward".equals(m.getRole())) {
+        if (!m.isWay()) return null;
+        if ("backward".equals(m.getRole())) {
             return m.getWay().lastNode();
         }
@@ -70,6 +71,6 @@
 
     public static Node lastOnewayNode(RelationMember m) {
-        if(!m.isWay()) return null;
-        if("backward".equals(m.getRole())) {
+        if (!m.isWay()) return null;
+        if ("backward".equals(m.getRole())) {
             return m.getWay().firstNode();
         }
@@ -90,5 +91,5 @@
                     addPair(nd, i);
                 }
-            } else if(RelationSortUtils.isOneway(m)) {
+            } else if (RelationSortUtils.isOneway(m)) {
                 addNodeWayMap(firstOnewayNode(m), i);
                 addWayNodeMap(lastOnewayNode(m), i);
@@ -180,11 +181,11 @@
         if (firstOneway != null) return popForwardOnewayPart(way);
 
-        if (map.ways.containsKey(way)){
+        if (map.ways.containsKey(way)) {
             for (Node n : map.ways.get(way)) {
                 Integer i = deleteAndGetAdjacentNode(map, n);
-                if(i != null) return i;
+                if (i != null) return i;
 
                 Integer j = deleteAndGetAdjacentNode(onewayMap, n);
-                if(j != null) {
+                if (j != null) {
                     firstOneway = j;
                     return j;
@@ -198,13 +199,13 @@
 
     private Integer popForwardOnewayPart(Integer way) {
-        if(onewayMap.ways.containsKey(way)) {
+        if (onewayMap.ways.containsKey(way)) {
             for (Node n : onewayMap.ways.get(way)) {
                 Integer i = findAdjacentWay(onewayMap, n);
-                if(i == null) {
+                if (i == null) {
                     continue;
                 }
 
                 lastOnewayNode = processBackwardIfEndOfLoopReached(i);
-                if(lastOnewayNode != null)
+                if (lastOnewayNode != null)
                     return popBackwardOnewayPart(firstOneway);
 
@@ -221,8 +222,8 @@
         if (onewayReverseMap.ways.containsKey(way)) {
             for (Node n : onewayReverseMap.ways.get(way)) {
-                if((map.nodes.containsKey(n))
+                if ((map.nodes.containsKey(n))
                         || (onewayMap.nodes.containsKey(n) && onewayMap.nodes.get(n).size() > 1))
                     return n;
-                if(firstCircular != null && firstCircular == n)
+                if (firstCircular != null && firstCircular == n)
                     return firstCircular;
             }
@@ -231,5 +232,5 @@
     }
 
-    private Integer popBackwardOnewayPart(int way){
+    private Integer popBackwardOnewayPart(int way) {
         if (lastOnewayNode != null) {
             Set<Node> nodes = new TreeSet<>();
@@ -241,12 +242,12 @@
             }
             for (Node n : nodes) {
-                if(n == lastOnewayNode) { //if oneway part ends
+                if (n == lastOnewayNode) { //if oneway part ends
                     firstOneway = null;
                     lastOnewayNode = null;
                     Integer j = deleteAndGetAdjacentNode(map, n);
-                    if(j != null) return j;
+                    if (j != null) return j;
 
                     Integer k = deleteAndGetAdjacentNode(onewayMap, n);
-                    if(k != null) {
+                    if (k != null) {
                         firstOneway = k;
                         return k;
@@ -255,5 +256,5 @@
 
                 Integer j = deleteAndGetAdjacentNode(onewayReverseMap, n);
-                if(j != null) return j;
+                if (j != null) return j;
             }
         }
@@ -273,5 +274,5 @@
     private Integer deleteAndGetAdjacentNode(NodesWays nw, Node n) {
         Integer j = findAdjacentWay(nw, n);
-        if(j == null) return null;
+        if (j == null) return null;
         deleteWayNode(nw, j, n);
         return j;
@@ -285,5 +286,5 @@
 
     private void deleteWayNode(NodesWays nw, Integer way, Node n) {
-        if(nw.oneWay) {
+        if (nw.oneWay) {
             doneOneway(way);
         } else {
@@ -298,5 +299,5 @@
      */
     public Integer pop() {
-        if (!remaining.isEmpty()){
+        if (!remaining.isEmpty()) {
             Integer i = remaining.iterator().next();
             done(i);
@@ -305,7 +306,7 @@
 
         if (remainingOneway.isEmpty()) return null;
-        for(Integer i :remainingOneway.keySet()){ //find oneway, which is connected to more than one way (is between two oneway loops)
-            for(Node n : onewayReverseMap.ways.get(i)){
-                if(onewayReverseMap.nodes.containsKey(n) && onewayReverseMap.nodes.get(n).size() > 1) {
+        for (Integer i :remainingOneway.keySet()) { //find oneway, which is connected to more than one way (is between two oneway loops)
+            for (Node n : onewayReverseMap.ways.get(i)) {
+                if (onewayReverseMap.nodes.containsKey(n) && onewayReverseMap.nodes.get(n).size() > 1) {
                     doneOneway(i);
                     firstCircular = n;
@@ -327,8 +328,8 @@
         Set<Node> nodesForward = remainingOneway.get(i);
         for (Node n : nodesForward) {
-            if(onewayMap.nodes.containsKey(n)) {
+            if (onewayMap.nodes.containsKey(n)) {
                 onewayMap.nodes.get(n).remove(i);
             }
-            if(onewayReverseMap.nodes.containsKey(n)) {
+            if (onewayReverseMap.nodes.containsKey(n)) {
                 onewayReverseMap.nodes.get(n).remove(i);
             }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSortUtils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSortUtils.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSortUtils.java	(revision 8510)
@@ -49,13 +49,13 @@
     }
 
-    static boolean isBackward(final RelationMember member){
+    static boolean isBackward(final RelationMember member) {
         return "backward".equals(member.getRole());
     }
 
-    static boolean isForward(final RelationMember member){
+    static boolean isForward(final RelationMember member) {
         return "forward".equals(member.getRole());
     }
 
-    static boolean isOneway(final RelationMember member){
+    static boolean isOneway(final RelationMember member) {
         return isForward(member) || isBackward(member);
     }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationSorter.java	(revision 8510)
@@ -20,9 +20,9 @@
     private static interface AdditionalSorter {
         public boolean acceptsMember(RelationMember m);
+
         public List<RelationMember> sortMembers(List<RelationMember> list);
     }
 
     private static final Collection<AdditionalSorter> additionalSorters = new ArrayList<>();
-
     static {
         // first adequate sorter is used, so order matters
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionType.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionType.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionType.java	(revision 8510)
@@ -49,5 +49,5 @@
     }
 
-    public WayConnectionType(boolean invalid){
+    public WayConnectionType(boolean invalid) {
         this.invalid = invalid;
     }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java	(revision 8510)
@@ -27,9 +27,9 @@
         final List<WayConnectionType> con = new ArrayList<>();
 
-        for (int i=0; i<members.size(); ++i) {
+        for (int i = 0; i < members.size(); ++i) {
             con.add(null);
         }
 
-        firstGroupIdx=0;
+        firstGroupIdx = 0;
 
         lastForwardWay = UNCONNECTED;
@@ -38,5 +38,5 @@
         WayConnectionType lastWct = null;
 
-        for (int i=0; i<members.size(); ++i) {
+        for (int i = 0; i < members.size(); ++i) {
             final RelationMember m = members.get(i);
             if (!m.isWay() || m.getWay() == null || m.getWay().isIncomplete()) {
@@ -50,12 +50,12 @@
 
             WayConnectionType wct = new WayConnectionType(false);
-            wct.linkPrev = i>0 && con.get(i-1) != null && con.get(i-1).isValid();
+            wct.linkPrev = i > 0 && con.get(i-1) != null && con.get(i-1).isValid();
             wct.direction = NONE;
 
-            if (RelationSortUtils.isOneway(m)){
+            if (RelationSortUtils.isOneway(m)) {
                 if (lastWct != null && lastWct.isOnewayTail) {
                     wct.isOnewayHead = true;
                 }
-                if (lastBackwardWay == UNCONNECTED && lastForwardWay == UNCONNECTED){ //Beginning of new oneway
+                if (lastBackwardWay == UNCONNECTED && lastForwardWay == UNCONNECTED) { //Beginning of new oneway
                     wct.isOnewayHead = true;
                     lastForwardWay = i-1;
@@ -81,5 +81,5 @@
             if (!wct.linkPrev) {
                 wct.direction = determineDirectionOfFirst(i, m);
-                if (RelationSortUtils.isOneway(m)){
+                if (RelationSortUtils.isOneway(m)) {
                     wct.isOnewayLoopForwardPart = true;
                     lastForwardWay = i;
@@ -115,5 +115,5 @@
         }
         if (loop) {
-            for (int j=firstGroupIdx; j <= i; ++j) {
+            for (int j = firstGroupIdx; j <= i; ++j) {
                 con.get(j).isLoop = true;
             }
@@ -126,5 +126,5 @@
             return result;
 
-        if (RelationSortUtils.isOneway(m)){
+        if (RelationSortUtils.isOneway(m)) {
             if (RelationSortUtils.isBackward(m)) return BACKWARD;
             else return FORWARD;
@@ -159,10 +159,10 @@
 
         if (RelationSortUtils.isOneway(m)) {
-            if (dirBW != NONE){
+            if (dirBW != NONE) {
                 wct.direction = dirBW;
                 lastBackwardWay = i;
                 wct.isOnewayLoopBackwardPart = true;
             }
-            if (dirFW != NONE){
+            if (dirFW != NONE) {
                 wct.direction = dirFW;
                 lastForwardWay = i;
@@ -184,5 +184,5 @@
 
             if (dirFW != NONE && dirBW != NONE) { //End of oneway loop
-                if (i+1<members.size() && determineDirection(i, dirFW, i+1) != NONE) {
+                if (i+1 < members.size() && determineDirection(i, dirFW, i+1) != NONE) {
                     wct.isOnewayLoopBackwardPart = false;
                     wct.direction = dirFW;
@@ -204,5 +204,5 @@
     }
 
-    private static Direction reverse(final Direction dir){
+    private static Direction reverse(final Direction dir) {
         if (dir == FORWARD) return BACKWARD;
         if (dir == BACKWARD) return FORWARD;
@@ -247,5 +247,5 @@
 
         /** the list of nodes the way k can dock to */
-        List<Node> refNodes= new ArrayList<>();
+        List<Node> refNodes = new ArrayList<>();
 
         switch (ref_direction) {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java	(revision 8510)
@@ -187,5 +187,5 @@
             }
             Severity s = e.getSeverity();
-            if(!other && s == Severity.OTHER) {
+            if (!other && s == Severity.OTHER) {
                 continue;
             }
Index: trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 8510)
@@ -45,5 +45,5 @@
         public Bookmark(Collection<String> list) {
             List<String> array = new ArrayList<>(list);
-            if(array.size() < 5)
+            if (array.size() < 5)
                 throw new IllegalArgumentException(tr("Wrong number of arguments for bookmark"));
             name = array.get(0);
@@ -155,10 +155,10 @@
      */
     public final void load() {
-        DefaultListModel<Bookmark> model = (DefaultListModel<Bookmark>)getModel();
+        DefaultListModel<Bookmark> model = (DefaultListModel<Bookmark>) getModel();
         model.removeAllElements();
         Collection<Collection<String>> args = Main.pref.getArray("bookmarks", null);
-        if(args != null) {
+        if (args != null) {
             List<Bookmark> bookmarks = new LinkedList<>();
-            for(Collection<String> entry : args) {
+            for (Collection<String> entry : args) {
                 try {
                     bookmarks.add(new Bookmark(entry));
@@ -179,5 +179,5 @@
     public final void save() {
         List<Collection<String>> coll = new LinkedList<>();
-        for (Object o : ((DefaultListModel<Bookmark>)getModel()).toArray()) {
+        for (Object o : ((DefaultListModel<Bookmark>) getModel()).toArray()) {
             String[] array = new String[5];
             Bookmark b = (Bookmark) o;
Index: trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java	(revision 8510)
@@ -85,5 +85,5 @@
         GridBagConstraints  gc = new GridBagConstraints();
         gc.anchor = GridBagConstraints.NORTHWEST;
-        gc.insets = new Insets(5,5,5,5);
+        gc.insets = new Insets(5, 5, 5, 5);
         pnl.add(lblCurrentDownloadArea = new JMultilineLabel(""), gc);
 
@@ -99,5 +99,5 @@
         gc.weightx = 0.0;
         gc.weighty = 0.0;
-        gc.insets = new Insets(5,5,5,5);
+        gc.insets = new Insets(5, 5, 5, 5);
         pnl.add(new JButton(actAdd = new AddAction()), gc);
         return pnl;
@@ -116,5 +116,5 @@
                 Bookmark b = bookmarks.getSelectedValue();
                 if (b != null) {
-                    gui.boundingBoxChanged(b.getArea(),BookmarkSelection.this);
+                    gui.boundingBoxChanged(b.getArea(), BookmarkSelection.this);
                 }
             }
@@ -126,5 +126,5 @@
         gc.weighty = 0.0;
         gc.gridwidth = 2;
-        dlg.add(buildDownloadAreaAddPanel(),gc);
+        dlg.add(buildDownloadAreaAddPanel(), gc);
 
         gc.gridwidth = 1;
@@ -134,5 +134,5 @@
         gc.weightx = 0.0;
         gc.weighty = 1.0;
-        dlg.add(buildButtonPanel(),gc);
+        dlg.add(buildButtonPanel(), gc);
 
         gc.gridwidth = 1;
@@ -196,5 +196,5 @@
             b.setName(
                     JOptionPane.showInputDialog(
-                            Main.parent,tr("Please enter a name for the bookmarked download area."),
+                            Main.parent, tr("Please enter a name for the bookmarked download area."),
                             tr("Name of location"),
                             JOptionPane.QUESTION_MESSAGE)
@@ -202,5 +202,5 @@
             b.setArea(currentArea);
             if (b.getName() != null && !b.getName().isEmpty()) {
-                ((DefaultListModel<BookmarkList.Bookmark>)bookmarks.getModel()).addElement(b);
+                ((DefaultListModel<BookmarkList.Bookmark>) bookmarks.getModel()).addElement(b);
                 bookmarks.save();
             }
@@ -209,4 +209,7 @@
 
     class RemoveAction extends AbstractAction implements ListSelectionListener{
+        /**
+         * Constructs a new {@code RemoveAction}.
+         */
         public RemoveAction() {
             putValue(SMALL_ICON, ImageProvider.get("dialogs", "delete"));
@@ -221,5 +224,5 @@
                 return;
             for (Object sel: sels) {
-                ((DefaultListModel<Bookmark>)bookmarks.getModel()).removeElement(sel);
+                ((DefaultListModel<Bookmark>) bookmarks.getModel()).removeElement(sel);
             }
             bookmarks.save();
@@ -229,4 +232,5 @@
             setEnabled(bookmarks.getSelectedIndices().length > 0);
         }
+
         @Override
         public void valueChanged(ListSelectionEvent e) {
@@ -235,5 +239,8 @@
     }
 
-    class RenameAction extends AbstractAction implements ListSelectionListener{
+    class RenameAction extends AbstractAction implements ListSelectionListener {
+        /**
+         * Constructs a new {@code RenameAction}.
+         */
         public RenameAction() {
             putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit"));
@@ -250,5 +257,5 @@
             Object value =
                 JOptionPane.showInputDialog(
-                        Main.parent,tr("Please enter a name for the bookmarked download area."),
+                        Main.parent, tr("Please enter a name for the bookmarked download area."),
                         tr("Name of location"),
                         JOptionPane.QUESTION_MESSAGE,
Index: trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java	(revision 8510)
@@ -57,7 +57,7 @@
     protected void buildDownloadAreaInputFields() {
         latlon = new JosmTextField[4];
-        for(int i=0; i< 4; i++) {
+        for (int i = 0; i < 4; i++) {
             latlon[i] = new JosmTextField(11);
-            latlon[i].setMinimumSize(new Dimension(100,new JosmTextField().getMinimumSize().height));
+            latlon[i].setMinimumSize(new Dimension(100, new JosmTextField().getMinimumSize().height));
             latlon[i].addFocusListener(new SelectAllOnFocusHandler(latlon[i]));
         }
@@ -95,11 +95,11 @@
         tfOsmUrl.setBorder(latlon[0].getBorder());
 
-        dlg.add(new JLabel(tr("min lat")), GBC.std().insets(10,20,5,0));
-        dlg.add(latlon[0], GBC.std().insets(0,20,0,0));
-        dlg.add(new JLabel(tr("min lon")), GBC.std().insets(10,20,5,0));
-        dlg.add(latlon[1], GBC.eol().insets(0,20,0,0));
-        dlg.add(new JLabel(tr("max lat")), GBC.std().insets(10,0,5,0));
+        dlg.add(new JLabel(tr("min lat")), GBC.std().insets(10, 20, 5, 0));
+        dlg.add(latlon[0], GBC.std().insets(0, 20, 0, 0));
+        dlg.add(new JLabel(tr("min lon")), GBC.std().insets(10, 20, 5, 0));
+        dlg.add(latlon[1], GBC.eol().insets(0, 20, 0, 0));
+        dlg.add(new JLabel(tr("max lat")), GBC.std().insets(10, 0, 5, 0));
         dlg.add(latlon[2], GBC.std());
-        dlg.add(new JLabel(tr("max lon")), GBC.std().insets(10,0,5,0));
+        dlg.add(new JLabel(tr("max lon")), GBC.std().insets(10, 0, 5, 0));
         dlg.add(latlon[3], GBC.eol());
 
@@ -111,9 +111,10 @@
             }
         });
-        dlg.add(btnClear, GBC.eol().insets(10,20,0,0));
-
-        dlg.add(new JLabel(tr("URL from www.openstreetmap.org (you can paste an URL here to download the area)")), GBC.eol().insets(10,5,5,0));
-        dlg.add(tfOsmUrl, GBC.eop().insets(10,0,5,0).fill());
-        dlg.add(showUrl, GBC.eop().insets(10,0,5,5));
+        dlg.add(btnClear, GBC.eol().insets(10, 20, 0, 0));
+
+        dlg.add(new JLabel(tr("URL from www.openstreetmap.org (you can paste an URL here to download the area)")),
+                GBC.eol().insets(10, 5, 5, 0));
+        dlg.add(tfOsmUrl, GBC.eop().insets(10, 0, 5, 0).fill());
+        dlg.add(showUrl, GBC.eop().insets(10, 0, 5, 5));
         showUrl.setEditable(false);
         showUrl.setBackground(dlg.getBackground());
@@ -136,8 +137,8 @@
     public Bounds getDownloadArea() {
         double[] values = new double[4];
-        for (int i=0; i < 4; i++) {
+        for (int i = 0; i < 4; i++) {
             try {
                 values[i] = Double.parseDouble(latlon[i].getText());
-            } catch(NumberFormatException x) {
+            } catch (NumberFormatException x) {
                 return null;
             }
@@ -152,6 +153,6 @@
     private boolean parseURL(DownloadDialog gui) {
         Bounds b = OsmUrlToBounds.parse(tfOsmUrl.getText());
-        if(b == null) return false;
-        gui.boundingBoxChanged(b,BoundingBoxSelection.this);
+        if (b == null) return false;
+        gui.boundingBoxChanged(b, BoundingBoxSelection.this);
         updateBboxFields(b);
         updateUrl(b);
@@ -198,10 +199,10 @@
             try {
                 value = Double.parseDouble(tfLatValue.getText());
-            } catch(NumberFormatException ex) {
-                setErrorMessage(tfLatValue,tr("The string ''{0}'' is not a valid double value.", tfLatValue.getText()));
+            } catch (NumberFormatException ex) {
+                setErrorMessage(tfLatValue, tr("The string ''{0}'' is not a valid double value.", tfLatValue.getText()));
                 return;
             }
             if (!LatLon.isValidLat(value)) {
-                setErrorMessage(tfLatValue,tr("Value for latitude in range [-90,90] required.", tfLatValue.getText()));
+                setErrorMessage(tfLatValue, tr("Value for latitude in range [-90,90] required.", tfLatValue.getText()));
                 return;
             }
@@ -231,10 +232,10 @@
             try {
                 value = Double.parseDouble(tfLonValue.getText());
-            } catch(NumberFormatException ex) {
-                setErrorMessage(tfLonValue,tr("The string ''{0}'' is not a valid double value.", tfLonValue.getText()));
+            } catch (NumberFormatException ex) {
+                setErrorMessage(tfLonValue, tr("The string ''{0}'' is not a valid double value.", tfLonValue.getText()));
                 return;
             }
             if (!LatLon.isValidLon(value)) {
-                setErrorMessage(tfLonValue,tr("Value for longitude in range [-180,180] required.", tfLonValue.getText()));
+                setErrorMessage(tfLonValue, tr("Value for longitude in range [-180,180] required.", tfLonValue.getText()));
                 return;
             }
@@ -255,4 +256,5 @@
     static class SelectAllOnFocusHandler extends FocusAdapter {
         private JTextComponent tfTarget;
+
         public SelectAllOnFocusHandler(JTextComponent tfTarget) {
             this.tfTarget = tfTarget;
@@ -267,14 +269,22 @@
     class OsmUrlRefresher implements DocumentListener {
         @Override
-        public void changedUpdate(DocumentEvent e) { parseURL(parent); }
-        @Override
-        public void insertUpdate(DocumentEvent e) { parseURL(parent); }
-        @Override
-        public void removeUpdate(DocumentEvent e) { parseURL(parent); }
+        public void changedUpdate(DocumentEvent e) {
+            parseURL(parent);
+        }
+
+        @Override
+        public void insertUpdate(DocumentEvent e) {
+            parseURL(parent);
+        }
+
+        @Override
+        public void removeUpdate(DocumentEvent e) {
+            parseURL(parent);
+        }
     }
 
     class BoundingBoxBuilder extends FocusAdapter implements ActionListener {
         protected Bounds build() {
-            double minlon, minlat, maxlon,maxlat;
+            double minlon, minlat, maxlon, maxlat;
             try {
                 minlat = Double.parseDouble(latlon[0].getText().trim());
@@ -282,5 +292,5 @@
                 maxlat = Double.parseDouble(latlon[2].getText().trim());
                 maxlon = Double.parseDouble(latlon[3].getText().trim());
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 return null;
             }
@@ -292,5 +302,5 @@
             if (minlat > maxlat)
                 return null;
-            return new Bounds(minlat,minlon,maxlat,maxlon);
+            return new Bounds(minlat, minlon, maxlat, maxlon);
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 8510)
@@ -86,5 +86,5 @@
 
     private void makeCheckBoxRespondToEnter(JCheckBox cb) {
-        cb.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), "doDownload");
+        cb.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "doDownload");
         cb.getActionMap().put("doDownload", actDownload);
     }
@@ -103,5 +103,5 @@
 
         // adding the download tasks
-        pnl.add(new JLabel(tr("Data Sources and Types:")), GBC.std().insets(5,5,1,5));
+        pnl.add(new JLabel(tr("Data Sources and Types:")), GBC.std().insets(5, 5, 1, 5));
         cbDownloadOsmData = new JCheckBox(tr("OpenStreetMap data"), true);
         cbDownloadOsmData.setToolTipText(tr("Select to download OSM data in the selected download area."));
@@ -156,5 +156,6 @@
         cbStartup = new JCheckBox(tr("Open this dialog on startup"));
         cbStartup.setToolTipText(
-                tr("<html>Autostart ''Download from OSM'' dialog every time JOSM is started.<br>You can open it manually from File menu or toolbar.</html>"));
+                tr("<html>Autostart ''Download from OSM'' dialog every time JOSM is started.<br>" +
+                        "You can open it manually from File menu or toolbar.</html>"));
         cbStartup.addActionListener(new ActionListener() {
             @Override
@@ -163,13 +164,13 @@
             }});
 
-        pnl.add(cbNewLayer, GBC.std().anchor(GBC.WEST).insets(5,5,5,5));
-        pnl.add(cbStartup, GBC.std().anchor(GBC.WEST).insets(15,5,5,5));
-
-        pnl.add(sizeCheck,  GBC.eol().anchor(GBC.EAST).insets(5,5,5,2));
+        pnl.add(cbNewLayer, GBC.std().anchor(GBC.WEST).insets(5, 5, 5, 5));
+        pnl.add(cbStartup, GBC.std().anchor(GBC.WEST).insets(15, 5, 5, 5));
+
+        pnl.add(sizeCheck,  GBC.eol().anchor(GBC.EAST).insets(5, 5, 5, 2));
 
         if (!ExpertToggleAction.isExpert()) {
             JLabel infoLabel  = new JLabel(
                     tr("Use left click&drag to select area, arrows or right mouse button to scroll map, wheel or +/- to zoom."));
-            pnl.add(infoLabel,GBC.eol().anchor(GBC.SOUTH).insets(0,0,0,0));
+            pnl.add(infoLabel, GBC.eol().anchor(GBC.SOUTH).insets(0, 0, 0, 0));
         }
         return pnl;
@@ -203,5 +204,5 @@
 
         // -- cancel on ESC
-        getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0), "cancel");
+        getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel");
         getRootPane().getActionMap().put("cancel", actCancel);
 
@@ -219,5 +220,5 @@
      */
     public DownloadDialog(Component parent) {
-        super(JOptionPane.getFrameForComponent(parent),tr("Download"), ModalityType.DOCUMENT_MODAL);
+        super(JOptionPane.getFrameForComponent(parent), tr("Download"), ModalityType.DOCUMENT_MODAL);
         getContentPane().setLayout(new BorderLayout());
         getContentPane().add(buildMainPanel(), BorderLayout.CENTER);
@@ -382,5 +383,5 @@
                     mv.getLatLon(mv.getWidth(), 0)
             );
-            boundingBoxChanged(currentBounds,null);
+            boundingBoxChanged(currentBounds, null);
         } else {
             Bounds bounds = getSavedDownloadBounds();
@@ -414,5 +415,5 @@
      */
     public static boolean isAutorunEnabled() {
-        return Main.pref.getBoolean("download.autorun",false);
+        return Main.pref.getBoolean("download.autorun", false);
     }
 
@@ -438,5 +439,5 @@
                     WindowGeometry.centerInWindow(
                             getParent(),
-                            new Dimension(1000,600)
+                            new Dimension(1000, 600)
                     )
             ).applySafe(this);
Index: trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 8510)
@@ -75,17 +75,14 @@
     private DownloadDialog parent;
     private static final Server[] SERVERS = new Server[] {
-        new Server("Nominatim","https://nominatim.openstreetmap.org/search?format=xml&q=",tr("Class Type"),tr("Bounds"))
+        new Server("Nominatim", "https://nominatim.openstreetmap.org/search?format=xml&q=", tr("Class Type"), tr("Bounds"))
     };
     private final JosmComboBox<Server> server = new JosmComboBox<>(SERVERS);
 
     private static class Server {
-        public String name;
-        public String url;
-        public String thirdcol;
-        public String fourthcol;
-        @Override
-        public String toString() {
-            return name;
-        }
+        public final String name;
+        public final String url;
+        public final String thirdcol;
+        public final String fourthcol;
+
         public Server(String n, String u, String t, String f) {
             name = n;
@@ -94,9 +91,14 @@
             fourthcol = f;
         }
+
+        @Override
+        public String toString() {
+            return name;
+        }
     }
 
     protected JPanel buildSearchPanel() {
         JPanel lpanel = new JPanel();
-        lpanel.setLayout(new GridLayout(2,2));
+        lpanel.setLayout(new GridLayout(2, 2));
         JPanel panel = new JPanel();
         panel.setLayout(new GridBagLayout());
@@ -122,6 +124,6 @@
         SearchAction searchAction = new SearchAction();
         JButton btnSearch = new JButton(searchAction);
-        ((JTextField)cbSearchExpression.getEditor().getEditorComponent()).getDocument().addDocumentListener(searchAction);
-        ((JTextField)cbSearchExpression.getEditor().getEditorComponent()).addActionListener(searchAction);
+        ((JTextField) cbSearchExpression.getEditor().getEditorComponent()).getDocument().addDocumentListener(searchAction);
+        ((JTextField) cbSearchExpression.getEditor().getEditorComponent()).addActionListener(searchAction);
 
         panel.add(btnSearch, GBC.eol().insets(5, 5, 0, 5));
@@ -147,5 +149,5 @@
         tblSearchResults.setSelectionModel(selectionModel);
         JScrollPane scrollPane = new JScrollPane(tblSearchResults);
-        scrollPane.setPreferredSize(new Dimension(200,200));
+        scrollPane.setPreferredSize(new Dimension(200, 200));
         panel.add(scrollPane, BorderLayout.CENTER);
 
@@ -216,5 +218,5 @@
                     currentResult.name = atts.getValue("name");
                     currentResult.info = atts.getValue("info");
-                    if(currentResult.info != null) {
+                    if (currentResult.info != null) {
                         currentResult.info = tr(currentResult.info);
                     }
@@ -288,5 +290,5 @@
         public SearchAction() {
             putValue(NAME, tr("Search ..."));
-            putValue(SMALL_ICON, ImageProvider.get("dialogs","search"));
+            putValue(SMALL_ICON, ImageProvider.get("dialogs", "search"));
             putValue(SHORT_DESCRIPTION, tr("Click to start searching for places"));
             updateEnabledState();
@@ -333,7 +335,7 @@
 
         public NameQueryTask(String searchExpression) {
-            super(tr("Querying name server"),false /* don't ignore exceptions */);
+            super(tr("Querying name server"), false /* don't ignore exceptions */);
             this.searchExpression = searchExpression;
-            useserver = (Server)server.getSelectedItem();
+            useserver = (Server) server.getSelectedItem();
             Main.pref.put("namefinder.server", useserver.name);
         }
@@ -368,8 +370,8 @@
                 getProgressMonitor().indeterminateSubTask(tr("Querying name server ..."));
                 URL url = new URL(urlString);
-                synchronized(this) {
+                synchronized (this) {
                     connection = Utils.openHttpConnection(url);
                 }
-                connection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
+                connection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect", 15)*1000);
                 try (
                     InputStream inputStream = connection.getInputStream();
@@ -415,4 +417,5 @@
             this.selectionModel = selectionModel;
         }
+
         @Override
         public int getRowCount() {
@@ -435,4 +438,5 @@
             fireTableDataChanged();
         }
+
         @Override
         public boolean isCellEditable(int row, int column) {
@@ -486,4 +490,5 @@
             addColumn(col4);
         }
+
         public void setHeadlines(String third, String fourth) {
             col3.setHeaderValue(third);
@@ -509,7 +514,10 @@
     static class NamedResultCellRenderer extends JLabel implements TableCellRenderer {
 
+        /**
+         * Constructs a new {@code NamedResultCellRenderer}.
+         */
         public NamedResultCellRenderer() {
             setOpaque(true);
-            setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
+            setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
         }
 
@@ -533,5 +541,5 @@
             StringBuilder line = new StringBuilder();
             StringTokenizer tok = new StringTokenizer(description, " ");
-            while(tok.hasMoreElements()) {
+            while (tok.hasMoreElements()) {
                 String t = tok.nextToken();
                 if (line.length() == 0) {
@@ -570,5 +578,5 @@
                 break;
             case 3:
-                if(sr.bounds != null) {
+                if (sr.bounds != null) {
                     setText(sr.bounds.toShortString(new DecimalFormat("0.000")));
                 } else {
Index: trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/download/SlippyMapChooser.java	(revision 8510)
@@ -52,7 +52,7 @@
         if (evt.getPropertyName().equals(BBoxChooser.BBOX_PROP)) {
             if (iGui != null) {
-                iGui.boundingBoxChanged((Bounds)evt.getNewValue(), this);
+                iGui.boundingBoxChanged((Bounds) evt.getNewValue(), this);
             }
-        } else if(evt.getPropertyName().equals(SlippyMapBBoxChooser.RESIZE_PROP)) {
+        } else if (evt.getPropertyName().equals(SlippyMapBBoxChooser.RESIZE_PROP)) {
             int w, h;
 
Index: trunk/src/org/openstreetmap/josm/gui/download/TileSelection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/TileSelection.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/download/TileSelection.java	(revision 8510)
@@ -49,5 +49,5 @@
     public void propertyChange(PropertyChangeEvent evt) {
         if (evt.getPropertyName().equals(BBoxChooser.BBOX_PROP)) {
-            Bounds bbox = (Bounds)evt.getNewValue();
+            Bounds bbox = (Bounds) evt.getNewValue();
             parent.boundingBoxChanged(bbox, this);
         }
Index: trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java	(revision 8510)
@@ -182,5 +182,5 @@
         p.add(new JScrollPane(help), BorderLayout.CENTER);
 
-        addWindowListener(new WindowAdapter(){
+        addWindowListener(new WindowAdapter() {
             @Override public void windowClosing(WindowEvent e) {
                 setVisible(false);
@@ -190,5 +190,5 @@
         p.add(buildToolBar(), BorderLayout.NORTH);
         help.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "Close");
-        help.getActionMap().put("Close", new AbstractAction(){
+        help.getActionMap().put("Close", new AbstractAction() {
             @Override
             public void actionPerformed(ActionEvent e) {
@@ -208,5 +208,5 @@
                     WindowGeometry.centerInWindow(
                             getParent(),
-                            new Dimension(600,400)
+                            new Dimension(600, 400)
                     )
             ).applySafe(this);
@@ -215,9 +215,9 @@
         }
         if (Main.main != null && Main.main.menu != null && Main.main.menu.windowMenu != null) {
-            if(windowMenuItem != null && !visible) {
+            if (windowMenuItem != null && !visible) {
                 Main.main.menu.windowMenu.remove(windowMenuItem);
                 windowMenuItem = null;
             }
-            if(windowMenuItem == null && visible) {
+            if (windowMenuItem == null && visible) {
                 windowMenuItem = MainMenu.add(Main.main.menu.windowMenu, focusAction, MainMenu.WINDOW_MENU_GROUP.VOLATILE);
             }
@@ -306,27 +306,27 @@
         try {
             content = reader.fetchHelpTopicContent(url, true);
-        } catch(MissingHelpContentException e) {
+        } catch (MissingHelpContentException e) {
             url = HelpUtil.getHelpTopicUrl(HelpUtil.buildAbsoluteHelpTopic(relativeHelpTopic, LocaleType.BASELANGUAGE));
             try {
                 content = reader.fetchHelpTopicContent(url, true);
-            } catch(MissingHelpContentException e1) {
+            } catch (MissingHelpContentException e1) {
                 url = HelpUtil.getHelpTopicUrl(HelpUtil.buildAbsoluteHelpTopic(relativeHelpTopic, LocaleType.ENGLISH));
                 try {
                     content = reader.fetchHelpTopicContent(url, true);
-                } catch(MissingHelpContentException e2) {
+                } catch (MissingHelpContentException e2) {
                     this.url = url;
                     handleMissingHelpContent(relativeHelpTopic);
                     return;
-                } catch(HelpContentReaderException e2) {
+                } catch (HelpContentReaderException e2) {
                     Main.error(e2);
                     handleHelpContentReaderException(relativeHelpTopic, e2);
                     return;
                 }
-            } catch(HelpContentReaderException e1) {
+            } catch (HelpContentReaderException e1) {
                 Main.error(e1);
                 handleHelpContentReaderException(relativeHelpTopic, e1);
                 return;
             }
-        } catch(HelpContentReaderException e) {
+        } catch (HelpContentReaderException e) {
             Main.error(e);
             handleHelpContentReaderException(relativeHelpTopic, e);
@@ -349,9 +349,9 @@
         try {
             content = reader.fetchHelpTopicContent(url, true);
-        } catch(MissingHelpContentException e) {
+        } catch (MissingHelpContentException e) {
             this.url = url;
             handleMissingHelpContent(absoluteHelpTopic);
             return;
-        } catch(HelpContentReaderException e) {
+        } catch (HelpContentReaderException e) {
             Main.error(e);
             handleHelpContentReaderException(absoluteHelpTopic, e);
@@ -386,5 +386,5 @@
                 history.setCurrentUrl(url);
                 this.url = url;
-            } catch(Exception e) {
+            } catch (Exception e) {
                 Main.warn(e);
                 HelpAwareOptionPane.showOptionDialog(
@@ -439,7 +439,10 @@
 
     class EditAction extends AbstractAction {
+        /**
+         * Constructs a new {@code EditAction}.
+         */
         public EditAction() {
             putValue(SHORT_DESCRIPTION, tr("Edit the current help page"));
-            putValue(SMALL_ICON,ImageProvider.get("dialogs", "edit"));
+            putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit"));
         }
 
@@ -447,5 +450,5 @@
         public void actionPerformed(ActionEvent e) {
             String url = getUrl();
-            if(url == null)
+            if (url == null)
                 return;
             if (!url.startsWith(HelpUtil.getWikiBaseHelpUrl())) {
@@ -484,4 +487,5 @@
     static class BackAction extends AbstractAction implements Observer {
         private transient HelpBrowserHistory history;
+
         public BackAction(HelpBrowserHistory history) {
             this.history = history;
@@ -496,4 +500,5 @@
             history.back();
         }
+
         @Override
         public void update(Observable o, Object arg) {
@@ -504,4 +509,5 @@
     static class ForwardAction extends AbstractAction implements Observer {
         private transient HelpBrowserHistory history;
+
         public ForwardAction(HelpBrowserHistory history) {
             this.history = history;
@@ -516,4 +522,5 @@
             history.forward();
         }
+
         @Override
         public void update(Observable o, Object arg) {
@@ -523,4 +530,7 @@
 
     class HomeAction extends AbstractAction  {
+        /**
+         * Constructs a new {@code HomeAction}.
+         */
         public HomeAction() {
             putValue(SHORT_DESCRIPTION, tr("Go to the JOSM help home page"));
@@ -578,8 +588,8 @@
             Object value = set.getAttribute(Tag.A);
             if (!(value instanceof SimpleAttributeSet)) return null;
-            SimpleAttributeSet atts = (SimpleAttributeSet)value;
+            SimpleAttributeSet atts = (SimpleAttributeSet) value;
             value = atts.getAttribute(javax.swing.text.html.HTML.Attribute.HREF);
             if (value == null) return null;
-            String s = (String)value;
+            String s = (String) value;
             if (s.matches("#.*"))
                 return s.substring(1);
@@ -592,7 +602,5 @@
                 return;
             if (e.getURL() == null || e.getURL().toString().startsWith(url+"#")) {
-                // Probably hyperlink event on a an A-element with a href consisting of
-                // a fragment only, i.e. "#ALocalFragment".
-                //
+                // Probably hyperlink event on a an A-element with a href consisting of a fragment only, i.e. "#ALocalFragment".
                 String fragment = getUrlFragment(e);
                 if (fragment != null) {
Index: trunk/src/org/openstreetmap/josm/gui/help/HelpBrowserHistory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/help/HelpBrowserHistory.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/help/HelpBrowserHistory.java	(revision 8510)
@@ -51,5 +51,5 @@
 
     public void setCurrentUrl(String url) {
-        boolean add=true;
+        boolean add = true;
 
         if (historyPos >= 0 && historyPos < history.size() && history.get(historyPos).equals(url)) {
@@ -57,5 +57,5 @@
         } else if (historyPos == history.size() -1) {
             // do nothing just append
-        } else if (historyPos ==0 && !history.isEmpty()) {
+        } else if (historyPos == 0 && !history.isEmpty()) {
             history = new ArrayList<>(Collections.singletonList(history.get(0)));
         } else if (historyPos < history.size() -1 && historyPos > 0) {
Index: trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java	(revision 8510)
@@ -43,5 +43,5 @@
      */
     public String fetchHelpTopicContent(String helpTopicUrl, boolean dotest) throws HelpContentReaderException {
-        if(helpTopicUrl == null)
+        if (helpTopicUrl == null)
             throw new MissingHelpContentException("helpTopicUrl is null");
         HttpURLConnection con = null;
@@ -53,12 +53,12 @@
                 return prepareHelpContent(in, dotest, u);
             }
-        } catch(MalformedURLException e) {
+        } catch (MalformedURLException e) {
             throw new HelpContentReaderException(e);
-        } catch(IOException e) {
+        } catch (IOException e) {
             HelpContentReaderException ex = new HelpContentReaderException(e);
             if (con != null) {
                 try {
                     ex.setResponseCode(con.getResponseCode());
-                } catch(IOException e1) {
+                } catch (IOException e1) {
                     // ignore
                 }
@@ -85,8 +85,8 @@
         try {
             s = readFromTrac(in, url);
-        } catch(IOException e) {
+        } catch (IOException e) {
             throw new HelpContentReaderException(e);
         }
-        if(dotest && s.isEmpty())
+        if (dotest && s.isEmpty())
             throw new MissingHelpContentException(s);
         return s;
Index: trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java	(revision 8510)
@@ -52,5 +52,5 @@
      */
     public static String getHelpTopicUrl(String absoluteHelpTopic) {
-        if(absoluteHelpTopic == null)
+        if (absoluteHelpTopic == null)
             return null;
         String ret = getWikiBaseHelpUrl();
@@ -125,5 +125,5 @@
     private static String getHelpTopicPrefix(LocaleType type) {
         String ret = LanguageInfo.getWikiLanguagePrefix(type);
-        if(ret == null)
+        if (ret == null)
             return ret;
         ret = "/" + ret + Main.pref.get("help.pathhelp", "/Help").replaceAll("^\\/+", ""); // remove leading /
@@ -160,23 +160,23 @@
             return null;
         if (context instanceof Helpful)
-            return ((Helpful)context).helpTopic();
+            return ((Helpful) context).helpTopic();
         if (context instanceof JMenu) {
-            JMenu b = (JMenu)context;
+            JMenu b = (JMenu) context;
             if (b.getClientProperty("help") != null)
-                return (String)b.getClientProperty("help");
+                return (String) b.getClientProperty("help");
             return null;
         }
         if (context instanceof AbstractButton) {
-            AbstractButton b = (AbstractButton)context;
+            AbstractButton b = (AbstractButton) context;
             if (b.getClientProperty("help") != null)
-                return (String)b.getClientProperty("help");
+                return (String) b.getClientProperty("help");
             return getContextSpecificHelpTopic(b.getAction());
         }
         if (context instanceof Action)
-            return (String)((Action)context).getValue("help");
-        if (context instanceof JComponent && ((JComponent)context).getClientProperty("help") != null)
-            return (String)((JComponent)context).getClientProperty("help");
+            return (String) ((Action) context).getValue("help");
+        if (context instanceof JComponent && ((JComponent) context).getClientProperty("help") != null)
+            return (String) ((JComponent) context).getClientProperty("help");
         if (context instanceof Component)
-            return getContextSpecificHelpTopic(((Component)context).getParent());
+            return getContextSpecificHelpTopic(((Component) context).getParent());
         return null;
     }
Index: trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java	(revision 8510)
@@ -29,5 +29,5 @@
 
     /** background color used when the coordinates are different */
-    public static final Color BGCOLOR_DIFFERENCE = new Color(255,197,197);
+    public static final Color BGCOLOR_DIFFERENCE = new Color(255, 197, 197);
 
     /** the model */
@@ -55,9 +55,9 @@
         gc.weightx = 0.5;
         gc.weighty = 0.0;
-        gc.insets = new Insets(5,5,5,0);
+        gc.insets = new Insets(5, 5, 5, 0);
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.anchor = GridBagConstraints.FIRST_LINE_START;
         referenceInfoPanel = new VersionInfoPanel(model, PointInTimeType.REFERENCE_POINT_IN_TIME);
-        add(referenceInfoPanel,gc);
+        add(referenceInfoPanel, gc);
 
         gc.gridx = 1;
@@ -68,5 +68,5 @@
         gc.anchor = GridBagConstraints.FIRST_LINE_START;
         currentInfoPanel = new VersionInfoPanel(model, PointInTimeType.CURRENT_POINT_IN_TIME);
-        add(currentInfoPanel,gc);
+        add(currentInfoPanel, gc);
 
         // ---------------------------
@@ -199,5 +199,5 @@
             gc.fill = GridBagConstraints.NONE;
             gc.weightx = 0.0;
-            gc.insets = new Insets(5,5,5,5);
+            gc.insets = new Insets(5, 5, 5, 5);
             gc.anchor = GridBagConstraints.NORTHWEST;
             add(new JLabel(tr("Latitude: ")), gc);
@@ -211,5 +211,5 @@
             lblLat.setBackground(Color.WHITE);
             lblLat.setOpaque(true);
-            lblLat.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
+            lblLat.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
 
             // --------
@@ -229,5 +229,5 @@
             lblLon.setBackground(Color.WHITE);
             lblLon.setOpaque(true);
-            lblLon.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
+            lblLon.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
 
             // fill the remaining space
@@ -257,5 +257,5 @@
             if (!(p instanceof HistoryNode)) return false;
             if (!(opposite instanceof HistoryNode)) return false;
-            HistoryNode node = (HistoryNode)p;
+            HistoryNode node = (HistoryNode) p;
             HistoryNode oppositeNode = (HistoryNode) opposite;
 
@@ -312,5 +312,5 @@
             gc.fill = GridBagConstraints.NONE;
             gc.weightx = 0.0;
-            gc.insets = new Insets(5,5,5,5);
+            gc.insets = new Insets(5, 5, 5, 5);
             gc.anchor = GridBagConstraints.NORTHWEST;
             add(new JLabel(tr("Distance: ")), gc);
@@ -324,5 +324,5 @@
             lblDistance.setBackground(Color.WHITE);
             lblDistance.setOpaque(true);
-            lblDistance.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
+            lblDistance.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/history/DiffTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/DiffTableModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/DiffTableModel.java	(revision 8510)
@@ -22,4 +22,5 @@
         fireTableDataChanged();
     }
+
     @Override
     public int getRowCount() {
@@ -42,5 +43,5 @@
 
     public int getFirstChange() {
-        for (int i=0; i<rows.size(); i++) {
+        for (int i = 0; i < rows.size(); i++) {
             if (rows.get(i).state != DiffItemType.SAME)
                 return i;
Index: trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialog.java	(revision 8510)
@@ -153,5 +153,4 @@
     }
 
-
     class CloseAction extends AbstractAction {
         public CloseAction() {
Index: trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java	(revision 8510)
@@ -154,4 +154,5 @@
     @Override
     public void activeLayerChange(Layer oldLayer, Layer newLayer) {}
+
     @Override
     public void layerAdded(Layer newLayer) {}
Index: trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 8510)
@@ -138,4 +138,5 @@
         return false;
     }
+
     protected boolean canShowAsLatest(OsmPrimitive primitive) {
         if (primitive == null) return false;
@@ -224,9 +225,9 @@
      */
     protected void initNodeListTableModels() {
-        if(current.getType() != OsmPrimitiveType.WAY || reference.getType() != OsmPrimitiveType.WAY)
+        if (current.getType() != OsmPrimitiveType.WAY || reference.getType() != OsmPrimitiveType.WAY)
             return;
         TwoColumnDiff diff = new TwoColumnDiff(
-                ((HistoryWay)reference).getNodes().toArray(),
-                ((HistoryWay)current).getNodes().toArray());
+                ((HistoryWay) reference).getNodes().toArray(),
+                ((HistoryWay) current).getNodes().toArray());
         referenceNodeListTableModel.setRows(diff.referenceDiff, diff.referenceReversed);
         currentNodeListTableModel.setRows(diff.currentDiff, false);
@@ -234,9 +235,9 @@
 
     protected void initMemberListTableModels() {
-        if(current.getType() != OsmPrimitiveType.RELATION || reference.getType() != OsmPrimitiveType.RELATION)
+        if (current.getType() != OsmPrimitiveType.RELATION || reference.getType() != OsmPrimitiveType.RELATION)
             return;
         TwoColumnDiff diff = new TwoColumnDiff(
-                ((HistoryRelation)reference).getMembers().toArray(),
-                ((HistoryRelation)current).getMembers().toArray());
+                ((HistoryRelation) reference).getMembers().toArray(),
+                ((HistoryRelation) current).getMembers().toArray());
         referenceRelationMemberTableModel.setRows(diff.referenceDiff, diff.referenceReversed);
         currentRelationMemberTableModel.setRows(diff.currentDiff, false);
@@ -735,5 +736,5 @@
     public void activeLayerChange(Layer oldLayer, Layer newLayer) {
         if (oldLayer instanceof OsmDataLayer) {
-            OsmDataLayer l = (OsmDataLayer)oldLayer;
+            OsmDataLayer l = (OsmDataLayer) oldLayer;
             l.data.removeDataSetListener(this);
         }
@@ -743,5 +744,5 @@
             return;
         }
-        OsmDataLayer l = (OsmDataLayer)newLayer;
+        OsmDataLayer l = (OsmDataLayer) newLayer;
         l.data.addDataSetListener(this);
         OsmPrimitive primitive = l.data.getPrimitiveById(history.getId(), history.getType());
@@ -758,4 +759,5 @@
     @Override
     public void layerAdded(Layer newLayer) {}
+
     @Override
     public void layerRemoved(Layer oldLayer) {}
@@ -778,5 +780,5 @@
             clone = new HistoryRelation(r.getId(), r.getVersion(), r.isVisible(), getCurrentUser(), 0, null, false);
             clone.setTags(r.getKeys());
-            HistoryRelation hr = (HistoryRelation)clone;
+            HistoryRelation hr = (HistoryRelation) clone;
             for (RelationMember rm : r.getMembers()) {
                 hr.addMember(new RelationMemberData(rm.getRole(), rm.getType(), rm.getUniqueId()));
@@ -789,5 +791,5 @@
             clone.setTags(w.getKeys());
             for (Node n: w.getNodes()) {
-                ((HistoryWay)clone).addNode(n.getUniqueId());
+                ((HistoryWay) clone).addNode(n.getUniqueId());
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java	(revision 8510)
@@ -190,5 +190,5 @@
         try {
             progressMonitor.setTicksCount(toLoad.size());
-            for(PrimitiveId pid: toLoad) {
+            for (PrimitiveId pid: toLoad) {
                 if (canceled) {
                     break;
@@ -212,5 +212,5 @@
                         ds.putChangeset(i);
                     }
-                } catch(OsmTransferException e) {
+                } catch (OsmTransferException e) {
                     if (canceled)
                         return;
@@ -219,5 +219,5 @@
                 loadedData.mergeInto(ds);
             }
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             lastException = e;
             return;
Index: trunk/src/org/openstreetmap/josm/gui/history/HistoryViewerPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/HistoryViewerPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/HistoryViewerPanel.java	(revision 8510)
@@ -82,9 +82,9 @@
         gc.weightx = 0.5;
         gc.weighty = 0.0;
-        gc.insets = new Insets(5,5,5,0);
+        gc.insets = new Insets(5, 5, 5, 0);
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.anchor = GridBagConstraints.FIRST_LINE_START;
         referenceInfoPanel = new VersionInfoPanel(model, PointInTimeType.REFERENCE_POINT_IN_TIME);
-        add(referenceInfoPanel,gc);
+        add(referenceInfoPanel, gc);
 
         gc.gridx = 1;
@@ -97,5 +97,5 @@
         gc.anchor = GridBagConstraints.FIRST_LINE_START;
         currentInfoPanel = new VersionInfoPanel(model, PointInTimeType.CURRENT_POINT_IN_TIME);
-        add(currentInfoPanel,gc);
+        add(currentInfoPanel, gc);
 
         adjustmentSynchronizer = new AdjustmentSynchronizer();
@@ -111,5 +111,5 @@
         gc.fill = GridBagConstraints.BOTH;
         gc.anchor = GridBagConstraints.NORTHWEST;
-        add(embedInScrollPane(buildReferenceTable()),gc);
+        add(embedInScrollPane(buildReferenceTable()), gc);
 
         gc.gridx = 1;
@@ -121,5 +121,5 @@
         gc.fill = GridBagConstraints.BOTH;
         gc.anchor = GridBagConstraints.NORTHWEST;
-        add(embedInScrollPane(buildCurrentTable()),gc);
+        add(embedInScrollPane(buildCurrentTable()), gc);
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/history/NodeListTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/NodeListTableCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/NodeListTableCellRenderer.java	(revision 8510)
@@ -17,5 +17,5 @@
 public class NodeListTableCellRenderer extends JLabel implements TableCellRenderer {
 
-    public static final Color BGCOLOR_SELECTED = new Color(143,170,255);
+    public static final Color BGCOLOR_SELECTED = new Color(143, 170, 255);
 
     private ImageIcon nodeIcon;
@@ -24,5 +24,5 @@
      * Constructs a new {@code NodeListTableCellRenderer}.
      */
-    public NodeListTableCellRenderer(){
+    public NodeListTableCellRenderer() {
         setOpaque(true);
         nodeIcon = ImageProvider.get("data", "node");
@@ -54,5 +54,5 @@
             int row, int column) {
 
-        renderNode((TwoColumnDiff.Item)value, isSelected);
+        renderNode((TwoColumnDiff.Item) value, isSelected);
         return this;
     }
Index: trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java	(revision 8510)
@@ -118,9 +118,9 @@
         gc.weightx = 0.5;
         gc.weighty = 0.0;
-        gc.insets = new Insets(5,5,5,0);
+        gc.insets = new Insets(5, 5, 5, 0);
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.anchor = GridBagConstraints.FIRST_LINE_START;
         referenceInfoPanel = new VersionInfoPanel(model, PointInTimeType.REFERENCE_POINT_IN_TIME);
-        add(referenceInfoPanel,gc);
+        add(referenceInfoPanel, gc);
 
         gc.gridx = 1;
@@ -133,5 +133,5 @@
         gc.anchor = GridBagConstraints.FIRST_LINE_START;
         currentInfoPanel = new VersionInfoPanel(model, PointInTimeType.CURRENT_POINT_IN_TIME);
-        add(currentInfoPanel,gc);
+        add(currentInfoPanel, gc);
 
         adjustmentSynchronizer = new AdjustmentSynchronizer();
@@ -149,5 +149,5 @@
         gc.fill = GridBagConstraints.BOTH;
         gc.anchor = GridBagConstraints.NORTHWEST;
-        add(embeddInScrollPane(buildReferenceNodeListTable()),gc);
+        add(embeddInScrollPane(buildReferenceNodeListTable()), gc);
 
         gc.gridx = 1;
@@ -159,5 +159,5 @@
         gc.fill = GridBagConstraints.BOTH;
         gc.anchor = GridBagConstraints.NORTHWEST;
-        add(embeddInScrollPane(buildCurrentNodeListTable()),gc);
+        add(embeddInScrollPane(buildCurrentNodeListTable()), gc);
     }
 
@@ -175,4 +175,5 @@
         }
     }
+
     protected void registerAsObserver(HistoryBrowserModel model) {
         if (currentInfoPanel != null) {
@@ -205,5 +206,5 @@
         }
 
-        public void prepare(PrimitiveId pid){
+        public void prepare(PrimitiveId pid) {
             zoomToNodeAction.setPrimitiveId(pid);
             zoomToNodeAction.updateEnabledState();
@@ -310,6 +311,6 @@
     private static PrimitiveId primitiveIdAtRow(TableModel model, int row) {
         DiffTableModel castedModel = (DiffTableModel) model;
-        Long id = (Long)castedModel.getValueAt(row, 0).value;
-        if(id == null) return null;
+        Long id = (Long) castedModel.getValueAt(row, 0).value;
+        if (id == null) return null;
         return new SimplePrimitiveId(id, OsmPrimitiveType.NODE);
     }
@@ -340,5 +341,5 @@
             if (e.getClickCount() < 2) return;
             int row = table.rowAtPoint(e.getPoint());
-            if(row <= 0) return;
+            if (row <= 0) return;
             PrimitiveId pid = primitiveIdAtRow(table.getModel(), row);
             if (pid == null || pid.isNew())
Index: trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListTableCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListTableCellRenderer.java	(revision 8510)
@@ -25,8 +25,8 @@
 public class RelationMemberListTableCellRenderer extends JLabel implements TableCellRenderer {
 
-    public static final Color BGCOLOR_EMPTY_ROW = new Color(234,234,234);
-    public static final Color BGCOLOR_NOT_IN_OPPOSITE = new Color(255,197,197);
-    public static final Color BGCOLOR_IN_OPPOSITE = new Color(255,234,213);
-    public static final Color BGCOLOR_SELECTED = new Color(143,170,255);
+    public static final Color BGCOLOR_EMPTY_ROW = new Color(234, 234, 234);
+    public static final Color BGCOLOR_NOT_IN_OPPOSITE = new Color(255, 197, 197);
+    public static final Color BGCOLOR_IN_OPPOSITE = new Color(255, 234, 213);
+    public static final Color BGCOLOR_SELECTED = new Color(143, 170, 255);
 
     private transient Map<OsmPrimitiveType, ImageIcon> icons;
@@ -55,5 +55,5 @@
         Color bgColor = diffItem.state.getColor();
         RelationMemberData member = (RelationMemberData) diffItem.value;
-        text = member == null?"":member.getRole();
+        text = member == null ? "" : member.getRole();
         setText(text);
         setToolTipText(text);
@@ -83,5 +83,5 @@
             int row, int column) {
 
-        Item member = (TwoColumnDiff.Item)value;
+        Item member = (TwoColumnDiff.Item) value;
         renderIcon((RelationMemberData) member.value);
         switch(column) {
Index: trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListViewer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListViewer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/RelationMemberListViewer.java	(revision 8510)
@@ -30,5 +30,5 @@
         @Override
         public void tableChanged(TableModelEvent e) {
-            Rectangle rect = table.getCellRect(((DiffTableModel)e.getSource()).getFirstChange(), 0, true);
+            Rectangle rect = table.getCellRect(((DiffTableModel) e.getSource()).getFirstChange(), 0, true);
             table.scrollRectToVisible(rect);
         }
Index: trunk/src/org/openstreetmap/josm/gui/history/SelectionSynchronizer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/SelectionSynchronizer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/SelectionSynchronizer.java	(revision 8510)
@@ -32,5 +32,5 @@
     @Override
     public void valueChanged(ListSelectionEvent e) {
-        DefaultListSelectionModel referenceModel = (DefaultListSelectionModel)e.getSource();
+        DefaultListSelectionModel referenceModel = (DefaultListSelectionModel) e.getSource();
         int i = referenceModel.getMinSelectionIndex();
         for (ListSelectionModel model : participants) {
@@ -38,5 +38,5 @@
                 continue;
             }
-            model.setSelectionInterval(i,i);
+            model.setSelectionInterval(i, i);
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/history/TagTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/TagTableCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/TagTableCellRenderer.java	(revision 8510)
@@ -18,5 +18,5 @@
  */
 public class TagTableCellRenderer extends JLabel implements TableCellRenderer {
-    public static final Color BGCOLOR_DIFFERENCE = new Color(255,197,197);
+    public static final Color BGCOLOR_DIFFERENCE = new Color(255, 197, 197);
 
     /**
@@ -85,5 +85,5 @@
             return this;
 
-        String key = (String)value;
+        String key = (String) value;
         HistoryBrowserModel.TagTableModel model = getTagTableModel(table);
 
Index: trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/TwoColumnDiff.java	(revision 8510)
@@ -32,6 +32,9 @@
 
         public enum DiffItemType {
-            INSERTED(new Color(0xDD, 0xFF, 0xDD)), DELETED(new Color(255,197,197)), CHANGED(new Color(255,234,213)),
-            SAME(new Color(234,234,234)), EMPTY(new Color(234,234,234));
+            INSERTED(new Color(0xDD, 0xFF, 0xDD)),
+            DELETED(new Color(255, 197, 197)),
+            CHANGED(new Color(255, 234, 213)),
+            SAME(new Color(234, 234, 234)),
+            EMPTY(new Color(234, 234, 234));
 
             private final Color color;
@@ -39,4 +42,5 @@
                 this.color = color;
             }
+
             public Color getColor() {
                 return color;
@@ -91,8 +95,8 @@
         int ib = 0;
 
-        while(script != null) {
+        while (script != null) {
             int deleted = script.deleted;
             int inserted = script.inserted;
-            while(ia < script.line0 && ib < script.line1){
+            while (ia < script.line0 && ib < script.line1) {
                 Item cell = new Item(DiffItemType.SAME, a[ia]);
                 referenceDiff.add(cell);
@@ -102,9 +106,9 @@
             }
 
-            while(inserted > 0 || deleted > 0) {
-                if(inserted > 0 && deleted > 0) {
+            while (inserted > 0 || deleted > 0) {
+                if (inserted > 0 && deleted > 0) {
                     referenceDiff.add(new Item(DiffItemType.CHANGED, a[ia++]));
                     currentDiff.add(new Item(DiffItemType.CHANGED, b[ib++]));
-                } else if(inserted > 0) {
+                } else if (inserted > 0) {
                     referenceDiff.add(new Item(DiffItemType.EMPTY, null));
                     currentDiff.add(new Item(DiffItemType.INSERTED, b[ib++]));
@@ -118,5 +122,5 @@
             script = script.link;
         }
-        while(ia < a.length && ib < b.length) {
+        while (ia < a.length && ib < b.length) {
             referenceDiff.add(new Item(DiffItemType.SAME, a[ia++]));
             currentDiff.add(new Item(DiffItemType.SAME, b[ib++]));
Index: trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java	(revision 8510)
@@ -92,5 +92,5 @@
         pnl1.add(lblInfo, BorderLayout.CENTER);
 
-        JPanel pnlUserAndChangeset = new JPanel(new GridLayout(2,2));
+        JPanel pnlUserAndChangeset = new JPanel(new GridLayout(2, 2));
         lblUser = new UrlLabel("", 2);
         pnlUserAndChangeset.add(new JLabel(tr("User:")));
Index: trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java	(revision 8510)
@@ -124,4 +124,5 @@
             super(popupMenu);
         }
+
         @Override
         public void mousePressed(MouseEvent e) {
@@ -136,4 +137,5 @@
             }
         }
+
         @Override
         protected int checkTableSelection(JTable table, Point p) {
@@ -228,4 +230,12 @@
         private UserInfoAction userInfoAction;
 
+        /**
+         * Constructs a new {@code VersionTablePopupMenu}.
+         */
+        public VersionTablePopupMenu() {
+            super();
+            build();
+        }
+
         protected void build() {
             changesetInfoAction = new ChangesetInfoAction();
@@ -234,8 +244,4 @@
             add(userInfoAction);
         }
-        public VersionTablePopupMenu() {
-            super();
-            build();
-        }
 
         public void prepare(HistoryOsmPrimitive primitive) {
@@ -251,5 +257,5 @@
         public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
                 int row, int column) {
-            setSelected(value != null && (Boolean)value);
+            setSelected(value != null && (Boolean) value);
             setHorizontalAlignment(SwingConstants.CENTER);
             return this;
@@ -314,5 +320,5 @@
         int maxwidth = 0;
 
-        for (int row=0; row<tbl.getRowCount(); row++) {
+        for (int row = 0; row < tbl.getRowCount(); row++) {
             TableCellRenderer tcr = tbl.getCellRenderer(row, col);
             Object val = tbl.getValueAt(row, col);
Index: trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java	(revision 8510)
@@ -78,5 +78,5 @@
     protected void synchronizeDataSet() {
         UpdateDataAction act = new UpdateDataAction();
-        act.actionPerformed(new ActionEvent(this,0,""));
+        act.actionPerformed(new ActionEvent(this, 0, ""));
     }
 
@@ -256,5 +256,5 @@
             Matcher m = p.matcher(errorHeader);
             if (m.matches()) {
-                handleUploadConflictForKnownConflict(OsmPrimitiveType.from(m.group(3)), Long.parseLong(m.group(4)), m.group(2),m.group(1));
+                handleUploadConflictForKnownConflict(OsmPrimitiveType.from(m.group(3)), Long.parseLong(m.group(4)), m.group(2), m.group(1));
                 return;
             }
@@ -296,5 +296,5 @@
     protected void handleGone(OsmApiPrimitiveGoneException e) {
         if (e.isKnownPrimitive()) {
-            UpdateSelectionAction.handlePrimitiveGoneException(e.getPrimitiveId(),e.getPrimitiveType());
+            UpdateSelectionAction.handlePrimitiveGoneException(e.getPrimitiveId(), e.getPrimitiveType());
         } else {
             ExceptionDialogUtil.explainGoneForUnknownPrimitive(e);
@@ -311,15 +311,15 @@
         //
         if (e instanceof OsmApiInitializationException) {
-            ExceptionDialogUtil.explainOsmApiInitializationException((OsmApiInitializationException)e);
+            ExceptionDialogUtil.explainOsmApiInitializationException((OsmApiInitializationException) e);
             return;
         }
 
         if (e instanceof OsmApiPrimitiveGoneException) {
-            handleGone((OsmApiPrimitiveGoneException)e);
+            handleGone((OsmApiPrimitiveGoneException) e);
             return;
         }
         if (e instanceof OsmApiException) {
-            OsmApiException ex = (OsmApiException)e;
-            if(ex.getResponseCode() == HttpURLConnection.HTTP_CONFLICT) {
+            OsmApiException ex = (OsmApiException) e;
+            if (ex.getResponseCode() == HttpURLConnection.HTTP_CONFLICT) {
                 // There was an upload conflict. Let the user decide whether and how to resolve it
                 handleUploadConflict(ex);
Index: trunk/src/org/openstreetmap/josm/gui/io/ActionFlagsTableCell.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/ActionFlagsTableCell.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/ActionFlagsTableCell.java	(revision 8510)
@@ -47,4 +47,7 @@
     };
 
+    /**
+     * Constructs a new {@code ActionFlagsTableCell}.
+     */
     public ActionFlagsTableCell() {
         checkBoxes[0] = new JCheckBox(tr("Upload"));
@@ -66,5 +69,9 @@
         }
 
-        setToolTipText(tr("<html>Select which actions to perform for this layer, if you click the leftmost button.<br/>Check \"upload\" to upload the changes to the OSM server.<br/>Check \"Save\" to save the layer to the file specified on the left.</html>"));
+        setToolTipText(tr("<html>"+
+            "Select which actions to perform for this layer, if you click the leftmost button.<br/>"+
+            "Check \"upload\" to upload the changes to the OSM server.<br/>"+
+            "Check \"Save\" to save the layer to the file specified on the left."+
+            "</html>"));
     }
 
@@ -72,5 +79,5 @@
         if (v != null && checkBoxes[0] != null && checkBoxes[1] != null) {
             boolean[] values;
-            if(v instanceof SaveLayerInfo) {
+            if (v instanceof SaveLayerInfo) {
                 values = new boolean[2];
                 values[0] = ((SaveLayerInfo) v).isDoUploadToServer();
Index: trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java	(revision 8510)
@@ -99,5 +99,5 @@
     protected void build() {
         setLayout(new BorderLayout());
-        setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
+        setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
         add(buildUploadCommentPanel(), BorderLayout.NORTH);
         add(pnlUploadParameterSummary, BorderLayout.CENTER);
@@ -136,4 +136,5 @@
                         }
                     }
+
                     @Override
                     public void keyReleased(KeyEvent e) {}
@@ -192,4 +193,5 @@
             destination.setComment(source.getText());
         }
+
         @Override
         public void focusLost(FocusEvent e) {
@@ -213,5 +215,5 @@
         public void update(Observable o, Object arg) {
             if (!(o instanceof ChangesetCommentModel)) return;
-            String newComment = (String)arg;
+            String newComment = (String) arg;
             if (!destination.getText().equals(newComment)) {
                 destination.setText(newComment);
Index: trunk/src/org/openstreetmap/josm/gui/io/ChangesetCommentModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/ChangesetCommentModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/ChangesetCommentModel.java	(revision 8510)
@@ -33,5 +33,5 @@
      */
     public String getComment() {
-        return comment == null ? "": comment;
+        return comment == null ? "" : comment;
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java	(revision 8510)
@@ -64,5 +64,5 @@
         setLayout(new GridBagLayout());
         GridBagConstraints gc = new GridBagConstraints();
-        setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
+        setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
 
         ButtonGroup bgUseNewOrExisting = new ButtonGroup();
@@ -83,5 +83,5 @@
         gc.weightx = 1.0;
         gc.weighty = 0.0;
-        gc.insets = new Insets(0,0,0,0);
+        gc.insets = new Insets(0, 0, 0, 0);
         gc.anchor = GridBagConstraints.FIRST_LINE_START;
         rbUseNew = new JRadioButton(tr("Upload to a new changeset"));
@@ -124,5 +124,5 @@
         gc.weightx = 0.0;
         JButton btnRefresh = new JButton(new RefreshAction());
-        btnRefresh.setMargin(new Insets(0,0,0,0));
+        btnRefresh.setMargin(new Insets(0, 0, 0, 0));
         add(btnRefresh, gc);
 
@@ -132,5 +132,5 @@
         CloseChangesetAction closeChangesetAction = new CloseChangesetAction();
         JButton btnClose = new JButton(closeChangesetAction);
-        btnClose.setMargin(new Insets(0,0,0,0));
+        btnClose.setMargin(new Insets(0, 0, 0, 0));
         cbOpenChangesets.addItemListener(closeChangesetAction);
         rbExisting.addItemListener(closeChangesetAction);
@@ -189,5 +189,5 @@
     public void setSelectedChangesetForNextUpload(Changeset cs) {
         int idx  = model.getIndexOf(cs);
-        if (idx >=0) {
+        if (idx >= 0) {
             rbExisting.setSelected(true);
             model.setSelectedItem(cs);
@@ -205,5 +205,5 @@
         if (rbUseNew.isSelected())
             return null;
-        return (Changeset)cbOpenChangesets.getSelectedItem();
+        return (Changeset) cbOpenChangesets.getSelectedItem();
     }
 
@@ -242,5 +242,5 @@
         @Override
         public void itemStateChanged(ItemEvent e) {
-            Changeset cs = (Changeset)cbOpenChangesets.getSelectedItem();
+            Changeset cs = (Changeset) cbOpenChangesets.getSelectedItem();
             if (cs == null) return;
             if (rbExisting.isSelected()) {
@@ -288,5 +288,5 @@
                     model.selectFirstChangeset();
                 }
-                Changeset cs = (Changeset)cbOpenChangesets.getSelectedItem();
+                Changeset cs = (Changeset) cbOpenChangesets.getSelectedItem();
                 if (cs == null) return;
                 changesetCommentModel.setComment(cs.get("comment"));
@@ -326,5 +326,5 @@
         @Override
         public void actionPerformed(ActionEvent e) {
-            Changeset cs = (Changeset)cbOpenChangesets.getSelectedItem();
+            Changeset cs = (Changeset) cbOpenChangesets.getSelectedItem();
             if (cs == null) return;
             CloseChangesetTask task = new CloseChangesetTask(Collections.singletonList(cs));
Index: trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java	(revision 8510)
@@ -53,5 +53,5 @@
     protected JPanel buildTopPanel() {
         JPanel pnl = new JPanel();
-        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         pnl.setLayout(new BorderLayout());
         pnl.add(new JLabel(tr("<html>Please select the changesets you want to close</html>")), BorderLayout.CENTER);
@@ -92,5 +92,5 @@
         getContentPane().add(buildSouthPanel(), BorderLayout.SOUTH);
 
-        getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0), "escape");
+        getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "escape");
         getRootPane().getActionMap().put("escape", new CancelAction());
         addWindowListener(new WindowEventHandler());
@@ -102,5 +102,5 @@
             new WindowGeometry(
                     getClass().getName() + ".geometry",
-                    WindowGeometry.centerInWindow(Main.parent, new Dimension(300,300))
+                    WindowGeometry.centerInWindow(Main.parent, new Dimension(300, 300))
             ).applySafe(this);
         } else if (isShowing()) { // Avoid IllegalComponentStateException like in #8775
Index: trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetTask.java	(revision 8510)
@@ -80,5 +80,5 @@
                 closedChangesets.add(cs);
             }
-        } catch(Exception e) {
+        } catch (Exception e) {
             if (canceled)
                 return;
Index: trunk/src/org/openstreetmap/josm/gui/io/ConfigurationParameterRequestHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/ConfigurationParameterRequestHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/ConfigurationParameterRequestHandler.java	(revision 8510)
@@ -4,4 +4,5 @@
 public interface ConfigurationParameterRequestHandler {
     void handleChangesetConfigurationRequest();
+
     void handleUploadStrategyConfigurationRequest();
 }
Index: trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 8510)
@@ -79,5 +79,5 @@
     public void setVisible(boolean visible) {
         if (visible) {
-            WindowGeometry.centerInWindow(Main.parent, new Dimension(350,300)).applySafe(this);
+            WindowGeometry.centerInWindow(Main.parent, new Dimension(350, 300)).applySafe(this);
         }
         super.setVisible(visible);
@@ -97,8 +97,9 @@
 
         addWindowListener(new WindowEventHander());
-        getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "escape");
+        getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
+                KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "escape");
         getRootPane().getActionMap().put("escape", new CancelAction());
 
-        getRootPane().setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        getRootPane().setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
     }
 
@@ -108,5 +109,5 @@
         try {
             setAlwaysOnTop(true);
-        } catch(SecurityException e) {
+        } catch (SecurityException e) {
             Main.warn(tr("Failed to put Credential Dialog always on top. Caught security exception."));
         }
@@ -136,15 +137,15 @@
 
     public String getUsername() {
-        if (pnlCredentials== null) return null;
+        if (pnlCredentials == null) return null;
         return pnlCredentials.getUserName();
     }
 
     public char[] getPassword() {
-        if (pnlCredentials== null) return null;
+        if (pnlCredentials == null) return null;
         return pnlCredentials.getPassword();
     }
 
     public boolean isSaveCredentials() {
-        if (pnlCredentials== null) return false;
+        if (pnlCredentials == null) return false;
         return pnlCredentials.isSaveCredentials();
     }
@@ -174,5 +175,5 @@
             gc.weightx = 1.0;
             gc.weighty = 0.0;
-            gc.insets = new Insets(0,0,10,0);
+            gc.insets = new Insets(0, 0, 10, 0);
             add(lblHeading = new JMultilineLabel(""), gc);
 
@@ -184,5 +185,5 @@
             gc.weightx = 0.0;
             gc.weighty = 0.0;
-            gc.insets = new Insets(0,0,10,10);
+            gc.insets = new Insets(0, 0, 10, 10);
             add(new JLabel(tr("Username")), gc);
             gc.gridx = 1;
@@ -220,5 +221,5 @@
             gc.gridy = 5;
             gc.weighty = 1.0;
-            add(new JPanel(),gc);
+            add(new JPanel(), gc);
 
         }
@@ -330,5 +331,5 @@
         public void focusGained(FocusEvent e) {
             if (e.getSource() instanceof JTextField) {
-                JTextField tf = (JTextField)e.getSource();
+                JTextField tf = (JTextField) e.getSource();
                 tf.selectAll();
             }
@@ -356,5 +357,5 @@
         @Override
         public void keyPressed(KeyEvent e) {
-            if(e.getKeyChar() == KeyEvent.VK_ENTER) {
+            if (e.getKeyChar() == KeyEvent.VK_ENTER) {
                 if (currentTF.getText().trim().isEmpty()) {
                     currentTF.selectAll();
Index: trunk/src/org/openstreetmap/josm/gui/io/DownloadFileTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/DownloadFileTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/DownloadFileTask.java	(revision 8510)
@@ -77,5 +77,4 @@
     }
 
-
     @Override
     protected void cancel() {
@@ -102,5 +101,5 @@
             URL url = new URL(address);
             int size;
-            synchronized(this) {
+            synchronized (this) {
                 downloadConnection = Utils.openHttpConnection(url);
                 downloadConnection.setRequestProperty("Cache-Control", "no-cache");
@@ -110,5 +109,5 @@
 
             progressMonitor.setTicksCount(100);
-            progressMonitor.subTask(tr("Downloading File {0}: {1} bytes...", file.getName(),size));
+            progressMonitor.subTask(tr("Downloading File {0}: {1} bytes...", file.getName(), size));
 
             try (
@@ -117,14 +116,14 @@
             ) {
                 byte[] buffer = new byte[32768];
-                int count=0;
-                int p1=0, p2=0;
+                int count = 0;
+                int p1 = 0, p2 = 0;
                 for (int read = in.read(buffer); read != -1; read = in.read(buffer)) {
                     out.write(buffer, 0, read);
-                    count+=read;
+                    count += read;
                     if (canceled) break;
                     p2 = 100 * count / size;
-                    if (p2!=p1) {
+                    if (p2 != p1) {
                         progressMonitor.setTicks(p2);
-                        p1=p2;
+                        p1 = p2;
                     }
                 }
@@ -138,5 +137,5 @@
                 }
             }
-        } catch(MalformedURLException e) {
+        } catch (MalformedURLException e) {
             String msg = tr("Cannot download file ''{0}''. Its download link ''{1}'' is not a valid URL. Skipping download.",
                     file.getName(), address);
@@ -157,5 +156,5 @@
         try {
             download();
-        } catch(DownloadException e) {
+        } catch (DownloadException e) {
             Main.error(e);
         }
Index: trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java	(revision 8510)
@@ -48,5 +48,5 @@
     protected void cancel() {
         this.canceled = true;
-        synchronized(this) {
+        synchronized (this) {
             if (reader != null) {
                 reader.cancel();
@@ -70,5 +70,5 @@
             return;
         }
-        if (canceled)return;
+        if (canceled) return;
         if (lastException != null) {
             ExceptionDialogUtil.explainException(lastException);
@@ -98,5 +98,5 @@
      *
      */
-    protected void refreshUserIdentity(){
+    protected void refreshUserIdentity() {
         JosmUserIdentityManager im = JosmUserIdentityManager.getInstance();
         try {
@@ -104,5 +104,5 @@
             UserInfo info = infoReader.fetchUserInfo(getProgressMonitor().createSubTaskMonitor(1, false));
             im.setFullyIdentified(info.getDisplayName(), info);
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             // retrieving the user info can fail if the current user is not authorised to
             // retrieve it, i.e. if he is working with an OAuth Access Token which doesn't
@@ -127,11 +127,11 @@
             if (im.isAnonymous()) {
                 refreshUserIdentity();
-            } else if (im.isFullyIdentified()){
+            } else if (im.isFullyIdentified()) {
                 // do nothing
             } else if (im.isPartiallyIdentified()) {
                 refreshUserIdentity();
             }
-            if (canceled)return;
-            synchronized(this) {
+            if (canceled) return;
+            synchronized (this) {
                 reader = new OsmServerChangesetReader();
             }
@@ -153,5 +153,5 @@
                     getProgressMonitor().createSubTaskMonitor(1, false /* not internal */)
             );
-        } catch(Exception e) {
+        } catch (Exception e) {
             if (canceled)
                 return;
Index: trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesTask.java	(revision 8510)
@@ -83,5 +83,5 @@
     protected void cancel() {
         canceled = true;
-        synchronized(this) {
+        synchronized (this) {
             if (multiObjectReader != null) {
                 multiObjectReader.cancel();
@@ -105,5 +105,5 @@
             public void run() {
                 layer.mergeFrom(ds);
-                if(Main.map != null)
+                if (Main.map != null)
                     AutoScaleAction.zoomTo(ds.allPrimitives());
                 layer.onPostDownloadFromServer();
@@ -139,5 +139,5 @@
         DataSet theirDataSet;
         try {
-            synchronized(this) {
+            synchronized (this) {
                 if (canceled) return;
                 multiObjectReader = new MultiFetchServerObjectReader();
@@ -146,5 +146,5 @@
             theirDataSet = multiObjectReader.parseOsm(progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));
             missingPrimitives = multiObjectReader.getMissingPrimitives();
-            synchronized(this) {
+            synchronized (this) {
                 multiObjectReader = null;
             }
@@ -158,5 +158,5 @@
                 // (it may happen because "relations" has no deterministic sort order, see #10388)
                 if (r.isIncomplete() || r.hasIncompleteMembers()) {
-                    synchronized(this) {
+                    synchronized (this) {
                         if (canceled) return;
                         objectReader = new OsmServerObjectReader(r.getId(), OsmPrimitiveType.RELATION, fullRelation);
@@ -178,5 +178,5 @@
                 if (canceled) return;
                 if (w.hasIncompleteNodes()) {
-                    synchronized(this) {
+                    synchronized (this) {
                         if (canceled) return;
                         objectReader = new OsmServerObjectReader(w.getId(), OsmPrimitiveType.WAY, true /* full */);
@@ -191,5 +191,5 @@
             }
 
-        } catch(Exception e) {
+        } catch (Exception e) {
             if (canceled) return;
             lastException = e;
Index: trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java	(revision 8510)
@@ -85,7 +85,7 @@
     @Override
     protected void cancel() {
-        synchronized(this) {
+        synchronized (this) {
             canceled = true;
-            if(currentTask != null)
+            if (currentTask != null)
                 currentTask.operationCanceled();
         }
@@ -97,7 +97,7 @@
         // First, download primitives
         mainTask = new DownloadPrimitivesTask(tmpLayer, ids, full, getProgressMonitor().createSubTaskMonitor(1, false));
-        synchronized(this) {
+        synchronized (this) {
             currentTask = mainTask;
-            if(canceled) {
+            if (canceled) {
                 currentTask = null;
                 return;
@@ -106,8 +106,8 @@
         currentTask.run();
         // Then, download referrers for each primitive
-        if(downloadReferrers)
-            for(PrimitiveId id : ids) {
-                synchronized(this) {
-                    if(canceled) {
+        if (downloadReferrers)
+            for (PrimitiveId id : ids) {
+                synchronized (this) {
+                    if (canceled) {
                         currentTask = null;
                         return;
@@ -123,6 +123,6 @@
     @Override
     protected void finish() {
-        synchronized(this) {
-            if(canceled)
+        synchronized (this) {
+            if (canceled)
                 return;
         }
@@ -130,5 +130,5 @@
         // Append downloaded data to JOSM
         OsmDataLayer layer = Main.main.getEditLayer();
-        if(layer == null || this.newLayer)
+        if (layer == null || this.newLayer)
             Main.main.addLayer(tmpLayer);
         else
@@ -187,6 +187,6 @@
      */
     public List<PrimitiveId> getDownloadedId() {
-        synchronized(this) {
-            if(canceled)
+        synchronized (this) {
+            if (canceled)
                 return null;
         }
Index: trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java	(revision 8510)
@@ -31,5 +31,5 @@
 
 class LayerNameAndFilePathTableCell extends JPanel implements TableCellRenderer, TableCellEditor {
-    private static final Color colorError = new Color(255,197,197);
+    private static final Color colorError = new Color(255, 197, 197);
     private static final String separator = System.getProperty("file.separator");
     private static final String ellipsis = "…" + separator;
@@ -78,5 +78,5 @@
             boolean hasFocus, int row, int column) {
         removeAll();
-        SaveLayerInfo info = (SaveLayerInfo)value;
+        SaveLayerInfo info = (SaveLayerInfo) value;
         StringBuilder sb = new StringBuilder();
         sb.append("<html>")
@@ -93,5 +93,5 @@
     public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
         removeAll();
-        SaveLayerInfo info = (SaveLayerInfo)value;
+        SaveLayerInfo info = (SaveLayerInfo) value;
         value = info.getFile();
         tfFilename.setText(value == null ? "" : value.toString());
@@ -161,7 +161,7 @@
     private String makePathFit(String t) {
         boolean hasEllipsis = false;
-        while(t != null && !t.isEmpty()) {
+        while (t != null && !t.isEmpty()) {
             int txtwidth = lblFilename.getFontMetrics(lblFilename.getFont()).stringWidth(t);
-            if(txtwidth < lblFilename.getWidth() || t.lastIndexOf(separator) < ellipsis.length()) {
+            if (txtwidth < lblFilename.getWidth() || t.lastIndexOf(separator) < ellipsis.length()) {
                 break;
             }
Index: trunk/src/org/openstreetmap/josm/gui/io/OpenChangesetComboBoxModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/OpenChangesetComboBoxModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/OpenChangesetComboBoxModel.java	(revision 8510)
@@ -101,5 +101,5 @@
         }
         if (!(anObject instanceof Changeset)) return;
-        Changeset cs = (Changeset)anObject;
+        Changeset cs = (Changeset) anObject;
         if (cs.getId() == 0 || !cs.isOpen()) return;
         Changeset candidate = getChangesetById(cs.getId());
Index: trunk/src/org/openstreetmap/josm/gui/io/SaveLayerTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/SaveLayerTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/SaveLayerTask.java	(revision 8510)
@@ -21,5 +21,5 @@
  *        // wait for the task to complete
  *        taskFuture.get();
- *     } catch(Exception e) {
+ *     } catch (Exception e) {
  *        e.printStackTracek();
  *     }
@@ -56,5 +56,5 @@
                 layerInfo.getLayer().onPostSaveToFile();
             }
-        } catch(Exception e) {
+        } catch (Exception e) {
             Main.error(e);
             setLastException(e);
Index: trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java	(revision 8510)
@@ -74,5 +74,5 @@
      */
     protected void build() {
-        WindowGeometry geometry = WindowGeometry.centerOnScreen(new Dimension(650,300));
+        WindowGeometry geometry = WindowGeometry.centerOnScreen(new Dimension(650, 300));
         geometry.applySafe(this);
         getContentPane().setLayout(new BorderLayout());
@@ -192,5 +192,5 @@
             gc.weightx = 1.0;
             gc.weighty = 1.0;
-            add(lstLayers,gc);
+            add(lstLayers, gc);
         }
 
@@ -353,8 +353,9 @@
             closeDialog();
         }
+
         @Override
         public void propertyChange(PropertyChangeEvent evt) {
             if (evt.getPropertyName().equals(SaveLayersModel.MODE_PROP)) {
-                Mode mode = (Mode)evt.getNewValue();
+                Mode mode = (Mode) evt.getNewValue();
                 switch(mode) {
                 case EDITING_DATA: setEnabled(true); break;
@@ -403,5 +404,5 @@
                 g.drawImage(base,                                                 is*2, 0, is, is, null);
                 putValue(SMALL_ICON, new ImageIcon(newIco));
-            } catch(Exception e) {
+            } catch (Exception e) {
                 putValue(SMALL_ICON, getValue(BASE_ICON));
             }
@@ -418,5 +419,5 @@
         public void propertyChange(PropertyChangeEvent evt) {
             if (evt.getPropertyName().equals(SaveLayersModel.MODE_PROP)) {
-                SaveLayersModel.Mode mode = (SaveLayersModel.Mode)evt.getNewValue();
+                SaveLayersModel.Mode mode = (SaveLayersModel.Mode) evt.getNewValue();
                 switch(mode) {
                 case EDITING_DATA: setEnabled(true); break;
@@ -481,7 +482,7 @@
                     //
                     currentFuture.get();
-                } catch(CancellationException e) {
+                } catch (CancellationException e) {
                     model.setUploadState(layer, UploadOrSaveState.CANCELED);
-                } catch(Exception e) {
+                } catch (Exception e) {
                     Main.error(e);
                     model.setUploadState(layer, UploadOrSaveState.FAILED);
@@ -522,7 +523,7 @@
                     //
                     currentFuture.get();
-                } catch(CancellationException e) {
+                } catch (CancellationException e) {
                     model.setSaveState(layerInfo.getLayer(), UploadOrSaveState.CANCELED);
-                } catch(Exception e) {
+                } catch (Exception e) {
                     Main.error(e);
                     model.setSaveState(layerInfo.getLayer(), UploadOrSaveState.FAILED);
@@ -608,5 +609,5 @@
     public void tableChanged(TableModelEvent arg0) {
         boolean dis = model.getLayersToSave().isEmpty() && model.getLayersToUpload().isEmpty();
-        if(saveAndProceedActionButton != null) {
+        if (saveAndProceedActionButton != null) {
             saveAndProceedActionButton.setEnabled(!dis);
         }
Index: trunk/src/org/openstreetmap/josm/gui/io/SaveLayersModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/SaveLayersModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/SaveLayersModel.java	(revision 8510)
@@ -17,4 +17,5 @@
 public class SaveLayersModel extends DefaultTableModel {
     public static final String MODE_PROP = SaveLayerInfo.class.getName() + ".mode";
+
     public enum Mode {
         EDITING_DATA,
@@ -104,5 +105,5 @@
         switch(column) {
         case columnFilename:
-            this.layerInfo.get(row).setFile((File)value);
+            this.layerInfo.get(row).setFile((File) value);
             this.layerInfo.get(row).setDoSaveToFile(true);
             break;
@@ -131,5 +132,5 @@
 
     public List<SaveLayerInfo> getLayersWithIllegalFilesAndSaveRequest() {
-        List<SaveLayerInfo> ret =new ArrayList<>();
+        List<SaveLayerInfo> ret = new ArrayList<>();
         for (SaveLayerInfo info: layerInfo) {
             if (info.isDoSaveToFile() && info.getFile() != null && info.getFile().exists() && !info.getFile().canWrite()) {
@@ -144,5 +145,5 @@
         for (SaveLayerInfo info: layerInfo) {
             AbstractModifiableLayer l = info.getLayer();
-            if (info.isDoUploadToServer() && l instanceof OsmDataLayer && !((OsmDataLayer)l).getConflicts().isEmpty()) {
+            if (info.isDoUploadToServer() && l instanceof OsmDataLayer && !((OsmDataLayer) l).getConflicts().isEmpty()) {
                 ret.add(info);
             }
Index: trunk/src/org/openstreetmap/josm/gui/io/SaveLayersTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/SaveLayersTable.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/SaveLayersTable.java	(revision 8510)
@@ -22,5 +22,5 @@
     public void propertyChange(PropertyChangeEvent evt) {
         if (evt.getPropertyName().equals(SaveLayersModel.MODE_PROP)) {
-            Mode mode = (Mode)evt.getNewValue();
+            Mode mode = (Mode) evt.getNewValue();
             switch(mode) {
             case EDITING_DATA: setEnabled(true);
Index: trunk/src/org/openstreetmap/josm/gui/io/SaveLayersTableColumnModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/SaveLayersTableColumnModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/SaveLayersTableColumnModel.java	(revision 8510)
@@ -38,5 +38,5 @@
                 boolean hasFocus, int row, int column) {
             JPanel panel = new JPanel(new GridBagLayout());
-            SaveLayerInfo info = (SaveLayerInfo)value;
+            SaveLayerInfo info = (SaveLayerInfo) value;
             StringBuilder sb = new StringBuilder(24);
             sb.append("<html>");
Index: trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java	(revision 8510)
@@ -81,5 +81,5 @@
 
     public void initFromChangeset(Changeset cs) {
-        Map<String,String> tags = getDefaultTags();
+        Map<String, String> tags = getDefaultTags();
         if (cs != null) {
             tags.putAll(cs.getKeys());
@@ -106,10 +106,10 @@
      * @return the map with the current tags in the tag editor model.
      */
-    public Map<String,String> getTags(boolean keepEmpty) {
+    public Map<String, String> getTags(boolean keepEmpty) {
         return pnlTagEditor.getModel().getTags(keepEmpty);
     }
 
-    public Map<String,String> getDefaultTags() {
-        Map<String,String> tags = new HashMap<>();
+    public Map<String, String> getDefaultTags() {
+        Map<String, String> tags = new HashMap<>();
         tags.putAll(defaultTags);
         return tags;
@@ -151,5 +151,5 @@
         public void update(Observable o, Object arg) {
             if (!(o instanceof ChangesetCommentModel)) return;
-            String newValue = (String)arg;
+            String newValue = (String) arg;
             String oldValue = getTagEditorValue(key);
             if (oldValue == null) {
Index: trunk/src/org/openstreetmap/josm/gui/io/UpdatePrimitivesTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UpdatePrimitivesTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/UpdatePrimitivesTask.java	(revision 8510)
@@ -60,5 +60,5 @@
     protected void cancel() {
         canceled = true;
-        synchronized(this) {
+        synchronized (this) {
             if (multiObjectReader != null) {
                 multiObjectReader.cancel();
@@ -93,5 +93,5 @@
                 reader.append(primitive);
             } else if (primitive instanceof Way) {
-                Way way = (Way)primitive;
+                Way way = (Way) primitive;
                 for (Node node: way.getNodes()) {
                     if (!node.isNew()) {
@@ -126,5 +126,5 @@
         DataSet theirDataSet;
         try {
-            synchronized(this) {
+            synchronized (this) {
                 if (canceled) return;
                 multiObjectReader = new MultiFetchServerObjectReader();
@@ -134,5 +134,5 @@
             initMultiFetchReaderWithRelations(multiObjectReader);
             theirDataSet = multiObjectReader.parseOsm(progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));
-            synchronized(this) {
+            synchronized (this) {
                 multiObjectReader = null;
             }
@@ -146,5 +146,5 @@
                 if (canceled) return;
                 if (w.hasIncompleteNodes()) {
-                    synchronized(this) {
+                    synchronized (this) {
                         if (canceled) return;
                         objectReader = new OsmServerObjectReader(w.getId(), OsmPrimitiveType.WAY, true /* full */);
@@ -158,5 +158,5 @@
                 }
             }
-        } catch(Exception e) {
+        } catch (Exception e) {
             if (canceled)
                 return;
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadAndSaveProgressRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadAndSaveProgressRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadAndSaveProgressRenderer.java	(revision 8510)
@@ -38,5 +38,5 @@
         gc.weightx = 1.0;
         gc.weighty = 0.0;
-        gc.insets = new Insets(5,0,0,5);
+        gc.insets = new Insets(5, 0, 0, 5);
         add(lblTaskTitle = new JLabel(""), gc);
 
@@ -46,5 +46,5 @@
         gc.weightx = 1.0;
         gc.weighty = 0.0;
-        gc.insets = new Insets(5,0,0,5);
+        gc.insets = new Insets(5, 0, 0, 5);
         add(lblCustomText = new JLabel(""), gc);
 
@@ -54,5 +54,5 @@
         gc.weightx = 1.0;
         gc.weighty = 0.0;
-        gc.insets = new Insets(5,0,0,5);
+        gc.insets = new Insets(5, 0, 0, 5);
         add(progressBar = new JProgressBar(JProgressBar.HORIZONTAL), gc);
     }
@@ -91,5 +91,5 @@
     public void propertyChange(PropertyChangeEvent evt) {
         if (evt.getPropertyName().equals(SaveLayersModel.MODE_PROP)) {
-            Mode mode = (Mode)evt.getNewValue();
+            Mode mode = (Mode) evt.getNewValue();
             switch(mode) {
                 case EDITING_DATA: setVisible(false); break;
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 8510)
@@ -108,5 +108,5 @@
     protected JPanel buildContentPanel() {
         JPanel pnl = new JPanel(new GridBagLayout());
-        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
 
         // the panel with the list of uploaded objects
@@ -158,5 +158,5 @@
         JPanel pnl = new JPanel();
         pnl.setLayout(new FlowLayout(FlowLayout.CENTER));
-        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
 
         // -- upload button
@@ -171,9 +171,9 @@
         getRootPane().registerKeyboardAction(
                 cancelAction,
-                KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0),
+                KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),
                 JComponent.WHEN_IN_FOCUSED_WINDOW
         );
         pnl.add(new SideButton(new ContextSensitiveHelpAction(ht("/Dialog/Upload"))));
-        HelpUtil.setHelpContext(getRootPane(),ht("/Dialog/Upload"));
+        HelpUtil.setHelpContext(getRootPane(), ht("/Dialog/Upload"));
         return pnl;
     }
@@ -209,6 +209,5 @@
         // users can click on either of two links in the upload parameter
         // summary handler. This installs the handler for these two events.
-        // We simply select the appropriate tab in the tabbed pane with the
-        // configuration dialogs.
+        // We simply select the appropriate tab in the tabbed pane with the configuration dialogs.
         //
         pnlBasicUploadSettings.getUploadParameterSummaryPanel().setConfigurationParameterRequestListener(
@@ -218,4 +217,5 @@
                         tpConfigPanels.setSelectedIndex(3);
                     }
+
                     @Override
                     public void handleChangesetConfigurationRequest() {
@@ -352,5 +352,5 @@
                     WindowGeometry.centerInWindow(
                             Main.parent,
-                            new Dimension(400,600)
+                            new Dimension(400, 600)
                     )
             ).applySafe(this);
@@ -429,5 +429,5 @@
                     new ImageProvider("cancel").setMaxSize(ImageSizes.LARGEICON).get(),
                     new ImageProvider("upload").setMaxSize(ImageSizes.LARGEICON).addOverlay(
-                            new ImageOverlay(new ImageProvider("warning-small"), 0.5,0.5,1.0,1.0)).get()});
+                            new ImageOverlay(new ImageProvider("warning-small"), 0.5, 0.5, 1.0, 1.0)).get()});
             dlg.setToolTipTexts(new String[] {
                     tr("Return to the previous dialog to enter a more descriptive comment"),
@@ -542,5 +542,5 @@
     public void propertyChange(PropertyChangeEvent evt) {
         if (evt.getPropertyName().equals(ChangesetManagementPanel.SELECTED_CHANGESET_PROP)) {
-            Changeset cs = (Changeset)evt.getNewValue();
+            Changeset cs = (Changeset) evt.getNewValue();
             if (cs == null) {
                 tpConfigPanels.setTitleAt(1, tr("Tags of new changeset"));
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java	(revision 8510)
@@ -35,5 +35,5 @@
  *        // wait for the task to complete
  *        taskFuture.get();
- *     } catch(Exception e) {
+ *     } catch (Exception e) {
  *        e.printStackTracek();
  *     }
@@ -88,5 +88,5 @@
      * @throws OsmTransferException if we can't recover from the exception
      */
-    protected void recoverFromGoneOnServer(OsmApiPrimitiveGoneException e, ProgressMonitor monitor) throws OsmTransferException{
+    protected void recoverFromGoneOnServer(OsmApiPrimitiveGoneException e, ProgressMonitor monitor) throws OsmTransferException {
         if (!e.isKnownPrimitive()) throw e;
         OsmPrimitive p = getPrimitive(e.getPrimitiveType(), e.getPrimitiveId());
@@ -112,5 +112,5 @@
         try {
             ds.adjustRelationUploadOrder();
-        } catch(CyclicUploadDependencyException e) {
+        } catch (CyclicUploadDependencyException e) {
             setLastException(e);
             return;
@@ -121,5 +121,5 @@
         writer = new OsmServerWriter();
         try {
-            while(true) {
+            while (true) {
                 try {
                     ProgressMonitor m = monitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false);
@@ -128,5 +128,5 @@
                     processedPrimitives.addAll(writer.getProcessedPrimitives()); // OsmPrimitive in => OsmPrimitive out
                     break;
-                } catch(OsmApiPrimitiveGoneException e) {
+                } catch (OsmApiPrimitiveGoneException e) {
                     recoverFromGoneOnServer(e, monitor);
                 }
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java	(revision 8510)
@@ -88,5 +88,5 @@
                         numObjects, numObjects
                 );
-            } else if (numRequests > 1){
+            } else if (numRequests > 1) {
                 msg = tr("Uploading <strong>{0} objects</strong> to <strong>1 changeset</strong> using <strong>{1} requests</strong>",
                         numObjects, numRequests);
@@ -96,7 +96,8 @@
             lblWarning.setVisible(true);
             if (numRequests == 0) {
-                msg = tr("{0} objects exceed the max. allowed {1} objects in a changeset on the server ''{2}''. Please <a href=\"urn:advanced-configuration\">configure</a> how to proceed with <strong>multiple changesets</strong>",
+                msg = tr("{0} objects exceed the max. allowed {1} objects in a changeset on the server ''{2}''. " +
+                        "Please <a href=\"urn:advanced-configuration\">configure</a> how to proceed with <strong>multiple changesets</strong>",
                         numObjects, maxChunkSize, OsmApi.getOsmApi().getBaseUrl());
-            } else if (numRequests > 1){
+            } else if (numRequests > 1) {
                 msg = tr("Uploading <strong>{0} objects</strong> to <strong>multiple changesets</strong> using <strong>{1} requests</strong>",
                         numObjects, numRequests);
@@ -116,5 +117,5 @@
         lblWarning.setVisible(false);
         lblWarning.setIcon(ImageProvider.get("warning-small"));
-        lblWarning.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        lblWarning.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         JPanel pnl = new JPanel(new BorderLayout());
         pnl.add(lblWarning, BorderLayout.NORTH);
@@ -174,14 +175,14 @@
     public void propertyChange(PropertyChangeEvent evt) {
         if (evt.getPropertyName().equals(ChangesetManagementPanel.SELECTED_CHANGESET_PROP)) {
-            selectedChangeset = (Changeset)evt.getNewValue();
+            selectedChangeset = (Changeset) evt.getNewValue();
             updateSummary();
         } else if (evt.getPropertyName().equals(ChangesetManagementPanel.CLOSE_CHANGESET_AFTER_UPLOAD)) {
-            closeChangesetAfterNextUpload = (Boolean)evt.getNewValue();
+            closeChangesetAfterNextUpload = (Boolean) evt.getNewValue();
             updateSummary();
         } else if (evt.getPropertyName().equals(UploadedObjectsSummaryPanel.NUM_OBJECTS_TO_UPLOAD_PROP)) {
-            numObjects = (Integer)evt.getNewValue();
+            numObjects = (Integer) evt.getNewValue();
             updateSummary();
         } else if (evt.getPropertyName().equals(UploadStrategySelectionPanel.UPLOAD_STRATEGY_SPECIFICATION_PROP)) {
-            this.spec = (UploadStrategySpecification)evt.getNewValue();
+            this.spec = (UploadStrategySpecification) evt.getNewValue();
             updateSummary();
         }
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java	(revision 8510)
@@ -66,6 +66,6 @@
      */
     public UploadPrimitivesTask(UploadStrategySpecification strategy, OsmDataLayer layer, APIDataSet toUpload, Changeset changeset) {
-        super(tr("Uploading data for layer ''{0}''", layer.getName()),false /* don't ignore exceptions */);
-        ensureParameterNotNull(layer,"layer");
+        super(tr("Uploading data for layer ''{0}''", layer.getName()), false /* don't ignore exceptions */);
+        ensureParameterNotNull(layer, "layer");
         ensureParameterNotNull(strategy, "strategy");
         ensureParameterNotNull(changeset, "changeset");
@@ -186,5 +186,5 @@
      * @throws OsmTransferException if we can't recover from the exception
      */
-    protected void recoverFromGoneOnServer(OsmApiPrimitiveGoneException e, ProgressMonitor monitor) throws OsmTransferException{
+    protected void recoverFromGoneOnServer(OsmApiPrimitiveGoneException e, ProgressMonitor monitor) throws OsmTransferException {
         if (!e.isKnownPrimitive()) throw e;
         OsmPrimitive p = layer.data.getPrimitiveById(e.getPrimitiveId(), e.getPrimitiveType());
@@ -231,7 +231,7 @@
         try {
             SwingUtilities.invokeAndWait(r);
-        } catch(InterruptedException e) {
+        } catch (InterruptedException e) {
             lastException = e;
-        } catch(InvocationTargetException e) {
+        } catch (InvocationTargetException e) {
             lastException = new OsmTransferException(e.getCause());
         }
@@ -240,8 +240,8 @@
     @Override protected void realRun() {
         try {
-            uploadloop:while(true) {
+            uploadloop: while (true) {
                 try {
                     getProgressMonitor().subTask(trn("Uploading {0} object...", "Uploading {0} objects...", toUpload.getSize(), toUpload.getSize()));
-                    synchronized(this) {
+                    synchronized (this) {
                         writer = new OsmServerWriter();
                     }
@@ -251,13 +251,13 @@
                     //
                     break;
-                } catch(OsmTransferCanceledException e) {
+                } catch (OsmTransferCanceledException e) {
                     Main.error(e);
                     uploadCanceled = true;
                     break uploadloop;
-                } catch(OsmApiPrimitiveGoneException e) {
+                } catch (OsmApiPrimitiveGoneException e) {
                     // try to recover from  410 Gone
                     //
                     recoverFromGoneOnServer(e, getProgressMonitor());
-                } catch(ChangesetClosedException e) {
+                } catch (ChangesetClosedException e) {
                     processedPrimitives.addAll(writer.getProcessedPrimitives()); // OsmPrimitive in => OsmPrimitive out
                     changeset.setOpen(false);
@@ -287,5 +287,5 @@
                         processedPrimitives.addAll(writer.getProcessedPrimitives());
                     }
-                    synchronized(this) {
+                    synchronized (this) {
                         writer = null;
                     }
@@ -336,5 +336,5 @@
                 }
                 if (lastException instanceof ChangesetClosedException) {
-                    ChangesetClosedException e = (ChangesetClosedException)lastException;
+                    ChangesetClosedException e = (ChangesetClosedException) lastException;
                     if (e.getSource().equals(ChangesetClosedException.Source.UPDATE_CHANGESET)) {
                         handleFailedUpload(lastException);
@@ -370,5 +370,5 @@
     @Override protected void cancel() {
         uploadCanceled = true;
-        synchronized(this) {
+        synchronized (this) {
             if (writer != null) {
                 writer.cancel();
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java	(revision 8510)
@@ -70,5 +70,5 @@
         JLabel lbl = new JLabel(
                 tr("<html>Mark modified objects <strong>from the current selection</strong> to be uploaded to the server.</html>"));
-        lbl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        lbl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         pnl.add(lbl, BorderLayout.NORTH);
         pnl.add(new JScrollPane(lstSelectedPrimitives = new OsmPrimitiveList()), BorderLayout.CENTER);
@@ -81,5 +81,5 @@
         pnl.setLayout(new BorderLayout());
         JLabel lbl = new JLabel(tr("<html>Mark <strong>locally deleted objects</strong> to be deleted on the server.</html>"));
-        lbl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        lbl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         pnl.add(lbl, BorderLayout.NORTH);
         pnl.add(new JScrollPane(lstDeletedPrimitives = new OsmPrimitiveList()), BorderLayout.CENTER);
@@ -169,5 +169,5 @@
                     WindowGeometry.centerInWindow(
                             Main.parent,
-                            new Dimension(200,400)
+                            new Dimension(200, 400)
                     )
             ).applySafe(this);
@@ -194,5 +194,5 @@
 
         public OsmPrimitiveListModel getOsmPrimitiveListModel() {
-            return (OsmPrimitiveListModel)getModel();
+            return (OsmPrimitiveListModel) getModel();
         }
     }
@@ -222,7 +222,7 @@
             sort();
             if (data != null) {
-                fireContentsChanged(this,0, data.size());
+                fireContentsChanged(this, 0, data.size());
             } else {
-                fireContentsChanged(this, 0,0);
+                fireContentsChanged(this, 0, 0);
             }
         }
@@ -289,5 +289,5 @@
 
         protected void updateEnabledState() {
-            setEnabled(lstSelectedPrimitives.getSelectedIndex() >=0
+            setEnabled(lstSelectedPrimitives.getSelectedIndex() >= 0
                     || lstDeletedPrimitives.getSelectedIndex() >= 0);
         }
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java	(revision 8510)
@@ -50,5 +50,5 @@
         UploadStrategySelectionPanel.class.getName() + ".uploadStrategySpecification";
 
-    private static final Color BG_COLOR_ERROR = new Color(255,224,224);
+    private static final Color BG_COLOR_ERROR = new Color(255, 224, 224);
 
     private transient Map<UploadStrategy, JRadioButton> rbStrategy;
@@ -92,5 +92,5 @@
         gc.gridwidth = 4;
         gc.fill = GridBagConstraints.HORIZONTAL;
-        gc.insets = new Insets(0,0,3,0);
+        gc.insets = new Insets(0, 0, 3, 0);
         gc.anchor = GridBagConstraints.FIRST_LINE_START;
         pnl.add(new JMultilineLabel(tr("Please select the upload strategy:")), gc);
@@ -173,5 +173,5 @@
         tfChunkSize.addFocusListener(strategyChangeListener);
         tfChunkSize.addActionListener(strategyChangeListener);
-        for(UploadStrategy strategy: UploadStrategy.values()) {
+        for (UploadStrategy strategy: UploadStrategy.values()) {
             rbStrategy.get(strategy).addItemListener(strategyChangeListener);
         }
@@ -190,5 +190,6 @@
         gc.weightx = 1.0;
         pnlMultiChangesetPolicyPanel.add(lblMultiChangesetPoliciesHeader = new JMultilineLabel(
-                tr("<html>There are <strong>multiple changesets</strong> necessary in order to upload {0} objects. Which strategy do you want to use?</html>",
+                tr("<html>There are <strong>multiple changesets</strong> necessary in order to upload {0} objects. " +
+                   "Which strategy do you want to use?</html>",
                         numUploadedObjects)), gc);
         gc.gridy = 1;
@@ -214,5 +215,5 @@
         gc.weighty = 0.0;
         gc.anchor = GridBagConstraints.NORTHWEST;
-        gc.insets = new Insets(3,3,3,3);
+        gc.insets = new Insets(3, 3, 3, 3);
 
         add(buildUploadStrategyPanel(), gc);
@@ -234,5 +235,5 @@
 
     public void setNumUploadedObjects(int numUploadedObjects) {
-        this.numUploadedObjects = Math.max(numUploadedObjects,0);
+        this.numUploadedObjects = Math.max(numUploadedObjects, 0);
         updateNumRequestsLabels();
     }
@@ -264,5 +265,5 @@
             break;
         }
-        if(pnlMultiChangesetPolicyPanel.isVisible()) {
+        if (pnlMultiChangesetPolicyPanel.isVisible()) {
             if (rbFillOneChangeset.isSelected()) {
                 spec.setPolicy(MaxChangesetSizeExceededPolicy.FILL_ONE_CHANGESET_AND_RETURN_TO_UPLOAD_DIALOG);
@@ -292,5 +293,5 @@
         try {
             return Integer.parseInt(tfChunkSize.getText().trim());
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             return UploadStrategySpecification.UNSPECIFIED_CHUNK_SIZE;
         }
@@ -312,5 +313,5 @@
             chunkSize = Integer.parseInt(tfChunkSize.getText().trim());
             Main.pref.putInteger("osm-server.upload-strategy.chunk-size", chunkSize);
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             // don't save invalid value to preferences
         }
@@ -325,7 +326,5 @@
             lbl.setToolTipText(tr("<html>Cannot upload {0} objects in one request because the<br>"
                     + "max. changeset size {1} on server ''{2}'' is exceeded.</html>",
-                    numUploadedObjects,
-                    maxChunkSize,
-                    OsmApi.getOsmApi().getBaseUrl()
+                    numUploadedObjects, maxChunkSize, OsmApi.getOsmApi().getBaseUrl()
             )
             );
@@ -334,5 +333,6 @@
 
             lblMultiChangesetPoliciesHeader.setText(
-                    tr("<html>There are <strong>multiple changesets</strong> necessary in order to upload {0} objects. Which strategy do you want to use?</html>",
+                    tr("<html>There are <strong>multiple changesets</strong> necessary in order to upload {0} objects. " +
+                       "Which strategy do you want to use?</html>",
                             numUploadedObjects));
             if (!rbFillOneChangeset.isSelected() && !rbUseMultipleChangesets.isSelected()) {
@@ -364,5 +364,5 @@
                 lblNumRequests.get(UploadStrategy.CHUNKED_DATASET_STRATEGY).setText(tr("(# requests unknown)"));
             } else {
-                int chunks = (int)Math.ceil((double)numUploadedObjects / (double)chunkSize);
+                int chunks = (int) Math.ceil((double) numUploadedObjects / (double) chunkSize);
                 lblNumRequests.get(UploadStrategy.CHUNKED_DATASET_STRATEGY).setText(
                         trn("({0} request)", "({0} requests)", chunks, chunks)
@@ -379,5 +379,5 @@
     public void propertyChange(PropertyChangeEvent evt) {
         if (evt.getPropertyName().equals(UploadedObjectsSummaryPanel.NUM_OBJECTS_TO_UPLOAD_PROP)) {
-            setNumUploadedObjects((Integer)evt.getNewValue());
+            setNumUploadedObjects((Integer) evt.getNewValue());
         }
     }
@@ -388,8 +388,9 @@
             Component c = e.getComponent();
             if (c instanceof JosmTextField) {
-                JosmTextField tf = (JosmTextField)c;
+                JosmTextField tf = (JosmTextField) c;
                 tf.selectAll();
             }
         }
+
         @Override
         public void focusLost(FocusEvent e) {}
@@ -426,5 +427,5 @@
                             chunkSize, maxChunkSize, OsmApi.getOsmApi().getBaseUrl()));
                 }
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 setErrorFeedback(tfChunkSize, tr("Value ''{0}'' is not a number. Please enter an integer > 1",
                         tfChunkSize.getText().trim()));
@@ -453,5 +454,5 @@
             if (evt.getSource() == tfChunkSize
                     && "enabled".equals(evt.getPropertyName())
-                    && (Boolean)evt.getNewValue()
+                    && (Boolean) evt.getNewValue()
             ) {
                 validateChunkSize();
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySpecification.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySpecification.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySpecification.java	(revision 8510)
@@ -91,5 +91,5 @@
 
     public int getNumRequests(int numObjects) {
-        if (numObjects <=0) return 0;
+        if (numObjects <= 0) return 0;
         switch(strategy) {
         case INDIVIDUAL_OBJECTS_STRATEGY: return numObjects;
@@ -99,5 +99,5 @@
                 return 0;
             else
-                return (int)Math.ceil((double)numObjects / (double)chunkSize);
+                return (int) Math.ceil((double) numObjects / (double) chunkSize);
         }
         // should not happen
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanel.java	(revision 8510)
@@ -101,5 +101,5 @@
             y++;
             gcLabel.gridy = y;
-            lblAdd.setText(trn("{0} object to add:", "{0} objects to add:", add.size(),add.size()));
+            lblAdd.setText(trn("{0} object to add:", "{0} objects to add:", add.size(), add.size()));
             add(lblAdd, gcLabel);
             y++;
@@ -110,5 +110,5 @@
             y++;
             gcLabel.gridy = y;
-            lblUpdate.setText(trn("{0} object to modify:", "{0} objects to modify:", update.size(),update.size()));
+            lblUpdate.setText(trn("{0} object to modify:", "{0} objects to modify:", update.size(), update.size()));
             add(lblUpdate, gcLabel);
             y++;
@@ -119,5 +119,5 @@
             y++;
             gcLabel.gridy = y;
-            lblDelete.setText(trn("{0} object to delete:", "{0} objects to delete:", delete.size(),delete.size()));
+            lblDelete.setText(trn("{0} object to delete:", "{0} objects to delete:", delete.size(), delete.size()));
             add(lblDelete, gcLabel);
             y++;
@@ -126,5 +126,5 @@
         }
 
-        firePropertyChange(NUM_OBJECTS_TO_UPLOAD_PROP,0, getNumObjectsToUpload());
+        firePropertyChange(NUM_OBJECTS_TO_UPLOAD_PROP, 0, getNumObjectsToUpload());
     }
 
@@ -152,5 +152,5 @@
 
         public PrimitiveListModel getPrimitiveListModel() {
-            return (PrimitiveListModel)getModel();
+            return (PrimitiveListModel) getModel();
         }
     }
@@ -179,5 +179,5 @@
                 this.primitives = primitives;
             }
-            fireContentsChanged(this,0,getSize());
+            fireContentsChanged(this, 0, getSize());
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/AlignImageryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/AlignImageryPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/AlignImageryPanel.java	(revision 8510)
@@ -58,9 +58,9 @@
             add(nagLabel, GBC.std(1, 1).fill());
             add(detailsList, GBC.std(1, 2).fill());
-            add(closeButton, GBC.std(2, 1).span(1,2).anchor(GBC.EAST));
+            add(closeButton, GBC.std(2, 1).span(1, 2).anchor(GBC.EAST));
         } else {
-            add(nagLabel, GBC.std(1,1).fill());
-            add(detailsList, GBC.std(2,1).fill());
-            add(closeButton, GBC.std(3,1).anchor(GBC.EAST));
+            add(nagLabel, GBC.std(1, 1).fill());
+            add(detailsList, GBC.std(2, 1).fill());
+            add(closeButton, GBC.std(3, 1).anchor(GBC.EAST));
         }
         setBorder(new CompoundBorder(new EtchedBorder(EtchedBorder.LOWERED), new EmptyBorder(12, 12, 12, 12)));
Index: trunk/src/org/openstreetmap/josm/gui/layer/CustomizeColor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/CustomizeColor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/CustomizeColor.java	(revision 8510)
@@ -43,6 +43,6 @@
     @Override
     public boolean supportLayers(List<Layer> layers) {
-        for(Layer layer: layers) {
-            if(layer.getColor(false) == null)
+        for (Layer layer: layers) {
+            if (layer.getColor(false) == null)
                 return false;
         }
@@ -62,5 +62,6 @@
     @Override
     public void actionPerformed(ActionEvent e) {
-        Color cl=layers.get(0).getColor(false); if (cl==null) cl=Color.gray;
+        Color cl = layers.get(0).getColor(false);
+        if (cl == null) cl = Color.gray;
         JColorChooser c = new JColorChooser(cl);
         Object[] options = new Object[]{tr("OK"), tr("Cancel"), tr("Default")};
@@ -77,5 +78,5 @@
         switch (answer) {
         case 0:
-            for(Layer layer : layers)
+            for (Layer layer : layers)
                 Main.pref.putColor("layer "+layer.getName(), c.getColor());
             break;
@@ -83,5 +84,5 @@
             return;
         case 2:
-            for(Layer layer : layers)
+            for (Layer layer : layers)
                 Main.pref.putColor("layer "+layer.getName(), null);
             break;
Index: trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(revision 8510)
@@ -255,7 +255,7 @@
             Date[] t = GpxData.getMinMaxTimeForTrack(trk);
 
-            if (t==null) continue;
+            if (t == null) continue;
             long tm = t[1].getTime();
-            trackVisibility[i]= (tm==0 && showWithoutDate) || (from <= tm && tm <= to);
+            trackVisibility[i] = (tm == 0 && showWithoutDate) || (from <= tm && tm <= to);
             i++;
         }
Index: trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/ImageryLayer.java	(revision 8510)
@@ -63,5 +63,5 @@
     public static Color getFadeColorWithAlpha() {
         Color c = PROP_FADE_COLOR.get();
-        return new Color(c.getRed(),c.getGreen(),c.getBlue(),PROP_FADE_AMOUNT.get()*255/100);
+        return new Color(c.getRed(), c.getGreen(), c.getBlue(), PROP_FADE_AMOUNT.get()*255/100);
     }
 
@@ -161,4 +161,5 @@
     class ApplyOffsetAction extends AbstractAction {
         private transient OffsetBookmark b;
+
         ApplyOffsetAction(OffsetBookmark b) {
             super(b.name);
@@ -193,5 +194,5 @@
         JMenu subMenu = new JMenu(trc("layer", "Offset"));
         subMenu.setIcon(ImageProvider.get("mapmode", "adjustimg"));
-        return (JMenuItem)getOffsetMenuItem(subMenu);
+        return (JMenuItem) getOffsetMenuItem(subMenu);
     }
 
@@ -220,5 +221,5 @@
                 MenuScroller.setScrollerFor((JMenu) subMenu);
             } else if (subMenu instanceof JPopupMenu) {
-                MenuScroller.setScrollerFor((JPopupMenu)subMenu);
+                MenuScroller.setScrollerFor((JPopupMenu) subMenu);
             }
         }
@@ -260,5 +261,5 @@
             if (!message.contains(" ")) {
                 g.setFont(g.getFont().deriveFont(Font.PLAIN).deriveFont(18.0f));
-                g.drawString(message, 5, (int)drawPosY);
+                g.drawString(message, 5, (int) drawPosY);
             } else {
                 // Draw message on several lines
Index: trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/JumpToMarkerActions.java	(revision 8510)
@@ -20,4 +20,5 @@
     public interface JumpToMarkerLayer {
         void jumpToNextMarker();
+
         void jumpToPreviousMarker();
     }
@@ -110,5 +111,5 @@
         @Override
         protected void execute(Layer l) {
-            ((JumpToMarkerLayer)l).jumpToNextMarker();
+            ((JumpToMarkerLayer) l).jumpToNextMarker();
             setLastLayer(l);
         }
Index: trunk/src/org/openstreetmap/josm/gui/layer/Layer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/Layer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/Layer.java	(revision 8510)
@@ -52,4 +52,5 @@
     public interface LayerAction {
         boolean supportLayers(List<Layer> layers);
+
         Component createMenuComponent();
     }
@@ -65,12 +66,15 @@
     public static class SeparatorLayerAction extends AbstractAction implements LayerAction {
         public static final SeparatorLayerAction INSTANCE = new SeparatorLayerAction();
+
         @Override
         public void actionPerformed(ActionEvent e) {
             throw new UnsupportedOperationException();
         }
+
         @Override
         public Component createMenuComponent() {
             return new JSeparator();
         }
+
         @Override
         public boolean supportLayers(List<Layer> layers) {
@@ -387,4 +391,5 @@
     public static class LayerSaveAction extends AbstractAction {
         private final transient Layer layer;
+
         public LayerSaveAction(Layer layer) {
             putValue(SMALL_ICON, ImageProvider.get("save"));
@@ -403,4 +408,5 @@
     public static class LayerSaveAsAction extends AbstractAction {
         private final transient Layer layer;
+
         public LayerSaveAsAction(Layer layer) {
             putValue(SMALL_ICON, ImageProvider.get("save_as"));
@@ -419,4 +425,5 @@
     public static class LayerGpxExportAction extends AbstractAction {
         private final transient Layer layer;
+
         public LayerGpxExportAction(Layer layer) {
             putValue(SMALL_ICON, ImageProvider.get("exportgpx"));
@@ -438,5 +445,5 @@
     @Override
     public void projectionChanged(Projection oldValue, Projection newValue) {
-        if(!isProjectionSupported(newValue)) {
+        if (!isProjectionSupported(newValue)) {
             JOptionPane.showMessageDialog(Main.parent,
                     tr("The layer {0} does not support the new projection {1}.\n{2}\n"
Index: trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 8510)
@@ -264,8 +264,8 @@
         Composite comp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.3f);
         big.setComposite(comp);
-        big.fillRect(0,0,15,15);
+        big.fillRect(0, 0, 15, 15);
         big.setColor(getOutsideColor());
-        big.drawLine(0,15,15,0);
-        Rectangle r = new Rectangle(0, 0, 15,15);
+        big.drawLine(0, 15, 15, 0);
+        Rectangle r = new Rectangle(0, 0, 15, 15);
         hatched = new TexturePaint(bi, r);
     }
@@ -335,5 +335,5 @@
                 Point p1 = mv.getPoint(bounds.getMin());
                 Point p2 = mv.getPoint(bounds.getMax());
-                Rectangle r = new Rectangle(Math.min(p1.x, p2.x),Math.min(p1.y, p2.y),Math.abs(p2.x-p1.x),Math.abs(p2.y-p1.y));
+                Rectangle r = new Rectangle(Math.min(p1.x, p2.x), Math.min(p1.y, p2.y), Math.abs(p2.x-p1.x), Math.abs(p2.y-p1.y));
                 a.subtract(new Area(r));
             }
@@ -368,8 +368,8 @@
         final PleaseWaitProgressMonitor monitor = new PleaseWaitProgressMonitor(tr("Merging layers"));
         monitor.setCancelable(false);
-        if (from instanceof OsmDataLayer && ((OsmDataLayer)from).isUploadDiscouraged()) {
+        if (from instanceof OsmDataLayer && ((OsmDataLayer) from).isUploadDiscouraged()) {
             setUploadDiscouraged(true);
         }
-        mergeFrom(((OsmDataLayer)from).data, monitor);
+        mergeFrom(((OsmDataLayer) from).data, monitor);
         monitor.close();
     }
@@ -393,5 +393,5 @@
      */
     public void mergeFrom(final DataSet from, ProgressMonitor progressMonitor) {
-        final DataSetMerger visitor = new DataSetMerger(data,from);
+        final DataSetMerger visitor = new DataSetMerger(data, from);
         try {
             visitor.merge(progressMonitor);
@@ -404,5 +404,4 @@
             );
             return;
-
         }
 
@@ -439,10 +438,12 @@
     }
 
-    @Override public boolean isMergable(final Layer other) {
+    @Override
+    public boolean isMergable(final Layer other) {
         // isUploadDiscouraged commented to allow merging between normal layers and discouraged layers with a warning (see #7684)
-        return other instanceof OsmDataLayer;// && (isUploadDiscouraged() == ((OsmDataLayer)other).isUploadDiscouraged());
-    }
-
-    @Override public void visitBoundingBox(final BoundingXYVisitor v) {
+        return other instanceof OsmDataLayer; // && (isUploadDiscouraged() == ((OsmDataLayer)other).isUploadDiscouraged());
+    }
+
+    @Override
+    public void visitBoundingBox(final BoundingXYVisitor v) {
         for (final Node n: data.getNodes()) {
             if (n.isUsable()) {
@@ -476,6 +477,6 @@
     }
 
-
-    @Override public Object getInfoComponent() {
+    @Override
+    public Object getInfoComponent() {
         final DataCountVisitor counter = new DataCountVisitor();
         for (final OsmPrimitive osm : data.allPrimitives()) {
@@ -500,10 +501,11 @@
 
         p.add(new JLabel(tr("{0} consists of:", getName())), GBC.eol());
-        p.add(new JLabel(nodeText, ImageProvider.get("data", "node"), JLabel.HORIZONTAL), GBC.eop().insets(15,0,0,0));
-        p.add(new JLabel(wayText, ImageProvider.get("data", "way"), JLabel.HORIZONTAL), GBC.eop().insets(15,0,0,0));
-        p.add(new JLabel(relationText, ImageProvider.get("data", "relation"), JLabel.HORIZONTAL), GBC.eop().insets(15,0,0,0));
-        p.add(new JLabel(tr("API version: {0}", (data.getVersion() != null) ? data.getVersion() : tr("unset"))), GBC.eop().insets(15,0,0,0));
+        p.add(new JLabel(nodeText, ImageProvider.get("data", "node"), JLabel.HORIZONTAL), GBC.eop().insets(15, 0, 0, 0));
+        p.add(new JLabel(wayText, ImageProvider.get("data", "way"), JLabel.HORIZONTAL), GBC.eop().insets(15, 0, 0, 0));
+        p.add(new JLabel(relationText, ImageProvider.get("data", "relation"), JLabel.HORIZONTAL), GBC.eop().insets(15, 0, 0, 0));
+        p.add(new JLabel(tr("API version: {0}", (data.getVersion() != null) ? data.getVersion() : tr("unset"))),
+                GBC.eop().insets(15, 0, 0, 0));
         if (isUploadDiscouraged()) {
-            p.add(new JLabel(tr("Upload is discouraged")), GBC.eop().insets(15,0,0,0));
+            p.add(new JLabel(tr("Upload is discouraged")), GBC.eop().insets(15, 0, 0, 0));
         }
 
@@ -724,4 +726,5 @@
             putValue("help", ht("/Action/ConvertToGpxLayer"));
         }
+
         @Override
         public void actionPerformed(ActionEvent e) {
Index: trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(revision 8510)
@@ -118,5 +118,4 @@
             ".add_to_slippymap_chooser", true);
     public static final StringProperty PROP_TILECACHE_DIR;
-
     static {
         String defPath = null;
@@ -167,5 +166,5 @@
                 for (String[] entry: content) {
                     panel.add(new JLabel(tr(entry[0]) + ":"), GBC.std());
-                    panel.add(GBC.glue(5,0), GBC.std());
+                    panel.add(GBC.glue(5, 0), GBC.std());
                     panel.add(createTextField(entry[1]), GBC.eol().fill(GBC.HORIZONTAL));
                 }
@@ -173,5 +172,5 @@
                 for (Entry<String, String> e: clickedTile.getMetadata().entrySet()) {
                     panel.add(new JLabel(tr("Metadata ") + tr(e.getKey()) + ":"), GBC.std());
-                    panel.add(GBC.glue(5,0), GBC.std());
+                    panel.add(GBC.glue(5, 0), GBC.std());
                     String value = e.getValue();
                     if ("lastModification".equals(e.getKey()) || "expirationTime".equals(e.getKey())) {
@@ -222,5 +221,5 @@
             try {
                 return new TMSCachedTileLoader(listener, "TMS",
-                        Main.pref.getInteger("socket.timeout.connect",15) * 1000,
+                        Main.pref.getInteger("socket.timeout.connect", 15) * 1000,
                         Main.pref.getInteger("socket.timeout.read", 30) * 1000,
                         headers,
@@ -277,5 +276,5 @@
         tileCache.clear();
         if (tileLoader instanceof CachedTileLoader) {
-            ((CachedTileLoader)tileLoader).clearCache(tileSource);
+            ((CachedTileLoader) tileLoader).clearCache(tileSource);
         }
         redraw();
@@ -311,8 +310,8 @@
 
     protected static int checkMaxZoomLvl(int maxZoomLvl, TileSource ts) {
-        if(maxZoomLvl > MAX_ZOOM) {
+        if (maxZoomLvl > MAX_ZOOM) {
             maxZoomLvl = MAX_ZOOM;
         }
-        if(maxZoomLvl < PROP_MIN_ZOOM_LVL.get()) {
+        if (maxZoomLvl < PROP_MIN_ZOOM_LVL.get()) {
             maxZoomLvl = PROP_MIN_ZOOM_LVL.get();
         }
@@ -333,9 +332,9 @@
 
     static int checkMinZoomLvl(int minZoomLvl, TileSource ts) {
-        if(minZoomLvl < MIN_ZOOM) {
+        if (minZoomLvl < MIN_ZOOM) {
             /*Main.debug("Min. zoom level should not be less than "+MIN_ZOOM+"! Setting to that.");*/
             minZoomLvl = MIN_ZOOM;
         }
-        if(minZoomLvl > PROP_MAX_ZOOM_LVL.get()) {
+        if (minZoomLvl > PROP_MAX_ZOOM_LVL.get()) {
             /*Main.debug("Min. zoom level should not be more than Max. zoom level! Setting to Max.");*/
             minZoomLvl = getMaxZoomLvl(ts);
@@ -460,5 +459,5 @@
         Map<String, String> headers = null;
         if (tileSource instanceof TemplatedTMSTileSource) {
-            headers = (((TemplatedTMSTileSource)tileSource).getHeaders());
+            headers = (((TemplatedTMSTileSource) tileSource).getHeaders());
         }
 
@@ -513,5 +512,5 @@
          * getScaleFactor(...) is supposed to be between 0.75 and 3
          */
-        int intResult = (int)Math.floor(result);
+        int intResult = (int) Math.floor(result);
         if (intResult > getMaxZoomLvl())
             return getMaxZoomLvl();
@@ -525,5 +524,5 @@
         super(info);
 
-        if(!isProjectionSupported(Main.getProjection())) {
+        if (!isProjectionSupported(Main.getProjection())) {
             JOptionPane.showMessageDialog(Main.parent,
                     tr("TMS layers do not support the projection {0}.\n{1}\n"
@@ -568,5 +567,5 @@
             @Override
             public void actionPerformed(ActionEvent ae) {
-                autoLoad= !autoLoad;
+                autoLoad = !autoLoad;
             }
         });
@@ -966,10 +965,10 @@
         // And how many pixels into the image itself does that
         // correlate to?
-        int img_x_offset = (int)(screen_x_offset * imageXScaling + 0.5);
-        int img_y_offset = (int)(screen_y_offset * imageYScaling + 0.5);
+        int img_x_offset = (int) (screen_x_offset * imageXScaling + 0.5);
+        int img_y_offset = (int) (screen_y_offset * imageYScaling + 0.5);
         // Now calculate the other corner of the image that we need
         // by scaling the 'target' rectangle's dimensions.
-        int img_x_end = img_x_offset + (int)(target.getWidth() * imageXScaling + 0.5);
-        int img_y_end = img_y_offset + (int)(target.getHeight() * imageYScaling + 0.5);
+        int img_x_end = img_x_offset + (int) (target.getWidth() * imageXScaling + 0.5);
+        int img_y_end = img_y_offset + (int) (target.getHeight() * imageYScaling + 0.5);
 
         if (Main.isDebugEnabled()) {
@@ -1033,7 +1032,7 @@
         Color oldColor = g.getColor();
         g.setColor(Color.black);
-        g.drawString(text,x+1,y+1);
+        g.drawString(text, x+1, y+1);
         g.setColor(oldColor);
-        g.drawString(text,x,y);
+        g.drawString(text, x, y);
     }
 
@@ -1122,8 +1121,9 @@
     private Coordinate getShiftedCoord(EastNorth en) {
         LatLon ll = getShiftedLatLon(en);
-        return new Coordinate(ll.lat(),ll.lon());
-    }
-
-    private final TileSet nullTileSet = new TileSet((LatLon)null, (LatLon)null, 0);
+        return new Coordinate(ll.lat(), ll.lon());
+    }
+
+    private final TileSet nullTileSet = new TileSet((LatLon) null, (LatLon) null, 0);
+
     private final class TileSet {
         private int x0, x1, y0, y1;
@@ -1135,5 +1135,5 @@
          */
         private TileSet(EastNorth topLeft, EastNorth botRight, int zoom) {
-            this(getShiftedLatLon(topLeft), getShiftedLatLon(botRight),zoom);
+            this(getShiftedLatLon(topLeft), getShiftedLatLon(botRight), zoom);
         }
 
@@ -1146,8 +1146,8 @@
                 return;
 
-            x0 = (int)tileSource.lonToTileX(topLeft.lon(),  zoom);
-            y0 = (int)tileSource.latToTileY(topLeft.lat(),  zoom);
-            x1 = (int)tileSource.lonToTileX(botRight.lon(), zoom);
-            y1 = (int)tileSource.latToTileY(botRight.lat(), zoom);
+            x0 = (int) tileSource.lonToTileX(topLeft.lon(),  zoom);
+            y0 = (int) tileSource.latToTileY(topLeft.lat(),  zoom);
+            x1 = (int) tileSource.lonToTileX(botRight.lon(), zoom);
+            y1 = (int) tileSource.latToTileY(botRight.lat(), zoom);
             if (x0 > x1) {
                 int tmp = x0;
@@ -1160,5 +1160,5 @@
                 y1 = tmp;
             }
-            tileMax = (int)Math.pow(2.0, zoom);
+            tileMax = (int) Math.pow(2.0, zoom);
             if (x0 < 0) {
                 x0 = 0;
@@ -1246,4 +1246,5 @@
                     return Math.abs(t.getXtile() - centerX) + Math.abs(t.getYtile() - centerY);
                 }
+
                 @Override
                 public int compare(Tile o1, Tile o2) {
@@ -1275,5 +1276,4 @@
         }
     }
-
 
     private static class TileSetInfo {
@@ -1307,4 +1307,5 @@
         private final TileSet[] tileSets;
         private final TileSetInfo[] tileSetInfos;
+
         public DeepTileSet(EastNorth topLeft, EastNorth botRight, int minZoom, int maxZoom) {
             this.topLeft = topLeft;
@@ -1315,4 +1316,5 @@
             this.tileSetInfos = new TileSetInfo[maxZoom - minZoom + 1];
         }
+
         public TileSet getTileSet(int zoom) {
             if (zoom < minZoom)
@@ -1383,5 +1385,5 @@
             }
             // Do binary search between currentZoomLevel and displayZoomLevel
-            while (zoom > displayZoomLevel && !tsi.hasVisibleTiles && tsi.hasOverzoomedTiles){
+            while (zoom > displayZoomLevel && !tsi.hasVisibleTiles && tsi.hasOverzoomedTiles) {
                 zoom = (zoom + displayZoomLevel)/2;
                 tsi = dts.getTileSetInfo(zoom);
@@ -1489,11 +1491,10 @@
             myDrawString(g, tr("Pixel scale: {0}", getScaleFactor(currentZoomLevel)), 50, 170);
             myDrawString(g, tr("Best zoom: {0}", getBestZoom()), 50, 185);
-            if(tileLoader instanceof TMSCachedTileLoader) {
-                TMSCachedTileLoader cachedTileLoader = (TMSCachedTileLoader)tileLoader;
+            if (tileLoader instanceof TMSCachedTileLoader) {
+                TMSCachedTileLoader cachedTileLoader = (TMSCachedTileLoader) tileLoader;
                 int offset = 185;
-                for(String part: cachedTileLoader.getStats().split("\n")) {
-                    myDrawString(g, tr("Cache stats: {0}", part), 50, offset+=15);
-                }
-
+                for (String part: cachedTileLoader.getStats().split("\n")) {
+                    myDrawString(g, tr("Cache stats: {0}", part), 50, offset += 15);
+                }
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java	(revision 8510)
@@ -239,5 +239,5 @@
     }
 
-    public boolean hasAutoDownload(){
+    public boolean hasAutoDownload() {
         return autoDownloadEnabled;
     }
@@ -265,6 +265,6 @@
             int maxY = getImageYIndex(maxEn.north());
 
-            for (int x=minX; x<=maxX; x++) {
-                for (int y=minY; y<=maxY; y++) {
+            for (int x = minX; x <= maxX; x++) {
+                for (int y = minY; y <= maxY; y++) {
                     requestedTiles.add(new Point(x, y));
                 }
@@ -300,8 +300,8 @@
             }
         }
-        for(int x = 0; x<dax; ++x) {
-            for(int y = 0; y<day; ++y) {
+        for (int x = 0; x < dax; ++x) {
+            for (int y = 0; y < day; ++y) {
                 if (images[x][y] == null) {
-                    images[x][y]= new GeorefImage(this);
+                    images[x][y] = new GeorefImage(this);
                 }
             }
@@ -314,5 +314,5 @@
 
     @Override public String getToolTipText() {
-        if(autoDownloadEnabled)
+        if (autoDownloadEnabled)
             return tr("WMS layer ({0}), automatically downloading in zoom {1}", getName(), resolutionText);
         else
@@ -321,5 +321,5 @@
 
     private int modulo(int a, int b) {
-        return a % b >= 0 ? a%b : a%b+b;
+        return a % b >= 0 ? a % b : a % b+b;
     }
 
@@ -331,5 +331,5 @@
     @Override
     public void paint(Graphics2D g, final MapView mv, Bounds b) {
-        if(info.getUrl() == null || (usesInvalidUrl && !isInvalidUrlConfirmed)) return;
+        if (info.getUrl() == null || (usesInvalidUrl && !isInvalidUrlConfirmed)) return;
 
         if (autoResolutionEnabled && !Utils.equalsEpsilon(getBestZoom(), mv.getDist100Pixel())) {
@@ -340,15 +340,15 @@
 
         ProjectionBounds bounds = mv.getProjectionBounds();
-        bminx= getImageXIndex(bounds.minEast);
-        bminy= getImageYIndex(bounds.minNorth);
-        bmaxx= getImageXIndex(bounds.maxEast);
-        bmaxy= getImageYIndex(bounds.maxNorth);
-
-        leftEdge = (int)(bounds.minEast * getPPD());
-        bottomEdge = (int)(bounds.minNorth * getPPD());
+        bminx = getImageXIndex(bounds.minEast);
+        bminy = getImageYIndex(bounds.minNorth);
+        bmaxx = getImageXIndex(bounds.maxEast);
+        bmaxy = getImageYIndex(bounds.maxNorth);
+
+        leftEdge = (int) (bounds.minEast * getPPD());
+        bottomEdge = (int) (bounds.minNorth * getPPD());
 
         if (zoomIsTooBig()) {
-            for(int x = 0; x<images.length; ++x) {
-                for(int y = 0; y<images[0].length; ++y) {
+            for (int x = 0; x < images.length; ++x) {
+                for (int y = 0; y < images[0].length; ++y) {
                     GeorefImage image = images[x][y];
                     image.paint(g, mv, image.getXIndex(), image.getYIndex(), leftEdge, bottomEdge);
@@ -369,17 +369,17 @@
 
     public int getImageXIndex(double coord) {
-        return (int)Math.floor(((coord - dx) * info.getPixelPerDegree()) / imageSize);
+        return (int) Math.floor(((coord - dx) * info.getPixelPerDegree()) / imageSize);
     }
 
     public int getImageYIndex(double coord) {
-        return (int)Math.floor(((coord - dy) * info.getPixelPerDegree()) / imageSize);
+        return (int) Math.floor(((coord - dy) * info.getPixelPerDegree()) / imageSize);
     }
 
     public int getImageX(int imageIndex) {
-        return (int)(imageIndex * imageSize * (getPPD() / info.getPixelPerDegree()) + dx * getPPD());
+        return (int) (imageIndex * imageSize * (getPPD() / info.getPixelPerDegree()) + dx * getPPD());
     }
 
     public int getImageY(int imageIndex) {
-        return (int)(imageIndex * imageSize * (getPPD() / info.getPixelPerDegree()) + dy * getPPD());
+        return (int) (imageIndex * imageSize * (getPPD() / info.getPixelPerDegree()) + dy * getPPD());
     }
 
@@ -442,5 +442,5 @@
     }
 
-    protected void downloadAndPaintVisible(Graphics g, final MapView mv, boolean real){
+    protected void downloadAndPaintVisible(Graphics g, final MapView mv, boolean real) {
 
         int newDax = dax;
@@ -461,7 +461,7 @@
         }
 
-        for(int x = bminx; x<=bmaxx; ++x) {
-            for(int y = bminy; y<=bmaxy; ++y){
-                images[modulo(x,dax)][modulo(y,day)].changePosition(x, y);
+        for (int x = bminx; x <= bmaxx; ++x) {
+            for (int y = bminy; y <= bmaxy; ++y) {
+                images[modulo(x, dax)][modulo(y, day)].changePosition(x, y);
             }
         }
@@ -470,7 +470,7 @@
         Set<ProjectionBounds> areaToCache = new HashSet<>();
 
-        for(int x = bminx; x<=bmaxx; ++x) {
-            for(int y = bminy; y<=bmaxy; ++y){
-                GeorefImage img = images[modulo(x,dax)][modulo(y,day)];
+        for (int x = bminx; x <= bmaxx; ++x) {
+            for (int y = bminy; y <= bmaxy; ++y) {
+                GeorefImage img = images[modulo(x, dax)][modulo(y, day)];
                 if (!img.paint(g, mv, x, y, leftEdge, bottomEdge)) {
                     addRequest(new WMSRequest(x, y, info.getPixelPerDegree(), real, true));
@@ -487,8 +487,9 @@
     }
 
-    @Override public void visitBoundingBox(BoundingXYVisitor v) {
-        for(int x = 0; x<dax; ++x) {
-            for(int y = 0; y<day; ++y)
-                if(images[x][y].getImage() != null){
+    @Override
+    public void visitBoundingBox(BoundingXYVisitor v) {
+        for (int x = 0; x < dax; ++x) {
+            for (int y = 0; y < day; ++y)
+                if (images[x][y].getImage() != null) {
                     v.visit(images[x][y].getMin());
                     v.visit(images[x][y].getMax());
@@ -497,5 +498,6 @@
     }
 
-    @Override public Action[] getMenuEntries() {
+    @Override
+    public Action[] getMenuEntries() {
         return new Action[]{
                 LayerListDialog.getInstance().createActivateLayerAction(this),
@@ -665,5 +667,5 @@
         try {
             for (WMSRequest request: finishedRequests) {
-                GeorefImage img = images[modulo(request.getXIndex(),dax)][modulo(request.getYIndex(),day)];
+                GeorefImage img = images[modulo(request.getXIndex(), dax)][modulo(request.getYIndex(), day)];
                 if (img.equalPosition(request.getXIndex(), request.getYIndex())) {
                     WMSException we = request.getException();
@@ -684,4 +686,5 @@
             super(tr("Download visible tiles"));
         }
+
         @Override
         public void actionPerformed(ActionEvent ev) {
@@ -708,6 +711,6 @@
         // the snapLevels, which are in meters per pixel. It works, though.
         double dist = Main.map.mapView.getDist100Pixel();
-        for(int i = snapLevels.length-2; i >= 0; i--) {
-            if(snapLevels[i+1]/3 + snapLevels[i]*2/3 > dist)
+        for (int i = snapLevels.length-2; i >= 0; i--) {
+            if (snapLevels[i+1]/3 + snapLevels[i]*2/3 > dist)
                 return snapLevels[i+1];
         }
@@ -724,5 +727,5 @@
      */
     private static void updateResolutionSetting(WMSLayer layer, boolean snap) {
-        if(snap) {
+        if (snap) {
             layer.resolution = getBestZoom();
             layer.resolutionText = MapView.getDistText(layer.resolution);
@@ -751,7 +754,7 @@
         // prevents some flickering when zooming with auto-resolution enabled
         // and instead gradually updates each tile.
-        if(!snap) {
-            for(int x = 0; x<layer.dax; ++x) {
-                for(int y = 0; y<layer.day; ++y) {
+        if (!snap) {
+            for (int x = 0; x < layer.dax; ++x) {
+                for (int y = 0; y < layer.day; ++y) {
                     layer.images[x][y].changePosition(-1, -1);
                 }
@@ -800,4 +803,5 @@
             super(tr("Reload erroneous tiles"));
         }
+
         @Override
         public void actionPerformed(ActionEvent ev) {
@@ -808,6 +812,6 @@
             for (int x = 0; x < dax; ++x) {
                 for (int y = 0; y < day; ++y) {
-                    GeorefImage img = images[modulo(x,dax)][modulo(y,day)];
-                    if(img.getState() == State.FAILED){
+                    GeorefImage img = images[modulo(x, dax)][modulo(y, day)];
+                    if (img.getState() == State.FAILED) {
                         addRequest(new WMSRequest(img.getXIndex(), img.getYIndex(), info.getPixelPerDegree(), true, false));
                     }
@@ -824,4 +828,5 @@
             super(tr("Alpha channel"));
         }
+
         @Override
         public void actionPerformed(ActionEvent ev) {
@@ -900,4 +905,5 @@
             super(tr("Set WMS Bookmark"));
         }
+
         @Override
         public void actionPerformed(ActionEvent ev) {
@@ -930,6 +936,6 @@
                 for (int x = 0; x < dax; ++x) {
                     for (int y = 0; y < day; ++y) {
-                        GeorefImage img = images[modulo(x,dax)][modulo(y,day)];
-                        if(img.getState() == State.NOT_IN_CACHE){
+                        GeorefImage img = images[modulo(x, dax)][modulo(y, day)];
+                        if (img.getState() == State.NOT_IN_CACHE) {
                             addRequest(new WMSRequest(img.getXIndex(), img.getYIndex(), info.getPixelPerDegree(), false, true));
                         }
@@ -982,5 +988,5 @@
             grabbers.clear();
             grabberThreads.clear();
-            for (int i=0; i<threadCount; i++) {
+            for (int i = 0; i < threadCount; i++) {
                 WMSGrabber grabber = getGrabber(i == 0 && threadCount > 1);
                 grabbers.add(grabber);
@@ -1014,6 +1020,6 @@
                 || event.getKey().equals(PROP_OVERLAP_EAST.getKey())
                 || event.getKey().equals(PROP_OVERLAP_NORTH.getKey())) {
-            for (int i=0; i<images.length; i++) {
-                for (int k=0; k<images[i].length; k++) {
+            for (int i = 0; i < images.length; i++) {
+                for (int k = 0; k < images[i].length; k++) {
                     images[i][k] = new GeorefImage(this);
                 }
@@ -1111,7 +1117,7 @@
         imageSize = in.readInt();
         info.setPixelPerDegree(in.readDouble());
-        doSetName((String)in.readObject());
-        info.setExtendedUrl((String)in.readObject());
-        images = (GeorefImage[][])in.readObject();
+        doSetName((String) in.readObject());
+        info.setExtendedUrl((String) in.readObject());
+        images = (GeorefImage[][]) in.readObject();
 
         for (GeorefImage[] imgs : images) {
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 8510)
@@ -116,5 +116,5 @@
                 return NOTHING;
             int answer = syncDialog.getValue();
-            if(answer != 1)
+            if (answer != 1)
                 return CANCEL;
 
@@ -242,9 +242,12 @@
         @Override
         public void actionPerformed(ActionEvent arg0) {
-            FileFilter filter = new FileFilter(){
-                @Override public boolean accept(File f) {
+            FileFilter filter = new FileFilter() {
+                @Override
+                public boolean accept(File f) {
                     return f.isDirectory() || Utils.hasExtension(f, "gpx", "gpx.gz");
                 }
-                @Override public String getDescription() {
+
+                @Override
+                public String getDescription() {
                     return tr("GPX Files (*.gpx *.gpx.gz)");
                 }
@@ -284,5 +287,5 @@
                     JOptionPane.showMessageDialog(
                             Main.parent,
-                            tr("Error while parsing {0}",sel.getName())+": "+x.getMessage(),
+                            tr("Error while parsing {0}", sel.getName())+": "+x.getMessage(),
                             tr("Error"),
                             JOptionPane.ERROR_MESSAGE
@@ -293,5 +296,5 @@
                     JOptionPane.showMessageDialog(
                             Main.parent,
-                            tr("Could not read \"{0}\"",sel.getName())+"\n"+x.getMessage(),
+                            tr("Could not read \"{0}\"", sel.getName())+"\n"+x.getMessage(),
                             tr("Error"),
                             JOptionPane.ERROR_MESSAGE
@@ -533,5 +536,5 @@
                     delta = dateFormat.parse(lbExifTime.getText()).getTime()
                     - dateFormat.parse(tfGpsTime.getText()).getTime();
-                } catch(ParseException e) {
+                } catch (ParseException e) {
                     JOptionPane.showMessageDialog(Main.parent, tr("Error while parsing the date.\n"
                             + "Please use the requested format"),
@@ -653,5 +656,5 @@
         cbShowThumbs.setEnabled(!yLayer.thumbsLoaded);
 
-        int y=0;
+        int y = 0;
         GBC gbc = GBC.eol();
         gbc.gridx = 0;
@@ -659,5 +662,5 @@
         panelTf.add(panelCb, gbc);
 
-        gbc = GBC.eol().fill(GBC.HORIZONTAL).insets(0,0,0,12);
+        gbc = GBC.eol().fill(GBC.HORIZONTAL).insets(0, 0, 0, 12);
         gbc.gridx = 0;
         gbc.gridy = y++;
@@ -686,5 +689,5 @@
         panelTf.add(tfOffset, gbc);
 
-        gbc = GBC.std().insets(5,5,5,5);
+        gbc = GBC.std().insets(5, 5, 5, 5);
         gbc.gridx = 2;
         gbc.gridy = y-2;
@@ -695,5 +698,5 @@
         panelTf.add(buttonViewGpsPhoto, gbc);
 
-        gbc = GBC.std().fill(GBC.BOTH).insets(5,5,5,5);
+        gbc = GBC.std().fill(GBC.BOTH).insets(5, 5, 5, 5);
         gbc.gridx = 2;
         gbc.gridy = y++;
@@ -704,5 +707,5 @@
         panelTf.add(buttonAdjust, gbc);
 
-        gbc = GBC.eol().fill(GBC.HORIZONTAL).insets(0,12,0,0);
+        gbc = GBC.eol().fill(GBC.HORIZONTAL).insets(0, 12, 0, 0);
         gbc.gridx = 0;
         gbc.gridy = y++;
@@ -780,15 +783,19 @@
             updateStatusBar();
         }
+
         @Override
         public void removeUpdate(DocumentEvent ev) {
             updateStatusBar();
         }
+
         @Override
         public void changedUpdate(DocumentEvent ev) {
         }
+
         @Override
         public void itemStateChanged(ItemEvent e) {
             updateStatusBar();
         }
+
         @Override
         public void actionPerformed(ActionEvent e) {
@@ -838,4 +845,5 @@
 
     private transient RepaintTheMapListener repaintTheMap = new RepaintTheMapListener();
+
     private class RepaintTheMapListener implements FocusListener {
         @Override
@@ -859,17 +867,17 @@
             long diff = delta + Math.round(timezone*60*60);
 
-            double diffInH = (double)diff/(60*60);    // hours
+            double diffInH = (double) diff/(60*60);    // hours
 
             // Find day difference
-            final int dayOffset = (int)Math.round(diffInH / 24); // days
+            final int dayOffset = (int) Math.round(diffInH / 24); // days
             double tmz = diff - dayOffset*24*60*60L;  // seconds
 
             // In hours, rounded to two decimal places
-            tmz = (double)Math.round(tmz*100/(60*60)) / 100;
+            tmz = (double) Math.round(tmz*100/(60*60)) / 100;
 
             // Due to imprecise clocks we might get a "+3:28" timezone, which should obviously be 3:30 with
             // -2 minutes offset. This determines the real timezone and finds offset.
-            double fixTimezone = (double)Math.round(tmz * 2)/2; // hours, rounded to one decimal place
-            int offset = (int)Math.round(diff - fixTimezone*60*60) - dayOffset*24*60*60; // seconds
+            double fixTimezone = (double) Math.round(tmz * 2)/2; // hours, rounded to one decimal place
+            int offset = (int) Math.round(diff - fixTimezone*60*60) - dayOffset*24*60*60; // seconds
 
             // Info Labels
@@ -877,10 +885,10 @@
 
             // Timezone Slider
-            // The slider allows to switch timezon from -12:00 to 12:00 in 30 minutes
-            // steps. Therefore the range is -24 to 24.
+            // The slider allows to switch timezon from -12:00 to 12:00 in 30 minutes steps. Therefore the range is -24 to 24.
             final JLabel lblTimezone = new JLabel();
             final JSlider sldTimezone = new JSlider(-24, 24, 0);
             sldTimezone.setPaintLabels(true);
-            Dictionary<Integer,JLabel> labelTable = new Hashtable<>();
+            Dictionary<Integer, JLabel> labelTable = new Hashtable<>();
+            // CHECKSTYLE.OFF: ParenPad
             labelTable.put(-24, new JLabel("-12:00"));
             labelTable.put(-12, new JLabel( "-6:00"));
@@ -888,4 +896,5 @@
             labelTable.put( 12, new JLabel(  "6:00"));
             labelTable.put( 24, new JLabel( "12:00"));
+            // CHECKSTYLE.ON: ParenPad
             sldTimezone.setLabelTable(labelTable);
 
@@ -910,7 +919,7 @@
                     double tz = Math.abs(sldTimezone.getValue());
                     String zone = tz % 2 == 0
-                    ? (int)Math.floor(tz/2) + ":00"
-                            : (int)Math.floor(tz/2) + ":30";
-                    if(sldTimezone.getValue() < 0) {
+                    ? (int) Math.floor(tz/2) + ":00"
+                            : (int) Math.floor(tz/2) + ":30";
+                    if (sldTimezone.getValue() < 0) {
                         zone = "-" + zone;
                     }
@@ -959,8 +968,8 @@
             // and inform the user about it.
             try {
-                sldTimezone.setValue((int)(fixTimezone*2));
-                sldMinutes.setValue(offset/60);
-                sldSeconds.setValue(offset%60);
-            } catch(Exception e) {
+                sldTimezone.setValue((int) (fixTimezone*2));
+                sldMinutes.setValue(offset / 60);
+                sldSeconds.setValue(offset % 60);
+            } catch (Exception e) {
                 JOptionPane.showMessageDialog(Main.parent,
                         tr("An error occurred while trying to match the photos to the GPX track."
@@ -1001,5 +1010,5 @@
 
             // no images found, exit
-            if(imgs.isEmpty()) {
+            if (imgs.isEmpty()) {
                 JOptionPane.showMessageDialog(Main.parent,
                         tr("The selected photos do not contain time information."),
@@ -1024,5 +1033,5 @@
                             firstGPXDate = dateParser.parse(curDateWpStr).getTime()/1000;
                             break outer;
-                        } catch(Exception e) {
+                        } catch (Exception e) {
                             Main.warn(e);
                         }
@@ -1032,5 +1041,5 @@
 
             // No GPX timestamps found, exit
-            if(firstGPXDate < 0) {
+            if (firstGPXDate < 0) {
                 JOptionPane.showMessageDialog(Main.parent,
                         tr("The selected GPX track does not contain timestamps. Please select another one."),
@@ -1042,16 +1051,16 @@
             long diff = firstExifDate - firstGPXDate;
 
-            double diffInH = (double)diff/(60*60);    // hours
+            double diffInH = (double) diff/(60*60);    // hours
 
             // Find day difference
-            int dayOffset = (int)Math.round(diffInH / 24); // days
+            int dayOffset = (int) Math.round(diffInH / 24); // days
             double tz = diff - dayOffset*24*60*60L;  // seconds
 
             // In hours, rounded to two decimal places
-            tz = (double)Math.round(tz*100/(60*60)) / 100;
+            tz = (double) Math.round(tz*100/(60*60)) / 100;
 
             // Due to imprecise clocks we might get a "+3:28" timezone, which should obviously be 3:30 with
             // -2 minutes offset. This determines the real timezone and finds offset.
-            timezone = (double)Math.round(tz * 2)/2; // hours, rounded to one decimal place
+            timezone = (double) Math.round(tz * 2)/2; // hours, rounded to one decimal place
             delta = Math.round(diff - timezone*60*60); // seconds
 
@@ -1150,5 +1159,5 @@
                             prevWpTime = curWpTime;
 
-                        } catch(ParseException e) {
+                        } catch (ParseException e) {
                             Main.error("Error while parsing date \"" + curWpTimeStr + '"');
                             Main.error(e);
@@ -1239,5 +1248,5 @@
             if (curImg.tmp.getPos() == null && prevWp != null) {
                 // The values of timeDiff are between 0 and 1, it is not seconds but a dimensionless variable
-                double timeDiff = (double)(imgTime - prevWpTime) / interval;
+                double timeDiff = (double) (imgTime - prevWpTime) / interval;
                 curImg.tmp.setPos(prevWp.getCoor().interpolate(curWp.getCoor(), timeDiff));
                 curImg.tmp.setSpeed(speed);
@@ -1256,8 +1265,8 @@
 
     private int getLastIndexOfListBefore(List<ImageEntry> images, long searchedTime) {
-        int lstSize= images.size();
+        int lstSize = images.size();
 
         // No photos or the first photo taken is later than the search period
-        if(lstSize == 0 || searchedTime < images.get(0).getExifTime().getTime())
+        if (lstSize == 0 || searchedTime < images.get(0).getExifTime().getTime())
             return -1;
 
@@ -1267,13 +1276,13 @@
 
         // The searched index is somewhere in the middle, do a binary search from the beginning
-        int curIndex= 0;
-        int startIndex= 0;
-        int endIndex= lstSize-1;
+        int curIndex = 0;
+        int startIndex = 0;
+        int endIndex = lstSize-1;
         while (endIndex - startIndex > 1) {
-            curIndex= (endIndex + startIndex) / 2;
+            curIndex = (endIndex + startIndex) / 2;
             if (searchedTime > images.get(curIndex).getExifTime().getTime()) {
-                startIndex= curIndex;
+                startIndex = curIndex;
             } else {
-                endIndex= curIndex;
+                endIndex = curIndex;
             }
         }
@@ -1384,13 +1393,14 @@
         if (!offset.isEmpty()) {
             try {
-                if(offset.startsWith("+")) {
+                if (offset.startsWith("+")) {
                     offset = offset.substring(1);
                 }
                 return Long.parseLong(offset);
-            } catch(NumberFormatException nfe) {
-                throw new ParseException(error,0);
-            }
-        } else
+            } catch (NumberFormatException nfe) {
+                throw new ParseException(error, 0);
+            }
+        } else {
             return 0;
+        }
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 8510)
@@ -187,5 +187,5 @@
             for (File f : sel) {
 
-                if(canceled) {
+                if (canceled) {
                     break;
                 }
@@ -329,4 +329,5 @@
 
     private static List<Action> menuAdditions = new LinkedList<>();
+
     public static void registerMenuAddition(Action addition) {
         menuAdditions.add(addition);
@@ -483,5 +484,5 @@
             if (updateOffscreenBuffer) {
                 Graphics2D tempG = offscreenBuffer.createGraphics();
-                tempG.setColor(new Color(0,0,0,0));
+                tempG.setColor(new Color(0, 0, 0, 0));
                 Composite saveComp = tempG.getComposite();
                 tempG.setComposite(AlphaComposite.Clear);   // remove the old images
@@ -784,6 +785,6 @@
                     new String[] {tr("Cancel"), tr("Delete")})
             .setButtonIcons(new String[] {"cancel", "dialogs/delete"})
-            .setContent(new JLabel(tr("<html><h3>Delete the file {0} from disk?<p>The image file will be permanently lost!</h3></html>"
-                    ,toDelete.getFile().getName()), ImageProvider.get("dialogs/geoimage/deletefromdisk"),SwingConstants.LEFT))
+            .setContent(new JLabel(tr("<html><h3>Delete the file {0} from disk?<p>The image file will be permanently lost!</h3></html>",
+                    toDelete.getFile().getName()), ImageProvider.get("dialogs/geoimage/deletefromdisk"), SwingConstants.LEFT))
                     .toggleEnable("geoimage.deleteimagefromdisk")
                     .setCancelButton(1)
@@ -941,6 +942,7 @@
                 return Main.map.mapMode == null || isSupportedMapMode(Main.map.mapMode);
             }
-            @Override public void mousePressed(MouseEvent e) {
-
+
+            @Override
+            public void mousePressed(MouseEvent e) {
                 if (e.getButton() != MouseEvent.BUTTON1)
                     return;
@@ -950,5 +952,6 @@
             }
 
-            @Override public void mouseReleased(MouseEvent ev) {
+            @Override
+            public void mouseReleased(MouseEvent ev) {
                 if (ev.getButton() != MouseEvent.BUTTON1)
                     return;
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java	(revision 8510)
@@ -91,5 +91,5 @@
             }
 
-            synchronized(ImageDisplay.this) {
+            synchronized (ImageDisplay.this) {
                 if (this.file != ImageDisplay.this.file) {
                     // The file has changed
@@ -206,5 +206,5 @@
             checkVisibleRectPos(image, visibleRect);
 
-            synchronized(ImageDisplay.this) {
+            synchronized (ImageDisplay.this) {
                 if (ImageDisplay.this.file == file) {
                     ImageDisplay.this.visibleRect = visibleRect;
@@ -243,5 +243,5 @@
             checkVisibleRectPos(image, visibleRect);
 
-            synchronized(ImageDisplay.this) {
+            synchronized (ImageDisplay.this) {
                 if (ImageDisplay.this.file == file) {
                     ImageDisplay.this.visibleRect = visibleRect;
@@ -314,5 +314,5 @@
                 visibleRect.y += mousePointInImg.y - p.y;
                 checkVisibleRectPos(image, visibleRect);
-                synchronized(ImageDisplay.this) {
+                synchronized (ImageDisplay.this) {
                     if (ImageDisplay.this.file == file) {
                         ImageDisplay.this.visibleRect = visibleRect;
@@ -437,5 +437,5 @@
 
     public void setImage(File file, Integer orientation) {
-        synchronized(this) {
+        synchronized (this) {
             this.file = file;
             image = null;
@@ -461,5 +461,5 @@
         boolean errorLoading;
 
-        synchronized(this) {
+        synchronized (this) {
             image = this.image;
             file = this.file;
@@ -622,5 +622,5 @@
         }
 
-        synchronized(this) {
+        synchronized (this) {
             if (file == this.file) {
                 this.visibleRect = visibleRect;
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java	(revision 8510)
@@ -58,4 +58,5 @@
         return pos;
     }
+
     public Double getSpeed() {
         if (tmp != null)
@@ -63,4 +64,5 @@
         return speed;
     }
+
     public Double getElevation() {
         if (tmp != null)
@@ -90,7 +92,9 @@
         return file;
     }
+
     public Integer getExifOrientation() {
         return exifOrientation;
     }
+
     public Date getExifTime() {
         return getDefensiveDate(exifTime);
@@ -133,4 +137,5 @@
         return exifCoor;
     }
+
     public Double getExifImgDir() {
         return exifImgDir;
@@ -147,19 +152,25 @@
         this.pos = pos;
     }
+
     public void setPos(LatLon pos) {
         this.pos = new CachedLatLon(pos);
     }
+
     public void setSpeed(Double speed) {
         this.speed = speed;
     }
+
     public void setElevation(Double elevation) {
         this.elevation = elevation;
     }
+
     public void setFile(File file) {
         this.file = file;
     }
+
     public void setExifOrientation(Integer exifOrientation) {
         this.exifOrientation = exifOrientation;
     }
+
     public void setExifTime(Date exifTime) {
         this.exifTime = getDefensiveDate(exifTime);
@@ -178,7 +189,9 @@
         this.gpsTime = getDefensiveDate(gpsTime);
     }
+
     public void setExifCoor(LatLon exifCoor) {
         this.exifCoor = exifCoor;
     }
+
     public void setExifImgDir(double exifDir) {
         this.exifImgDir = exifDir;
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java	(revision 8510)
@@ -84,5 +84,5 @@
         content.add(imgDisplay, BorderLayout.CENTER);
 
-        Dimension buttonDim = new Dimension(26,26);
+        Dimension buttonDim = new Dimension(26, 26);
 
         ImageAction prevAction = new ImageAction(COMMAND_PREVIOUS, ImageProvider.get("dialogs", "previous"), tr("Previous"));
@@ -160,5 +160,5 @@
         btnCollapse = new JButton(new ImageAction(COMMAND_COLLAPSE,
                 ImageProvider.get("dialogs", "collapse"), tr("Move dialog to the side pane")));
-        btnCollapse.setPreferredSize(new Dimension(20,20));
+        btnCollapse.setPreferredSize(new Dimension(20, 20));
         btnCollapse.setAlignmentY(Component.TOP_ALIGNMENT);
 
@@ -203,4 +203,5 @@
     class ImageAction extends AbstractAction {
         private final String action;
+
         public ImageAction(String action, ImageIcon icon, String toolTipText) {
             this.action = action;
@@ -223,5 +224,4 @@
             } else if (COMMAND_LAST.equals(action) && currentLayer != null) {
                 currentLayer.showLastPhoto();
-
             } else if (COMMAND_CENTERVIEW.equals(action)) {
                 centerView = ((JToggleButton) e.getSource()).isSelected();
@@ -229,8 +229,6 @@
                     Main.map.mapView.zoomTo(currentEntry.getPos());
                 }
-
             } else if (COMMAND_ZOOM.equals(action)) {
                 imgDisplay.zoomBestFitOrOne();
-
             } else if (COMMAND_REMOVE.equals(action)) {
                 if (currentLayer != null) {
@@ -284,5 +282,5 @@
         boolean imageChanged;
 
-        synchronized(this) {
+        synchronized (this) {
             // TODO: pop up image dialog but don't load image again
 
@@ -392,5 +390,5 @@
     public void activeLayerChange(Layer oldLayer, Layer newLayer) {
         if (currentLayer == null && newLayer instanceof GeoImageLayer) {
-            ((GeoImageLayer)newLayer).showFirstPhoto();
+            ((GeoImageLayer) newLayer).showFirstPhoto();
         }
     }
@@ -399,5 +397,5 @@
     public void layerAdded(Layer newLayer) {
         if (currentLayer == null && newLayer instanceof GeoImageLayer) {
-            ((GeoImageLayer)newLayer).showFirstPhoto();
+            ((GeoImageLayer) newLayer).showFirstPhoto();
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java	(revision 8510)
@@ -106,5 +106,5 @@
             try {
                 Thread.sleep(10);
-            } catch(InterruptedException ie) {
+            } catch (InterruptedException ie) {
                 Main.warn("InterruptedException while drawing thumb");
             }
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java	(revision 8510)
@@ -99,7 +99,7 @@
         @Override
         public int compare(TrackLength l0, TrackLength l1) {
-            if(l0.value < l1.value)
+            if (l0.value < l1.value)
                 return -1;
-            else if(l0.value > l1.value)
+            else if (l0.value > l1.value)
                 return 1;
             return 0;
@@ -184,5 +184,5 @@
     }
 
-    private boolean noUpdates=false;
+    private boolean noUpdates = false;
 
     /** selects all rows (=tracks) in the table that are currently visible on the layer*/
@@ -228,5 +228,5 @@
 
         dateFilter = new DateFilterPanel(layer, "gpx.traces", false);
-        dateFilter.setFilterAppliedListener(new ActionListener(){
+        dateFilter.setFilterAppliedListener(new ActionListener() {
             @Override public void actionPerformed(ActionEvent e) {
                 noUpdates = true;
@@ -250,8 +250,10 @@
         });
         dateFilter.setEnabled(false);
-        msg.add(b, GBC.std().insets(0,0,5,0));
-        msg.add(dateFilter, GBC.eol().insets(0,0,10,0).fill(GBC.HORIZONTAL));
-
-        msg.add(new JLabel(tr("<html>Select all tracks that you want to be displayed. You can drag select a range of tracks or use CTRL+Click to select specific ones. The map is updated live in the background. Open the URLs by double clicking them.</html>")),
+        msg.add(b, GBC.std().insets(0, 0, 5, 0));
+        msg.add(dateFilter, GBC.eol().insets(0, 0, 10, 0).fill(GBC.HORIZONTAL));
+
+        msg.add(new JLabel(tr("<html>Select all tracks that you want to be displayed. " +
+                "You can drag select a range of tracks or use CTRL+Click to select specific ones. " +
+                "The map is updated live in the background. Open the URLs by double clicking them.</html>")),
                 GBC.eop().fill(GBC.HORIZONTAL));
         // build table
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/DateFilterPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/DateFilterPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/DateFilterPanel.java	(revision 8510)
@@ -48,5 +48,5 @@
         final Date startTime, endTime;
         Date[] bounds = layer.data.getMinMaxTimeForAllTracks();
-        startTime = (bounds.length == 0) ? new GregorianCalendar(2000, 1, 1).getTime():bounds[0];
+        startTime = (bounds.length == 0) ? new GregorianCalendar(2000, 1, 1).getTime() : bounds[0];
         endTime = (bounds.length == 0) ? new Date() : bounds[1];
 
@@ -56,7 +56,7 @@
         dateTo.setRange(startTime, endTime);
 
-        add(noTimestampCb, GBC.std().grid(1,1).insets(0, 0, 5, 0));
-        add(dateFrom, GBC.std().grid(2,1).fill(GBC.HORIZONTAL));
-        add(dateTo, GBC.eol().grid(3,1).fill(GBC.HORIZONTAL));
+        add(noTimestampCb, GBC.std().grid(1, 1).insets(0, 0, 5, 0));
+        add(dateFrom, GBC.std().grid(2, 1).fill(GBC.HORIZONTAL));
+        add(dateTo, GBC.eol().grid(3, 1).fill(GBC.HORIZONTAL));
 
         setEnabled(enabled);
@@ -93,5 +93,5 @@
         t.stop();
         filterTracksByDate();
-        if (filterAppliedListener!=null)
+        if (filterAppliedListener != null)
            filterAppliedListener.actionPerformed(null);
     }
@@ -111,8 +111,8 @@
      */
     public void loadFromPrefs() {
-        long t1 =Main.pref.getLong(prefDateMin, 0);
-        if (t1!=0) dateFrom.setDate(new Date(t1));
-        long t2 =Main.pref.getLong(prefDateMax, 0);
-        if (t2!=0) dateTo.setDate(new Date(t2));
+        long t1 = Main.pref.getLong(prefDateMin, 0);
+        if (t1 != 0) dateFrom.setDate(new Date(t1));
+        long t2 = Main.pref.getLong(prefDateMax, 0);
+        if (t2 != 0) dateTo.setDate(new Date(t2));
         noTimestampCb.setSelected(Main.pref.getBoolean(prefDate0, false));
     }
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongPanel.java	(revision 8510)
@@ -63,12 +63,12 @@
         cbDownloadOsmData = new JCheckBox(tr("OpenStreetMap data"), Main.pref.getBoolean(prefOsm, true));
         cbDownloadOsmData.setToolTipText(tr("Select to download OSM data."));
-        add(cbDownloadOsmData, GBC.std().insets(1,5,1,5));
+        add(cbDownloadOsmData, GBC.std().insets(1, 5, 1, 5));
         cbDownloadGpxData = new JCheckBox(tr("Raw GPS data"), Main.pref.getBoolean(prefGps, false));
         cbDownloadGpxData.setToolTipText(tr("Select to download GPS traces."));
-        add(cbDownloadGpxData, GBC.eol().insets(5,5,1,5));
+        add(cbDownloadGpxData, GBC.eol().insets(5, 5, 1, 5));
 
         add(new JLabel(tr("Download everything within:")), GBC.std());
         buffer = new JSpinner(new SpinnerNumberModel(50.0, 10.0, 5000.0, 1.0));
-        add(buffer, GBC.std().insets(5,5,5,5));
+        add(buffer, GBC.std().insets(5, 5, 5, 5));
         add(new JLabel(tr("meters")), GBC.eol());
 
@@ -80,5 +80,5 @@
             }
         };
-        add(maxRect, GBC.std().insets(5,5,5,5));
+        add(maxRect, GBC.std().insets(5, 5, 5, 5));
         add(new JLabel(tr("sq km")), GBC.eol());
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackAction.java	(revision 8510)
@@ -185,4 +185,5 @@
             }
         }
+
         Main.worker.submit(new CalculateDownloadArea());
     }
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(revision 8510)
@@ -190,5 +190,4 @@
     }
 
-
     public void drawAll(Graphics2D g, MapView mv, List<WayPoint> visibleSegments) {
 
@@ -207,5 +206,5 @@
 
         if (lineWidth != 0) {
-            g.setStroke(new BasicStroke(lineWidth,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND));
+            g.setStroke(new BasicStroke(lineWidth, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
         }
         fixColors(visibleSegments);
@@ -226,5 +225,5 @@
             if (colored == ColorMode.VELOCITY) {
                 for (Collection<WayPoint> segment : data.getLinesIterable(null)) {
-                    if(!forceLines) {
+                    if (!forceLines) {
                         oldWp = null;
                     }
@@ -237,8 +236,8 @@
                             double vel = c.greatCircleDistance(oldWp.getCoor())
                                     / (trkPnt.time - oldWp.time);
-                            if(vel > maxval) {
+                            if (vel > maxval) {
                                 maxval = vel;
                             }
-                            if(vel < minval) {
+                            if (vel < minval) {
                                 minval = vel;
                             }
@@ -258,8 +257,8 @@
                         if (val != null) {
                             double hdop = ((Float) val).doubleValue();
-                            if(hdop > maxval) {
+                            if (hdop > maxval) {
                                 maxval = hdop;
                             }
-                            if(hdop < minval) {
+                            if (hdop < minval) {
                                 minval = hdop;
                             }
@@ -312,9 +311,9 @@
                 if (oldWp != null) { // other coloring modes need segment for calcuation
                     double dist = c.greatCircleDistance(oldWp.getCoor());
-                    boolean noDraw=false;
+                    boolean noDraw = false;
                     switch (colored) {
                     case VELOCITY:
                         double dtime = trkPnt.time - oldWp.time;
-                        if(dtime > 0) {
+                        if (dtime > 0) {
                             color = velocityScale.getColor(dist / dtime);
                         } else {
@@ -327,5 +326,5 @@
                         break;
                     case TIME:
-                        double t=trkPnt.time;
+                        double t = trkPnt.time;
                         if (t > 0 && t <= now && maxval - minval > minTrackDurationForTimeColoring) { // skip bad timestamps and very short tracks
                             color = dateScale.getColor(t);
@@ -345,5 +344,5 @@
                     color = neutralColor;
                 }
-                if (color!=null) {
+                if (color != null) {
                     trkPnt.customColoring = color;
                 }
@@ -451,10 +450,10 @@
                 if (hdopCircle && trkPnt.get(GpxConstants.PT_HDOP) != null) {
                     // hdop value
-                    float hdop = (Float)trkPnt.get(GpxConstants.PT_HDOP);
+                    float hdop = (Float) trkPnt.get(GpxConstants.PT_HDOP);
                     if (hdop < 0) {
                         hdop = 0;
                     }
-                    Color customColoringTransparent = hdopAlpha<0 ? trkPnt.customColoring:
-                        new Color(trkPnt.customColoring.getRGB() & 0x00ffffff | hdopAlpha<<24, true);
+                    Color customColoringTransparent = hdopAlpha < 0 ? trkPnt.customColoring :
+                        new Color(trkPnt.customColoring.getRGB() & 0x00ffffff | hdopAlpha << 24, true);
                     g.setColor(customColoringTransparent);
                     // hdop cirles
@@ -467,6 +466,6 @@
                     // color the large GPS points like the gps lines
                     if (trkPnt.customColoring != null) {
-                        Color customColoringTransparent = largePointAlpha<0 ? trkPnt.customColoring:
-                            new Color(trkPnt.customColoring.getRGB() & 0x00ffffff | largePointAlpha<<24, true);
+                        Color customColoringTransparent = largePointAlpha < 0 ? trkPnt.customColoring :
+                            new Color(trkPnt.customColoring.getRGB() & 0x00ffffff | largePointAlpha << 24, true);
 
                         g.setColor(customColoringTransparent);
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(revision 8510)
@@ -58,5 +58,6 @@
 
     private void warnCantImportIntoServerLayer(GpxLayer layer) {
-        String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>Because its way points do not include a timestamp we cannot correlate them with audio data.</html>",
+        String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>" +
+                "Because its way points do not include a timestamp we cannot correlate them with audio data.</html>",
                 layer.getName());
         HelpAwareOptionPane.showOptionDialog(Main.parent, msg, tr("Import not possible"),
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java	(revision 8510)
@@ -34,5 +34,6 @@
 
     private void warnCantImportIntoServerLayer(GpxLayer layer) {
-        String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>Because its way points do not include a timestamp we cannot correlate them with images.</html>",
+        String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>"+
+                "Because its way points do not include a timestamp we cannot correlate them with images.</html>",
                 layer.getName());
         HelpAwareOptionPane.showOptionDialog(Main.parent, msg, tr("Import not possible"),
Index: trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ImageMarker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ImageMarker.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ImageMarker.java	(revision 8510)
@@ -54,12 +54,12 @@
         p2.add(scale);
         p.add(p2, BorderLayout.SOUTH);
-        scale.addActionListener(new ActionListener(){
+        scale.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent ev) {
                 p.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
                 if (scale.getModel().isSelected()) {
-                    ((JLabel)vp.getView()).setIcon(loadScaledImage(imageUrl, Math.max(vp.getWidth(), vp.getHeight())));
+                    ((JLabel) vp.getView()).setIcon(loadScaledImage(imageUrl, Math.max(vp.getWidth(), vp.getHeight())));
                 } else {
-                    ((JLabel)vp.getView()).setIcon(new ImageIcon(imageUrl));
+                    ((JLabel) vp.getView()).setIcon(new ImageIcon(imageUrl));
                 }
                 p.setCursor(Cursor.getDefaultCursor());
@@ -78,9 +78,9 @@
         int w = img.getWidth(null);
         int h = img.getHeight(null);
-        if (w>h) {
-            h = (int) Math.round(maxSize*((double)h/w));
+        if (w > h) {
+            h = (int) Math.round(maxSize*((double) h/w));
             w = maxSize;
         } else {
-            w = (int) Math.round(maxSize*((double)w/h));
+            w = (int) Math.round(maxSize*((double) w/h));
             h = maxSize;
         }
Index: trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java	(revision 8510)
@@ -92,4 +92,5 @@
         // Legacy code - convert label from int to template engine expression
         private static final IntegerProperty PROP_LABEL = new IntegerProperty("draw.rawgps.layer.wpt", 0);
+
         private static String getDefaultLabelPattern() {
             switch (PROP_LABEL.get()) {
@@ -113,5 +114,5 @@
             TemplateEntryProperty result = CACHE.get(key);
             if (result == null) {
-                String defaultValue = layerName == null ? getDefaultLabelPattern():"";
+                String defaultValue = layerName == null ? getDefaultLabelPattern() : "";
                 TemplateEntryProperty parent = layerName == null ? null : forMarker(null);
                 result = new TemplateEntryProperty(key, defaultValue, parent);
@@ -128,5 +129,5 @@
             TemplateEntryProperty result = CACHE.get(key);
             if (result == null) {
-                String defaultValue = layerName == null?"?{ '{name}' | '{desc}' | '{" + Marker.MARKER_FORMATTED_OFFSET + "}' }":"";
+                String defaultValue = layerName == null ? "?{ '{name}' | '{desc}' | '{" + Marker.MARKER_FORMATTED_OFFSET + "}' }" : "";
                 TemplateEntryProperty parent = layerName == null ? null : forAudioMarker(null);
                 result = new TemplateEntryProperty(key, defaultValue, parent);
@@ -298,5 +299,5 @@
         // /* ICON(markers/) */"Bridge"
         // /* ICON(markers/) */"Crossing"
-        this.symbol = iconName != null ? ImageProvider.getIfAvailable("markers",iconName) : null;
+        this.symbol = iconName != null ? ImageProvider.getIfAvailable("markers", iconName) : null;
         this.parentLayer = parentLayer;
 
@@ -461,5 +462,5 @@
 
     private String formatOffset() {
-        int wholeSeconds = (int)(offset + 0.5);
+        int wholeSeconds = (int) (offset + 0.5);
         if (wholeSeconds < 60)
             return Integer.toString(wholeSeconds);
Index: trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java	(revision 8510)
@@ -138,5 +138,6 @@
     public void hookUpMapView() {
         Main.map.mapView.addMouseListener(new MouseAdapter() {
-            @Override public void mousePressed(MouseEvent e) {
+            @Override
+            public void mousePressed(MouseEvent e) {
                 if (e.getButton() != MouseEvent.BUTTON1)
                     return;
@@ -157,5 +158,7 @@
                 }
             }
-            @Override public void mouseReleased(MouseEvent ev) {
+
+            @Override
+            public void mouseReleased(MouseEvent ev) {
                 if (ev.getButton() != MouseEvent.BUTTON1 || !mousePressed)
                     return;
@@ -220,5 +223,5 @@
 
     @Override public void mergeFrom(Layer from) {
-        MarkerLayer layer = (MarkerLayer)from;
+        MarkerLayer layer = (MarkerLayer) from;
         data.addAll(layer.data);
         Collections.sort(data, new Comparator<Marker>() {
@@ -311,5 +314,5 @@
         for (Marker m : data) {
             if (m.getClass() == AudioMarker.class) {
-                am = (AudioMarker)m;
+                am = (AudioMarker) m;
                 offset = time - am.time;
                 break;
@@ -383,5 +386,5 @@
         } else {
             boolean foundCurrent = false;
-            for (int i=data.size() - 1; i>=0; i--) {
+            for (int i = data.size() - 1; i >= 0; i--) {
                 Marker m = data.get(i);
                 if (foundCurrent) {
@@ -424,5 +427,5 @@
                     }
                 } else if (marker.getClass() == AudioMarker.class) {
-                    if(nextTime || startMarker == null)
+                    if (nextTime || startMarker == null)
                         return marker;
                     previousMarker = marker;
@@ -452,5 +455,5 @@
         }
         if (m != null) {
-            ((AudioMarker)m).play();
+            ((AudioMarker) m).play();
         }
     }
@@ -461,5 +464,5 @@
      */
     private boolean isTextOrIconShown() {
-        String current = Main.pref.get("marker.show "+getName(),"show");
+        String current = Main.pref.get("marker.show "+getName(), "show");
         return "show".equalsIgnoreCase(current);
     }
@@ -475,5 +478,4 @@
         }
 
-
         @Override
         public void actionPerformed(ActionEvent e) {
@@ -481,5 +483,4 @@
             Main.map.mapView.repaint();
         }
-
 
         @Override
@@ -496,7 +497,9 @@
     }
 
-
     private class SynchronizeAudio extends AbstractAction {
 
+        /**
+         * Constructs a new {@code SynchronizeAudio} action.
+         */
         public SynchronizeAudio() {
             super(tr("Synchronize Audio"), ImageProvider.get("audio-sync"));
Index: trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java	(revision 8510)
@@ -61,5 +61,5 @@
 
     private PlayHeadMarker() {
-        super(new LatLon(0.0,0.0), "",
+        super(new LatLon(0.0, 0.0), "",
                 Main.pref.get("marker.audiotracericon", "audio-tracer"),
                 null, -1.0, 0.0);
@@ -85,5 +85,6 @@
     }
 
-    @Override public boolean containsPoint(Point p) {
+    @Override
+    public boolean containsPoint(Point p) {
         Point screen = Main.map.mapView.getPoint(getEastNorth());
         Rectangle r = new Rectangle(screen.x, screen.y, symbol.getIconWidth(),
@@ -102,6 +103,9 @@
         wasPlaying = AudioPlayer.playing();
         if (wasPlaying) {
-            try { AudioPlayer.pause();
-            } catch (Exception ex) { AudioPlayer.audioMalfunction(ex);}
+            try {
+                AudioPlayer.pause();
+            } catch (Exception ex) {
+                AudioPlayer.audioMalfunction(ex);
+            }
         }
     }
@@ -112,6 +116,9 @@
     private void endDrag(boolean reset) {
         if (!wasPlaying || reset) {
-            try { AudioPlayer.pause();
-            } catch (Exception ex) { AudioPlayer.audioMalfunction(ex);}
+            try {
+                AudioPlayer.pause();
+            } catch (Exception ex) {
+                AudioPlayer.audioMalfunction(ex);
+            }
         }
         if (reset) {
@@ -168,5 +175,6 @@
             JOptionPane.showMessageDialog(
                     Main.parent,
-                    tr("You need to drag the play head near to the GPX track whose associated sound track you were playing (after the first marker)."),
+                    tr("You need to drag the play head near to the GPX track " +
+                       "whose associated sound track you were playing (after the first marker)."),
                     tr("Warning"),
                     JOptionPane.WARNING_MESSAGE
@@ -191,5 +199,5 @@
     public void synchronize(EastNorth en) {
         AudioMarker recent = AudioMarker.recentlyPlayedMarker();
-        if(recent == null)
+        if (recent == null)
             return;
         /* First, see if we dropped onto an existing audio marker in the layer being played */
@@ -234,5 +242,5 @@
 
         /* Actually do the synchronization */
-        if(ca == null) {
+        if (ca == null) {
             JOptionPane.showMessageDialog(
                     Main.parent,
@@ -281,5 +289,5 @@
         if (timer == null) {
             animationInterval = Main.pref.getDouble("marker.audioanimationinterval", 1.0); //milliseconds
-            timer = new Timer((int)(animationInterval * 1000.0), new ActionListener() {
+            timer = new Timer((int) (animationInterval * 1000.0), new ActionListener() {
                 @Override
                 public void actionPerformed(ActionEvent e) {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java	(revision 8510)
@@ -18,4 +18,5 @@
 
     public enum HorizontalTextAlignment { LEFT, CENTER, RIGHT }
+
     public enum VerticalTextAlignment { ABOVE, TOP, CENTER, BOTTOM, BELOW }
 
@@ -172,4 +173,5 @@
         if (SIMPLE_NODE_TEXT_ELEMSTYLE == null) throw new AssertionError();
     }
+
     /*
      * Caches the default text color from the preferences.
@@ -179,4 +181,5 @@
      */
     private static volatile Color DEFAULT_TEXT_COLOR = null;
+
     private static void initDefaultParameters() {
         if (DEFAULT_TEXT_COLOR != null) return;
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 8510)
@@ -164,5 +164,5 @@
             List<?> l = (List<?>) o;
             float[] a = new float[l.size()];
-            for (int i=0; i<l.size(); ++i) {
+            for (int i = 0; i < l.size(); ++i) {
                 Float f = toFloat(l.get(i));
                 if (f == null)
@@ -213,5 +213,5 @@
                 res.append(Arrays.toString((float[]) val));
             } else if (val instanceof Color) {
-                res.append(Utils.toString((Color)val));
+                res.append(Utils.toString((Color) val));
             } else if (val != null) {
                 res.append(val);
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java	(revision 8510)
@@ -132,5 +132,5 @@
         public int size;
 
-        public FontDescriptor(String name, int style, int size){
+        public FontDescriptor(String name, int style, int size) {
             this.name = name;
             this.style = style;
@@ -147,4 +147,5 @@
             return result;
         }
+
         @Override
         public boolean equals(Object obj) {
@@ -170,4 +171,5 @@
 
     private static final Map<FontDescriptor, Font> FONT_MAP = new HashMap<>();
+
     private static Font getCachedFont(FontDescriptor fd) {
         Font f = FONT_MAP.get(fd);
@@ -178,5 +180,5 @@
     }
 
-    private static Font getCachedFont(String name, int style, int size){
+    private static Font getCachedFont(String name, int style, int size) {
         return getCachedFont(new FontDescriptor(name, style, size));
     }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 8510)
@@ -198,5 +198,5 @@
                     if (!hasIndependentLineStyle) {
                         Pair<StyleList, Range> mpElemStyles;
-                        synchronized(r) {
+                        synchronized (r) {
                             mpElemStyles = getStyleCacheWithRange(r, scale, nc);
                         }
@@ -275,5 +275,5 @@
         } else if (osm instanceof Relation) {
             Pair<StyleList, Range> p = generateStyles(osm, scale, true);
-            if (drawMultipolygon && ((Relation)osm).isMultipolygon()) {
+            if (drawMultipolygon && ((Relation) osm).isMultipolygon()) {
                 if (!Utils.exists(p.a, AreaElemStyle.class) && Main.pref.getBoolean("multipolygon.deprecated.outerstyle", true)) {
                     // look at outer ways to find area style
@@ -342,5 +342,5 @@
                 }
             } else if (osm instanceof Relation) {
-                if (((Relation)osm).isMultipolygon()) {
+                if (((Relation) osm).isMultipolygon()) {
                     addIfNotNull(sl, AreaElemStyle.create(env));
                     addIfNotNull(sl, RepeatImageElemStyle.create(env));
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategy.java	(revision 8510)
@@ -48,5 +48,5 @@
         private String defaultLabel;
 
-        public StaticLabelCompositionStrategy(String defaultLabel){
+        public StaticLabelCompositionStrategy(String defaultLabel) {
             this.defaultLabel = defaultLabel;
         }
@@ -95,5 +95,6 @@
 
         private String defaultLabelTag;
-        public TagLookupCompositionStrategy(String defaultLabelTag){
+
+        public TagLookupCompositionStrategy(String defaultLabelTag) {
             if (defaultLabelTag != null) {
                 defaultLabelTag = defaultLabelTag.trim();
@@ -189,5 +190,5 @@
             }
             List<String> result = new ArrayList<>();
-            for(String tag: nameTags) {
+            for (String tag: nameTags) {
                 if (tag == null) {
                     continue;
@@ -207,5 +208,5 @@
          * @param nameTags the name tags. null values are ignored.
          */
-        public void setNameTags(List<String> nameTags){
+        public void setNameTags(List<String> nameTags) {
             this.nameTags = buildNameTags(nameTags);
         }
@@ -217,5 +218,5 @@
          * @since 6541
          */
-        public void setNameComplementTags(List<String> nameComplementTags){
+        public void setNameComplementTags(List<String> nameComplementTags) {
             this.nameComplementTags = buildNameTags(nameComplementTags);
         }
@@ -247,5 +248,5 @@
          */
         public final void initNameTagsFromPreferences() {
-            if (Main.pref == null){
+            if (Main.pref == null) {
                 this.nameTags = new ArrayList<>(Arrays.asList(DEFAULT_NAME_TAGS));
                 this.nameComplementTags = new ArrayList<>(Arrays.asList(DEFAULT_NAME_COMPLEMENT_TAGS));
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java	(revision 8510)
@@ -30,4 +30,5 @@
         return createLine(new Environment(null, mc, "default", null));
     }
+
     public static final LineElemStyle UNTAGGED_WAY = createSimpleLineStyle(null, false);
 
@@ -139,5 +140,5 @@
                 try {
                     realWidth = Float.valueOf(widthTag);
-                } catch(NumberFormatException nfe) {
+                } catch (NumberFormatException nfe) {
                     Main.warn(nfe);
                 }
@@ -265,5 +266,5 @@
     public void paintPrimitive(OsmPrimitive primitive, MapPaintSettings paintSettings, StyledMapRenderer painter,
             boolean selected, boolean outermember, boolean member) {
-        Way w = (Way)primitive;
+        Way w = (Way) primitive;
         /* show direction arrows, if draw.segment.relevant_directions_only is not set,
         the way is tagged with a direction key
@@ -299,5 +300,5 @@
         } else if (member || outermember) {
             myColor = paintSettings.getRelationSelectedColor(color.getAlpha());
-        } else if(w.isDisabled()) {
+        } else if (w.isDisabled()) {
             myColor = paintSettings.getInactiveColor();
             myDashedColor = paintSettings.getInactiveColor();
@@ -307,9 +308,9 @@
                 showOnlyHeadArrowOnly, showOneway, onewayReversed);
 
-        if(paintSettings.isShowOrderNumber() && !painter.isInactiveMode()) {
+        if (paintSettings.isShowOrderNumber() && !painter.isInactiveMode()) {
             int orderNumber = 0;
             lastN = null;
-            for(Node n : w.getNodes()) {
-                if(lastN != null) {
+            for (Node n : w.getNodes()) {
+                if (lastN != null) {
                     orderNumber++;
                     painter.drawOrderNumber(lastN, n, orderNumber, myColor);
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/LineTextElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/LineTextElemStyle.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/LineTextElemStyle.java	(revision 8510)
@@ -18,4 +18,5 @@
         this.text = text;
     }
+
     public static LineTextElemStyle create(final Environment env) {
         final Cascade c = env.mc.getCascade(env.layer);
@@ -34,5 +35,5 @@
     public void paintPrimitive(OsmPrimitive primitive, MapPaintSettings paintSettings, StyledMapRenderer painter,
             boolean selected, boolean outermember, boolean member) {
-        Way w = (Way)primitive;
+        Way w = (Way) primitive;
         painter.drawTextOnPath(w, text);
     }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintMenu.java	(revision 8510)
@@ -78,4 +78,5 @@
         }
     }
+
     private final transient Map<String, MapPaintAction> actions = new HashMap<>();
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 8510)
@@ -69,4 +69,5 @@
     public static class TagKeyReference {
         public final String key;
+
         public TagKeyReference(String key) {
             this.key = key;
@@ -217,5 +218,5 @@
         for (String fileset : prefIconDirs) {
             String[] a;
-            if(fileset.indexOf('=') >= 0) {
+            if (fileset.indexOf('=') >= 0) {
                 a = fileset.split("=", 2);
             } else {
@@ -224,5 +225,5 @@
 
             /* non-prefixed path is generic path, always take it */
-            if(a[0].isEmpty() || source.getPrefName().equals(a[0])) {
+            if (a[0].isEmpty() || source.getPrefName().equals(a[0])) {
                 dirs.add(a[1]);
             }
@@ -451,4 +452,5 @@
     public interface MapPaintSylesUpdateListener {
         public void mapPaintStylesUpdated();
+
         public void mapPaintStyleEntryUpdated(int idx);
     }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 8510)
@@ -107,5 +107,5 @@
         if (scale <= 0)
             throw new IllegalArgumentException("scale must be <= 0 but is "+scale);
-        for (int i=0; i<data.size(); ++i) {
+        for (int i = 0; i < data.size(); ++i) {
             if (bd.get(i) < scale && scale <= bd.get(i+1)) {
                 return data.get(i);
@@ -122,5 +122,5 @@
         if (scale <= 0)
             throw new IllegalArgumentException("scale must be <= 0 but is "+scale);
-        for (int i=0; i<data.size(); ++i) {
+        for (int i = 0; i < data.size(); ++i) {
             if (bd.get(i) < scale && scale <= bd.get(i+1)) {
                 return new Pair<>(data.get(i), new Range(bd.get(i), bd.get(i+1)));
@@ -161,5 +161,5 @@
      */
     private void putImpl(StyleList sl, double lower, double upper) {
-        int i=0;
+        int i = 0;
         while (bd.get(i) < lower) {
             ++i;
@@ -214,5 +214,5 @@
         if (bd.get(0) != 0) throw new AssertionError();
         if (bd.get(bd.size() - 1) != Double.POSITIVE_INFINITY) throw new AssertionError();
-        for (int i=0; i<data.size() - 1; ++i) {
+        for (int i = 0; i < data.size() - 1; ++i) {
             if (bd.get(i) >= bd.get(i + 1)) throw new AssertionError();
         }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java	(revision 8510)
@@ -78,5 +78,5 @@
      * @return the label composition strategy
      */
-    protected static LabelCompositionStrategy buildLabelCompositionStrategy(Cascade c, boolean defaultAnnotate){
+    protected static LabelCompositionStrategy buildLabelCompositionStrategy(Cascade c, boolean defaultAnnotate) {
         /*
          * If the cascade includes a TagKeyReference we will lookup the rendered label
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 8510)
@@ -312,5 +312,5 @@
         public Predicate<String> containsPattern;
 
-        public KeyCondition(String label, boolean negateResult, KeyMatchType matchType){
+        public KeyCondition(String label, boolean negateResult, KeyMatchType matchType) {
             this.label = label;
             this.negateResult = negateResult;
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 8510)
@@ -612,5 +612,5 @@
          */
         public static boolean not_equal(Object a, Object b) {
-            return !equal(a,b);
+            return !equal(a, b);
         }
         /**
@@ -741,5 +741,5 @@
             final String text = args[0];
             System.arraycopy(args, 1, args, 0, args.length - 1);
-            return org.openstreetmap.josm.tools.I18n.tr(text, (Object[])args);
+            return org.openstreetmap.josm.tools.I18n.tr(text, (Object[]) args);
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj	(revision 8510)
@@ -86,5 +86,5 @@
         try {
             scs = new SimpleCharStream(in, encoding, 1, 1);
-        } catch(java.io.UnsupportedEncodingException e) {
+        } catch (java.io.UnsupportedEncodingException e) {
             throw new RuntimeException(e);
         }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 8510)
@@ -128,5 +128,5 @@
              * @param e the environment against which we match
              */
-            public MatchingReferrerFinder(Environment e){
+            public MatchingReferrerFinder(Environment e) {
                 this.e = e;
             }
@@ -148,5 +148,5 @@
                 if (!left.matches(e.withPrimitive(w)))
                     return;
-                for (int i=0; i<w.getNodesCount(); i++) {
+                for (int i = 0; i < w.getNodesCount(); i++) {
                     Node n = w.getNode(i);
                     if (n.equals(e.osm)) {
@@ -171,5 +171,5 @@
                 if (!left.matches(e.withPrimitive(r)))
                     return;
-                for (int i=0; i < r.getMembersCount(); i++) {
+                for (int i = 0; i < r.getMembersCount(); i++) {
                     RelationMember m = r.getMember(i);
                     if (m.getMember().equals(e.osm)) {
@@ -387,5 +387,5 @@
                 if (e.osm instanceof Way) {
                     List<Node> wayNodes = ((Way) e.osm).getNodes();
-                    for (int i=0; i<wayNodes.size(); i++) {
+                    for (int i = 0; i < wayNodes.size(); i++) {
                         Node n = wayNodes.get(i);
                         if (left.matches(e.withPrimitive(n))) {
@@ -400,5 +400,5 @@
                 } else if (e.osm instanceof Relation) {
                     List<RelationMember> members = ((Relation) e.osm).getMembers();
-                    for (int i=0; i<members.size(); i++) {
+                    for (int i = 0; i < members.size(); i++) {
                         OsmPrimitive member = members.get(i).getMember();
                         if (left.matches(e.withPrimitive(member))) {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Subpart.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Subpart.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Subpart.java	(revision 8510)
@@ -24,4 +24,5 @@
             this.id = id;
         }
+
         @Override
         public String getId(Environment env) {
@@ -41,4 +42,5 @@
             this.id = id;
         }
+
         @Override
         public String getId(Environment env) {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/xml/LinemodPrototype.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/xml/LinemodPrototype.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/xml/LinemodPrototype.java	(revision 8510)
@@ -6,8 +6,8 @@
 public class LinemodPrototype extends LinePrototype implements Comparable<LinemodPrototype> {
 
+    public enum WidthMode { ABSOLUTE, PERCENT, OFFSET }
+
+    public WidthMode widthMode;
     public boolean over;
-
-    public enum WidthMode { ABSOLUTE, PERCENT, OFFSET }
-    public WidthMode widthMode;
 
     public LinemodPrototype(LinemodPrototype s, Range range) {
@@ -50,7 +50,7 @@
     @Override
     public int compareTo(LinemodPrototype s) {
-        if(s.priority != priority)
+        if (s.priority != priority)
             return s.priority > priority ? 1 : -1;
-            if(!over && s.over)
+            if (!over && s.over)
                 return -1;
             // we have no idea how to order other objects :-)
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/xml/Prototype.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/xml/Prototype.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/xml/Prototype.java	(revision 8510)
@@ -28,10 +28,10 @@
 
     public String getCode() {
-        if(code == null) {
+        if (code == null) {
             if (conditions == null || conditions.isEmpty()) {
                 code = "";
             } else {
                 final StringBuilder sb = new StringBuilder();
-                for(XmlCondition r: conditions) {
+                for (XmlCondition r: conditions) {
                     r.appendCode(sb);
                 }
@@ -43,7 +43,7 @@
 
     public boolean check(OsmPrimitive primitive) {
-        if(conditions == null)
+        if (conditions == null)
             return true;
-        for(XmlCondition r : conditions) {
+        for (XmlCondition r : conditions) {
             String k = primitive.get(r.key);
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlCondition.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlCondition.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlCondition.java	(revision 8510)
@@ -21,7 +21,7 @@
 
     public String getKey() {
-        if(value != null)
+        if (value != null)
             return "n" + key + "=" + value;
-        else if(boolValue != null)
+        else if (boolValue != null)
             return "b" + key  + "=" + OsmUtils.getNamedOsmBoolean(boolValue);
         else
@@ -35,5 +35,5 @@
     @Override
     public String toString() {
-      return "Rule["+key+","+(boolValue != null ? "b="+boolValue:"v="+value)+"]";
+      return "Rule["+key+","+(boolValue != null ? "b="+boolValue : "v="+value)+"]";
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java	(revision 8510)
@@ -270,5 +270,5 @@
 
     public void add(XmlCondition c, Collection<XmlCondition> conditions, Prototype prot) {
-         if(conditions != null) {
+         if (conditions != null) {
             prot.conditions = conditions;
             if (prot instanceof IconPrototype) {
@@ -317,5 +317,5 @@
                 }
             }
-        } else if (osm instanceof Way || (osm instanceof Relation && ((Relation)osm).isMultipolygon())) {
+        } else if (osm instanceof Way || (osm instanceof Relation && ((Relation) osm).isMultipolygon())) {
             WayPrototypesRecord p = new WayPrototypesRecord();
             get(osm, pretendWayIsClosed || !(osm instanceof Way) || ((Way) osm).isClosed(), p, useMinMaxScale ? scale : null, mc);
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSourceHandler.java	(revision 8510)
@@ -44,17 +44,17 @@
     public XmlStyleSourceHandler(XmlStyleSource style) {
         this.style = style;
-        inDoc=inRule=inCondition=inLine=inIcon=inArea=false;
+        inDoc = inRule = inCondition = inLine = inIcon = inArea = false;
         rule.init();
     }
 
-    Color convertColor(String colString) {
+    private Color convertColor(String colString) {
         int i = colString.indexOf('#');
         Color ret;
         if (i < 0) {
             ret = Main.pref.getColor("mappaint."+style.getPrefName()+"."+colString, Color.red);
-        } else if(i == 0) {
+        } else if (i == 0) {
             ret = ColorHelper.html2color(colString);
         } else {
-            ret = Main.pref.getColor("mappaint."+style.getPrefName()+"."+colString.substring(0,i),
+            ret = Main.pref.getColor("mappaint."+style.getPrefName()+"."+colString.substring(0, i),
                     ColorHelper.html2color(colString.substring(i)));
         }
@@ -62,9 +62,11 @@
     }
 
-    @Override public void startDocument() {
+    @Override
+    public void startDocument() {
         inDoc = true;
     }
 
-    @Override public void endDocument() {
+    @Override
+    public void endDocument() {
         inDoc = false;
     }
@@ -77,5 +79,5 @@
 
     private void startElementLine(String qName, Attributes atts, LinePrototype line) {
-        for (int count=0; count<atts.getLength(); count++) {
+        for (int count = 0; count < atts.getLength(); count++) {
             switch (atts.getQName(count)) {
             case "width":
@@ -101,5 +103,5 @@
                 } catch (NumberFormatException nfe) {
                     boolean isDashed = Boolean.parseBoolean(atts.getValue(count));
-                    if(isDashed) {
+                    if (isDashed) {
                         dashed = new Float[]{9f};
                     } else {
@@ -126,5 +128,5 @@
     private void startElementLinemod(String qName, Attributes atts, LinemodPrototype line) {
         startElementLine(qName, atts, line);
-        for (int count=0; count<atts.getLength(); count++) {
+        for (int count = 0; count < atts.getLength(); count++) {
             switch (atts.getQName(count)) {
             case "width":
@@ -133,8 +135,8 @@
                     line.setWidth(Integer.parseInt(val.substring(1)));
                     line.widthMode = LinemodPrototype.WidthMode.OFFSET;
-                } else if(val.startsWith("-")) {
+                } else if (val.startsWith("-")) {
                     line.setWidth(Integer.parseInt(val));
                     line.widthMode = LinemodPrototype.WidthMode.OFFSET;
-                } else if(val.endsWith("%")) {
+                } else if (val.endsWith("%")) {
                     line.setWidth(Integer.parseInt(val.substring(0, val.length()-1)));
                     line.widthMode = LinemodPrototype.WidthMode.PERCENT;
@@ -151,5 +153,5 @@
 
     @Override
-    public void startElement(String uri,String name, String qName, Attributes atts) {
+    public void startElement(String uri, String name, String qName, Attributes atts) {
         if (inDoc) {
             switch(qName) {
@@ -179,5 +181,5 @@
                     XmlCondition c = rule.cond;
                     if (c.key != null) {
-                        if(rule.conditions == null) {
+                        if (rule.conditions == null) {
                             rule.conditions = new LinkedList<>();
                         }
@@ -186,5 +188,5 @@
                         rule.conditions.add(c);
                     }
-                    for (int count=0; count<atts.getLength(); count++) {
+                    for (int count = 0; count < atts.getLength(); count++) {
                         switch (atts.getQName(count)) {
                         case "k":
@@ -201,5 +203,5 @@
                         }
                     }
-                    if(c.key == null) {
+                    if (c.key == null) {
                         error("The condition has no key!");
                     }
@@ -216,5 +218,5 @@
             case "icon":
                 inIcon = true;
-                for (int count=0; count<atts.getLength(); count++) {
+                for (int count = 0; count < atts.getLength(); count++) {
                     switch (atts.getQName(count)) {
                     case "src":
@@ -236,11 +238,11 @@
             case "area":
                 hadArea = inArea = true;
-                for (int count=0; count<atts.getLength(); count++) {
+                for (int count = 0; count < atts.getLength(); count++) {
                     switch (atts.getQName(count)) {
                     case "colour":
-                        rule.area.color=convertColor(atts.getValue(count));
+                        rule.area.color = convertColor(atts.getValue(count));
                         break;
                     case "closed":
-                        rule.area.closed=Boolean.parseBoolean(atts.getValue(count));
+                        rule.area.closed = Boolean.parseBoolean(atts.getValue(count));
                         break;
                     case "priority":
@@ -259,5 +261,5 @@
 
     @Override
-    public void endElement(String uri,String name, String qName) {
+    public void endElement(String uri, String name, String qName) {
         if (inRule && "rule".equals(qName)) {
             if (hadLine) {
Index: trunk/src/org/openstreetmap/josm/gui/oauth/AccessTokenInfoPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/AccessTokenInfoPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/AccessTokenInfoPanel.java	(revision 8510)
@@ -34,5 +34,5 @@
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 0.0;
-        gc.insets = new Insets(0,0,3,3);
+        gc.insets = new Insets(0, 0, 3, 3);
         add(new JLabel(tr("Access Token Key:")), gc);
 
@@ -46,5 +46,5 @@
         gc.gridy = 1;
         gc.weightx = 0.0;
-        gc.insets = new Insets(0,0,3,3);
+        gc.insets = new Insets(0, 0, 3, 3);
         add(new JLabel(tr("Access Token Secret:")), gc);
 
Index: trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/AdvancedOAuthPropertiesPanel.java	(revision 8510)
@@ -53,5 +53,5 @@
     protected final void build() {
         setLayout(new GridBagLayout());
-        setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
+        setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
         GridBagConstraints gc = new GridBagConstraints();
 
@@ -59,5 +59,5 @@
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 1.0;
-        gc.insets = new Insets(0,0, 3, 3);
+        gc.insets = new Insets(0, 0, 3, 3);
         gc.gridwidth = 2;
         cbUseDefaults = new JCheckBox(tr("Use default settings"));
@@ -177,5 +177,5 @@
     }
 
-    protected void setChildComponentsEnabled(boolean enabled){
+    protected void setChildComponentsEnabled(boolean enabled) {
         for (Component c: getComponents()) {
             if (c instanceof JosmTextField || c instanceof JLabel) {
Index: trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java	(revision 8510)
@@ -86,5 +86,5 @@
         VerticallyScrollablePanel pnl = new VerticallyScrollablePanel(new GridBagLayout());
         GridBagConstraints gc = new GridBagConstraints();
-        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
 
         gc.anchor = GridBagConstraints.NORTHWEST;
@@ -93,7 +93,8 @@
         gc.gridwidth = 2;
         HtmlPanel pnlMessage = new HtmlPanel();
-        HTMLEditorKit kit = (HTMLEditorKit)pnlMessage.getEditorPane().getEditorKit();
+        HTMLEditorKit kit = (HTMLEditorKit) pnlMessage.getEditorPane().getEditorKit();
         kit.getStyleSheet().addRule(
-                ".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
+                ".warning-body {background-color:rgb(253,255,221);padding: 10pt; " +
+                "border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
         kit.getStyleSheet().addRule("ol {margin-left: 1cm}");
         pnlMessage.setText("<html><body><p class=\"warning-body\">"
@@ -111,5 +112,5 @@
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 0.0;
-        gc.insets = new Insets(0,0,3,3);
+        gc.insets = new Insets(0, 0, 3, 3);
         pnl.add(new JLabel(tr("Username: ")), gc);
 
@@ -143,7 +144,8 @@
         gc.gridwidth = 2;
         pnlMessage = new HtmlPanel();
-        kit = (HTMLEditorKit)pnlMessage.getEditorPane().getEditorKit();
+        kit = (HTMLEditorKit) pnlMessage.getEditorPane().getEditorKit();
         kit.getStyleSheet().addRule(
-                ".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
+                ".warning-body {background-color:rgb(253,255,221);padding: 10pt; " +
+                "border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
         kit.getStyleSheet().addRule("ol {margin-left: 1cm}");
         pnlMessage.setText("<html><body>"
@@ -197,5 +199,5 @@
                 tfPassword.setText(pa.getPassword() == null ? "" : String.valueOf(pa.getPassword()));
             }
-        } catch(CredentialsAgentException e) {
+        } catch (CredentialsAgentException e) {
             Main.error(e);
             tfUserName.setText("");
@@ -212,5 +214,5 @@
         JPanel pnl = new JPanel(new FlowLayout(FlowLayout.LEFT));
 
-        RunAuthorisationAction runAuthorisationAction= new RunAuthorisationAction();
+        RunAuthorisationAction runAuthorisationAction = new RunAuthorisationAction();
         tfPassword.getDocument().addDocumentListener(runAuthorisationAction);
         tfUserName.getDocument().addDocumentListener(runAuthorisationAction);
@@ -227,5 +229,5 @@
         JPanel pnl = new JPanel(new GridBagLayout());
         GridBagConstraints gc = new GridBagConstraints();
-        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
 
         // the message panel
@@ -240,10 +242,10 @@
                 + "Click on <strong>{0}</strong> to accept the token. JOSM will use it in "
                 + "subsequent requests to gain access to the OSM API."
-                + "</html>",lbl));
+                + "</html>", lbl));
         pnl.add(msg, gc);
 
         // infos about the access token
         gc.gridy = 1;
-        gc.insets = new Insets(5,0,0,0);
+        gc.insets = new Insets(5, 0, 0, 0);
         pnl.add(pnlAccessTokenInfo = new AccessTokenInfoPanel(), gc);
 
@@ -495,5 +497,5 @@
             try {
                 loginUrl = authClient.buildOsmLoginUrl();
-            } catch(OsmOAuthAuthorizationException e1) {
+            } catch (OsmOAuthAuthorizationException e1) {
                 alertInvalidLoginUrl();
                 return;
@@ -520,5 +522,5 @@
                 public void run() {
                     if (e instanceof OsmLoginFailedException) {
-                        alertLoginFailed((OsmLoginFailedException)e);
+                        alertLoginFailed((OsmLoginFailedException) e);
                     } else {
                         alertAuthorisationFailed(e);
@@ -541,5 +543,5 @@
                 );
                 getProgressMonitor().worked(1);
-                if (canceled)return;
+                if (canceled) return;
                 authClient.authorise(
                         requestToken,
@@ -550,10 +552,10 @@
                 );
                 getProgressMonitor().worked(1);
-                if (canceled)return;
+                if (canceled) return;
                 final OAuthToken accessToken = authClient.getAccessToken(
-                        getProgressMonitor().createSubTaskMonitor(1,false)
+                        getProgressMonitor().createSubTaskMonitor(1, false)
                 );
                 getProgressMonitor().worked(1);
-                if (canceled)return;
+                if (canceled) return;
                 GuiHelper.runInEDT(new Runnable() {
                     @Override
@@ -563,5 +565,5 @@
                     }
                 });
-            } catch(final OsmOAuthAuthorizationException e) {
+            } catch (final OsmOAuthAuthorizationException e) {
                 handleException(e);
             }
Index: trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java	(revision 8510)
@@ -30,5 +30,5 @@
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 0.0;
-        gc.insets = new Insets(0,0,3,3);
+        gc.insets = new Insets(0, 0, 3, 3);
         pnl.add(new JLabel(tr("Username: ")), gc);
 
@@ -61,5 +61,5 @@
         setLayout(new GridBagLayout());
         GridBagConstraints gc = new GridBagConstraints();
-        setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
+        setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
 
         gc.anchor = GridBagConstraints.NORTHWEST;
Index: trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUI.java	(revision 8510)
@@ -50,5 +50,5 @@
     protected JPanel buildAccessTokenPanel() {
         JPanel pnl = new JPanel(new GridBagLayout());
-        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         GridBagConstraints gc = new GridBagConstraints();
         AccessTokenBuilder accessTokenBuilder = new AccessTokenBuilder();
@@ -59,5 +59,5 @@
         gc.weightx = 0.0;
         gc.gridwidth = 2;
-        gc.insets = new Insets(0,0,5,0);
+        gc.insets = new Insets(0, 0, 5, 0);
         pnlMessage = new HtmlPanel();
         pnlMessage.setText("<html><body>"
@@ -71,5 +71,5 @@
         gc.weightx = 0.0;
         gc.gridwidth = 1;
-        gc.insets = new Insets(0,0,0,3);
+        gc.insets = new Insets(0, 0, 0, 3);
         pnl.add(new JLabel(tr("Access Token Key:")), gc);
 
@@ -99,5 +99,5 @@
         gc.gridy = 3;
         gc.gridx = 0;
-        gc.gridwidth =2;
+        gc.gridwidth = 2;
         gc.weightx = 1.0;
         pnl.add(cbSaveToPreferences = new JCheckBox(tr("Save Access Token in preferences")), gc);
@@ -107,5 +107,5 @@
         gc.gridy = 3;
         gc.gridx = 0;
-        gc.gridwidth =2;
+        gc.gridwidth = 2;
         gc.weightx = 1.0;
         gc.weighty = 1.0;
@@ -155,5 +155,5 @@
     protected final void build() {
         setLayout(new BorderLayout());
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         add(buildTabbedPreferencesPanel(), BorderLayout.CENTER);
         add(buildActionsPanel(), BorderLayout.SOUTH);
@@ -225,4 +225,5 @@
             }
         }
+
         @Override
         public void changedUpdate(DocumentEvent e) {
Index: trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java	(revision 8510)
@@ -71,5 +71,5 @@
      * @return panel with buttons
      */
-    protected JPanel buildButtonRow(){
+    protected JPanel buildButtonRow() {
         JPanel pnl = new JPanel(new FlowLayout(FlowLayout.CENTER));
 
@@ -93,5 +93,5 @@
     protected JPanel buildHeaderInfoPanel() {
         JPanel pnl = new JPanel(new GridBagLayout());
-        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         GridBagConstraints gc = new GridBagConstraints();
 
@@ -109,5 +109,5 @@
         // OAuth in a nutshell ...
         gc.gridy  = 1;
-        gc.insets = new Insets(5,0,0,5);
+        gc.insets = new Insets(5, 0, 0, 5);
         HtmlPanel pnlMessage = new HtmlPanel();
         pnlMessage.setText("<html><body>"
@@ -125,10 +125,10 @@
         lbl = new JLabel(tr("Please select an authorization procedure: "));
         lbl.setFont(lbl.getFont().deriveFont(Font.PLAIN));
-        pnl.add(lbl,gc);
+        pnl.add(lbl, gc);
 
         gc.gridx = 1;
         gc.gridwidth = 1;
         gc.weightx = 1.0;
-        pnl.add(cbAuthorisationProcedure = new AuthorizationProcedureComboBox(),gc);
+        pnl.add(cbAuthorisationProcedure = new AuthorizationProcedureComboBox(), gc);
         cbAuthorisationProcedure.addItemListener(new AuthorisationProcedureChangeListener());
         lbl.setLabelFor(cbAuthorisationProcedure);
@@ -141,5 +141,5 @@
      */
     protected void refreshAuthorisationProcedurePanel() {
-        AuthorizationProcedure procedure = (AuthorizationProcedure)cbAuthorisationProcedure.getSelectedItem();
+        AuthorizationProcedure procedure = (AuthorizationProcedure) cbAuthorisationProcedure.getSelectedItem();
         switch(procedure) {
         case FULLY_AUTOMATIC:
@@ -189,4 +189,5 @@
                     @Override
                     public void componentResized(ComponentEvent e) {}
+
                     @Override
                     public void componentMoved(ComponentEvent e) {}
@@ -239,5 +240,5 @@
 
     protected AbstractAuthorizationUI getCurrentAuthorisationUI() {
-        switch((AuthorizationProcedure)cbAuthorisationProcedure.getSelectedItem()) {
+        switch((AuthorizationProcedure) cbAuthorisationProcedure.getSelectedItem()) {
         case FULLY_AUTOMATIC: return pnlFullyAutomaticAuthorisationUI;
         case MANUALLY: return pnlManualAuthorisationUI;
@@ -296,5 +297,5 @@
                     WindowGeometry.centerInWindow(
                             Main.parent,
-                            new Dimension(450,540)
+                            new Dimension(450, 540)
                     )
             ).applySafe(this);
@@ -365,5 +366,5 @@
             if (!evt.getPropertyName().equals(AbstractAuthorizationUI.ACCESS_TOKEN_PROP))
                 return;
-            updateEnabledState((OAuthToken)evt.getNewValue());
+            updateEnabledState((OAuthToken) evt.getNewValue());
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/oauth/OsmLoginFailedException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/OsmLoginFailedException.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/OsmLoginFailedException.java	(revision 8510)
@@ -2,5 +2,5 @@
 package org.openstreetmap.josm.gui.oauth;
 
-public class OsmLoginFailedException extends OsmOAuthAuthorizationException{
+public class OsmLoginFailedException extends OsmOAuthAuthorizationException {
 
     public OsmLoginFailedException() {
Index: trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 8510)
@@ -99,5 +99,5 @@
      */
     public void cancel() {
-        DefaultOAuthProvider p  = (DefaultOAuthProvider)provider;
+        DefaultOAuthProvider p  = (DefaultOAuthProvider) provider;
         canceled = true;
         if (p != null) {
@@ -105,5 +105,5 @@
                 Field f =  p.getClass().getDeclaredField("connection");
                 f.setAccessible(true);
-                HttpURLConnection con = (HttpURLConnection)f.get(p);
+                HttpURLConnection con = (HttpURLConnection) f.get(p);
                 if (con != null) {
                     con.disconnect();
@@ -114,5 +114,5 @@
             }
         }
-        synchronized(this) {
+        synchronized (this) {
             if (connection != null) {
                 connection.disconnect();
@@ -139,5 +139,5 @@
             provider.retrieveRequestToken(consumer, "");
             return OAuthToken.createToken(consumer);
-        } catch(OAuthException e){
+        } catch (OAuthException e) {
             if (canceled)
                 throw new OsmTransferCanceledException(e);
@@ -169,5 +169,5 @@
             provider.retrieveAccessToken(consumer, null);
             return OAuthToken.createToken(consumer);
-        } catch(OAuthException e){
+        } catch (OAuthException e) {
             if (canceled)
                 throw new OsmTransferCanceledException(e);
@@ -235,5 +235,5 @@
                     // osm session cookie found
                     String token = extractToken(connection);
-                    if(token == null)
+                    if (token == null)
                         return null;
                     SessionId si = new SessionId();
@@ -247,9 +247,9 @@
     }
 
-    protected String buildPostRequest(Map<String,String> parameters) throws OsmOAuthAuthorizationException {
+    protected String buildPostRequest(Map<String, String> parameters) throws OsmOAuthAuthorizationException {
         StringBuilder sb = new StringBuilder(32);
 
-        for(Iterator<Entry<String,String>> it = parameters.entrySet().iterator(); it.hasNext();) {
-            Entry<String,String> entry = it.next();
+        for (Iterator<Entry<String, String>> it = parameters.entrySet().iterator(); it.hasNext();) {
+            Entry<String, String> entry = it.next();
             String value = entry.getValue();
             value = (value == null) ? "" : value;
@@ -269,10 +269,10 @@
      * URLs are malformed
      */
-    public String buildOsmLoginUrl() throws OsmOAuthAuthorizationException{
+    public String buildOsmLoginUrl() throws OsmOAuthAuthorizationException {
         try {
             URL autUrl = new URL(oauthProviderParameters.getAuthoriseUrl());
             URL url = new URL(Main.pref.get("oauth.protocol", "https"), autUrl.getHost(), autUrl.getPort(), "/login");
             return url.toString();
-        } catch(MalformedURLException e) {
+        } catch (MalformedURLException e) {
             throw new OsmOAuthAuthorizationException(e);
         }
@@ -286,10 +286,10 @@
      * URLs are malformed
      */
-    protected String buildOsmLogoutUrl() throws OsmOAuthAuthorizationException{
+    protected String buildOsmLogoutUrl() throws OsmOAuthAuthorizationException {
         try {
             URL autUrl = new URL(oauthProviderParameters.getAuthoriseUrl());
             URL url = new URL("http", autUrl.getHost(), autUrl.getPort(), "/logout");
             return url.toString();
-        } catch(MalformedURLException e) {
+        } catch (MalformedURLException e) {
             throw new OsmOAuthAuthorizationException(e);
         }
@@ -308,5 +308,5 @@
             sb.append(buildOsmLoginUrl()).append("?cookie_test=true");
             URL url = new URL(sb.toString());
-            synchronized(this) {
+            synchronized (this) {
                 connection = Utils.openHttpConnection(url);
             }
@@ -319,8 +319,8 @@
                 throw new OsmOAuthAuthorizationException(tr("OSM website did not return a session cookie in response to ''{0}'',", url.toString()));
             return sessionId;
-        } catch(IOException e) {
-            throw new OsmOAuthAuthorizationException(e);
-        } finally {
-            synchronized(this) {
+        } catch (IOException e) {
+            throw new OsmOAuthAuthorizationException(e);
+        } finally {
+            synchronized (this) {
                 connection = null;
             }
@@ -337,5 +337,5 @@
         try {
             URL url = new URL(getAuthoriseUrl(requestToken));
-            synchronized(this) {
+            synchronized (this) {
                 connection = Utils.openHttpConnection(url);
             }
@@ -348,8 +348,8 @@
             if (sessionId.token == null)
                 throw new OsmOAuthAuthorizationException(tr("OSM website did not return a session cookie in response to ''{0}'',", url.toString()));
-        } catch(IOException e) {
-            throw new OsmOAuthAuthorizationException(e);
-        } finally {
-            synchronized(this) {
+        } catch (IOException e) {
+            throw new OsmOAuthAuthorizationException(e);
+        } finally {
+            synchronized (this) {
                 connection = null;
             }
@@ -360,5 +360,5 @@
         try {
             URL url = new URL(buildOsmLoginUrl());
-            synchronized(this) {
+            synchronized (this) {
                 connection = Utils.openHttpConnection(url);
             }
@@ -368,5 +368,5 @@
             connection.setUseCaches(false);
 
-            Map<String,String> parameters = new HashMap<>();
+            Map<String, String> parameters = new HashMap<>();
             parameters.put("username", userName);
             parameters.put("password", password);
@@ -397,10 +397,10 @@
             if (retCode != HttpURLConnection.HTTP_MOVED_TEMP)
                 throw new OsmOAuthAuthorizationException(tr("Failed to authenticate user ''{0}'' with password ''***'' as OAuth user", userName));
-        } catch(OsmOAuthAuthorizationException e) {
+        } catch (OsmOAuthAuthorizationException e) {
             throw new OsmLoginFailedException(e.getCause());
-        } catch(IOException e) {
+        } catch (IOException e) {
             throw new OsmLoginFailedException(e);
         } finally {
-            synchronized(this) {
+            synchronized (this) {
                 connection = null;
             }
@@ -411,5 +411,5 @@
         try {
             URL url = new URL(buildOsmLogoutUrl());
-            synchronized(this) {
+            synchronized (this) {
                 connection = Utils.openHttpConnection(url);
             }
@@ -418,8 +418,8 @@
             connection.setDoOutput(false);
             connection.connect();
-        } catch(IOException e) {
+        } catch (IOException e) {
             throw new OsmOAuthAuthorizationException(e);
         }  finally {
-            synchronized(this) {
+            synchronized (this) {
                 connection = null;
             }
@@ -458,5 +458,5 @@
         try {
             URL url = new URL(oauthProviderParameters.getAuthoriseUrl());
-            synchronized(this) {
+            synchronized (this) {
                 connection = Utils.openHttpConnection(url);
             }
@@ -483,5 +483,5 @@
             throw new OsmOAuthAuthorizationException(e);
         } finally {
-            synchronized(this) {
+            synchronized (this) {
                 connection = null;
             }
@@ -541,5 +541,5 @@
                 throw new OsmTransferCanceledException("Authorization canceled");
             monitor.worked(1);
-        } catch(OsmOAuthAuthorizationException e) {
+        } catch (OsmOAuthAuthorizationException e) {
             if (canceled)
                 throw new OsmTransferCanceledException(e);
Index: trunk/src/org/openstreetmap/josm/gui/oauth/OsmPrivilegesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/OsmPrivilegesPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/OsmPrivilegesPanel.java	(revision 8510)
@@ -27,5 +27,5 @@
         setLayout(new GridBagLayout());
         GridBagConstraints gc = new GridBagConstraints();
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
 
         // checkbox for "allow to upload map data"
@@ -34,5 +34,5 @@
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 1.0;
-        gc.insets = new Insets(0,0,3,3);
+        gc.insets = new Insets(0, 0, 3, 3);
         add(cbWriteApi = new JCheckBox(), gc);
         cbWriteApi.setText(tr("Allow to upload map data"));
Index: trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveAccessTokenTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveAccessTokenTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveAccessTokenTask.java	(revision 8510)
@@ -55,5 +55,5 @@
     protected void cancel() {
         canceled = true;
-        synchronized(this) {
+        synchronized (this) {
             if (client != null) {
                 client.cancel();
@@ -81,9 +81,9 @@
     protected void realRun() throws SAXException, IOException, OsmTransferException {
         try {
-            synchronized(this) {
+            synchronized (this) {
                 client = new OsmOAuthAuthorizationClient(parameters, requestToken);
             }
             accessToken = client.getAccessToken(getProgressMonitor().createSubTaskMonitor(0, false));
-        } catch(OsmTransferCanceledException e) {
+        } catch (OsmTransferCanceledException e) {
             return;
         } catch (OsmOAuthAuthorizationException e) {
@@ -92,5 +92,5 @@
             accessToken = null;
         } finally {
-            synchronized(this) {
+            synchronized (this) {
                 client = null;
             }
Index: trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveRequestTokenTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveRequestTokenTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveRequestTokenTask.java	(revision 8510)
@@ -49,5 +49,5 @@
     protected void cancel() {
         canceled = true;
-        synchronized(this) {
+        synchronized (this) {
             if (client != null) {
                 client.cancel();
@@ -75,9 +75,9 @@
     protected void realRun() throws SAXException, IOException, OsmTransferException {
         try {
-            synchronized(this) {
+            synchronized (this) {
                 client = new OsmOAuthAuthorizationClient(parameters);
             }
             requestToken = client.getRequestToken(getProgressMonitor().createSubTaskMonitor(0, false));
-        } catch(OsmTransferCanceledException e) {
+        } catch (OsmTransferCanceledException e) {
             return;
         } catch (OsmOAuthAuthorizationException e) {
@@ -86,5 +86,5 @@
             requestToken = null;
         } finally {
-            synchronized(this) {
+            synchronized (this) {
                 client = null;
             }
Index: trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java	(revision 8510)
@@ -53,5 +53,5 @@
     protected final void build() {
         setLayout(new BorderLayout());
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         pnlRetrieveRequestToken = new RetrieveRequestTokenPanel();
         pnlRetrieveAccessToken = new RetrieveAccessTokenPanel();
@@ -123,10 +123,10 @@
         protected JPanel buildAdvancedParametersPanel() {
             JPanel pnl = new JPanel(new GridBagLayout());
-            GridBagConstraints gc= new GridBagConstraints();
+            GridBagConstraints gc = new GridBagConstraints();
 
             gc.anchor = GridBagConstraints.NORTHWEST;
             gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 0.0;
-            gc.insets = new Insets(0,0,0,3);
+            gc.insets = new Insets(0, 0, 0, 3);
             JCheckBox cbShowAdvancedParameters = new JCheckBox();
             pnl.add(cbShowAdvancedParameters, gc);
@@ -149,5 +149,5 @@
             gc.gridy = 1;
             gc.gridx = 1;
-            gc.insets = new Insets(3,0,3,0);
+            gc.insets = new Insets(3, 0, 3, 0);
             gc.fill = GridBagConstraints.BOTH;
             gc.weightx = 1.0;
@@ -157,5 +157,5 @@
                     BorderFactory.createCompoundBorder(
                             BorderFactory.createLineBorder(Color.GRAY, 1),
-                            BorderFactory.createEmptyBorder(3,3,3,3)
+                            BorderFactory.createEmptyBorder(3, 3, 3, 3)
                     )
             );
@@ -166,5 +166,5 @@
         protected JPanel buildCommandPanel() {
             JPanel pnl = new JPanel(new GridBagLayout());
-            GridBagConstraints gc= new GridBagConstraints();
+            GridBagConstraints gc = new GridBagConstraints();
 
             gc.anchor = GridBagConstraints.NORTHWEST;
@@ -172,5 +172,5 @@
             gc.weightx = 1.0;
             gc.weighty = 1.0;
-            gc.insets = new Insets(0,0,0,3);
+            gc.insets = new Insets(0, 0, 0, 3);
 
 
@@ -193,6 +193,7 @@
 
         }
+
         protected final void build() {
-            setLayout(new BorderLayout(0,5));
+            setLayout(new BorderLayout(0, 5));
             JLabel lbl = new JLabel(tr("<html>Step 1/3: Retrieve an OAuth Request Token</html>"));
             lbl.setFont(lbl.getFont().deriveFont(16f));
@@ -229,5 +230,5 @@
             GridBagConstraints gc = new GridBagConstraints();
 
-            gc.anchor= GridBagConstraints.NORTHWEST;
+            gc.anchor = GridBagConstraints.NORTHWEST;
             gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 1.0;
@@ -320,5 +321,5 @@
             GridBagConstraints gc = new GridBagConstraints();
 
-            gc.anchor= GridBagConstraints.NORTHWEST;
+            gc.anchor = GridBagConstraints.NORTHWEST;
             gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 1.0;
Index: trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java	(revision 8510)
@@ -70,5 +70,5 @@
     protected void cancel() {
         canceled = true;
-        synchronized(this) {
+        synchronized (this) {
             if (connection != null) {
                 connection.disconnect();
@@ -80,5 +80,5 @@
     protected void finish() {}
 
-    protected void sign(HttpURLConnection con) throws OAuthException{
+    protected void sign(HttpURLConnection con) throws OAuthException {
         OAuthConsumer consumer = oauthParameters.buildConsumer();
         consumer.setTokenWithSecret(token.getKey(), token.getSecret());
@@ -91,5 +91,5 @@
 
         // remove trailing slashes
-        while(url.endsWith("/")) {
+        while (url.endsWith("/")) {
             url = url.substring(0, url.lastIndexOf('/'));
         }
@@ -103,5 +103,5 @@
             authenticatorEnabled = DefaultAuthenticator.getInstance().isEnabled();
             DefaultAuthenticator.getInstance().setEnabled(false);
-            synchronized(this) {
+            synchronized (this) {
                 connection = Utils.openHttpConnection(url);
             }
@@ -121,12 +121,12 @@
 
             if (connection.getResponseCode() != HttpURLConnection.HTTP_OK)
-                throw new OsmApiException(connection.getResponseCode(),connection.getHeaderField("Error"), null);
+                throw new OsmApiException(connection.getResponseCode(), connection.getHeaderField("Error"), null);
             Document d = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(connection.getInputStream());
             return OsmServerUserInfoReader.buildFromXML(d);
-        } catch(SAXException | ParserConfigurationException e) {
+        } catch (SAXException | ParserConfigurationException e) {
             throw new XmlParsingException(e);
-        } catch(IOException e) {
+        } catch (IOException e) {
             throw new OsmTransferException(e);
-        } catch(OAuthException e) {
+        } catch (OAuthException e) {
             throw new OsmOAuthAuthorizationException(e);
         } finally {
@@ -249,9 +249,9 @@
             if (canceled) return;
             notifySuccess(userInfo);
-        }catch(OsmOAuthAuthorizationException e) {
+        } catch (OsmOAuthAuthorizationException e) {
             if (canceled) return;
             Main.error(e);
             alertFailedSigning();
-        } catch(OsmApiException e) {
+        } catch (OsmApiException e) {
             if (canceled) return;
             Main.error(e);
@@ -267,5 +267,5 @@
             }
             alertFailedConnection();
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             if (canceled) return;
             Main.error(e);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/DefaultTabPreferenceSetting.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/DefaultTabPreferenceSetting.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/DefaultTabPreferenceSetting.java	(revision 8510)
@@ -20,5 +20,5 @@
     private final JTabbedPane tabpane;
     private final Map<SubPreferenceSetting, Component> subSettingMap;
-    
+
     /**
      * Constructs a new {@code DefaultTabPreferenceSetting}.
@@ -77,9 +77,9 @@
         return tabpane;
     }
-    
+
     protected final void createPreferenceTabWithScrollPane(PreferenceTabbedPane gui, JPanel panel) {
-        GBC a = GBC.eol().insets(-5,0,0,0);
+        GBC a = GBC.eol().insets(-5, 0, 0, 0);
         a.anchor = GBC.EAST;
-        
+
         JScrollPane scrollPane = new JScrollPane(panel);
         scrollPane.setBorder(null);
@@ -87,5 +87,5 @@
         JPanel tab = gui.createPreferenceTab(this);
         tab.add(scrollPane, GBC.eol().fill(GBC.BOTH));
-        tab.add(GBC.glue(0,10), a);
+        tab.add(GBC.glue(0, 10), a);
     }
 
@@ -106,10 +106,10 @@
         return false;
     }
-    
+
     @Override
     public final void addSubTab(SubPreferenceSetting sub, String title, Component component) {
         addSubTab(sub, title, component, null);
     }
-    
+
     @Override
     public final void addSubTab(SubPreferenceSetting sub, String title, Component component, String tip) {
@@ -119,5 +119,5 @@
         }
     }
-    
+
     @Override
     public final void registerSubTab(SubPreferenceSetting sub, Component component) {
@@ -126,5 +126,5 @@
         }
     }
-    
+
     @Override
     public final Component getSubTab(SubPreferenceSetting sub) {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java	(revision 8510)
@@ -54,9 +54,9 @@
 
         JPanel btns = new JPanel(new FlowLayout(FlowLayout.CENTER));
-        btns.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        btns.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         btns.add(new SideButton(new OKAction()));
         btns.add(new SideButton(new CancelAction()));
         btns.add(new SideButton(new ContextSensitiveHelpAction(HelpUtil.ht("/Action/Preferences"))));
-        pnl.add(expert, GBC.std().insets(5,0,0,0));
+        pnl.add(expert, GBC.std().insets(5, 0, 0, 0));
         pnl.add(btns, GBC.std().fill(GBC.HORIZONTAL));
         return pnl;
@@ -68,5 +68,5 @@
         c.add(tpPreferences = new PreferenceTabbedPane(), BorderLayout.CENTER);
         tpPreferences.buildGui();
-        tpPreferences.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        tpPreferences.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         c.add(buildActionPanel(), BorderLayout.SOUTH);
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 8510)
@@ -193,4 +193,5 @@
     private static interface PreferenceTab {
         public TabPreferenceSetting getTabPreferenceSetting();
+
         public Component getComponent();
     }
@@ -207,10 +208,10 @@
 
         protected void buildPanel() {
-            setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
-            add(new JLabel(preferenceSetting.getTitle()), GBC.eol().insets(0,5,0,10).anchor(GBC.NORTHWEST));
+            setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+            add(new JLabel(preferenceSetting.getTitle()), GBC.eol().insets(0, 5, 0, 10).anchor(GBC.NORTHWEST));
 
             JLabel descLabel = new JLabel("<html>"+preferenceSetting.getDescription()+"</html>");
             descLabel.setFont(descLabel.getFont().deriveFont(Font.ITALIC));
-            add(descLabel, GBC.eol().insets(5,0,5,20).fill(GBC.HORIZONTAL));
+            add(descLabel, GBC.eol().insets(5, 0, 5, 20).fill(GBC.HORIZONTAL));
         }
 
@@ -303,5 +304,5 @@
 
     private void selectTabBy(TabIdentifier method, Object param) {
-        for (int i=0; i<getTabCount(); i++) {
+        for (int i = 0; i < getTabCount(); i++) {
             Component c = getComponentAt(i);
             if (c instanceof PreferenceTab) {
@@ -316,5 +317,5 @@
 
     public void selectTabByName(String name) {
-        selectTabBy(new TabIdentifier(){
+        selectTabBy(new TabIdentifier() {
             @Override
             public boolean identify(TabPreferenceSetting tps, Object name) {
@@ -324,5 +325,5 @@
 
     public void selectTabByPref(Class<? extends TabPreferenceSetting> clazz) {
-        selectTabBy(new TabIdentifier(){
+        selectTabBy(new TabIdentifier() {
             @Override
             public boolean identify(TabPreferenceSetting tps, Object clazz) {
@@ -336,5 +337,5 @@
                 final SubPreferenceSetting sub = (SubPreferenceSetting) setting;
                 final TabPreferenceSetting tab = sub.getTabPreferenceSetting(PreferenceTabbedPane.this);
-                selectTabBy(new TabIdentifier(){
+                selectTabBy(new TabIdentifier() {
                     @Override
                     public boolean identify(TabPreferenceSetting tps, Object unused) {
@@ -539,5 +540,5 @@
         for (PreferenceSetting setting:settings) {
             if (clazz.isAssignableFrom(setting.getClass()))
-                return (T)setting;
+                return (T) setting;
         }
         return null;
@@ -577,5 +578,5 @@
     public void mouseWheelMoved(MouseWheelEvent wev) {
         // Ensure the cursor is over the tab strip
-        if(super.indexAtLocation(wev.getPoint().x, wev.getPoint().y) < 0)
+        if (super.indexAtLocation(wev.getPoint().x, wev.getPoint().y) < 0)
             return;
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 8510)
@@ -211,5 +211,5 @@
         RemoveActiveSourcesAction removeActiveSourcesAction = new RemoveActiveSourcesAction();
         tblActiveSources.getSelectionModel().addListSelectionListener(removeActiveSourcesAction);
-        tblActiveSources.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE,0), "delete");
+        tblActiveSources.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "delete");
         tblActiveSources.getActionMap().put("delete", removeActiveSourcesAction);
 
@@ -327,8 +327,5 @@
         add(bottomRightTB, gbc);
 
-        /***
-         * Icon configuration
-         **/
-
+        // Icon configuration
         if (handleIcons) {
             buildIcons(gbc);
@@ -353,5 +350,5 @@
         RemoveIconPathAction removeIconPathAction = new RemoveIconPathAction();
         tblIconPaths.getSelectionModel().addListSelectionListener(removeIconPathAction);
-        tblIconPaths.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE,0), "delete");
+        tblIconPaths.getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), "delete");
         tblIconPaths.getActionMap().put("delete", removeIconPathAction);
 
@@ -494,6 +491,6 @@
         public void deleteSelected() {
             Iterator<ExtendedSourceEntry> it = data.iterator();
-            int i=0;
-            while(it.hasNext()) {
+            int i = 0;
+            while (it.hasNext()) {
                 it.next();
                 if (selectionModel.isSelectedIndex(i)) {
@@ -507,5 +504,5 @@
         public List<ExtendedSourceEntry> getSelected() {
             List<ExtendedSourceEntry> ret = new ArrayList<>();
-            for(int i=0; i<data.size();i++) {
+            for (int i = 0; i < data.size(); i++) {
                 if (selectionModel.isSelectedIndex(i)) {
                     ret.add(data.get(i));
@@ -586,6 +583,6 @@
         public void removeSelected() {
             Iterator<SourceEntry> it = data.iterator();
-            int i=0;
-            while(it.hasNext()) {
+            int i = 0;
+            while (it.hasNext()) {
                 it.next();
                 if (selectionModel.isSelectedIndex(i)) {
@@ -599,5 +596,5 @@
         public void removeIdxs(Collection<Integer> idxs) {
             List<SourceEntry> newData = new ArrayList<>();
-            for (int i=0; i<data.size(); ++i) {
+            for (int i = 0; i < data.size(); ++i) {
                 if (!idxs.contains(i)) {
                     newData.add(data.get(i));
@@ -617,5 +614,5 @@
             for (ExtendedSourceEntry info: sources) {
                 int pos = data.indexOf(info);
-                if (pos >=0) {
+                if (pos >= 0) {
                     selectionModel.addSelectionInterval(pos, pos);
                 }
@@ -725,5 +722,5 @@
         try {
             sourceUrl = new URL(url);
-        } catch(MalformedURLException e) {
+        } catch (MalformedURLException e) {
             File f = new File(url);
             if (f.isFile()) {
@@ -788,8 +785,10 @@
                     updateOkButtonState();
                 }
+
                 @Override
                 public void removeUpdate(DocumentEvent e) {
                     updateOkButtonState();
                 }
+
                 @Override
                 public void changedUpdate(DocumentEvent e) {
@@ -958,4 +957,5 @@
     class MoveUpDownAction extends AbstractAction implements ListSelectionListener, TableModelListener {
         private final int increment;
+
         public MoveUpDownAction(boolean isDown) {
             increment = isDown ? 1 : -1;
@@ -1054,4 +1054,5 @@
         private final String url;
         private final transient List<SourceProvider> sourceProviders;
+
         public ReloadSourcesAction(String url, List<SourceProvider> sourceProviders) {
             putValue(NAME, tr("Reload"));
@@ -1101,10 +1102,10 @@
         @Override
         public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
-            updatePath(rowIndex, (String)aValue);
+            updatePath(rowIndex, (String) aValue);
         }
 
         public void setIconPaths(Collection<String> paths) {
             data.clear();
-            if (paths !=null) {
+            if (paths != null) {
                 data.addAll(paths);
             }
@@ -1138,6 +1139,6 @@
         public void removeSelected() {
             Iterator<String> it = data.iterator();
-            int i=0;
-            while(it.hasNext()) {
+            int i = 0;
+            while (it.hasNext()) {
                 it.next();
                 if (selectionModel.isSelectedIndex(i)) {
@@ -1181,5 +1182,5 @@
         public void actionPerformed(ActionEvent e) {
             iconPathsModel.addPath("");
-            tblIconPaths.editCellAt(iconPathsModel.getRowCount() -1,0);
+            tblIconPaths.editCellAt(iconPathsModel.getRowCount() -1, 0);
         }
     }
@@ -1500,5 +1501,5 @@
         public boolean isCellEditable(EventObject anEvent) {
             if (anEvent instanceof MouseEvent)
-                return ((MouseEvent)anEvent).getClickCount() >= 2;
+                return ((MouseEvent) anEvent).getClickCount() >= 2;
                 return true;
         }
@@ -1532,5 +1533,5 @@
         @Override
         public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
-            setInitialValue((String)value);
+            setInitialValue((String) value);
             tfFileName.selectAll();
             return this;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 8510)
@@ -113,5 +113,5 @@
 
         public String getDisplayTooltip() {
-            if(!name.isEmpty())
+            if (!name.isEmpty())
                 return name;
 
@@ -124,8 +124,8 @@
 
         public Icon getDisplayIcon() {
-            if(ico != null)
+            if (ico != null)
                 return ico;
             Object o = action.getValue(Action.LARGE_ICON_KEY);
-            if(o == null)
+            if (o == null)
                 o = action.getValue(Action.SMALL_ICON);
             return (Icon) o;
@@ -156,5 +156,5 @@
             if (!(getAction() instanceof ParameterizedAction)) return false;
             for (Object o: parameters.values()) {
-                if (o!=null) return true;
+                if (o != null) return true;
             }
             return false;
@@ -208,5 +208,5 @@
                 skip('(');
 
-                ParameterizedAction parametrizedAction = (ParameterizedAction)action;
+                ParameterizedAction parametrizedAction = (ParameterizedAction) action;
                 Map<String, ActionParameter<?>> actionParams = new ConcurrentHashMap<>();
                 for (ActionParameter<?> param: parametrizedAction.getActionParameters()) {
@@ -217,5 +217,5 @@
                     String paramName = readTillChar('=', '=');
                     skip('=');
-                    String paramValue = readTillChar(',',')');
+                    String paramValue = readTillChar(',', ')');
                     if (!paramName.isEmpty() && !paramValue.isEmpty()) {
                         ActionParameter<?> actionParam = actionParams.get(paramName);
@@ -234,8 +234,8 @@
                     String paramName = readTillChar('=', '=');
                     skip('=');
-                    String paramValue = readTillChar(',','}');
+                    String paramValue = readTillChar(',', '}');
                     if ("icon".equals(paramName) && !paramValue.isEmpty()) {
                         result.setIcon(paramValue);
-                    } else if("name".equals(paramName) && !paramValue.isEmpty()) {
+                    } else if ("name".equals(paramName) && !paramValue.isEmpty()) {
                         result.setName(paramValue);
                     }
@@ -249,5 +249,5 @@
 
         private void escape(String s) {
-            for (int i=0; i<s.length(); i++) {
+            for (int i = 0; i < s.length(); i++) {
                 char ch = s.charAt(i);
                 if (ch == '\\' || ch == '(' || ch == '{' || ch == ',' || ch == ')' || ch == '}' || ch == '=') {
@@ -265,12 +265,12 @@
 
             String val = (String) action.getAction().getValue("toolbar");
-            if(val == null)
+            if (val == null)
                 return null;
             escape(val);
             if (action.getAction() instanceof ParameterizedAction) {
                 result.append('(');
-                List<ActionParameter<?>> params = ((ParameterizedAction)action.getAction()).getActionParameters();
-                for (int i=0; i<params.size(); i++) {
-                    ActionParameter<Object> param = (ActionParameter<Object>)params.get(i);
+                List<ActionParameter<?>> params = ((ParameterizedAction) action.getAction()).getActionParameters();
+                for (int i = 0; i < params.size(); i++) {
+                    ActionParameter<Object> param = (ActionParameter<Object>) params.get(i);
                     escape(param.getName());
                     result.append('=');
@@ -302,5 +302,5 @@
                     first = false;
                 }
-                if(!first) {
+                if (!first) {
                     result.append('}');
             }
@@ -325,5 +325,5 @@
             if (currentAction.isSeparator() || !(currentAction.getAction() instanceof ParameterizedAction))
                 return adaptable;
-            ParameterizedAction pa = (ParameterizedAction)currentAction.getAction();
+            ParameterizedAction pa = (ParameterizedAction) currentAction.getAction();
             return pa.getActionParameters().size() + adaptable;
         }
@@ -331,5 +331,5 @@
         @SuppressWarnings("unchecked")
         private ActionParameter<Object> getParam(int index) {
-            ParameterizedAction pa = (ParameterizedAction)currentAction.getAction();
+            ParameterizedAction pa = (ParameterizedAction) currentAction.getAction();
             return (ActionParameter<Object>) pa.getActionParameters().get(index);
         }
@@ -337,5 +337,5 @@
         @Override
         public Object getValueAt(int rowIndex, int columnIndex) {
-            if(currentAction.getAction() instanceof AdaptableAction) {
+            if (currentAction.getAction() instanceof AdaptableAction) {
                 if (rowIndex < 2) {
                     switch (columnIndex) {
@@ -372,5 +372,5 @@
             int paramIndex = rowIndex;
 
-            if(currentAction.getAction() instanceof AdaptableAction) {
+            if (currentAction.getAction() instanceof AdaptableAction) {
                 if (rowIndex == 0) {
                      currentAction.setName(val);
@@ -386,5 +386,5 @@
 
             if (param != null && !val.isEmpty()) {
-                currentAction.getParameters().put(param.getName(), param.readFromString((String)aValue));
+                currentAction.getParameters().put(param.getName(), param.readFromString((String) aValue));
             }
         }
@@ -402,6 +402,6 @@
             this.act = action;
             doNotHide.setSelected(Main.pref.getBoolean("toolbar.always-visible", true));
-            remove.setVisible(act!=null);
-            shortcutEdit.setVisible(act!=null);
+            remove.setVisible(act != null);
+            shortcutEdit.setVisible(act != null);
         }
 
@@ -423,21 +423,21 @@
             @Override
             public void actionPerformed(ActionEvent e) {
-                    final PreferenceDialog p =new PreferenceDialog(Main.parent);
-                    p.selectPreferencesTabByName("toolbar");
-                    p.setVisible(true);
-                }
-            });
+                final PreferenceDialog p = new PreferenceDialog(Main.parent);
+                p.selectPreferencesTabByName("toolbar");
+                p.setVisible(true);
+            }
+        });
 
         private JMenuItem shortcutEdit = new JMenuItem(new AbstractAction(tr("Edit shortcut")) {
             @Override
             public void actionPerformed(ActionEvent e) {
-                    final PreferenceDialog p =new PreferenceDialog(Main.parent);
+                final PreferenceDialog p = new PreferenceDialog(Main.parent);
                 p.getTabbedPane().getShortcutPreference().setDefaultFilter(act.getDisplayName());
-                    p.selectPreferencesTabByName("shortcuts");
-                    p.setVisible(true);
+                p.selectPreferencesTabByName("shortcuts");
+                p.setVisible(true);
                 // refresh toolbar to try using changed shortcuts without restart
-                    Main.toolbar.refreshToolbarControl();
-                }
-            });
+                Main.toolbar.refreshToolbarControl();
+            }
+        });
 
         private JCheckBoxMenuItem doNotHide = new JCheckBoxMenuItem(new AbstractAction(tr("Do not hide toolbar and menu")) {
@@ -447,6 +447,7 @@
                 Main.pref.put("toolbar.always-visible", sel);
                 Main.pref.put("menu.always-visible", sel);
-        }
+            }
         });
+
         {
             addPopupMenuListener(new PopupMenuListener() {
@@ -454,7 +455,8 @@
                 public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
                     setActionAndAdapt(buttonActions.get(
-                            ((JPopupMenu)e.getSource()).getInvoker()
+                            ((JPopupMenu) e.getSource()).getInvoker()
                     ));
                 }
+
                 @Override
                 public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {}
@@ -496,5 +498,5 @@
             protected Transferable createTransferable(JComponent c) {
                 List<ActionDefinition> actions = new ArrayList<>();
-                for (ActionDefinition o: ((JList<ActionDefinition>)c).getSelectedValuesList()) {
+                for (ActionDefinition o: ((JList<ActionDefinition>) c).getSelectedValuesList()) {
                     actions.add(o);
                 }
@@ -609,5 +611,5 @@
                             selected.add(leadItem++, ActionDefinition.getSeparator());
                         } else if (node.getUserObject() instanceof Action) {
-                            selected.add(leadItem++, new ActionDefinition((Action)node.getUserObject()));
+                            selected.add(leadItem++, new ActionDefinition((Action) node.getUserObject()));
                         }
                     }
@@ -744,5 +746,5 @@
                         s = tr("Separator");
                     }
-                    JLabel l = (JLabel)def.getListCellRendererComponent(list, s, index, isSelected, cellHasFocus);
+                    JLabel l = (JLabel) def.getListCellRendererComponent(list, s, index, isSelected, cellHasFocus);
                     l.setIcon(i);
                     return l;
@@ -750,5 +752,5 @@
             };
             selectedList.setCellRenderer(renderer);
-            selectedList.addListSelectionListener(new ListSelectionListener(){
+            selectedList.addListSelectionListener(new ListSelectionListener() {
                 @Override
                 public void valueChanged(ListSelectionEvent e) {
@@ -806,5 +808,5 @@
             right.add(new JScrollPane(actionsTree), GBC.eol().fill(GBC.BOTH));
 
-            final JPanel buttons = new JPanel(new GridLayout(6,1));
+            final JPanel buttons = new JPanel(new GridLayout(6, 1));
             buttons.add(upButton = createButton("up"));
             buttons.add(addButton = createButton("<"));
@@ -814,9 +816,11 @@
 
             final JPanel p = new JPanel();
-            p.setLayout(new LayoutManager(){
+            p.setLayout(new LayoutManager() {
                 @Override
                 public void addLayoutComponent(String name, Component comp) {}
+
                 @Override
                 public void removeLayoutComponent(Component comp) {}
+
                 @Override
                 public Dimension minimumLayoutSize(Container parent) {
@@ -824,12 +828,14 @@
                     Dimension r = right.getMinimumSize();
                     Dimension b = buttons.getMinimumSize();
-                    return new Dimension(l.width+b.width+10+r.width,l.height+b.height+10+r.height);
-                }
+                    return new Dimension(l.width+b.width+10+r.width, l.height+b.height+10+r.height);
+                }
+
                 @Override
                 public Dimension preferredLayoutSize(Container parent) {
                     Dimension l = new Dimension(200, 200);
                     Dimension r = new Dimension(200, 200);
-                    return new Dimension(l.width+r.width+10+buttons.getPreferredSize().width,Math.max(l.height, r.height));
-                }
+                    return new Dimension(l.width+r.width+10+buttons.getPreferredSize().width, Math.max(l.height, r.height));
+                }
+
                 @Override
                 public void layoutContainer(Container parent) {
@@ -837,6 +843,6 @@
                     Dimension b = buttons.getPreferredSize();
                     int width = (d.width-10-b.width)/2;
-                    left.setBounds(new Rectangle(0,0,width,d.height));
-                    right.setBounds(new Rectangle(width+10+b.width,0,width,d.height));
+                    left.setBounds(new Rectangle(0, 0, width, d.height));
+                    right.setBounds(new Rectangle(width+10+b.width, 0, width, d.height));
                     buttons.setBounds(new Rectangle(width+5, d.height/2-b.height/2, b.width, b.height));
                 }
@@ -873,5 +879,5 @@
                 } else {
                     String res = parser.saveAction(action);
-                    if(res != null) {
+                    if (res != null) {
                         t.add(res);
                 }
@@ -905,15 +911,15 @@
         for (MenuElement item : menuElement.getSubElements()) {
             if (item instanceof JMenuItem) {
-                JMenuItem menuItem = (JMenuItem)item;
+                JMenuItem menuItem = (JMenuItem) item;
                 if (menuItem.getAction() != null) {
                     Action action = menuItem.getAction();
                     userObject = action;
                     Object tb = action.getValue("toolbar");
-                    if(tb == null) {
+                    if (tb == null) {
                         Main.info(tr("Toolbar action without name: {0}",
                         action.getClass().getName()));
                         continue;
                     } else if (!(tb instanceof String)) {
-                        if(!(tb instanceof Boolean) || (Boolean)tb) {
+                        if (!(tb instanceof Boolean) || (Boolean) tb) {
                             Main.info(tr("Strange toolbar value: {0}",
                             action.getClass().getName()));
@@ -923,5 +929,5 @@
                         String toolbar = (String) tb;
                         Action r = actions.get(toolbar);
-                        if(r != null && r != action && !toolbar.startsWith("imagery_")) {
+                        if (r != null && r != action && !toolbar.startsWith("imagery_")) {
                             Main.info(tr("Toolbar action {0} overwritten: {1} gets {2}",
                             toolbar, r.getClass().getName(), action.getClass().getName()));
@@ -941,5 +947,5 @@
     public Action getAction(String s) {
         Action e = actions.get(s);
-        if(e == null) {
+        if (e == null) {
             e = regactions.get(s);
         }
@@ -990,5 +996,5 @@
             } else {
                 ActionDefinition a = actionParser.loadAction(s);
-                if(a != null) {
+                if (a != null) {
                     result.add(a);
                 } else {
@@ -1031,5 +1037,5 @@
         control.removeAll();
         buttonActions.clear();
-        boolean unregisterTab = Shortcut.findShortcut(KeyEvent.VK_TAB, 0)!=null;
+        boolean unregisterTab = Shortcut.findShortcut(KeyEvent.VK_TAB, 0) != null;
 
         for (ActionDefinition action : getDefinedActions()) {
@@ -1077,5 +1083,5 @@
             t.remove(definitionText);
         } else {
-            if (preferredIndex>=0 && preferredIndex < t.size()) {
+            if (preferredIndex >= 0 && preferredIndex < t.size()) {
                 t.add(preferredIndex, definitionText); // add to specified place
             } else {
@@ -1105,17 +1111,17 @@
 
         String tt = action.getDisplayTooltip();
-        if (tt==null) {
-            tt="";
+        if (tt == null) {
+            tt = "";
         }
 
         if (sc == null || paramCode != 0) {
             String name = (String) action.getAction().getValue("toolbar");
-            if (name==null) {
-                name=action.getDisplayName();
-            }
-            if (paramCode!=0) {
+            if (name == null) {
+                name = action.getDisplayName();
+            }
+            if (paramCode != 0) {
                 name = name+paramCode;
             }
-            String desc = action.getDisplayName() + ((paramCode==0)?"":action.parameters.toString());
+            String desc = action.getDisplayName() + ((paramCode == 0) ? "" : action.parameters.toString());
             sc = Shortcut.registerShortcut("toolbar:"+name, tr("Toolbar: {0}", desc),
                 KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
@@ -1126,5 +1132,5 @@
             if (sc.isAssignedUser()) {
                 if (tt.startsWith("<html>") && tt.endsWith("</html>")) {
-                    tt = tt.substring(6,tt.length()-6);
+                    tt = tt.substring(6, tt.length()-6);
                 }
                 tt = Main.platform.makeTooltip(tt, sc);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 8510)
@@ -90,14 +90,20 @@
         p.add(lbFilter);
         p.add(txtFilter, GBC.eol().fill(GBC.HORIZONTAL));
-        txtFilter.getDocument().addDocumentListener(new DocumentListener(){
-            @Override public void changedUpdate(DocumentEvent e) {
+        txtFilter.getDocument().addDocumentListener(new DocumentListener() {
+            @Override
+            public void changedUpdate(DocumentEvent e) {
                 action();
             }
-            @Override public void insertUpdate(DocumentEvent e) {
+
+            @Override
+            public void insertUpdate(DocumentEvent e) {
                 action();
             }
-            @Override public void removeUpdate(DocumentEvent e) {
+
+            @Override
+            public void removeUpdate(DocumentEvent e) {
                 action();
             }
+
             private void action() {
                 applyFilter();
@@ -110,13 +116,13 @@
         JScrollPane scroll = new JScrollPane(table);
         p.add(scroll, GBC.eol().fill(GBC.BOTH));
-        scroll.setPreferredSize(new Dimension(400,200));
+        scroll.setPreferredSize(new Dimension(400, 200));
 
         JButton add = new JButton(tr("Add"));
         p.add(Box.createHorizontalGlue(), GBC.std().fill(GBC.HORIZONTAL));
-        p.add(add, GBC.std().insets(0,5,0,0));
-        add.addActionListener(new ActionListener(){
+        p.add(add, GBC.std().insets(0, 5, 0, 0));
+        add.addActionListener(new ActionListener() {
             @Override public void actionPerformed(ActionEvent e) {
                 PrefEntry pe = table.addPreference(gui);
-                if (pe!=null) {
+                if (pe != null) {
                     allData.add(pe);
                     Collections.sort(allData);
@@ -127,6 +133,6 @@
 
         JButton edit = new JButton(tr("Edit"));
-        p.add(edit, GBC.std().insets(5,5,5,0));
-        edit.addActionListener(new ActionListener(){
+        p.add(edit, GBC.std().insets(5, 5, 5, 0));
+        edit.addActionListener(new ActionListener() {
             @Override public void actionPerformed(ActionEvent e) {
                 boolean ok = table.editPreference(gui);
@@ -136,6 +142,6 @@
 
         JButton reset = new JButton(tr("Reset"));
-        p.add(reset, GBC.std().insets(0,5,0,0));
-        reset.addActionListener(new ActionListener(){
+        p.add(reset, GBC.std().insets(0, 5, 0, 0));
+        reset.addActionListener(new ActionListener() {
             @Override public void actionPerformed(ActionEvent e) {
                 table.resetPreferences(gui);
@@ -144,6 +150,6 @@
 
         JButton read = new JButton(tr("Read from file"));
-        p.add(read, GBC.std().insets(5,5,0,0));
-        read.addActionListener(new ActionListener(){
+        p.add(read, GBC.std().insets(5, 5, 0, 0));
+        read.addActionListener(new ActionListener() {
             @Override public void actionPerformed(ActionEvent e) {
                 readPreferencesFromXML();
@@ -152,6 +158,6 @@
 
         JButton export = new JButton(tr("Export selected items"));
-        p.add(export, GBC.std().insets(5,5,0,0));
-        export.addActionListener(new ActionListener(){
+        p.add(export, GBC.std().insets(5, 5, 0, 0));
+        export.addActionListener(new ActionListener() {
             @Override public void actionPerformed(ActionEvent e) {
                 exportSelectedToXML();
@@ -160,5 +166,5 @@
 
         final JButton more = new JButton(tr("More..."));
-        p.add(more, GBC.std().insets(5,5,0,0));
+        p.add(more, GBC.std().insets(5, 5, 0, 0));
         more.addActionListener(new ActionListener() {
             private JPopupMenu menu = buildPopupMenu();
@@ -180,5 +186,5 @@
             // so we do not want to show it in the table as "changed" now
             Setting<?> pluginSetting = orig.get("plugins");
-            if (pluginSetting!=null) {
+            if (pluginSetting != null) {
                 loaded.put("plugins", pluginSetting);
             }
@@ -195,4 +201,5 @@
                 return f.isDirectory() || Utils.hasExtension(f, "xml");
             }
+
             @Override
             public String getDescription() {
@@ -204,5 +211,5 @@
         if (fc != null) {
             File[] sel = fc.isMultiSelectionEnabled() ? fc.getSelectedFiles() : (new File[]{fc.getSelectedFile()});
-            if (sel.length==1 && !sel[0].getName().contains(".")) sel[0]=new File(sel[0].getAbsolutePath()+".xml");
+            if (sel.length == 1 && !sel[0].getName().contains(".")) sel[0] = new File(sel[0].getAbsolutePath()+".xml");
             return sel;
         }
@@ -314,5 +321,5 @@
     }
 
-    private Map<String,String> profileTypes = new LinkedHashMap<>();
+    private Map<String, String> profileTypes = new LinkedHashMap<>();
 
     private JPopupMenu buildPopupMenu() {
@@ -323,5 +330,5 @@
         profileTypes.put(marktr("imagery"), "imagery.*");
 
-        for (Entry<String,String> e: profileTypes.entrySet()) {
+        for (Entry<String, String> e: profileTypes.entrySet()) {
             menu.add(new ExportProfileAction(Main.pref, e.getKey(), e.getValue()));
         }
@@ -354,5 +361,5 @@
 
     private JMenu getProfileMenu() {
-        final JMenu p =new JMenu(tr("Load profile"));
+        final JMenu p = new JMenu(tr("Load profile"));
         p.addMenuListener(new MenuListener() {
             @Override
@@ -364,6 +371,6 @@
                        String s = f.getName();
                        int idx = s.indexOf('_');
-                       if (idx>=0) {
-                            String t=s.substring(0,idx);
+                       if (idx >= 0) {
+                            String t = s.substring(0, idx);
                             if (profileTypes.containsKey(t)) {
                                 p.add(new ImportProfileAction(s, f, t));
@@ -377,6 +384,6 @@
                        String s = f.getName();
                        int idx = s.indexOf('_');
-                       if (idx>=0) {
-                            String t=s.substring(0,idx);
+                       if (idx >= 0) {
+                            String t = s.substring(0, idx);
                             if (profileTypes.containsKey(t)) {
                                 p.add(new ImportProfileAction(s, f, t));
@@ -386,8 +393,10 @@
                 }
             }
+
             @Override
             public void menuDeselected(MenuEvent me) {
                 // Not implemented
             }
+
             @Override
             public void menuCanceled(MenuEvent me) {
@@ -450,5 +459,5 @@
             }
         }
-        if (table!=null) table.fireDataChanged();
+        if (table != null) table.fireDataChanged();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java	(revision 8510)
@@ -57,5 +57,5 @@
         }
         File f = askUserForCustomSettingsFile();
-        if (f!=null)
+        if (f != null)
            CustomConfigurator.exportPreferencesKeysToFile(f.getAbsolutePath(), false, keys);
     }
@@ -69,4 +69,5 @@
                 return f.isDirectory() || Utils.hasExtension(f, "xml") && f.getName().toLowerCase(Locale.ENGLISH).startsWith(schemaKey);
             }
+
             @Override
             public String getDescription() {
@@ -78,5 +79,5 @@
         if (fc != null) {
             File sel = fc.getSelectedFile();
-            if (!sel.getName().endsWith(".xml")) sel=new File(sel.getAbsolutePath()+".xml");
+            if (!sel.getName().endsWith(".xml")) sel = new File(sel.getAbsolutePath()+".xml");
             if (!sel.getName().startsWith(schemaKey)) {
                 sel = new File(sel.getParentFile().getAbsolutePath()+"/"+schemaKey+"_"+sel.getName());
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListEditor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListEditor.java	(revision 8510)
@@ -66,5 +66,5 @@
     protected final JPanel build() {
         JPanel p = new JPanel(new GridBagLayout());
-        p.add(new JLabel(tr("Key: {0}", entry.getKey())), GBC.eol().insets(0,0,5,0));
+        p.add(new JLabel(tr("Key: {0}", entry.getKey())), GBC.eol().insets(0, 0, 5, 0));
         ListSettingTableModel listModel = new ListSettingTableModel();
         JTable table = new JTable(listModel);
@@ -77,5 +77,5 @@
 
         JScrollPane pane = new JScrollPane(table);
-        p.add(pane, GBC.eol().insets(5,10,0,0).fill());
+        p.add(pane, GBC.eol().insets(5, 10, 0, 0).fill());
         return p;
     }
@@ -104,6 +104,6 @@
         @Override
         public void setValueAt(Object o, int row, int column) {
-            String s = (String)o;
-            if(row == data.size()) {
+            String s = (String) o;
+            if (row == data.size()) {
                 data.add(s);
                 fireTableRowsInserted(row+1, row+1);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListListEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListListEditor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ListListEditor.java	(revision 8510)
@@ -77,5 +77,5 @@
     protected final JPanel build() {
         JPanel p = new JPanel(new GridBagLayout());
-        p.add(new JLabel(tr("Key: {0}", entry.getKey())), GBC.std(0,0).span(2).weight(1, 0).insets(0,0,5,10));
+        p.add(new JLabel(tr("Key: {0}", entry.getKey())), GBC.std(0, 0).span(2).weight(1, 0).insets(0, 0, 5, 10));
 
         JPanel left = new JPanel(new GridBagLayout());
@@ -98,5 +98,5 @@
         left.setPreferredSize(new Dimension(80, 0));
 
-        p.add(left, GBC.std(0,1).fill().weight(0.3, 1.0));
+        p.add(left, GBC.std(0, 1).fill().weight(0.3, 1.0));
 
         tableModel = new ListTableModel();
@@ -111,5 +111,5 @@
         JScrollPane pane = new JScrollPane(table);
         pane.setPreferredSize(new Dimension(140, 0));
-        p.add(pane, GBC.std(1,1).insets(5,0,0,0).fill().weight(0.7, 1.0));
+        p.add(pane, GBC.std(1, 1).insets(5, 0, 0, 0).fill().weight(0.7, 1.0));
         return p;
     }
@@ -216,5 +216,5 @@
         @Override
         public void setValueAt(Object o, int row, int column) {
-            String s = (String)o;
+            String s = (String) o;
             if (row == data().size()) {
                 data().add(s);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/MapListEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/MapListEditor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/MapListEditor.java	(revision 8510)
@@ -81,9 +81,9 @@
      * @return the preference data
      */
-    public List<Map<String,String>> getData() {
-        List<Map<String,String>> data = new ArrayList<>();
-        for (int i=0; i < dataKeys.size(); ++i) {
-            Map<String,String> m = new LinkedHashMap<>();
-            for (int j=0; j < dataKeys.get(i).size(); ++j) {
+    public List<Map<String, String>> getData() {
+        List<Map<String, String>> data = new ArrayList<>();
+        for (int i = 0; i < dataKeys.size(); ++i) {
+            Map<String, String> m = new LinkedHashMap<>();
+            for (int j = 0; j < dataKeys.get(i).size(); ++j) {
                 m.put(dataKeys.get(i).get(j), dataValues.get(i).get(j));
             }
@@ -95,5 +95,5 @@
     protected final JPanel build() {
         JPanel p = new JPanel(new GridBagLayout());
-        p.add(new JLabel(tr("Key: {0}", entry.getKey())), GBC.std(0,0).span(2).weight(1, 0).insets(0,0,5,10));
+        p.add(new JLabel(tr("Key: {0}", entry.getKey())), GBC.std(0, 0).span(2).weight(1, 0).insets(0, 0, 5, 10));
 
         JPanel left = new JPanel(new GridBagLayout());
@@ -116,5 +116,5 @@
         left.setPreferredSize(new Dimension(80, 0));
 
-        p.add(left, GBC.std(0,1).fill().weight(0.3, 1.0));
+        p.add(left, GBC.std(0, 1).fill().weight(0.3, 1.0));
 
         tableModel = new MapTableModel();
@@ -129,5 +129,5 @@
         JScrollPane pane = new JScrollPane(table);
         pane.setPreferredSize(new Dimension(140, 0));
-        p.add(pane, GBC.std(1,1).insets(5,0,0,0).fill().weight(0.7, 1.0));
+        p.add(pane, GBC.std(1, 1).insets(5, 0, 0, 0).fill().weight(0.7, 1.0));
         return p;
     }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java	(revision 8510)
@@ -153,9 +153,9 @@
     public PrefEntry addPreference(final JComponent gui) {
         JPanel p = new JPanel(new GridBagLayout());
-        p.add(new JLabel(tr("Key")), GBC.std().insets(0,0,5,0));
+        p.add(new JLabel(tr("Key")), GBC.std().insets(0, 0, 5, 0));
         JosmTextField tkey = new JosmTextField("", 50);
-        p.add(tkey, GBC.eop().insets(5,0,0,0).fill(GBC.HORIZONTAL));
-
-        p.add(new JLabel(tr("Select Setting Type:")), GBC.eol().insets(5,15,5,0));
+        p.add(tkey, GBC.eop().insets(5, 0, 0, 0).fill(GBC.HORIZONTAL));
+
+        p.add(new JLabel(tr("Select Setting Type:")), GBC.eol().insets(5, 15, 5, 0));
 
         JRadioButton rbString = new JRadioButton(tr("Simple"));
@@ -301,9 +301,9 @@
         private Color changedColor = Main.pref.getColor(
                          marktr("Advanced Background: Changed"),
-                         new Color(200,255,200));
+                         new Color(200, 255, 200));
         private Color foregroundColor = Main.pref.getUIColor("Table.foreground");
         private Color nonDefaultColor = Main.pref.getColor(
                             marktr("Advanced Background: NonDefault"),
-                            new Color(255,255,200));
+                            new Color(255, 255, 200));
 
         @Override
@@ -316,5 +316,5 @@
             String display = val != null ? val.toString() : "<html><i>&lt;"+tr("unset")+"&gt;</i></html>";
 
-            JLabel label = (JLabel)super.getTableCellRendererComponent(table,
+            JLabel label = (JLabel) super.getTableCellRendererComponent(table,
                     display, isSelected, hasFocus, row, column);
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/StringEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/StringEditor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/StringEditor.java	(revision 8510)
@@ -44,9 +44,9 @@
     protected final JPanel build(String orig) {
         JPanel p = new JPanel(new GridBagLayout());
-        p.add(new JLabel(tr("Key: {0}", entry.getKey())), GBC.eol().insets(0,0,5,0));
+        p.add(new JLabel(tr("Key: {0}", entry.getKey())), GBC.eol().insets(0, 0, 5, 0));
 
         p.add(new JLabel(tr("Value: ")), GBC.std());
         tvalue = new JosmTextField(orig, 50);
-        p.add(tvalue, GBC.eop().insets(5,0,0,0).fill(GBC.HORIZONTAL));
+        p.add(tvalue, GBC.eop().insets(5, 0, 0, 0).fill(GBC.HORIZONTAL));
 
         return p;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/audio/AudioPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/audio/AudioPreference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/audio/AudioPreference.java	(revision 8510)
@@ -61,5 +61,5 @@
         audioMenuVisible.setSelected(!Main.pref.getBoolean("audio.menuinvisible"));
         audioMenuVisible.setToolTipText(tr("Show or hide the audio menu entry on the main menu bar."));
-        audio.add(audioMenuVisible, GBC.eol().insets(0,0,0,0));
+        audio.add(audioMenuVisible, GBC.eol().insets(0, 0, 0, 0));
 
         // audioTraceVisible
@@ -67,10 +67,10 @@
         markerAudioTraceVisible.setToolTipText(
                 tr("Display a moving icon representing the point on the synchronized track where the audio currently playing was recorded."));
-        audio.add(markerAudioTraceVisible, GBC.eol().insets(0,0,0,0));
+        audio.add(markerAudioTraceVisible, GBC.eol().insets(0, 0, 0, 0));
 
         // buttonLabels
         markerButtonLabels.setSelected(Main.pref.getBoolean("marker.buttonlabels", true));
         markerButtonLabels.setToolTipText(tr("Put text labels against audio (and image and web) markers as well as their button icons."));
-        audio.add(markerButtonLabels, GBC.eol().insets(0,0,0,0));
+        audio.add(markerButtonLabels, GBC.eol().insets(0, 0, 0, 0));
 
         audio.add(new JLabel(tr("When importing audio, make markers from...")), GBC.eol());
@@ -79,10 +79,10 @@
         audioMarkersFromExplicitWaypoints.setSelected(Main.pref.getBoolean("marker.audiofromexplicitwaypoints", true));
         audioMarkersFromExplicitWaypoints.setToolTipText(tr("When importing audio, apply it to any waypoints in the GPX layer."));
-        audio.add(audioMarkersFromExplicitWaypoints, GBC.eol().insets(10,0,0,0));
+        audio.add(audioMarkersFromExplicitWaypoints, GBC.eol().insets(10, 0, 0, 0));
 
         // audioMarkersFromUntimedWaypoints
         audioMarkersFromUntimedWaypoints.setSelected(Main.pref.getBoolean("marker.audiofromuntimedwaypoints", true));
         audioMarkersFromUntimedWaypoints.setToolTipText(tr("When importing audio, apply it to any waypoints in the GPX layer."));
-        audio.add(audioMarkersFromUntimedWaypoints, GBC.eol().insets(10,0,0,0));
+        audio.add(audioMarkersFromUntimedWaypoints, GBC.eol().insets(10, 0, 0, 0));
 
         // audioMarkersFromNamedTrackpoints
@@ -90,5 +90,5 @@
         audioMarkersFromNamedTrackpoints.setToolTipText(
                 tr("Automatically create audio markers from trackpoints (rather than explicit waypoints) with names or descriptions."));
-        audio.add(audioMarkersFromNamedTrackpoints, GBC.eol().insets(10,0,0,0));
+        audio.add(audioMarkersFromNamedTrackpoints, GBC.eol().insets(10, 0, 0, 0));
 
         // audioMarkersFromWavTimestamps
@@ -96,5 +96,5 @@
         audioMarkersFromWavTimestamps.setToolTipText(
                 tr("Create audio markers at the position on the track corresponding to the modified time of each audio WAV file imported."));
-        audio.add(audioMarkersFromWavTimestamps, GBC.eol().insets(10,0,0,0));
+        audio.add(audioMarkersFromWavTimestamps, GBC.eol().insets(10, 0, 0, 0));
 
         // audioMarkersFromStart
@@ -102,15 +102,15 @@
         audioMarkersFromStart.setToolTipText(
                 tr("Automatically create audio markers from trackpoints (rather than explicit waypoints) with names or descriptions."));
-        audio.add(audioMarkersFromStart, GBC.eol().insets(10,0,0,0));
+        audio.add(audioMarkersFromStart, GBC.eol().insets(10, 0, 0, 0));
 
         audioForwardBackAmount.setText(Main.pref.get("audio.forwardbackamount", "10.0"));
         audioForwardBackAmount.setToolTipText(tr("The number of seconds to jump forward or back when the relevant button is pressed"));
         audio.add(new JLabel(tr("Forward/back time (seconds)")), GBC.std());
-        audio.add(audioForwardBackAmount, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+        audio.add(audioForwardBackAmount, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 5));
 
         audioFastForwardMultiplier.setText(Main.pref.get("audio.fastfwdmultiplier", "1.3"));
         audioFastForwardMultiplier.setToolTipText(tr("The amount by which the speed is multiplied for fast forwarding"));
         audio.add(new JLabel(tr("Fast forward multiplier")), GBC.std());
-        audio.add(audioFastForwardMultiplier, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+        audio.add(audioFastForwardMultiplier, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 5));
 
         audioLeadIn.setText(Main.pref.get("audio.leadin", "1.0"));
@@ -118,10 +118,10 @@
                 tr("Playback starts this number of seconds before (or after, if negative) the audio track position requested"));
         audio.add(new JLabel(tr("Lead-in time (seconds)")), GBC.std());
-        audio.add(audioLeadIn, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+        audio.add(audioLeadIn, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 5));
 
         audioCalibration.setText(Main.pref.get("audio.calibration", "1.0"));
         audioCalibration.setToolTipText(tr("The ratio of voice recorder elapsed time to true elapsed time"));
         audio.add(new JLabel(tr("Voice recorder calibration")), GBC.std());
-        audio.add(audioCalibration, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+        audio.add(audioCalibration, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 5));
 
         audio.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.VERTICAL));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/ColorPreference.java	(revision 8510)
@@ -135,7 +135,7 @@
         String value;
         Map<String, String> colorMap = new HashMap<>();
-        for(int row = 0; row < tableModel.getRowCount(); ++row) {
-            key = (String)tableModel.getValueAt(row, 0);
-            value = ColorHelper.color2html((Color)tableModel.getValueAt(row, 1));
+        for (int row = 0; row < tableModel.getRowCount(); ++row) {
+            key = (String) tableModel.getValueAt(row, 0);
+            value = ColorHelper.color2html((Color) tableModel.getValueAt(row, 1));
             colorMap.put(key, value);
         }
@@ -153,12 +153,12 @@
 
         colorEdit = new JButton(tr("Choose"));
-        colorEdit.addActionListener(new ActionListener(){
+        colorEdit.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
                 int sel = colors.getSelectedRow();
-                JColorChooser chooser = new JColorChooser((Color)colors.getValueAt(sel, 1));
+                JColorChooser chooser = new JColorChooser((Color) colors.getValueAt(sel, 1));
                 int answer = JOptionPane.showConfirmDialog(
                         gui, chooser,
-                        tr("Choose a color for {0}", getName((String)colors.getValueAt(sel, 0))),
+                        tr("Choose a color for {0}", getName((String) colors.getValueAt(sel, 0))),
                         JOptionPane.OK_CANCEL_OPTION,
                         JOptionPane.PLAIN_MESSAGE);
@@ -169,9 +169,9 @@
         });
         defaultSet = new JButton(tr("Set to default"));
-        defaultSet.addActionListener(new ActionListener(){
+        defaultSet.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
                 int sel = colors.getSelectedRow();
-                String name = (String)colors.getValueAt(sel, 0);
+                String name = (String) colors.getValueAt(sel, 0);
                 Color c = Main.pref.getDefaultColor(name);
                 if (c != null) {
@@ -181,9 +181,9 @@
         });
         JButton defaultAll = new JButton(tr("Set all to default"));
-        defaultAll.addActionListener(new ActionListener(){
+        defaultAll.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
-                for(int i = 0; i < colors.getRowCount(); ++i) {
-                    String name = (String)colors.getValueAt(i, 0);
+                for (int i = 0; i < colors.getRowCount(); ++i) {
+                    String name = (String) colors.getValueAt(i, 0);
                     Color c = Main.pref.getDefaultColor(name);
                     if (c != null) {
@@ -194,9 +194,9 @@
         });
         remove = new JButton(tr("Remove"));
-        remove.addActionListener(new ActionListener(){
+        remove.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
                 int sel = colors.getSelectedRow();
-                del.add((String)colors.getValueAt(sel, 0));
+                del.add((String) colors.getValueAt(sel, 0));
                 tableModel.removeRow(sel);
             }
@@ -211,4 +211,5 @@
                 return false;
             }
+
             @Override public void valueChanged(ListSelectionEvent e) {
                 super.valueChanged(e);
@@ -221,5 +222,5 @@
         colors.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
         final TableCellRenderer oldColorsRenderer = colors.getDefaultRenderer(Object.class);
-        colors.setDefaultRenderer(Object.class, new TableCellRenderer(){
+        colors.setDefaultRenderer(Object.class, new TableCellRenderer() {
             @Override
             public Component getTableCellRendererComponent(JTable t, Object o, boolean selected, boolean focus, int row, int column) {
@@ -227,33 +228,33 @@
                     return new JLabel();
                 if (column == 1) {
-                    JLabel l = new JLabel(ColorHelper.color2html((Color)o));
-                    l.setBackground((Color)o);
+                    JLabel l = new JLabel(ColorHelper.color2html((Color) o));
+                    l.setBackground((Color) o);
                     l.setOpaque(true);
                     return l;
                 }
-                return oldColorsRenderer.getTableCellRendererComponent(t,getName(o.toString()),selected,focus,row,column);
+                return oldColorsRenderer.getTableCellRendererComponent(t, getName(o.toString()), selected, focus, row, column);
             }
         });
         colors.getColumnModel().getColumn(1).setWidth(100);
         colors.setToolTipText(tr("Colors used by different objects in JOSM."));
-        colors.setPreferredScrollableViewportSize(new Dimension(100,112));
+        colors.setPreferredScrollableViewportSize(new Dimension(100, 112));
 
         JPanel panel = new JPanel(new GridBagLayout());
-        panel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         JScrollPane scrollpane = new JScrollPane(colors);
         scrollpane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
         panel.add(scrollpane, GBC.eol().fill(GBC.BOTH));
         JPanel buttonPanel = new JPanel(new GridBagLayout());
-        panel.add(buttonPanel, GBC.eol().insets(5,0,5,5).fill(GBC.HORIZONTAL));
+        panel.add(buttonPanel, GBC.eol().insets(5, 0, 5, 5).fill(GBC.HORIZONTAL));
         buttonPanel.add(Box.createHorizontalGlue(), GBC.std().fill(GBC.HORIZONTAL));
-        buttonPanel.add(colorEdit, GBC.std().insets(0,5,0,0));
-        buttonPanel.add(defaultSet, GBC.std().insets(5,5,5,0));
-        buttonPanel.add(defaultAll, GBC.std().insets(0,5,0,0));
-        buttonPanel.add(remove, GBC.std().insets(0,5,0,0));
+        buttonPanel.add(colorEdit, GBC.std().insets(0, 5, 0, 0));
+        buttonPanel.add(defaultSet, GBC.std().insets(5, 5, 5, 0));
+        buttonPanel.add(defaultAll, GBC.std().insets(0, 5, 0, 0));
+        buttonPanel.add(remove, GBC.std().insets(0, 5, 0, 0));
         gui.getDisplayPreference().addSubTab(this, tr("Colors"), panel);
     }
 
     Boolean isRemoveColor(int row) {
-        return ((String)colors.getValueAt(row, 0)).startsWith("layer ");
+        return ((String) colors.getValueAt(row, 0)).startsWith("layer ");
     }
 
@@ -277,11 +278,11 @@
     public boolean ok() {
         boolean ret = false;
-        for(String d : del) {
+        for (String d : del) {
             Main.pref.put("color."+d, null);
         }
         for (int i = 0; i < colors.getRowCount(); ++i) {
-            String key = (String)colors.getValueAt(i, 0);
-            if(Main.pref.putColor(key, (Color)colors.getValueAt(i, 1))) {
-                if(key.startsWith("mappaint.")) {
+            String key = (String) colors.getValueAt(i, 0);
+            if (Main.pref.putColor(key, (Color) colors.getValueAt(i, 1))) {
+                if (key.startsWith("mappaint.")) {
                     ret = true;
                 }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java	(revision 8510)
@@ -66,13 +66,13 @@
         gui.getDisplayPreference().addSubTab(this, tr("GPS Points"), scrollpane);
         panel = new JPanel(new GridBagLayout());
-        panel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
 
         // directionHint
-        directionHint.addActionListener(new ActionListener(){
+        directionHint.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
-                if (directionHint.isSelected()){
+                if (directionHint.isSelected()) {
                     headArrow.setSelected(Main.pref.getBoolean("draw.segment.head_only", false));
-                }else{
+                } else {
                     headArrow.setSelected(false);
                 }
@@ -134,26 +134,26 @@
 
         panel.add(new JLabel(tr("Segment drawing options")),
-                GBC.eop().insets(5,10,0,0));
-        panel.add(directionHint, GBC.eop().insets(20,0,0,0));
+                GBC.eop().insets(5, 10, 0, 0));
+        panel.add(directionHint, GBC.eop().insets(20, 0, 0, 0));
         panel.add(headArrow, GBC.eop().insets(40, 0, 0, 0));
-        panel.add(onewayArrow, GBC.eop().insets(20,0,0,0));
-        panel.add(segmentOrderNumber, GBC.eop().insets(20,0,0,0));
+        panel.add(onewayArrow, GBC.eop().insets(20, 0, 0, 0));
+        panel.add(segmentOrderNumber, GBC.eop().insets(20, 0, 0, 0));
 
         panel.add(new JLabel(tr("Select and draw mode options")),
-                GBC.eop().insets(5,10,0,0));
-        panel.add(virtualNodes, GBC.eop().insets(20,0,0,0));
+                GBC.eop().insets(5, 10, 0, 0));
+        panel.add(virtualNodes, GBC.eop().insets(20, 0, 0, 0));
         panel.add(drawHelperLine, GBC.eop().insets(20, 0, 0, 0));
 
-        panel.add(performanceLabel, GBC.eop().insets(5,10,0,0));
-        panel.add(useAntialiasing, GBC.eop().insets(20,0,0,0));
+        panel.add(performanceLabel, GBC.eop().insets(5, 10, 0, 0));
+        panel.add(useAntialiasing, GBC.eop().insets(20, 0, 0, 0));
         panel.add(useWireframeAntialiasing, GBC.eop().insets(20, 0, 0, 0));
-        panel.add(useHighlighting, GBC.eop().insets(20,0,0,0));
-        panel.add(outlineOnly, GBC.eol().insets(20,0,0,0));
+        panel.add(useHighlighting, GBC.eop().insets(20, 0, 0, 0));
+        panel.add(outlineOnly, GBC.eol().insets(20, 0, 0, 0));
 
         panel.add(new JLabel(tr("Other options")),
-                GBC.eop().insets(5,10,0,0));
-        panel.add(sourceBounds, GBC.eop().insets(20,0,0,0));
-        panel.add(inactive, GBC.eop().insets(20,0,0,0));
-        panel.add(discardableKeys, GBC.eop().insets(20,0,0,0));
+                GBC.eop().insets(5, 10, 0, 0));
+        panel.add(sourceBounds, GBC.eop().insets(20, 0, 0, 0));
+        panel.add(inactive, GBC.eop().insets(20, 0, 0, 0));
+        panel.add(discardableKeys, GBC.eop().insets(20, 0, 0, 0));
 
         ExpertToggleAction.addVisibilitySwitcher(performanceLabel);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java	(revision 8510)
@@ -85,6 +85,6 @@
     public GPXSettingsPanel(String layerName, boolean local, boolean nonlocal) {
         super(new GridBagLayout());
-        this.local=local;
-        this.nonlocal=nonlocal;
+        this.local = local;
+        this.nonlocal = nonlocal;
         this.layerName = "layer "+layerName;
         initComponents();
@@ -98,20 +98,20 @@
         super(new GridBagLayout());
         initComponents();
-        local=false;
-        nonlocal=false;
+        local = false;
+        nonlocal = false;
         loadPreferences(); // preferences -> controls
     }
 
     private void initComponents() {
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
 
         // makeAutoMarkers
         makeAutoMarkers.setToolTipText(tr("Automatically make a marker layer from any waypoints when opening a GPX layer."));
         ExpertToggleAction.addVisibilitySwitcher(makeAutoMarkers);
-        add(makeAutoMarkers, GBC.eol().insets(20,0,0,5));
+        add(makeAutoMarkers, GBC.eol().insets(20, 0, 0, 5));
 
         // drawRawGpsLines
         ButtonGroup gpsLinesGroup = new ButtonGroup();
-        if (layerName!=null) {
+        if (layerName != null) {
             gpsLinesGroup.add(drawRawGpsLinesGlobal);
         }
@@ -123,14 +123,14 @@
 
         JLabel label = new JLabel(tr("Draw lines between raw GPS points"));
-        add(label, GBC.eol().insets(20,0,0,0));
-        if (layerName!=null) {
-            add(drawRawGpsLinesGlobal, GBC.eol().insets(40,0,0,0));
-        }
-        add(drawRawGpsLinesNone, GBC.eol().insets(40,0,0,0));
-        if (layerName==null || local) {
-            add(drawRawGpsLinesLocal, GBC.eol().insets(40,0,0,0));
-        }
-        if (layerName==null || nonlocal) {
-            add(drawRawGpsLinesAll, GBC.eol().insets(40,0,0,0));
+        add(label, GBC.eol().insets(20, 0, 0, 0));
+        if (layerName != null) {
+            add(drawRawGpsLinesGlobal, GBC.eol().insets(40, 0, 0, 0));
+        }
+        add(drawRawGpsLinesNone, GBC.eol().insets(40, 0, 0, 0));
+        if (layerName == null || local) {
+            add(drawRawGpsLinesLocal, GBC.eol().insets(40, 0, 0, 0));
+        }
+        if (layerName == null || nonlocal) {
+            add(drawRawGpsLinesAll, GBC.eol().insets(40, 0, 0, 0));
         }
         ExpertToggleAction.addVisibilitySwitcher(label);
@@ -140,8 +140,8 @@
         ExpertToggleAction.addVisibilitySwitcher(drawRawGpsLinesAll);
 
-        drawRawGpsLinesActionListener = new ActionListener(){
+        drawRawGpsLinesActionListener = new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
-                boolean f=drawRawGpsLinesNone.isSelected()||drawRawGpsLinesGlobal.isSelected();
+                boolean f = drawRawGpsLinesNone.isSelected() || drawRawGpsLinesGlobal.isSelected();
                 forceRawGpsLines.setEnabled(!f);
                 drawRawGpsMaxLineLength.setEnabled(!(f || drawRawGpsLinesLocal.isSelected()));
@@ -161,6 +161,6 @@
         drawRawGpsMaxLineLengthLocal.setToolTipText(tr("Maximum length (in meters) to draw lines for local files. Set to ''-1'' to draw all lines."));
         label = new JLabel(tr("Maximum length for local files (meters)"));
-        add(label, GBC.std().insets(40,0,0,0));
-        add(drawRawGpsMaxLineLengthLocal, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+        add(label, GBC.std().insets(40, 0, 0, 0));
+        add(drawRawGpsMaxLineLengthLocal, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 5));
         ExpertToggleAction.addVisibilitySwitcher(label);
         ExpertToggleAction.addVisibilitySwitcher(drawRawGpsMaxLineLengthLocal);
@@ -169,6 +169,6 @@
         drawRawGpsMaxLineLength.setToolTipText(tr("Maximum length (in meters) to draw lines. Set to ''-1'' to draw all lines."));
         label = new JLabel(tr("Maximum length (meters)"));
-        add(label, GBC.std().insets(40,0,0,0));
-        add(drawRawGpsMaxLineLength, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+        add(label, GBC.std().insets(40, 0, 0, 0));
+        add(drawRawGpsMaxLineLength, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 5));
         ExpertToggleAction.addVisibilitySwitcher(label);
         ExpertToggleAction.addVisibilitySwitcher(drawRawGpsMaxLineLength);
@@ -176,9 +176,9 @@
         // forceRawGpsLines
         forceRawGpsLines.setToolTipText(tr("Force drawing of lines if the imported data contain no line information."));
-        add(forceRawGpsLines, GBC.eop().insets(40,0,0,0));
+        add(forceRawGpsLines, GBC.eop().insets(40, 0, 0, 0));
         ExpertToggleAction.addVisibilitySwitcher(forceRawGpsLines);
 
         // drawGpsArrows
-        drawGpsArrows.addActionListener(new ActionListener(){
+        drawGpsArrows.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
@@ -188,29 +188,29 @@
         });
         drawGpsArrows.setToolTipText(tr("Draw direction arrows for lines, connecting GPS points."));
-        add(drawGpsArrows, GBC.eop().insets(40,0,0,0));
+        add(drawGpsArrows, GBC.eop().insets(40, 0, 0, 0));
 
         // drawGpsArrowsFast
         drawGpsArrowsFast.setToolTipText(tr("Draw the direction arrows using table lookups instead of complex math."));
-        add(drawGpsArrowsFast, GBC.eop().insets(60,0,0,0));
+        add(drawGpsArrowsFast, GBC.eop().insets(60, 0, 0, 0));
         ExpertToggleAction.addVisibilitySwitcher(drawGpsArrowsFast);
 
         // drawGpsArrowsMinDist
         drawGpsArrowsMinDist.setToolTipText(tr("Do not draw arrows if they are not at least this distance away from the last one."));
-        add(new JLabel(tr("Minimum distance (pixels)")), GBC.std().insets(60,0,0,0));
-        add(drawGpsArrowsMinDist, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+        add(new JLabel(tr("Minimum distance (pixels)")), GBC.std().insets(60, 0, 0, 0));
+        add(drawGpsArrowsMinDist, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 5));
 
         // hdopCircleGpsPoints
         hdopCircleGpsPoints.setToolTipText(tr("Draw a circle from HDOP value."));
-        add(hdopCircleGpsPoints, GBC.eop().insets(20,0,0,0));
+        add(hdopCircleGpsPoints, GBC.eop().insets(20, 0, 0, 0));
         ExpertToggleAction.addVisibilitySwitcher(hdopCircleGpsPoints);
 
         // largeGpsPoints
         largeGpsPoints.setToolTipText(tr("Draw larger dots for the GPS points."));
-        add(largeGpsPoints, GBC.eop().insets(20,0,0,0));
+        add(largeGpsPoints, GBC.eop().insets(20, 0, 0, 0));
 
         // drawLineWidth
         drawLineWidth.setToolTipText(tr("Width of drawn GPX line (0 for default)"));
-        add(new JLabel(tr("Drawing width of GPX lines")), GBC.std().insets(20,0,0,0));
-        add(drawLineWidth, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+        add(new JLabel(tr("Drawing width of GPX lines")), GBC.std().insets(20, 0, 0, 0));
+        add(drawLineWidth, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 5));
 
         // antialiasing
@@ -221,5 +221,5 @@
         // colorTracks
         ButtonGroup colorGroup = new ButtonGroup();
-        if (layerName!=null) {
+        if (layerName != null) {
             colorGroup.add(colorTypeGlobal);
         }
@@ -230,5 +230,5 @@
         colorGroup.add(colorTypeTime);
 
-        colorTypeVelocity.addChangeListener(new ChangeListener(){
+        colorTypeVelocity.addChangeListener(new ChangeListener() {
             @Override
             public void stateChanged(ChangeEvent e) {
@@ -237,5 +237,5 @@
             }
         });
-        colorTypeDilution.addChangeListener(new ChangeListener(){
+        colorTypeDilution.addChangeListener(new ChangeListener() {
             @Override
             public void stateChanged(ChangeEvent e) {
@@ -256,19 +256,19 @@
         add(Box.createVerticalGlue(), GBC.eol().insets(0, 20, 0, 0));
 
-        add(new JLabel(tr("Track and Point Coloring")), GBC.eol().insets(20,0,0,0));
-        if (layerName!=null) {
-            add(colorTypeGlobal, GBC.eol().insets(40,0,0,0));
-        }
-        add(colorTypeNone, GBC.eol().insets(40,0,0,0));
-        add(colorTypeVelocity, GBC.std().insets(40,0,0,0));
-        add(colorTypeVelocityTune, GBC.eop().insets(5,0,0,5));
-        add(colorTypeDirection, GBC.eol().insets(40,0,0,0));
-        add(colorTypeDilution, GBC.eol().insets(40,0,0,0));
-        add(colorTypeTime, GBC.eol().insets(40,0,0,0));
+        add(new JLabel(tr("Track and Point Coloring")), GBC.eol().insets(20, 0, 0, 0));
+        if (layerName != null) {
+            add(colorTypeGlobal, GBC.eol().insets(40, 0, 0, 0));
+        }
+        add(colorTypeNone, GBC.eol().insets(40, 0, 0, 0));
+        add(colorTypeVelocity, GBC.std().insets(40, 0, 0, 0));
+        add(colorTypeVelocityTune, GBC.eop().insets(5, 0, 0, 5));
+        add(colorTypeDirection, GBC.eol().insets(40, 0, 0, 0));
+        add(colorTypeDilution, GBC.eol().insets(40, 0, 0, 0));
+        add(colorTypeTime, GBC.eol().insets(40, 0, 0, 0));
         ExpertToggleAction.addVisibilitySwitcher(colorTypeDirection);
         ExpertToggleAction.addVisibilitySwitcher(colorTypeDilution);
 
         colorDynamic.setToolTipText(tr("Colors points and track segments by data limits."));
-        add(colorDynamic, GBC.eop().insets(40,0,0,0));
+        add(colorDynamic, GBC.eop().insets(40, 0, 0, 0));
         ExpertToggleAction.addVisibilitySwitcher(colorDynamic);
 
@@ -279,7 +279,7 @@
             // waypointLabel
             label = new JLabel(tr("Waypoint labelling"));
-            add(label, GBC.std().insets(20,0,0,0));
+            add(label, GBC.std().insets(20, 0, 0, 0));
             label.setLabelFor(waypointLabel);
-            add(waypointLabel, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+            add(waypointLabel, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 5));
             waypointLabel.addActionListener(new ActionListener() {
                 @Override
@@ -289,5 +289,5 @@
             });
             updateWaypointLabelCombobox(waypointLabel, waypointLabelPattern, TemplateEntryProperty.forMarker(layerName));
-            add(waypointLabelPattern, GBC.eol().fill(GBC.HORIZONTAL).insets(20,0,0,5));
+            add(waypointLabelPattern, GBC.eol().fill(GBC.HORIZONTAL).insets(20, 0, 0, 5));
             ExpertToggleAction.addVisibilitySwitcher(label);
             ExpertToggleAction.addVisibilitySwitcher(waypointLabel);
@@ -300,7 +300,7 @@
 
             label = new JLabel(tr("Audio waypoint labelling"));
-            add(label, GBC.std().insets(20,0,0,0));
+            add(label, GBC.std().insets(20, 0, 0, 0));
             label.setLabelFor(audioWaypointLabel);
-            add(audioWaypointLabel, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+            add(audioWaypointLabel, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 5));
             audioWaypointLabel.addActionListener(new ActionListener() {
                 @Override
@@ -310,5 +310,5 @@
             });
             updateWaypointLabelCombobox(audioWaypointLabel, audioWaypointLabelPattern, TemplateEntryProperty.forAudioMarker(layerName));
-            add(audioWaypointLabelPattern, GBC.eol().fill(GBC.HORIZONTAL).insets(20,0,0,5));
+            add(audioWaypointLabelPattern, GBC.eol().fill(GBC.HORIZONTAL).insets(20, 0, 0, 5));
             ExpertToggleAction.addVisibilitySwitcher(label);
             ExpertToggleAction.addVisibilitySwitcher(audioWaypointLabel);
@@ -324,11 +324,11 @@
     public final void loadPreferences() {
         makeAutoMarkers.setSelected(Main.pref.getBoolean("marker.makeautomarkers", true));
-        if(layerName!=null && Main.pref.get("draw.rawgps.lines."+layerName).isEmpty()
-                && Main.pref.get("draw.rawgps.lines.local."+layerName).isEmpty()){
+        if (layerName != null && Main.pref.get("draw.rawgps.lines."+layerName).isEmpty()
+                && Main.pref.get("draw.rawgps.lines.local."+layerName).isEmpty()) {
             // no line preferences for layer is found
             drawRawGpsLinesGlobal.setSelected(true);
         } else {
-            Boolean lf = Main.pref.getBoolean("draw.rawgps.lines.local",layerName, true);
-            if(Main.pref.getBoolean("draw.rawgps.lines",layerName, true)) {
+            Boolean lf = Main.pref.getBoolean("draw.rawgps.lines.local", layerName, true);
+            if (Main.pref.getBoolean("draw.rawgps.lines", layerName, true)) {
                 drawRawGpsLinesAll.setSelected(true);
             } else if (lf) {
@@ -339,22 +339,22 @@
         }
 
-        drawRawGpsMaxLineLengthLocal.setText(Integer.toString(Main.pref.getInteger("draw.rawgps.max-line-length.local",layerName, -1)));
-        drawRawGpsMaxLineLength.setText(Integer.toString(Main.pref.getInteger("draw.rawgps.max-line-length",layerName, 200)));
-        drawLineWidth.setText(Integer.toString(Main.pref.getInteger("draw.rawgps.linewidth",layerName, 0)));
-        forceRawGpsLines.setSelected(Main.pref.getBoolean("draw.rawgps.lines.force",layerName, false));
-        drawGpsArrows.setSelected(Main.pref.getBoolean("draw.rawgps.direction",layerName, false));
-        drawGpsArrowsFast.setSelected(Main.pref.getBoolean("draw.rawgps.alternatedirection",layerName, false));
-        drawGpsArrowsMinDist.setText(Integer.toString(Main.pref.getInteger("draw.rawgps.min-arrow-distance",layerName, 40)));
-        hdopCircleGpsPoints.setSelected(Main.pref.getBoolean("draw.rawgps.hdopcircle",layerName, false));
-        largeGpsPoints.setSelected(Main.pref.getBoolean("draw.rawgps.large",layerName, false));
+        drawRawGpsMaxLineLengthLocal.setText(Integer.toString(Main.pref.getInteger("draw.rawgps.max-line-length.local", layerName, -1)));
+        drawRawGpsMaxLineLength.setText(Integer.toString(Main.pref.getInteger("draw.rawgps.max-line-length", layerName, 200)));
+        drawLineWidth.setText(Integer.toString(Main.pref.getInteger("draw.rawgps.linewidth", layerName, 0)));
+        forceRawGpsLines.setSelected(Main.pref.getBoolean("draw.rawgps.lines.force", layerName, false));
+        drawGpsArrows.setSelected(Main.pref.getBoolean("draw.rawgps.direction", layerName, false));
+        drawGpsArrowsFast.setSelected(Main.pref.getBoolean("draw.rawgps.alternatedirection", layerName, false));
+        drawGpsArrowsMinDist.setText(Integer.toString(Main.pref.getInteger("draw.rawgps.min-arrow-distance", layerName, 40)));
+        hdopCircleGpsPoints.setSelected(Main.pref.getBoolean("draw.rawgps.hdopcircle", layerName, false));
+        largeGpsPoints.setSelected(Main.pref.getBoolean("draw.rawgps.large", layerName, false));
         useGpsAntialiasing.setSelected(Main.pref.getBoolean("mappaint.gpx.use-antialiasing", false));
         drawRawGpsLinesActionListener.actionPerformed(null);
 
-        if(layerName!=null && Main.pref.get("draw.rawgps.colors."+layerName).isEmpty()) {
+        if (layerName != null && Main.pref.get("draw.rawgps.colors."+layerName).isEmpty()) {
             colorTypeGlobal.setSelected(true);
             colorDynamic.setSelected(false);
             colorDynamic.setEnabled(false);
         } else {
-            switch(Main.pref.getInteger("draw.rawgps.colors",layerName, 0)) {
+            switch(Main.pref.getInteger("draw.rawgps.colors", layerName, 0)) {
             case 0: colorTypeNone.setSelected(true);   break;
             case 1: colorTypeVelocity.setSelected(true);  break;
@@ -363,8 +363,8 @@
             case 4: colorTypeTime.setSelected(true);  break;
             }
-            int ccts = Main.pref.getInteger("draw.rawgps.colorTracksTune",layerName, 45);
-            colorTypeVelocityTune.setSelectedIndex(ccts==10 ? 2 : (ccts==20 ? 1 : 0));
+            int ccts = Main.pref.getInteger("draw.rawgps.colorTracksTune", layerName, 45);
+            colorTypeVelocityTune.setSelectedIndex(ccts == 10 ? 2 : (ccts == 20 ? 1 : 0));
             colorTypeVelocityTune.setEnabled(colorTypeVelocity.isSelected() && colorTypeVelocity.isEnabled());
-            colorDynamic.setSelected(Main.pref.getBoolean("draw.rawgps.colors.dynamic",layerName, false));
+            colorDynamic.setSelected(Main.pref.getBoolean("draw.rawgps.colors.dynamic", layerName, false));
             colorDynamic.setEnabled(colorTypeVelocity.isSelected() || colorTypeDilution.isSelected());
         }
@@ -379,6 +379,6 @@
     public boolean savePreferences(String layerName, boolean locLayer) {
         String layerNameDot = ".layer "+layerName;
-        if (layerName==null) {
-            layerNameDot="";
+        if (layerName == null) {
+            layerNameDot = "";
         }
         Main.pref.put("marker.makeautomarkers"+layerNameDot, makeAutoMarkers.isSelected());
@@ -393,9 +393,9 @@
             Main.pref.put("draw.rawgps.min-arrow-distance"+layerNameDot, null);
         } else {
-            if (layerName==null || !locLayer) {
+            if (layerName == null || !locLayer) {
                 Main.pref.put("draw.rawgps.lines" +  layerNameDot, drawRawGpsLinesAll.isSelected());
                 Main.pref.put("draw.rawgps.max-line-length" + layerNameDot, drawRawGpsMaxLineLength.getText());
             }
-            if (layerName==null || locLayer) {
+            if (layerName == null || locLayer) {
                 Main.pref.put("draw.rawgps.lines.local" + layerNameDot, drawRawGpsLinesAll.isSelected() || drawRawGpsLinesLocal.isSelected());
                 Main.pref.put("draw.rawgps.max-line-length.local" + layerNameDot, drawRawGpsMaxLineLengthLocal.getText());
@@ -415,16 +415,16 @@
         TemplateEntryProperty.forAudioMarker(layerName).put(audioWaypointLabelPattern.getText());
 
-        if(colorTypeGlobal.isSelected()) {
+        if (colorTypeGlobal.isSelected()) {
             Main.pref.put("draw.rawgps.colors"+layerNameDot, null);
             Main.pref.put("draw.rawgps.colors.dynamic"+layerNameDot, null);
             Main.pref.put("draw.rawgps.colorTracksTunec"+layerNameDot, null);
             return false;
-        } else if(colorTypeVelocity.isSelected()) {
+        } else if (colorTypeVelocity.isSelected()) {
             Main.pref.putInteger("draw.rawgps.colors"+layerNameDot, 1);
-        } else if(colorTypeDilution.isSelected()) {
+        } else if (colorTypeDilution.isSelected()) {
             Main.pref.putInteger("draw.rawgps.colors"+layerNameDot, 2);
-        } else if(colorTypeDirection.isSelected()) {
+        } else if (colorTypeDirection.isSelected()) {
             Main.pref.putInteger("draw.rawgps.colors"+layerNameDot, 3);
-        } else if(colorTypeTime.isSelected()) {
+        } else if (colorTypeTime.isSelected()) {
             Main.pref.putInteger("draw.rawgps.colors"+layerNameDot, 4);
         } else {
@@ -432,6 +432,6 @@
         }
         Main.pref.put("draw.rawgps.colors.dynamic"+layerNameDot, colorDynamic.isSelected());
-        int ccti=colorTypeVelocityTune.getSelectedIndex();
-        Main.pref.putInteger("draw.rawgps.colorTracksTune"+layerNameDot, ccti==2 ? 10 : (ccti==1 ? 20 : 45));
+        int ccti = colorTypeVelocityTune.getSelectedIndex();
+        Main.pref.putInteger("draw.rawgps.colorTracksTune"+layerNameDot, ccti == 2 ? 10 : (ccti == 1 ? 20 : 45));
         return false;
     }
@@ -448,5 +448,5 @@
         String labelPattern = property.getAsString();
         boolean found = false;
-        for (int i=0; i<LABEL_PATTERN_TEMPLATE.length; i++) {
+        for (int i = 0; i < LABEL_PATTERN_TEMPLATE.length; i++) {
             if (LABEL_PATTERN_TEMPLATE[i].equals(labelPattern)) {
                 cb.setSelectedIndex(i);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java	(revision 8510)
@@ -71,8 +71,8 @@
             try {
                 Class<?> Cquaqua = Class.forName("ch.randelshofer.quaqua.QuaquaLookAndFeel");
-                Object Oquaqua = Cquaqua.getConstructor((Class[])null).newInstance((Object[])null);
+                Object Oquaqua = Cquaqua.getConstructor((Class[]) null).newInstance((Object[]) null);
                 // no exception? Then Go!
                 lafCombo.addItem(
-                        new UIManager.LookAndFeelInfo(((LookAndFeel)Oquaqua).getName(), "ch.randelshofer.quaqua.QuaquaLookAndFeel")
+                        new UIManager.LookAndFeelInfo(((LookAndFeel) Oquaqua).getName(), "ch.randelshofer.quaqua.QuaquaLookAndFeel")
                 );
             } catch (Exception ex) {
@@ -90,5 +90,5 @@
         }
 
-        lafCombo.setRenderer(new ListCellRenderer<LookAndFeelInfo>(){
+        lafCombo.setRenderer(new ListCellRenderer<LookAndFeelInfo>() {
             private final DefaultListCellRenderer def = new DefaultListCellRenderer();
             @Override
@@ -100,5 +100,5 @@
 
         panel = new JPanel(new GridBagLayout());
-        panel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
 
         // Show splash screen on startup
@@ -144,5 +144,5 @@
 
         panel.add(new JLabel(tr("Look and Feel")), GBC.std().insets(20, 0, 0, 0));
-        panel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
+        panel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
         panel.add(lafCombo, GBC.eol().fill(GBC.HORIZONTAL));
 
@@ -162,5 +162,5 @@
         Main.pref.put(DateUtils.PROP_ISO_DATES.getKey(), isoDates.isSelected());
         Main.pref.put(FileChooserManager.PROP_USE_NATIVE_FILE_DIALOG.getKey(), nativeFileChoosers.isSelected());
-        mod |= Main.pref.put("laf", ((LookAndFeelInfo)lafCombo.getSelectedItem()).getClassName());
+        mod |= Main.pref.put("laf", ((LookAndFeelInfo) lafCombo.getSelectedItem()).getClassName());
         return mod;
     }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java	(revision 8510)
@@ -59,5 +59,5 @@
         final JPanel panel = lafPreference.panel;
         panel.add(new JLabel(tr("Language")), GBC.std().insets(20, 0, 0, 0));
-        panel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
+        panel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
         panel.add(langCombo, GBC.eol().fill(GBC.HORIZONTAL));
         panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
@@ -69,9 +69,9 @@
     @Override
     public boolean ok() {
-        if(langCombo.getSelectedItem() == null)
+        if (langCombo.getSelectedItem() == null)
             return Main.pref.put("language", null);
         else
             return Main.pref.put("language",
-                    LanguageInfo.getJOSMLocaleCode((Locale)langCombo.getSelectedItem()));
+                    LanguageInfo.getJOSMLocaleCode((Locale) langCombo.getSelectedItem()));
     }
 
@@ -79,6 +79,6 @@
         private final List<Locale> data = new ArrayList<>();
 
-        public LanguageComboBoxModel(){
-            data.add(0,null);
+        public LanguageComboBoxModel() {
+            data.add(0, null);
             data.addAll(Arrays.asList(I18n.getAvailableTranslations()));
         }
@@ -113,7 +113,12 @@
     private static class LanguageCellRenderer implements ListCellRenderer<Locale> {
         private final DefaultListCellRenderer dispatch;
+
+        /**
+         * Constructs a new {@code LanguageCellRenderer}.
+         */
         public LanguageCellRenderer() {
             this.dispatch = new DefaultListCellRenderer();
         }
+
         @Override
         public Component getListCellRendererComponent(JList<? extends Locale> list, Locale l,
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java	(revision 8510)
@@ -60,7 +60,18 @@
     protected final void registerValidableComponent(JTextComponent component) {
         component.getDocument().addDocumentListener(new DocumentListener() {
-            @Override public void removeUpdate(DocumentEvent e) { notifyListeners(); }
-            @Override public void insertUpdate(DocumentEvent e) { notifyListeners(); }
-            @Override public void changedUpdate(DocumentEvent e) { notifyListeners(); }
+            @Override
+            public void removeUpdate(DocumentEvent e) {
+                notifyListeners();
+            }
+
+            @Override
+            public void insertUpdate(DocumentEvent e) {
+                notifyListeners();
+            }
+
+            @Override
+            public void changedUpdate(DocumentEvent e) {
+                notifyListeners();
+            }
         });
     }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java	(revision 8510)
@@ -103,12 +103,12 @@
         lbl.setFont(lbl.getFont().deriveFont(Font.BOLD));
         lbl.setLabelFor(section);
-        p.add(lbl,GBC.std());
+        p.add(lbl, GBC.std());
         p.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 0));
-        p.add(section, gbc.insets(20,5,0,10));
+        p.add(section, gbc.insets(20, 5, 0, 10));
     }
 
     private Component buildSettingsPanel() {
         final JPanel p = new JPanel(new GridBagLayout());
-        p.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        p.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
 
         addSettingsSection(p, tr("Common Settings"), commonSettings = new CommonSettingsPanel());
@@ -118,5 +118,5 @@
                 GBC.eol().fill(GBC.HORIZONTAL));
 
-        p.add(new JPanel(),GBC.eol().fill(GBC.BOTH));
+        p.add(new JPanel(), GBC.eol().fill(GBC.BOTH));
         return new JScrollPane(p);
     }
@@ -132,5 +132,5 @@
         pane.addTab(tr("Offset bookmarks"), new OffsetBookmarksPanel(gui));
         loadSettings();
-        p.add(pane,GBC.std().fill(GBC.BOTH));
+        p.add(pane, GBC.std().fill(GBC.BOTH));
     }
 
@@ -257,9 +257,9 @@
                             label.setBackground(Main.pref.getColor(
                                     marktr("Imagery Background: Default"),
-                                    new Color(200,255,200)));
+                                    new Color(200, 255, 200)));
                             break;
                         }
                     }
-                    label.setToolTipText((String)value);
+                    label.setToolTipText((String) value);
                 }
                 return label;
@@ -419,5 +419,5 @@
                 } else if (!e.getValueIsAdjusting()) {
                     // Only process complete (final) selection events
-                    for (int i = e.getFirstIndex(); i<=e.getLastIndex(); i++) {
+                    for (int i = e.getFirstIndex(); i <= e.getLastIndex(); i++) {
                         updateBoundsAndShapes(i);
                     }
@@ -482,7 +482,7 @@
                 putValue(SHORT_DESCRIPTION, tr("Add a new {0} entry by entering the URL", type.toString()));
                 String icon = /* ICON(dialogs/) */ "add";
-                if(ImageryInfo.ImageryType.WMS.equals(type))
+                if (ImageryInfo.ImageryType.WMS.equals(type))
                     icon = /* ICON(dialogs/) */ "add_wms";
-                else if(ImageryInfo.ImageryType.TMS.equals(type))
+                else if (ImageryInfo.ImageryType.TMS.equals(type))
                     icon = /* ICON(dialogs/) */ "add_tms";
                 putValue(SMALL_ICON, ImageProvider.get("dialogs", icon));
@@ -702,5 +702,5 @@
                     break;
                 case 1:
-                    info.setExtendedUrl((String)o);
+                    info.setExtendedUrl((String) o);
                     info.clearId();
                     break;
@@ -769,5 +769,5 @@
                         htmlPane = new JosmEditorPane(url);
                     } catch (IOException e2) {
-                        JOptionPane.showMessageDialog(gui ,tr("EULA license URL not available: {0}", eulaUrl));
+                        JOptionPane.showMessageDialog(gui, tr("EULA license URL not available: {0}", eulaUrl));
                         return false;
                     }
@@ -783,5 +783,5 @@
                     return true;
             } catch (MalformedURLException e2) {
-                JOptionPane.showMessageDialog(gui ,tr("Malformed URL for the EULA licence: {0}", eulaUrl));
+                JOptionPane.showMessageDialog(gui, tr("Malformed URL for the EULA licence: {0}", eulaUrl));
             }
             return false;
@@ -823,5 +823,5 @@
                 @Override
                 public void actionPerformed(ActionEvent e) {
-                    OffsetBookmark b = new OffsetBookmark(Main.getProjection().toCode(),"","",0,0);
+                    OffsetBookmark b = new OffsetBookmark(Main.getProjection().toCode(), "", "", 0, 0);
                     model.addRow(b);
                 }
@@ -844,5 +844,5 @@
             });
 
-            add(buttonPanel,GBC.eol());
+            add(buttonPanel, GBC.eol());
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/TMSSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/TMSSettingsPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/TMSSettingsPanel.java	(revision 8510)
@@ -114,6 +114,6 @@
         TMSLayer.PROP_DEFAULT_AUTOZOOM.put(this.autozoomActive.isSelected());
         TMSLayer.PROP_DEFAULT_AUTOLOAD.put(this.autoloadTiles.isSelected());
-        TMSLayer.setMaxZoomLvl((Integer)this.maxZoomLvl.getValue());
-        TMSLayer.setMinZoomLvl((Integer)this.minZoomLvl.getValue());
+        TMSLayer.setMaxZoomLvl((Integer) this.maxZoomLvl.getValue());
+        TMSLayer.setMinZoomLvl((Integer) this.minZoomLvl.getValue());
 
         if (!TMSCachedTileLoader.MAX_OBJECTS_ON_DISK.get().equals(this.maxElementsOnDisk.getValue())) {
@@ -122,10 +122,10 @@
         }
 
-        if(!TMSCachedTileLoader.THREAD_LIMIT.get().equals(this.maxConcurrentDownloads.getValue())) {
+        if (!TMSCachedTileLoader.THREAD_LIMIT.get().equals(this.maxConcurrentDownloads.getValue())) {
             TMSCachedTileLoader.THREAD_LIMIT.put((Integer) this.maxConcurrentDownloads.getValue());
             restartRequired = true;
         }
 
-        if(!TMSCachedTileLoader.HOST_LIMIT.get().equals(this.maxDownloadsPerHost.getValue())) {
+        if (!TMSCachedTileLoader.HOST_LIMIT.get().equals(this.maxDownloadsPerHost.getValue())) {
             TMSCachedTileLoader.HOST_LIMIT.put((Integer) this.maxDownloadsPerHost.getValue());
             restartRequired = true;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/map/BackupPreference.java	(revision 8510)
@@ -42,4 +42,5 @@
         }
     }
+
     private static final BooleanProperty PROP_KEEP_BACKUP = new BooleanProperty("save.keepbackup", false);
     private JCheckBox notification;
@@ -53,5 +54,5 @@
         JPanel panel = new VerticallyScrollablePanel();
         panel.setLayout(new GridBagLayout());
-        panel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
 
         autosave = new JCheckBox(tr("Auto save enabled"));
@@ -61,17 +62,17 @@
         final JLabel autosaveIntervalLabel = new JLabel(tr("Auto save interval (seconds)"));
         autosaveIntervalLabel.setLabelFor(autosaveInterval);
-        panel.add(autosaveIntervalLabel, GBC.std().insets(60,0,0,0));
+        panel.add(autosaveIntervalLabel, GBC.std().insets(60, 0, 0, 0));
         autosaveInterval.setText(Integer.toString(AutosaveTask.PROP_INTERVAL.get()));
         autosaveInterval.setToolTipText(tr("Default value: {0}", AutosaveTask.PROP_INTERVAL.getDefaultValue()));
         autosaveInterval.setMinimumSize(autosaveInterval.getPreferredSize());
-        panel.add(autosaveInterval, GBC.eol().insets(5,0,0,5));
+        panel.add(autosaveInterval, GBC.eol().insets(5, 0, 0, 5));
 
         final JLabel backupPerLayerLabel = new JLabel(tr("Auto saved files per layer"));
         backupPerLayerLabel.setLabelFor(backupPerLayer);
-        panel.add(backupPerLayerLabel, GBC.std().insets(60,0,0,0));
+        panel.add(backupPerLayerLabel, GBC.std().insets(60, 0, 0, 0));
         backupPerLayer.setText(Integer.toString(AutosaveTask.PROP_FILES_PER_LAYER.get()));
         backupPerLayer.setToolTipText(tr("Default value: {0}", AutosaveTask.PROP_FILES_PER_LAYER.getDefaultValue()));
         backupPerLayer.setMinimumSize(backupPerLayer.getPreferredSize());
-        panel.add(backupPerLayer, GBC.eol().insets(5,0,0,10));
+        panel.add(backupPerLayer, GBC.eol().insets(5, 0, 0, 10));
 
         panel.add(new HtmlPanel(
@@ -80,5 +81,5 @@
                 "In case of a crash, JOSM tries to recover the unsaved changes " +
                 "on next start.)</i>")),
-            GBC.eop().fill(GBC.HORIZONTAL).insets(5,0,0,10));
+            GBC.eop().fill(GBC.HORIZONTAL).insets(5, 0, 0, 10));
 
         panel.add(new JSeparator(), GBC.eop().fill(GBC.HORIZONTAL));
@@ -92,5 +93,5 @@
             tr("<i>(JOSM can keep a backup file when saving data layers. "+
                 "It appends ''~'' to the file name and saves it in the same folder.)</i>")),
-            GBC.eop().fill(GBC.HORIZONTAL).insets(5,0,0,0));
+            GBC.eop().fill(GBC.HORIZONTAL).insets(5, 0, 0, 0));
 
         panel.add(new JSeparator(), GBC.eop().fill(GBC.HORIZONTAL));
@@ -101,5 +102,5 @@
         panel.add(notification, GBC.eop());
 
-        ActionListener autosaveEnabled = new ActionListener(){
+        ActionListener autosaveEnabled = new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 8510)
@@ -76,5 +76,5 @@
 
         panel.add(sources, GBC.eol().fill(GBC.BOTH));
-        panel.add(enableIconDefault, GBC.eol().insets(11,2,5,0));
+        panel.add(enableIconDefault, GBC.eol().insets(11, 2, 5, 0));
 
         final MapPreference mapPref = gui.getMapPreference();
Index: trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 8510)
@@ -169,5 +169,5 @@
         final JPanel panel = new JPanel(new GridBagLayout());
         panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
-        panel.add(sortMenu, GBC.eol().insets(5,5,5,0));
+        panel.add(sortMenu, GBC.eol().insets(5, 5, 5, 0));
         sources = new TaggingPresetSourceEditor();
         panel.add(sources, GBC.eol().fill(GBC.BOTH));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginListPanel.java	(revision 8510)
@@ -92,5 +92,5 @@
         gbc.anchor = GridBagConstraints.CENTER;
         gbc.fill = GridBagConstraints.BOTH;
-        gbc.insets = new Insets(40,0,40,0);
+        gbc.insets = new Insets(40, 0, 40, 0);
         gbc.weightx = 1.0;
         gbc.weighty = 1.0;
@@ -111,4 +111,5 @@
     private class JPluginCheckBox extends JCheckBox {
         public final transient PluginInformation pi;
+
         public JPluginCheckBox(final PluginInformation pi, boolean selected) {
             this.pi = pi;
@@ -125,7 +126,9 @@
     private class PluginCbActionListener implements ActionListener {
         private final JPluginCheckBox cb;
+
         public PluginCbActionListener(JPluginCheckBox cb) {
             this.cb = cb;
         }
+
         protected void selectRequiredPlugins(PluginInformation info) {
             if (info != null && info.requires != null) {
@@ -138,4 +141,5 @@
             }
         }
+
         @Override
         public void actionPerformed(ActionEvent e) {
@@ -237,5 +241,5 @@
             gbc.gridx = 0;
             gbc.gridy = ++row;
-            gbc.insets = new Insets(5,5,0,5);
+            gbc.insets = new Insets(5, 5, 0, 5);
             gbc.weighty = 0.0;
             gbc.weightx = 0.0;
@@ -251,5 +255,5 @@
                 @Override
                 public void hyperlinkUpdate(HyperlinkEvent e) {
-                    if(e.getEventType() == EventType.ACTIVATED) {
+                    if (e.getEventType() == EventType.ACTIVATED) {
                         OpenBrowser.displayUrl(e.getURL().toString());
                     }
@@ -260,5 +264,5 @@
             gbc.gridx = 1;
             gbc.gridy = ++row;
-            gbc.insets = new Insets(3,25,5,5);
+            gbc.insets = new Insets(3, 25, 5, 5);
             gbc.weighty = 1.0;
             add(description, gbc);
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java	(revision 8510)
@@ -94,5 +94,5 @@
                     ));
             sb.append("<ul>");
-            for(PluginInformation pi: downloaded) {
+            for (PluginInformation pi: downloaded) {
                 sb.append("<li>").append(pi.name).append(" (").append(pi.version).append(")</li>");
             }
@@ -107,5 +107,5 @@
                     ));
             sb.append("<ul>");
-            for(PluginInformation pi: failed) {
+            for (PluginInformation pi: failed) {
                 sb.append("<li>").append(pi.name).append("</li>");
             }
@@ -159,5 +159,5 @@
     protected JPanel buildSearchFieldPanel() {
         JPanel pnl  = new JPanel(new GridBagLayout());
-        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         GridBagConstraints gc = new GridBagConstraints();
 
@@ -165,5 +165,5 @@
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 0.0;
-        gc.insets = new Insets(0,0,0,3);
+        gc.insets = new Insets(0, 0, 0, 3);
         pnl.add(new JLabel(tr("Search:")), gc);
 
@@ -179,5 +179,5 @@
 
     protected JPanel buildActionPanel() {
-        JPanel pnl = new JPanel(new GridLayout(1,3));
+        JPanel pnl = new JPanel(new GridLayout(1, 3));
 
         pnl.add(new JButton(new DownloadAvailablePluginsAction()));
@@ -194,9 +194,10 @@
         spPluginPreferences = GuiHelper.embedInVerticalScrollPane(pnlPluginPreferences);
         spPluginPreferences.getVerticalScrollBar().addComponentListener(
-                new ComponentAdapter(){
+                new ComponentAdapter() {
                     @Override
                     public void componentShown(ComponentEvent e) {
                         spPluginPreferences.setBorder(UIManager.getBorder("ScrollPane.border"));
                     }
+
                     @Override
                     public void componentHidden(ComponentEvent e) {
@@ -329,5 +330,5 @@
          */
         public DownloadAvailablePluginsAction() {
-            putValue(NAME,tr("Download list"));
+            putValue(NAME, tr("Download list"));
             putValue(SHORT_DESCRIPTION, tr("Download the list of available plugins"));
             putValue(SMALL_ICON, ImageProvider.get("download"));
@@ -365,5 +366,5 @@
     class UpdateSelectedPluginsAction extends AbstractAction {
         public UpdateSelectedPluginsAction() {
-            putValue(NAME,tr("Update plugins"));
+            putValue(NAME, tr("Update plugins"));
             putValue(SHORT_DESCRIPTION, tr("Update the selected plugins"));
             putValue(SMALL_ICON, ImageProvider.get("dialogs", "refresh"));
@@ -467,5 +468,5 @@
     class ConfigureSitesAction extends AbstractAction {
         public ConfigureSitesAction() {
-            putValue(NAME,tr("Configure sites..."));
+            putValue(NAME, tr("Configure sites..."));
             putValue(SHORT_DESCRIPTION, tr("Configure the list of sites where plugins are downloaded from"));
             putValue(SMALL_ICON, ImageProvider.get("dialogs", "settings"));
@@ -522,5 +523,5 @@
             add(new JScrollPane(list), GBC.std().fill());
             JPanel buttons = new JPanel(new GridBagLayout());
-            buttons.add(new JButton(new AbstractAction(tr("Add")){
+            buttons.add(new JButton(new AbstractAction(tr("Add")) {
                 @Override
                 public void actionPerformed(ActionEvent e) {
@@ -536,5 +537,5 @@
                 }
             }), GBC.eol().fill(GBC.HORIZONTAL));
-            buttons.add(new JButton(new AbstractAction(tr("Edit")){
+            buttons.add(new JButton(new AbstractAction(tr("Edit")) {
                 @Override
                 public void actionPerformed(ActionEvent e) {
@@ -548,5 +549,5 @@
                         return;
                     }
-                    String s = (String)JOptionPane.showInputDialog(
+                    String s = (String) JOptionPane.showInputDialog(
                             Main.parent,
                             tr("Edit JOSM Plugin description URL."),
@@ -562,5 +563,5 @@
                 }
             }), GBC.eol().fill(GBC.HORIZONTAL));
-            buttons.add(new JButton(new AbstractAction(tr("Delete")){
+            buttons.add(new JButton(new AbstractAction(tr("Delete")) {
                 @Override
                 public void actionPerformed(ActionEvent event) {
@@ -587,5 +588,5 @@
             if (model.getSize() == 0) return Collections.emptyList();
             List<String> ret = new ArrayList<>(model.getSize());
-            for (int i=0; i< model.getSize();i++){
+            for (int i = 0; i < model.getSize(); i++) {
                 ret.add(model.get(i));
             }
@@ -593,5 +594,3 @@
         }
     }
-
-
 }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferencesModel.java	(revision 8510)
@@ -364,5 +364,5 @@
                 }
                 oldinfo.updateLocalInfo(newinfo);
-            } catch(PluginException e) {
+            } catch (PluginException e) {
                 Main.error(e);
             }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java	(revision 8510)
@@ -66,5 +66,5 @@
         gc.anchor = GridBagConstraints.NORTHWEST;
         gc.fill = GridBagConstraints.HORIZONTAL;
-        gc.weightx  =1.0;
+        gc.weightx = 1.0;
 
         ButtonGroup bgVersionBasedUpdatePolicy = new ButtonGroup();
@@ -84,5 +84,5 @@
         JMultilineLabel lbl = new JMultilineLabel(
                 tr("Please decide whether JOSM shall automatically update active plugins at startup after an update of JOSM itself."));
-        gc.gridy=0;
+        gc.gridy = 0;
         pnl.add(lbl, gc);
         for (Policy p: Policy.values()) {
@@ -107,5 +107,5 @@
         gc.anchor = GridBagConstraints.NORTHWEST;
         gc.fill = GridBagConstraints.HORIZONTAL;
-        gc.weightx  =1.0;
+        gc.weightx = 1.0;
 
         TimeBasedPolicyChangeListener changeListener = new TimeBasedPolicyChangeListener();
@@ -130,5 +130,5 @@
         JMultilineLabel lbl = new JMultilineLabel(
                 tr("Please decide whether JOSM shall automatically update active plugins after a certain period of time."));
-        gc.gridy=0;
+        gc.gridy = 0;
         pnl.add(lbl, gc);
         for (Policy p: Policy.values()) {
@@ -146,6 +146,6 @@
         gc.anchor = GridBagConstraints.NORTHWEST;
         gc.fill = GridBagConstraints.HORIZONTAL;
-        gc.weightx  =1.0;
-        gc.insets = new Insets(5,5,10,5);
+        gc.weightx = 1.0;
+        gc.insets = new Insets(5, 5, 10, 5);
 
         add(buildVersionBasedUpdatePolicyPanel(), gc);
@@ -194,5 +194,5 @@
             try {
                 days = Integer.parseInt(pref);
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 // ignore - load from preference pluginmanager.time-based-update.interval
             }
@@ -238,5 +238,5 @@
                 days = PluginHandler.DEFAULT_TIME_BASED_UPDATE_INTERVAL;
             }
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             days = PluginHandler.DEFAULT_TIME_BASED_UPDATE_INTERVAL;
         }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeProjectionChoice.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/CodeProjectionChoice.java	(revision 8510)
@@ -72,4 +72,5 @@
             private static final long serialVersionUID = 1L;
             private final Pattern codePattern = Pattern.compile("([a-zA-Z]+):(\\d+)");
+
             @Override
             public int compare(String c1, String c2) {
@@ -190,5 +191,4 @@
     }
 
-
     @Override
     public String getCurrentCode() {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/CustomProjectionChoice.java	(revision 8510)
@@ -88,5 +88,5 @@
                 public void validate() {
                     if (!isValid()) {
-                        feedbackInvalid(tr("Invalid projection configuration: {0}",error));
+                        feedbackInvalid(tr("Invalid projection configuration: {0}", error));
                     } else {
                         feedbackValid(tr("Projection configuration is valid."));
@@ -124,5 +124,5 @@
             });
             btnCheck.setLayout(new BorderLayout());
-            btnCheck.setMargin(new Insets(-1,0,-1,0));
+            btnCheck.setMargin(new Insets(-1, 0, -1, 0));
 
             JButton btnInfo = new JButton(tr("Parameter information..."));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/GaussKruegerProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/GaussKruegerProjectionChoice.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/GaussKruegerProjectionChoice.java	(revision 8510)
@@ -34,5 +34,5 @@
         try {
             return Integer.parseInt(zone) - 2;
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             Main.warn(e);
         }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/LambertCC9ZonesProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/LambertCC9ZonesProjectionChoice.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/LambertCC9ZonesProjectionChoice.java	(revision 8510)
@@ -18,13 +18,13 @@
 
     private static String[] lambert9zones = {
-        tr("{0} ({1} to {2} degrees)", 1,41,43),
-        tr("{0} ({1} to {2} degrees)", 2,42,44),
-        tr("{0} ({1} to {2} degrees)", 3,43,45),
-        tr("{0} ({1} to {2} degrees)", 4,44,46),
-        tr("{0} ({1} to {2} degrees)", 5,45,47),
-        tr("{0} ({1} to {2} degrees)", 6,46,48),
-        tr("{0} ({1} to {2} degrees)", 7,47,49),
-        tr("{0} ({1} to {2} degrees)", 8,48,50),
-        tr("{0} ({1} to {2} degrees)", 9,49,51)
+        tr("{0} ({1} to {2} degrees)", 1, 41, 43),
+        tr("{0} ({1} to {2} degrees)", 2, 42, 44),
+        tr("{0} ({1} to {2} degrees)", 3, 43, 45),
+        tr("{0} ({1} to {2} degrees)", 4, 44, 46),
+        tr("{0} ({1} to {2} degrees)", 5, 45, 47),
+        tr("{0} ({1} to {2} degrees)", 6, 46, 48),
+        tr("{0} ({1} to {2} degrees)", 7, 47, 49),
+        tr("{0} ({1} to {2} degrees)", 8, 48, 50),
+        tr("{0} ({1} to {2} degrees)", 9, 49, 51)
     };
 
@@ -73,9 +73,9 @@
         if (code.startsWith("EPSG:39") && code.length() == 9) {
             try {
-                String zonestring = code.substring(5,9);
+                String zonestring = code.substring(5, 9);
                 int zoneval = Integer.parseInt(zonestring)-3942;
-                if(zoneval >= 0 && zoneval <= 8)
+                if (zoneval >= 0 && zoneval <= 8)
                     return Collections.singleton(String.valueOf(zoneval+1));
-            } catch(NumberFormatException ex) {
+            } catch (NumberFormatException ex) {
                 Main.warn(ex);
             }
@@ -93,5 +93,5 @@
         try {
             return Integer.parseInt(zone) - 1;
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             Main.warn(e);
         }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/LambertProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/LambertProjectionChoice.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/LambertProjectionChoice.java	(revision 8510)
@@ -18,7 +18,7 @@
 
     private static final String[] lambert4zones = {
-        tr("{0} ({1} to {2} degrees)", 1,"51.30","48.15"),
-        tr("{0} ({1} to {2} degrees)", 2,"48.15","45.45"),
-        tr("{0} ({1} to {2} degrees)", 3,"45.45","42.76"),
+        tr("{0} ({1} to {2} degrees)", 1, "51.30", "48.15"),
+        tr("{0} ({1} to {2} degrees)", 2, "48.15", "45.45"),
+        tr("{0} ({1} to {2} degrees)", 3, "45.45", "42.76"),
         tr("{0} (Corsica)", 4)
     };
@@ -69,7 +69,7 @@
                 String zonestring = code.substring(9);
                 int zoneval = Integer.parseInt(zonestring);
-                if(zoneval >= 1 && zoneval <= 4)
+                if (zoneval >= 1 && zoneval <= 4)
                     return Collections.singleton(zonestring);
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 Main.warn(e);
             }
@@ -87,5 +87,5 @@
         try {
             return Integer.parseInt(zone) - 1;
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             Main.warn(e);
         }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/ListProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/ListProjectionChoice.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/ListProjectionChoice.java	(revision 8510)
@@ -87,5 +87,5 @@
             prefcb.setSelectedIndex(initialIndex);
             this.setLayout(new GridBagLayout());
-            this.add(new JLabel(label), GBC.std().insets(5,5,0,5));
+            this.add(new JLabel(label), GBC.std().insets(5, 5, 0, 5));
             this.add(GBC.glue(1, 0), GBC.std().fill(GBC.HORIZONTAL));
             this.add(prefcb, GBC.eop().fill(GBC.HORIZONTAL));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java	(revision 8510)
@@ -250,5 +250,5 @@
     private static final String[] unitsValuesTr = new String[unitsValues.length];
     static {
-        for (int i=0; i<unitsValues.length; ++i) {
+        for (int i = 0; i < unitsValues.length; ++i) {
             unitsValuesTr[i] = tr(unitsValues[i]);
         }
@@ -315,29 +315,29 @@
         projPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
         projPanel.setLayout(new GridBagLayout());
-        projPanel.add(new JLabel(tr("Projection method")), GBC.std().insets(5,5,0,5));
-        projPanel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
-        projPanel.add(projectionCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
-        projPanel.add(projectionCodeLabel = new JLabel(tr("Projection code")), GBC.std().insets(25,5,0,5));
-        projPanel.add(projectionCodeGlue = GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
-        projPanel.add(projectionCode, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
-        projPanel.add(projectionNameLabel = new JLabel(tr("Projection name")), GBC.std().insets(25,5,0,5));
-        projPanel.add(projectionNameGlue = GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
-        projPanel.add(projectionName, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
-        projPanel.add(new JLabel(tr("Bounds")), GBC.std().insets(25,5,0,5));
-        projPanel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
-        projPanel.add(bounds, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
-        projPanel.add(projSubPrefPanelWrapper, GBC.eol().fill(GBC.HORIZONTAL).insets(20,5,5,5));
+        projPanel.add(new JLabel(tr("Projection method")), GBC.std().insets(5, 5, 0, 5));
+        projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
+        projPanel.add(projectionCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5));
+        projPanel.add(projectionCodeLabel = new JLabel(tr("Projection code")), GBC.std().insets(25, 5, 0, 5));
+        projPanel.add(projectionCodeGlue = GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
+        projPanel.add(projectionCode, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5));
+        projPanel.add(projectionNameLabel = new JLabel(tr("Projection name")), GBC.std().insets(25, 5, 0, 5));
+        projPanel.add(projectionNameGlue = GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
+        projPanel.add(projectionName, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5));
+        projPanel.add(new JLabel(tr("Bounds")), GBC.std().insets(25, 5, 0, 5));
+        projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
+        projPanel.add(bounds, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5));
+        projPanel.add(projSubPrefPanelWrapper, GBC.eol().fill(GBC.HORIZONTAL).insets(20, 5, 5, 5));
 
         projectionCodeLabel.setLabelFor(projectionCode);
         projectionNameLabel.setLabelFor(projectionName);
 
-        projPanel.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0,5,0,10));
-        projPanel.add(new JLabel(tr("Display coordinates as")), GBC.std().insets(5,5,0,5));
-        projPanel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
-        projPanel.add(coordinatesCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
-        projPanel.add(new JLabel(tr("System of measurement")), GBC.std().insets(5,5,0,5));
-        projPanel.add(GBC.glue(5,0), GBC.std().fill(GBC.HORIZONTAL));
-        projPanel.add(unitsCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0,5,5,5));
-        projPanel.add(GBC.glue(1,1), GBC.std().fill(GBC.HORIZONTAL).weight(1.0, 1.0));
+        projPanel.add(new JSeparator(), GBC.eol().fill(GBC.HORIZONTAL).insets(0, 5, 0, 10));
+        projPanel.add(new JLabel(tr("Display coordinates as")), GBC.std().insets(5, 5, 0, 5));
+        projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
+        projPanel.add(coordinatesCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5));
+        projPanel.add(new JLabel(tr("System of measurement")), GBC.std().insets(5, 5, 0, 5));
+        projPanel.add(GBC.glue(5, 0), GBC.std().fill(GBC.HORIZONTAL));
+        projPanel.add(unitsCombo, GBC.eop().fill(GBC.HORIZONTAL).insets(0, 5, 5, 5));
+        projPanel.add(GBC.glue(1, 1), GBC.std().fill(GBC.HORIZONTAL).weight(1.0, 1.0));
 
         JScrollPane scrollpane = new JScrollPane(projPanel);
@@ -378,6 +378,6 @@
         setProjection(id, prefs);
 
-        if(PROP_COORDINATES.put(((CoordinateFormat)coordinatesCombo.getSelectedItem()).name())) {
-            CoordinateFormat.setCoordinateFormat((CoordinateFormat)coordinatesCombo.getSelectedItem());
+        if (PROP_COORDINATES.put(((CoordinateFormat) coordinatesCombo.getSelectedItem()).name())) {
+            CoordinateFormat.setCoordinateFormat((CoordinateFormat) coordinatesCombo.getSelectedItem());
         }
 
@@ -422,5 +422,5 @@
         // Don't try to update if we're still starting up
         int size = projPanel.getComponentCount();
-        if(size < 1)
+        if (size < 1)
             return;
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/PuwgProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/PuwgProjectionChoice.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/PuwgProjectionChoice.java	(revision 8510)
@@ -44,5 +44,4 @@
     }
 
-
     @Override
     public String[] allCodes() {
@@ -66,5 +65,5 @@
     @Override
     protected int zoneToIndex(String zone) {
-        for (int i=0; i<CODES.length; i++) {
+        for (int i = 0; i < CODES.length; i++) {
             if (zone.equals(CODES[i])) {
                 return i;
@@ -73,4 +72,3 @@
         return defaultIndex;
     }
-
 }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMFranceDOMProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMFranceDOMProjectionChoice.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMFranceDOMProjectionChoice.java	(revision 8510)
@@ -41,5 +41,5 @@
         try {
             return Integer.parseInt(zone) - 1;
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             Main.warn(e);
         }
@@ -60,5 +60,5 @@
     public String[] allCodes() {
         String[] res = new String[utmEPSGs.length];
-        for (int i=0; i<utmEPSGs.length; ++i) {
+        for (int i = 0; i < utmEPSGs.length; ++i) {
             res[i] = "EPSG:" + utmEPSGs[i];
         }
@@ -68,5 +68,5 @@
     @Override
     public Collection<String> getPreferencesFromCode(String code) {
-        for (int i=0; i < utmEPSGs.length; i++)
+        for (int i = 0; i < utmEPSGs.length; i++)
             if (("EPSG:" + utmEPSGs[i]).equals(code))
                 return Collections.singleton(Integer.toString(i+1));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMProjectionChoice.java	(revision 8510)
@@ -73,5 +73,5 @@
             bPanel.add(GBC.glue(1, 1), GBC.eol().fill(GBC.BOTH));
 
-            this.add(new JLabel(tr("Hemisphere")), GBC.std().insets(5,5,0,5));
+            this.add(new JLabel(tr("Hemisphere")), GBC.std().insets(5, 5, 0, 5));
             this.add(GBC.glue(1, 0), GBC.std().fill(GBC.HORIZONTAL));
             this.add(bPanel, GBC.eop().fill(GBC.HORIZONTAL));
@@ -102,5 +102,4 @@
     }
 
-
     @Override
     public Collection<String> getPreferences(JPanel panel) {
@@ -110,5 +109,5 @@
         UTMPanel p = (UTMPanel) panel;
         int idx = p.prefcb.getSelectedIndex();
-        Hemisphere hem = p.south.isSelected()?Hemisphere.South:Hemisphere.North;
+        Hemisphere hem = p.south.isSelected() ? Hemisphere.South : Hemisphere.North;
         return Arrays.asList(indexToZone(idx), hem.toString());
     }
@@ -117,7 +116,7 @@
     public String[] allCodes() {
         List<String> projections = new ArrayList<>(60*4);
-        for (int zone = 1;zone <= 60; zone++) {
+        for (int zone = 1; zone <= 60; zone++) {
             for (Hemisphere hem : Hemisphere.values()) {
-                projections.add("EPSG:" + (32600 + zone + (hem == Hemisphere.South?100:0)));
+                projections.add("EPSG:" + (32600 + zone + (hem == Hemisphere.South ? 100 : 0)));
             }
         }
@@ -130,10 +129,10 @@
         if (code.startsWith("EPSG:326") || code.startsWith("EPSG:327")) {
             try {
-                Hemisphere hem = code.charAt(7)=='6'?Hemisphere.North:Hemisphere.South;
+                Hemisphere hem = code.charAt(7) == '6' ? Hemisphere.North : Hemisphere.South;
                 String zonestring = code.substring(8);
                 int zoneval = Integer.parseInt(zonestring);
-                if(zoneval > 0 && zoneval <= 60)
+                if (zoneval > 0 && zoneval <= 60)
                     return Arrays.asList(zonestring, hem.toString());
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 Main.warn(e);
             }
@@ -166,5 +165,5 @@
         try {
             return Integer.parseInt(zone) - 1;
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             Main.warn(e);
         }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreference.java	(revision 8510)
@@ -67,4 +67,5 @@
         }
     }
+
     private final Map<PermissionPrefWithDefault, JCheckBox> prefs = new LinkedHashMap<>();
     private JCheckBox enableRemoteControl;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTask.java	(revision 8510)
@@ -47,5 +47,5 @@
     public ApiUrlTestTask(Component parent, String url) {
         super(parent, tr("Testing OSM API URL ''{0}''", url), false /* don't ignore exceptions */);
-        CheckParameterUtil.ensureParameterNotNull(url,"url");
+        CheckParameterUtil.ensureParameterNotNull(url, "url");
         this.parent = parent;
         this.url = url;
@@ -135,5 +135,5 @@
     protected void cancel() {
         canceled = true;
-        synchronized(this) {
+        synchronized (this) {
             if (connection != null) {
                 connection.disconnect();
@@ -152,5 +152,5 @@
     protected String getNormalizedApiUrl() {
         String apiUrl = url.trim();
-        while(apiUrl.endsWith("/")) {
+        while (apiUrl.endsWith("/")) {
             apiUrl = apiUrl.substring(0, apiUrl.lastIndexOf('/'));
         }
@@ -163,5 +163,5 @@
             try {
                 new URL(getNormalizedApiUrl());
-            } catch(MalformedURLException e) {
+            } catch (MalformedURLException e) {
                 alertInvalidUrl(getNormalizedApiUrl());
                 return;
@@ -171,10 +171,10 @@
             try {
                 capabilitiesUrl = new URL(getCapabilitiesUrl);
-            } catch(MalformedURLException e) {
+            } catch (MalformedURLException e) {
                 alertInvalidCapabilitiesUrl(getCapabilitiesUrl);
                 return;
             }
 
-            synchronized(this) {
+            synchronized (this) {
                 connection = Utils.openHttpConnection(capabilitiesUrl);
             }
@@ -197,5 +197,5 @@
             }
             success = true;
-        } catch(IOException e) {
+        } catch (IOException e) {
             if (canceled)
                 // ignore exceptions
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java	(revision 8510)
@@ -58,5 +58,5 @@
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 0.0;
-        gc.insets = new Insets(0,0,0, 3);
+        gc.insets = new Insets(0, 0, 0, 3);
         add(rbBasicAuthentication = new JRadioButton(), gc);
         rbBasicAuthentication.setText(tr("Use Basic Authentication"));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/BasicAuthenticationPreferencesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/BasicAuthenticationPreferencesPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/BasicAuthenticationPreferencesPanel.java	(revision 8510)
@@ -43,5 +43,5 @@
     protected final void build() {
         setLayout(new GridBagLayout());
-        setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
+        setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
         GridBagConstraints gc = new GridBagConstraints();
 
@@ -50,5 +50,5 @@
         gc.anchor = GridBagConstraints.NORTHWEST;
         gc.weightx = 0.0;
-        gc.insets = new Insets(0,0,3,3);
+        gc.insets = new Insets(0, 0, 3, 3);
         add(new JLabel(tr("OSM username:")), gc);
 
@@ -78,5 +78,5 @@
         gc.weightx = 1.0;
         gc.weighty = 1.0;
-        gc.insets = new Insets(5,0,0,0);
+        gc.insets = new Insets(5, 0, 0, 0);
         gc.fill = GridBagConstraints.BOTH;
         decorationPanel = new JPanel(new BorderLayout());
@@ -104,8 +104,8 @@
                 tfOsmPassword.setText("");
             } else {
-                tfOsmUserName.setText(pa.getUserName() == null? "" : pa.getUserName());
+                tfOsmUserName.setText(pa.getUserName() == null ? "" : pa.getUserName());
                 tfOsmPassword.setText(pa.getPassword() == null ? "" : String.valueOf(pa.getPassword()));
             }
-        } catch(CredentialsAgentException e) {
+        } catch (CredentialsAgentException e) {
             Main.error(e);
             Main.warn(tr("Failed to retrieve OSM credentials from credential manager."));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/FeaturesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/FeaturesPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/FeaturesPanel.java	(revision 8510)
@@ -40,5 +40,5 @@
     private void build() {
         setLayout(new GridBagLayout());
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
 
         notifier = new JCheckBox(tr("Periodically check for new messages"));
@@ -57,5 +57,5 @@
         notifierInterval.setToolTipText(tr("Default value: {0}", MessageNotifier.PROP_INTERVAL.getDefaultValue()));
         notifierInterval.setMinimumSize(notifierInterval.getPreferredSize());
-        add(notifierInterval, GBC.eol().insets(5,0,0,0));
+        add(notifierInterval, GBC.eol().insets(5, 0, 0, 0));
 
         final JLabel notesDaysClosedLabel = new JLabel(tr("Max age for closed notes (days):"));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAccessTokenHolder.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAccessTokenHolder.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAccessTokenHolder.java	(revision 8510)
@@ -153,5 +153,5 @@
         try {
             token = cm.lookupOAuthAccessToken();
-        } catch(CredentialsAgentException e) {
+        } catch (CredentialsAgentException e) {
             Main.error(e);
             Main.warn(tr("Failed to retrieve OAuth Access Token from credential manager"));
@@ -184,5 +184,5 @@
                 cm.storeOAuthAccessToken(new OAuthToken(accessTokenKey, accessTokenSecret));
             }
-        } catch(CredentialsAgentException e){
+        } catch (CredentialsAgentException e) {
             Main.error(e);
             Main.warn(tr("Failed to store OAuth Access Token to credentials manager"));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java	(revision 8510)
@@ -60,10 +60,10 @@
     protected JPanel buildAdvancedPropertiesPanel() {
         JPanel pnl = new JPanel(new GridBagLayout());
-        GridBagConstraints gc= new GridBagConstraints();
+        GridBagConstraints gc = new GridBagConstraints();
 
         gc.anchor = GridBagConstraints.NORTHWEST;
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 0.0;
-        gc.insets = new Insets(0,0,0,3);
+        gc.insets = new Insets(0, 0, 0, 3);
         pnl.add(cbShowAdvancedParameters = new JCheckBox(), gc);
         cbShowAdvancedParameters.setSelected(false);
@@ -85,5 +85,5 @@
         gc.gridy = 1;
         gc.gridx = 1;
-        gc.insets = new Insets(3,0,3,0);
+        gc.insets = new Insets(3, 0, 3, 0);
         gc.fill = GridBagConstraints.BOTH;
         gc.weightx = 1.0;
@@ -94,5 +94,5 @@
                 BorderFactory.createCompoundBorder(
                         BorderFactory.createLineBorder(Color.GRAY, 1),
-                        BorderFactory.createEmptyBorder(3,3,3,3)
+                        BorderFactory.createEmptyBorder(3, 3, 3, 3)
                 )
         );
@@ -106,5 +106,5 @@
     protected final void build() {
         setLayout(new GridBagLayout());
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         GridBagConstraints gc = new GridBagConstraints();
 
@@ -116,5 +116,5 @@
         gc.weighty = 1.0;
         gc.weightx = 1.0;
-        gc.insets = new Insets(10,0,0,0);
+        gc.insets = new Insets(10, 0, 0, 0);
         add(pnlAuthorisationMessage = new JPanel(), gc);
         pnlAuthorisationMessage.setLayout(new BorderLayout());
@@ -193,5 +193,5 @@
             // A message explaining that the user isn't authorised yet
             gc.anchor = GridBagConstraints.NORTHWEST;
-            gc.insets = new Insets(0,0,3,0);
+            gc.insets = new Insets(0, 0, 3, 0);
             gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 1.0;
@@ -228,5 +228,5 @@
             GridBagConstraints gc = new GridBagConstraints();
             gc.anchor = GridBagConstraints.NORTHWEST;
-            gc.insets = new Insets(0,0,3,3);
+            gc.insets = new Insets(0, 0, 3, 3);
             gc.fill = GridBagConstraints.HORIZONTAL;
             gc.weightx = 1.0;
@@ -296,10 +296,13 @@
         public final void refreshView() {
             String v = OAuthAccessTokenHolder.getInstance().getAccessTokenKey();
-            tfAccessTokenKey.setText(v == null? "" : v);
+            tfAccessTokenKey.setText(v == null ? "" : v);
             v = OAuthAccessTokenHolder.getInstance().getAccessTokenSecret();
-            tfAccessTokenSecret.setText(v == null? "" : v);
+            tfAccessTokenSecret.setText(v == null ? "" : v);
             cbSaveToPreferences.setSelected(OAuthAccessTokenHolder.getInstance().isSaveToPreferences());
         }
 
+        /**
+         * Constructs a new {@code AlreadyAuthorisedPanel}.
+         */
         public AlreadyAuthorisedPanel() {
             build();
@@ -316,6 +319,6 @@
             putValue(SHORT_DESCRIPTION, tr("Click to step through the OAuth authorization process"));
             putValue(SMALL_ICON, ImageProvider.get("oauth", "oauth-small"));
-
-        }
+        }
+
         @Override
         public void actionPerformed(ActionEvent arg0) {
@@ -338,4 +341,7 @@
      */
     private class RenewAuthorisationAction extends AbstractAction {
+        /**
+         * Constructs a new {@code RenewAuthorisationAction}.
+         */
         public RenewAuthorisationAction() {
             putValue(NAME, tr("New Access Token"));
@@ -344,4 +350,5 @@
 
         }
+
         @Override
         public void actionPerformed(ActionEvent arg0) {
@@ -392,5 +399,5 @@
         if (!evt.getPropertyName().equals(OsmApiUrlInputPanel.API_URL_PROP))
             return;
-        setApiUrl((String)evt.getNewValue());
+        setApiUrl((String) evt.getNewValue());
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/OsmApiUrlInputPanel.java	(revision 8510)
@@ -72,5 +72,5 @@
         gc.anchor = GridBagConstraints.NORTHWEST;
         gc.weightx = 1.0;
-        gc.insets = new Insets(0,0,0,0);
+        gc.insets = new Insets(0, 0, 0, 0);
         gc.gridwidth  = 4;
         add(buildDefaultServerUrlPanel(), gc);
@@ -82,5 +82,5 @@
         gc.gridwidth = 1;
         gc.weightx = 0.0;
-        gc.insets = new Insets(0,0,0,3);
+        gc.insets = new Insets(0, 0, 0, 3);
         add(lblApiUrl = new JLabel(tr("OSM Server URL:")), gc);
 
@@ -255,5 +255,5 @@
                 new URL(getComponent().getText().trim());
                 return true;
-            } catch(MalformedURLException e) {
+            } catch (MalformedURLException e) {
                 return false;
             }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/ProxyPreferencesPanel.java	(revision 8510)
@@ -76,5 +76,5 @@
             if (policyName == null) return null;
             policyName = policyName.trim().toLowerCase(Locale.ENGLISH);
-            for(ProxyPolicy pp: values()) {
+            for (ProxyPolicy pp: values()) {
                 if (pp.getName().equals(policyName))
                     return pp;
@@ -127,5 +127,5 @@
 
         gc.anchor = GridBagConstraints.WEST;
-        gc.insets = new Insets(5,5,0,0);
+        gc.insets = new Insets(5, 5, 0, 0);
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 0.0;
@@ -134,5 +134,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        pnl.add(tfProxyHttpHost = new JosmTextField(),gc);
+        pnl.add(tfProxyHttpHost = new JosmTextField(), gc);
 
         gc.gridy = 1;
@@ -144,5 +144,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        pnl.add(tfProxyHttpPort = new JosmTextField(5),gc);
+        pnl.add(tfProxyHttpPort = new JosmTextField(5), gc);
         tfProxyHttpPort.setMinimumSize(tfProxyHttpPort.getPreferredSize());
 
@@ -164,5 +164,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        pnl.add(tfProxyHttpUser = new JosmTextField(20),gc);
+        pnl.add(tfProxyHttpUser = new JosmTextField(20), gc);
         tfProxyHttpUser.setMinimumSize(tfProxyHttpUser.getPreferredSize());
 
@@ -174,5 +174,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        pnl.add(tfProxyHttpPassword = new JosmPasswordField(20),gc);
+        pnl.add(tfProxyHttpPassword = new JosmPasswordField(20), gc);
         tfProxyHttpPassword.setMinimumSize(tfProxyHttpPassword.getPreferredSize());
 
@@ -202,5 +202,5 @@
         GridBagConstraints gc = new GridBagConstraints();
         gc.anchor = GridBagConstraints.WEST;
-        gc.insets = new Insets(5,5,0,0);
+        gc.insets = new Insets(5, 5, 0, 0);
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 0.0;
@@ -209,5 +209,5 @@
         gc.gridx = 1;
         gc.weightx = 1.0;
-        pnl.add(tfProxySocksHost = new JosmTextField(20),gc);
+        pnl.add(tfProxySocksHost = new JosmTextField(20), gc);
 
         gc.gridy = 1;
@@ -252,5 +252,5 @@
         gc.anchor = GridBagConstraints.NORTHWEST;
         gc.weightx = 0.0;
-        pnl.add(rbProxyPolicy.get(ProxyPolicy.NO_PROXY),gc);
+        pnl.add(rbProxyPolicy.get(ProxyPolicy.NO_PROXY), gc);
 
         gc.gridx = 1;
@@ -262,5 +262,5 @@
         gc.gridy = 1;
         gc.weightx = 0.0;
-        pnl.add(rbProxyPolicy.get(ProxyPolicy.USE_SYSTEM_SETTINGS),gc);
+        pnl.add(rbProxyPolicy.get(ProxyPolicy.USE_SYSTEM_SETTINGS), gc);
 
         gc.gridx = 1;
@@ -278,9 +278,9 @@
         gc.gridy = 2;
         gc.weightx = 0.0;
-        pnl.add(rbProxyPolicy.get(ProxyPolicy.USE_HTTP_PROXY),gc);
-
-        gc.gridx = 1;
-        gc.weightx = 1.0;
-        pnl.add(new JLabel(tr("Manually configure a HTTP proxy")),gc);
+        pnl.add(rbProxyPolicy.get(ProxyPolicy.USE_HTTP_PROXY), gc);
+
+        gc.gridx = 1;
+        gc.weightx = 1.0;
+        pnl.add(new JLabel(tr("Manually configure a HTTP proxy")), gc);
 
         // the panel with the http proxy configuration parameters
@@ -290,5 +290,5 @@
         gc.weightx = 1.0;
         gc.weighty = 0.0;
-        pnl.add(pnlHttpProxyConfigurationPanel = buildHttpProxyConfigurationPanel(),gc);
+        pnl.add(pnlHttpProxyConfigurationPanel = buildHttpProxyConfigurationPanel(), gc);
 
         // radio button SOCKS proxy
@@ -296,9 +296,9 @@
         gc.gridy = 4;
         gc.weightx = 0.0;
-        pnl.add(rbProxyPolicy.get(ProxyPolicy.USE_SOCKS_PROXY),gc);
-
-        gc.gridx = 1;
-        gc.weightx = 1.0;
-        pnl.add(new JLabel(tr("Use a SOCKS proxy")),gc);
+        pnl.add(rbProxyPolicy.get(ProxyPolicy.USE_SOCKS_PROXY), gc);
+
+        gc.gridx = 1;
+        gc.weightx = 1.0;
+        pnl.add(new JLabel(tr("Use a SOCKS proxy")), gc);
 
         // the panel with the SOCKS configuration parameters
@@ -309,5 +309,5 @@
         gc.weightx = 1.0;
         gc.weighty = 0.0;
-        pnl.add(pnlSocksProxyConfigurationPanel = buildSocksProxyConfigurationPanel(),gc);
+        pnl.add(pnlSocksProxyConfigurationPanel = buildSocksProxyConfigurationPanel(), gc);
 
         return pnl;
@@ -344,5 +344,6 @@
 
         if (pp.equals(ProxyPolicy.USE_SYSTEM_SETTINGS) && !DefaultProxySelector.willJvmRetrieveSystemProxies()) {
-            Main.warn(tr("JOSM is configured to use proxies from the system setting, but the JVM is not configured to retrieve them. Resetting preferences to ''No proxy''"));
+            Main.warn(tr("JOSM is configured to use proxies from the system setting, but the JVM is not configured to retrieve them. " +
+                         "Resetting preferences to ''No proxy''"));
             pp = ProxyPolicy.NO_PROXY;
             rbProxyPolicy.get(pp).setSelected(true);
@@ -361,5 +362,5 @@
                 tfProxyHttpPassword.setText(pa.getPassword() == null ? "" : String.valueOf(pa.getPassword()));
             }
-        } catch(CredentialsAgentException e) {
+        } catch (CredentialsAgentException e) {
             Main.error(e);
             tfProxyHttpUser.setText("");
@@ -394,5 +395,5 @@
     public ProxyPreferencesPanel() {
         setLayout(new GridBagLayout());
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         add(buildProxySettingsPanel(), GBC.eop().anchor(GridBagConstraints.NORTHWEST).fill(GridBagConstraints.BOTH));
 
@@ -426,5 +427,5 @@
         ProxySelector selector = ProxySelector.getDefault();
         if (selector instanceof DefaultProxySelector) {
-            ((DefaultProxySelector)selector).initFromPreferences();
+            ((DefaultProxySelector) selector).initFromPreferences();
         }
 
@@ -436,5 +437,5 @@
             );
             cm.store(RequestorType.PROXY, tfProxyHttpHost.getText(), pa);
-        } catch(CredentialsAgentException e) {
+        } catch (CredentialsAgentException e) {
             Main.error(e);
         }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreference.java	(revision 8510)
@@ -66,5 +66,5 @@
         gc.anchor = GridBagConstraints.NORTHWEST;
         gc.weightx = 1.0;
-        gc.insets = new Insets(0,0,0,0);
+        gc.insets = new Insets(0, 0, 0, 0);
         pnlApiUrlPreferences = new OsmApiUrlInputPanel();
         pnl.add(pnlApiUrlPreferences, gc);
@@ -75,5 +75,5 @@
         gc.weightx = 1.0;
         gc.weighty = 1.0;
-        gc.insets = new Insets(10,0,3,3);
+        gc.insets = new Insets(10, 0, 3, 3);
         pnl.add(buildTabbedServerPreferences(), gc);
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/shortcut/PrefJPanel.java	(revision 8510)
@@ -121,22 +121,29 @@
         private transient List<Shortcut> data;
 
+        /**
+         * Constructs a new {@code ScListModel}.
+         */
         public ScListModel() {
             data = Shortcut.listAll();
         }
+
         @Override
         public int getColumnCount() {
             return columnNames.length;
         }
+
         @Override
         public int getRowCount() {
             return data.size();
         }
+
         @Override
         public String getColumnName(int col) {
             return columnNames[col];
         }
+
         @Override
         public Object getValueAt(int row, int col) {
-            return (col==0)?  data.get(row).getLongText() : data.get(row);
+            return (col == 0) ? data.get(row).getLongText() : data.get(row);
         }
     }
@@ -154,6 +161,6 @@
                 isSelected, boolean hasFocus, int row, int column) {
             int row1 = shortcutTable.convertRowIndexToModel(row);
-            Shortcut sc = (Shortcut)model.getValueAt(row1, -1);
-            if (sc==null) return null;
+            Shortcut sc = (Shortcut) model.getValueAt(row1, -1);
+            if (sc == null) return null;
             JLabel label = (JLabel) super.getTableCellRendererComponent(
                 table, name ? sc.getLongText() : sc.getKeyText(), isSelected, hasFocus, row, column);
@@ -162,12 +169,12 @@
                 label.setForeground(Main.pref.getUIColor("Table.foreground"));
             }
-            if(sc.isAssignedUser()) {
+            if (sc.isAssignedUser()) {
                 label.setBackground(Main.pref.getColor(
                         marktr("Shortcut Background: User"),
-                        new Color(200,255,200)));
-            } else if(!sc.isAssignedDefault()) {
+                        new Color(200, 255, 200)));
+            } else if (!sc.isAssignedDefault()) {
                 label.setBackground(Main.pref.getColor(
                         marktr("Shortcut Background: Modified"),
-                        new Color(255,255,200)));
+                        new Color(255, 255, 200)));
             }
             return label;
@@ -238,5 +245,5 @@
         // copied from PluginPreference
         JPanel pnl  = new JPanel(new GridBagLayout());
-        pnl.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        pnl.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         GridBagConstraints gc = new GridBagConstraints();
 
@@ -244,5 +251,5 @@
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 0.0;
-        gc.insets = new Insets(0,0,0,5);
+        gc.insets = new Insets(0, 0, 0, 5);
         pnl.add(new JLabel(tr("Search:")), gc);
 
@@ -253,5 +260,5 @@
         SelectAllOnFocusGainedDecorator.decorate(filterField);
         filterField.getDocument().addDocumentListener(new FilterFieldAdapter());
-        pnl.setMaximumSize(new Dimension(300,10));
+        pnl.setMaximumSize(new Dimension(300, 10));
         return pnl;
     }
@@ -276,7 +283,9 @@
     private class CbAction extends AbstractAction implements ListSelectionListener {
         private PrefJPanel panel;
+
         public CbAction(PrefJPanel panel) {
             this.panel = panel;
         }
+
         @Override
         public void valueChanged(ListSelectionEvent e) {
@@ -284,5 +293,5 @@
             if (!lsm.isSelectionEmpty()) {
                 int row = panel.shortcutTable.convertRowIndexToModel(lsm.getMinSelectionIndex());
-                Shortcut sc = (Shortcut)panel.model.getValueAt(row, -1);
+                Shortcut sc = (Shortcut) panel.model.getValueAt(row, -1);
                 panel.cbDefault.setSelected(!sc.isAssignedUser());
                 panel.cbDisable.setSelected(sc.getKeyStroke() == null);
@@ -309,4 +318,5 @@
             }
         }
+
         @Override
         public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -315,5 +325,5 @@
                 if (e != null) { // only if we've been called by a user action
                     int row = panel.shortcutTable.convertRowIndexToModel(lsm.getMinSelectionIndex());
-                    Shortcut sc = (Shortcut)panel.model.getValueAt(row, -1);
+                    Shortcut sc = (Shortcut) panel.model.getValueAt(row, -1);
                     if (panel.cbDisable.isSelected()) {
                         sc.setAssignedModifier(-1);
@@ -359,5 +369,5 @@
             try {
                 final TableRowSorter<? extends TableModel> sorter =
-                    (TableRowSorter<? extends TableModel>)shortcutTable.getRowSorter();
+                    (TableRowSorter<? extends TableModel>) shortcutTable.getRowSorter();
                 if (expr == null) {
                     sorter.setRowFilter(null);
@@ -381,8 +391,10 @@
             filter();
         }
+
         @Override
         public void insertUpdate(DocumentEvent e) {
             filter();
         }
+
         @Override
         public void removeUpdate(DocumentEvent e) {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreference.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreference.java	(revision 8510)
@@ -56,5 +56,5 @@
     public void addGui(PreferenceTabbedPane gui) {
         JPanel testPanel = new JPanel(new GridBagLayout());
-        testPanel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        testPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
 
         prefUseIgnore = new JCheckBox(tr("Use ignore list."), Main.pref.getBoolean(ValidatorPreference.PREF_USE_IGNORE, true));
@@ -84,5 +84,5 @@
         otherUploadEnabled.actionPerformed(null);
 
-        GBC a = GBC.eol().insets(-5,0,0,0);
+        GBC a = GBC.eol().insets(-5, 0, 0, 0);
         a.anchor = GBC.EAST;
         testPanel.add(new JLabel(tr("On demand")), GBC.std());
@@ -107,7 +107,7 @@
             test.ok();
             String name = test.getClass().getName();
-            if(!test.enabled)
+            if (!test.enabled)
                 tests.add(name);
-            if(!test.testBeforeUpload)
+            if (!test.testBeforeUpload)
                 testsBeforeUpload.add(name);
         }
Index: trunk/src/org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java	(revision 8510)
@@ -44,7 +44,11 @@
 
     protected abstract void doBeginTask();
+
     protected abstract void doFinishTask();
+
     protected abstract void doSetIntermediate(boolean value);
+
     protected abstract void doSetTitle(String title);
+
     protected abstract void doSetCustomText(String title);
 
@@ -174,10 +178,10 @@
         }
 
-        if (newTitle == null?shownTitle != null:!newTitle.equals(shownTitle)) {
+        if (newTitle == null ? shownTitle != null : !newTitle.equals(shownTitle)) {
             shownTitle = newTitle;
             doSetTitle(shownTitle);
         }
 
-        if (customText == null?shownCustomText != null:!customText.equals(shownCustomText)) {
+        if (customText == null ? shownCustomText != null : !customText.equals(shownCustomText)) {
             shownCustomText = customText;
             doSetCustomText(shownCustomText);
@@ -241,5 +245,5 @@
         }
         checkState(State.IN_TASK, State.IN_SUBTASK);
-        updateProgress(ticksCount == 0?0:(ticks + childProgress * childTicks) / ticksCount);
+        updateProgress(ticksCount == 0 ? 0 : (ticks + childProgress * childTicks) / ticksCount);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java	(revision 8510)
@@ -24,8 +24,13 @@
     public interface ProgressMonitorDialog {
         void setVisible(boolean visible);
+
         void updateProgress(int progress);
+
         void setCustomText(String text);
+
         void setCurrentAction(String text);
+
         void setIndeterminate(boolean newValue);
+
         // TODO Not implemented properly in background monitor, log message will get lost if progress runs in background
         void appendLogMessage(String message);
@@ -52,5 +57,4 @@
         SwingUtilities.invokeLater(runnable);
     }
-
 
     private void setDialogVisible(boolean visible) {
@@ -114,5 +118,5 @@
     }
 
-    private ActionListener cancelListener = new ActionListener(){
+    private ActionListener cancelListener = new ActionListener() {
         @Override
         public void actionPerformed(ActionEvent e) {
@@ -133,5 +137,5 @@
     };
 
-    private WindowListener windowListener = new WindowAdapter(){
+    private WindowListener windowListener = new WindowAdapter() {
         @Override public void windowClosing(WindowEvent e) {
             cancel();
@@ -179,5 +183,5 @@
     @Override
     protected void updateProgress(double progressValue) {
-        final int newValue = (int)(progressValue * PROGRESS_BAR_MAX);
+        final int newValue = (int) (progressValue * PROGRESS_BAR_MAX);
         if (newValue != currentProgressValue) {
             currentProgressValue = newValue;
@@ -328,5 +332,4 @@
     }
 
-
     @Override
     public Component getWindowParent() {
Index: trunk/src/org/openstreetmap/josm/gui/progress/ProgressRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/progress/ProgressRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/progress/ProgressRenderer.java	(revision 8510)
@@ -9,7 +9,11 @@
 public interface ProgressRenderer {
     void setTaskTitle(String taskTitle);
+
     void setCustomText(String message);
+
     void setIndeterminate(boolean indeterminate);
+
     void setMaximum(int maximum);
+
     void setValue(int value);
 }
Index: trunk/src/org/openstreetmap/josm/gui/progress/SwingRenderingProgressMonitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/progress/SwingRenderingProgressMonitor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/progress/SwingRenderingProgressMonitor.java	(revision 8510)
@@ -48,5 +48,5 @@
     @Override
     protected void updateProgress(double progressValue) {
-        final int newValue = (int)(progressValue * PROGRESS_BAR_MAX);
+        final int newValue = (int) (progressValue * PROGRESS_BAR_MAX);
         if (newValue != currentProgressValue) {
             currentProgressValue = newValue;
Index: trunk/src/org/openstreetmap/josm/gui/tagging/PresetHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/PresetHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/PresetHandler.java	(revision 8510)
@@ -1,13 +1,14 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.tagging;
+
+import java.util.Collection;
+import java.util.List;
 
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Tag;
 
-import java.util.Collection;
-import java.util.List;
-
 public interface PresetHandler {
     Collection<OsmPrimitive> getSelection();
+
     void updateTags(List<Tag> tags);
 }
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagCellEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagCellEditor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagCellEditor.java	(revision 8510)
@@ -91,10 +91,10 @@
 
         // no autocompletion for initial editor#setText()
-        if(autoCompletionList != null) {
+        if (autoCompletionList != null) {
             autoCompletionList.clear();
         }
         if (column == 0) {
             editor.setText(currentTag.getName());
-            TagEditorModel model = (TagEditorModel)table.getModel();
+            TagEditorModel model = (TagEditorModel) table.getModel();
             initAutoCompletionListForKeys(model, currentTag);
             return editor;
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagCellRenderer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagCellRenderer.java	(revision 8510)
@@ -23,9 +23,12 @@
     private Font fontItalic = null;
 
+    /**
+     * Constructs a new {@code TagCellRenderer}.
+     */
     public TagCellRenderer() {
         fontStandard = UIManager.getFont("Table.font");
         fontItalic = fontStandard.deriveFont(Font.ITALIC);
         setOpaque(true);
-        setBorder(new EmptyBorder(5,5,5,5));
+        setBorder(new EmptyBorder(5, 5, 5, 5));
     }
 
@@ -67,5 +70,5 @@
 
     protected TagEditorModel getModel(JTable table) {
-        return (TagEditorModel)table.getModel();
+        return (TagEditorModel) table.getModel();
     }
 
@@ -91,5 +94,5 @@
         // set background color
         //
-        if (isSelected){
+        if (isSelected) {
             setBackground(UIManager.getColor("Table.selectionBackground"));
             setForeground(UIManager.getColor("Table.selectionForeground"));
@@ -100,6 +103,6 @@
 
         switch(vColIndex) {
-        case 0: renderTagName((TagModel)value); break;
-        case 1: renderTagValue((TagModel)value); break;
+        case 0: renderTagName((TagModel) value); break;
+        case 1: renderTagValue((TagModel) value); break;
 
         default: throw new RuntimeException("unexpected index in switch statement");
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java	(revision 8510)
@@ -36,5 +36,5 @@
 
     /** the list holding the tags */
-    protected final transient List<TagModel> tags =new ArrayList<>();
+    protected final transient List<TagModel> tags = new ArrayList<>();
 
     /** indicates whether the model is dirty */
@@ -147,8 +147,8 @@
         switch(col) {
         case 0:
-            updateTagName(tag, (String)value);
+            updateTagName(tag, (String) value);
             break;
         case 1:
-            String v = (String)value;
+            String v = (String) value;
             if (tag.getValueCount() > 1 && !v.isEmpty()) {
                 updateTagValue(tag, v);
@@ -290,5 +290,5 @@
         Iterator<TagModel> it = tags.iterator();
         boolean changed = false;
-        while(it.hasNext()) {
+        while (it.hasNext()) {
             TagModel tm = it.next();
             if (tm.getName().equals(name)) {
@@ -352,5 +352,5 @@
         for (String key : primitive.keySet()) {
             String value = primitive.get(key);
-            this.tags.add(new TagModel(key,value));
+            this.tags.add(new TagModel(key, value));
         }
         TagModel tag = new TagModel();
@@ -366,5 +366,5 @@
      * @param tags the tags of an OSM primitive
      */
-    public void initFromTags(Map<String,String> tags) {
+    public void initFromTags(Map<String, String> tags) {
         this.tags.clear();
         for (Entry<String, String> entry : tags.entrySet()) {
@@ -385,5 +385,5 @@
     public void initFromTags(TagCollection tags) {
         this.tags.clear();
-        if (tags == null){
+        if (tags == null) {
             setDirty(false);
             return;
@@ -391,5 +391,5 @@
         for (String key : tags.getKeys()) {
             String value = tags.getJoinedValues(key);
-            this.tags.add(new TagModel(key,value));
+            this.tags.add(new TagModel(key, value));
         }
         sort();
@@ -407,5 +407,5 @@
      */
     public void applyToPrimitive(Tagged primitive) {
-        Map<String,String> tags = primitive.getKeys();
+        Map<String, String> tags = primitive.getKeys();
         applyToTags(tags, false);
         primitive.setKeys(tags);
@@ -436,10 +436,10 @@
     }
 
-    public Map<String,String> getTags() {
+    public Map<String, String> getTags() {
         return getTags(false);
     }
 
-    public Map<String,String> getTags(boolean keepEmpty) {
-        Map<String,String> tags = new HashMap<>();
+    public Map<String, String> getTags(boolean keepEmpty) {
+        Map<String, String> tags = new HashMap<>();
         applyToTags(tags, keepEmpty);
         return tags;
@@ -494,5 +494,5 @@
                 if (!currentkeys.contains(oldkey)) {
                     ChangePropertyCommand deleteCommand =
-                        new ChangePropertyCommand(primitive,oldkey,null);
+                        new ChangePropertyCommand(primitive, oldkey, null);
                     commands.add(deleteCommand);
                 }
@@ -581,5 +581,5 @@
 
         Map<String, TagModel> modelTags = new HashMap<>();
-        for (int i=0; i<getRowCount(); i++) {
+        for (int i = 0; i < getRowCount(); i++) {
             TagModel tagModel = get(i);
             modelTags.put(tagModel.getName(), tagModel);
@@ -627,8 +627,8 @@
             rowSelectionModel.setValueIsAdjusting(true);
             colSelectionModel.setValueIsAdjusting(true);
-            if (rowMin >= 0 && rowMax >=0) {
+            if (rowMin >= 0 && rowMax >= 0) {
                 rowSelectionModel.setSelectionInterval(rowMin, rowMax);
             }
-            if (colMin >=0 && colMax >= 0) {
+            if (colMin >= 0 && colMax >= 0) {
                 colSelectionModel.setSelectionInterval(colMin, colMax);
             }
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java	(revision 8510)
@@ -75,15 +75,15 @@
         JButton btn;
         pnl.add(btn = new JButton(tagTable.getAddAction()));
-        btn.setMargin(new Insets(0,0,0,0));
+        btn.setMargin(new Insets(0, 0, 0, 0));
         tagTable.addComponentNotStoppingCellEditing(btn);
 
         // delete action
         pnl.add(btn = new JButton(tagTable.getDeleteAction()));
-        btn.setMargin(new Insets(0,0,0,0));
+        btn.setMargin(new Insets(0, 0, 0, 0));
         tagTable.addComponentNotStoppingCellEditing(btn);
 
         // paste action
         pnl.add(btn = new JButton(tagTable.getPasteAction()));
-        btn.setMargin(new Insets(0,0,0,0));
+        btn.setMargin(new Insets(0, 0, 0, 0));
         tagTable.addComponentNotStoppingCellEditing(btn);
         return pnl;
@@ -110,5 +110,5 @@
         gc.weighty = 1.0;
         gc.anchor = GridBagConstraints.NORTHWEST;
-        add(buttonPanel,gc);
+        add(buttonPanel, gc);
 
         // -- the panel with the editor table
@@ -119,5 +119,5 @@
         gc.weighty = 1.0;
         gc.anchor = GridBagConstraints.CENTER;
-        add(tablePanel,gc);
+        add(tablePanel, gc);
 
         if (presetHandler != null) {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagModel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagModel.java	(revision 8510)
@@ -55,5 +55,5 @@
      * @return the tag name
      */
-    public String getName(){
+    public String getName() {
         return name;
     }
@@ -98,5 +98,5 @@
      * @param value the value
      */
-    public void removeValue(String value){
+    public void removeValue(String value) {
         value = (value == null) ? "" : value;
         values.remove(value);
@@ -114,5 +114,5 @@
         } else {
             StringBuilder sb = new StringBuilder();
-            for (int i =0; i < values.size(); i++) {
+            for (int i = 0; i < values.size(); i++) {
                 sb.append(values.get(i));
                 if (i + 1 < values.size()) {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java	(revision 8510)
@@ -118,5 +118,5 @@
             }
 
-            if (row==-1 && col==-1) {
+            if (row == -1 && col == -1) {
                 requestFocusInCell(0, 0);
                 return;
@@ -126,22 +126,21 @@
                 col++;
             } else if (col == 1 && row < getRowCount()-1) {
-                col=0;
+                col = 0;
                 row++;
-            } else if (col == 1 && row == getRowCount()-1){
-                // we are at the end. Append an empty row and move the focus
-                // to its second column
-                String key = ((TagModel)model.getValueAt(row, 0)).getName();
+            } else if (col == 1 && row == getRowCount()-1) {
+                // we are at the end. Append an empty row and move the focus to its second column
+                String key = ((TagModel) model.getValueAt(row, 0)).getName();
                 if (!key.trim().isEmpty()) {
                     model.appendNewTag();
-                    col=0;
+                    col = 0;
                     row++;
                 } else {
                     clearSelection();
-                    if (nextFocusComponent!=null)
+                    if (nextFocusComponent != null)
                         nextFocusComponent.requestFocusInWindow();
                     return;
                 }
             }
-            requestFocusInCell(row,col);
+            requestFocusInCell(row, col);
         }
     }
@@ -170,5 +169,5 @@
                 row--;
             }
-            requestFocusInCell(row,col);
+            requestFocusInCell(row, col);
         }
     }
@@ -300,5 +299,5 @@
             }
             final int rowIdx = model.getRowCount()-1;
-            String key = ((TagModel)model.getValueAt(rowIdx, 0)).getName();
+            String key = ((TagModel) model.getValueAt(rowIdx, 0)).getName();
             if (!key.trim().isEmpty()) {
                 model.appendNewTag();
@@ -322,5 +321,5 @@
     class PasteAction extends RunnableAction implements PropertyChangeListener{
         public PasteAction() {
-            putValue(SMALL_ICON, ImageProvider.get("","pastetags"));
+            putValue(SMALL_ICON, ImageProvider.get("", "pastetags"));
             putValue(SHORT_DESCRIPTION, tr("Paste tags from buffer"));
             TagTable.this.addPropertyChangeListener(this);
@@ -336,5 +335,5 @@
             if (buf == null || buf.isEmpty() || buf.matches(CopyAction.CLIPBOARD_REGEXP)) {
                 List<PrimitiveData> directlyAdded = Main.pasteBuffer.getDirectlyAdded();
-                if (directlyAdded==null || directlyAdded.isEmpty()) return;
+                if (directlyAdded == null || directlyAdded.isEmpty()) return;
                 PasteTagsAction.TagPaster tagPaster = new PasteTagsAction.TagPaster(directlyAdded, Collections.<OsmPrimitive>singletonList(relation));
                 model.updateTags(tagPaster.execute());
@@ -342,5 +341,5 @@
                 // Paste tags from arbitrary text
                  Map<String, String> tags = TextTagParser.readTagsFromText(buf);
-                 if (tags==null || tags.isEmpty()) {
+                 if (tags == null || tags.isEmpty()) {
                     TextTagParser.showBadBufferMessage(ht("/Action/PasteTags"));
                  } else if (TextTagParser.validateTags(tags)) {
@@ -349,5 +348,5 @@
                         String k = entry.getKey();
                         String v = entry.getValue();
-                        newTags.add(new Tag(k,v));
+                        newTags.add(new Tag(k, v));
                      }
                      model.updateTags(newTags);
@@ -443,7 +442,7 @@
 
     @Override
-    public Dimension getPreferredSize(){
+    public Dimension getPreferredSize() {
         Container c = getParent();
-        while(c != null && !(c instanceof JViewport)) {
+        while (c != null && !(c instanceof JViewport)) {
             c = c.getParent();
         }
@@ -536,8 +535,8 @@
         editCellAt(row, col);
         Component c = getEditorComponent();
-        if (c!=null) {
+        if (c != null) {
             c.requestFocusInWindow();
             if (c instanceof JTextComponent) {
-                 ((JTextComponent)c).selectAll();
+                 ((JTextComponent) c).selectAll();
             }
         }
@@ -581,7 +580,6 @@
 
         // delegate to the default implementation
-        return super.editCellAt(row, column,e);
-    }
-
+        return super.editCellAt(row, column, e);
+    }
 
     @Override
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 8510)
@@ -114,6 +114,6 @@
 
     public String getLocaleName() {
-        if(locale_name == null) {
-            if(name_context != null) {
+        if (locale_name == null) {
+            if (name_context != null) {
                 locale_name = trc(name_context, TaggingPresetItems.fixPresetString(name));
             } else {
@@ -208,4 +208,5 @@
     private static class PresetPanel extends JPanel {
         private boolean hasElements = false;
+
         PresetPanel() {
             super(new GridBagLayout());
@@ -219,5 +220,5 @@
         List<Link> l = new LinkedList<>();
         List<PresetLink> presetLink = new LinkedList<>();
-        if (types != null){
+        if (types != null) {
             JPanel pp = new JPanel();
             for (TaggingPresetType t : types) {
@@ -267,5 +268,5 @@
         JToggleButton tb = new JToggleButton(new ToolbarButtonAction());
         tb.setFocusable(false);
-        p.add(tb, GBC.std(0,0).anchor(GBC.LINE_END));
+        p.add(tb, GBC.std(0, 0).anchor(GBC.LINE_END));
         return p;
     }
@@ -318,5 +319,5 @@
             final Relation r = new Relation();
             final Collection<RelationMember> members = new HashSet<>();
-            for(Tag t : getChangedTags()) {
+            for (Tag t : getChangedTags()) {
                 r.put(t.getKey(), t.getValue());
             }
@@ -340,5 +341,5 @@
         public PresetDialog(Component content, String title, ImageIcon icon, boolean disableApply, boolean showNewRelation) {
             super(Main.parent, title,
-                    showNewRelation?
+                    showNewRelation ?
                             new String[] {tr("Apply Preset"), tr("New relation"), tr("Cancel")} :
                                 new String[] {tr("Apply Preset"), tr("Cancel")},
@@ -346,5 +347,5 @@
             if (icon != null)
                 setIconImage(icon.getImage());
-            contentInsets = new Insets(10,5,0,5);
+            contentInsets = new Insets(10, 5, 0, 5);
             if (showNewRelation) {
                 setButtonIcons(new String[] {"ok", "dialogs/addrelation", "cancel" });
@@ -375,6 +376,6 @@
         if (p.getComponentCount() != 0 && (sel.isEmpty() || p.hasElements)) {
             String title = trn("Change {0} object", "Change {0} objects", sel.size(), sel.size());
-            if(sel.isEmpty()) {
-                if(originalSelectionEmpty) {
+            if (sel.isEmpty()) {
+                if (originalSelectionEmpty) {
                     title = tr("Nothing selected!");
                 } else {
@@ -460,5 +461,5 @@
     @Override
     public String toString() {
-        return (types == null?"":types) + " " + name;
+        return (types == null ? "" : types) + " " + name;
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 8510)
@@ -87,10 +87,10 @@
 
     // cache the parsing of types using a LRU cache (http://java-planet.blogspot.com/2005/08/how-to-set-up-simple-lru-cache-using.html)
-    private static final Map<String,Set<TaggingPresetType>> TYPE_CACHE = new LinkedHashMap<>(16, 1.1f, true);
+    private static final Map<String, Set<TaggingPresetType>> TYPE_CACHE = new LinkedHashMap<>(16, 1.1f, true);
 
     /**
      * Last value of each key used in presets, used for prefilling corresponding fields
      */
-    private static final Map<String,String> LAST_VALUES = new HashMap<>();
+    private static final Map<String, String> LAST_VALUES = new HashMap<>();
 
     public static class PresetListEntry implements Comparable<PresetListEntry> {
@@ -196,7 +196,7 @@
 
         public void setRequisite(String str) throws SAXException {
-            if("required".equals(str)) {
+            if ("required".equals(str)) {
                 required = true;
-            } else if(!"optional".equals(str))
+            } else if (!"optional".equals(str))
                 throw new SAXException(tr("Unknown requisite: {0}", str));
         }
@@ -232,7 +232,7 @@
             if (count > 0 && !required) {
                 cstring = "0,"+count;
-            } else if(count > 0) {
+            } else if (count > 0) {
                 cstring = String.valueOf(count);
-            } else if(!required) {
+            } else if (!required) {
                 cstring = "0-...";
             } else {
@@ -242,10 +242,10 @@
                 locale_text = getLocaleText(text, text_context, null);
             }
-            p.add(new JLabel(locale_text+":"), GBC.std().insets(0,0,10,0));
-            p.add(new JLabel(key), GBC.std().insets(0,0,10,0));
-            p.add(new JLabel(cstring), types == null ? GBC.eol() : GBC.std().insets(0,0,10,0));
+            p.add(new JLabel(locale_text+":"), GBC.std().insets(0, 0, 10, 0));
+            p.add(new JLabel(key), GBC.std().insets(0, 0, 10, 0));
+            p.add(new JLabel(cstring), types == null ? GBC.eol() : GBC.std().insets(0, 0, 10, 0));
             if (types != null) {
                 JPanel pp = new JPanel();
-                for(TaggingPresetType t : types) {
+                for (TaggingPresetType t : types) {
                     pp.add(new JLabel(ImageProvider.get(t.getIconName())));
                 }
@@ -553,4 +553,5 @@
 
         public abstract MatchType getDefaultMatch();
+
         public abstract Collection<String> getValues();
 
@@ -650,5 +651,5 @@
                 textField.setMaxChars(Integer.valueOf(length));
             }
-            if (usage.unused()){
+            if (usage.unused()) {
                 if (auto_increment_selected != 0  && auto_increment != null) {
                     try {
@@ -681,5 +682,5 @@
                 comboBox.setEditor(textField);
                 comboBox.getEditor().setItem(DIFFERENT);
-                value=comboBox;
+                value = comboBox;
                 originalValue = DIFFERENT;
             }
@@ -702,5 +703,5 @@
                     JToggleButton aibutton = new JToggleButton(ai);
                     aibutton.setToolTipText(tr("Select auto-increment of {0} for this field", ai));
-                    aibutton.setMargin(new java.awt.Insets(0,0,0,0));
+                    aibutton.setMargin(new java.awt.Insets(0, 0, 0, 0));
                     aibutton.setFocusable(false);
                     saveHorizontalSpace(aibutton);
@@ -732,5 +733,5 @@
                 JButton releasebutton = new JButton("X");
                 releasebutton.setToolTipText(tr("Cancel auto-increment for this field"));
-                releasebutton.setMargin(new java.awt.Insets(0,0,0,0));
+                releasebutton.setMargin(new java.awt.Insets(0, 0, 0, 0));
                 releasebutton.setFocusable(false);
                 releasebutton.addActionListener(new ActionListener() {
@@ -745,5 +746,5 @@
                 value = pnl;
             }
-            p.add(new JLabel(locale_text+":"), GBC.std().insets(0,0,10,0));
+            p.add(new JLabel(locale_text+":"), GBC.std().insets(0, 0, 10, 0));
             p.add(value, GBC.eol().fill(GBC.HORIZONTAL));
             return true;
@@ -765,5 +766,5 @@
                 return ((JosmTextField) comp).getText();
             } else if (comp instanceof JPanel) {
-                return getValue(((JPanel)comp).getComponent(0));
+                return getValue(((JPanel) comp).getComponent(0));
             } else {
                 return null;
@@ -996,4 +997,5 @@
 
         protected abstract Object getSelectedItem();
+
         protected abstract void addToPanelAnchor(JPanel p, String def, boolean presetInitiallyMatches);
 
@@ -1414,4 +1416,5 @@
     private static class ConcatenatingJList extends JList<PresetListEntry> {
         private String delimiter;
+
         public ConcatenatingJList(String del, PresetListEntry[] o) {
             super(o);
@@ -1431,5 +1434,5 @@
                     final String value = lm.getElementAt(i).value;
                     if (parts.contains(value)) {
-                        intParts[j++]=i;
+                        intParts[j++] = i;
                         parts.remove(value);
                     }
@@ -1447,6 +1450,6 @@
             int[] si = getSelectedIndices();
             StringBuilder builder = new StringBuilder();
-            for (int i=0; i<si.length; i++) {
-                if (i>0) {
+            for (int i = 0; i < si.length; i++) {
+                if (i > 0) {
                     builder.append(delimiter);
                 }
@@ -1474,5 +1477,5 @@
 
     static String fixPresetString(String s) {
-        return s == null ? s : s.replaceAll("'","''");
+        return s == null ? s : s.replaceAll("'", "''");
     }
 
@@ -1500,5 +1503,5 @@
         boolean backslash = false;
         StringBuilder item = new StringBuilder();
-        for (int i=0; i<s.length(); i++) {
+        for (int i = 0; i < s.length(); i++) {
             char ch = s.charAt(i);
             if (backslash) {
@@ -1530,5 +1533,5 @@
                 returnValue.hadEmpty = true;
             }
-            if(s.hasKeys()) {
+            if (s.hasKeys()) {
                 returnValue.hadKeys = true;
             }
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java	(revision 8510)
@@ -67,5 +67,5 @@
     private Component copyMenuComponent(Component menuComponent) {
         if (menuComponent instanceof JMenu) {
-            JMenu menu = (JMenu)menuComponent;
+            JMenu menu = (JMenu) menuComponent;
             JMenu result = new JMenu(menu.getAction());
             for (Component item:menu.getMenuComponents()) {
@@ -75,9 +75,9 @@
             return result;
         } else if (menuComponent instanceof JMenuItem) {
-            JMenuItem menuItem = (JMenuItem)menuComponent;
+            JMenuItem menuItem = (JMenuItem) menuComponent;
             JMenuItem result = new JMenuItem(menuItem.getAction());
             result.setText(menuItem.getText());
             return result;
-        } else if(menuComponent instanceof JSeparator) {
+        } else if (menuComponent instanceof JSeparator) {
             return new JSeparator();
         } else {
@@ -102,5 +102,5 @@
      * Sorts the menu items using the translated item text
      */
-    public void sortMenu(){
+    public void sortMenu() {
         TaggingPresetMenu.sortMenu(this.menu);
     }
@@ -109,5 +109,5 @@
      * Sorts the menu items using the translated item text
      */
-    public static void sortMenu(JMenu menu){
+    public static void sortMenu(JMenu menu) {
         Component[] items = menu.getMenuComponents();
         PresetTextComparator comp = new PresetTextComparator();
@@ -116,16 +116,16 @@
         for (int i = 0; i < items.length; i++) {
             Object item = items[i];
-            if (item instanceof JMenu){
-                sortMenu((JMenu)item);
+            if (item instanceof JMenu) {
+                sortMenu((JMenu) item);
             }
-            if (item instanceof JMenuItem){
-                sortarray.add((JMenuItem)item);
-                if (i == items.length-1){
+            if (item instanceof JMenuItem) {
+                sortarray.add((JMenuItem) item);
+                if (i == items.length-1) {
                     Collections.sort(sortarray, comp);
                     int pos = 0;
                     for (JMenuItem menuItem : sortarray) {
                         int oldPos;
-                        if (lastSeparator == 0){
-                            oldPos=pos;
+                        if (lastSeparator == 0) {
+                            oldPos = pos;
                         } else {
                             oldPos = pos+lastSeparator+1;
@@ -137,12 +137,12 @@
                     lastSeparator = 0;
                 }
-            } else if (item instanceof JSeparator){
+            } else if (item instanceof JSeparator) {
                 Collections.sort(sortarray, comp);
                 int pos = 0;
                 for (JMenuItem menuItem : sortarray) {
                     int oldPos;
-                    if(lastSeparator == 0){
-                        oldPos=pos;
-                    }else {
+                    if (lastSeparator == 0) {
+                        oldPos = pos;
+                    } else {
                         oldPos = pos+lastSeparator+1;
                     }
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetNameTemplateList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetNameTemplateList.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetNameTemplateList.java	(revision 8510)
@@ -36,5 +36,5 @@
 
     private void buildPresetsWithPattern() {
-        synchronized(this) {
+        synchronized (this) {
             Main.debug("Building list of presets with name template");
             presetsWithPattern.clear();
@@ -53,5 +53,5 @@
      */
     public TaggingPreset findPresetTemplate(OsmPrimitive primitive) {
-        synchronized(this) {
+        synchronized (this) {
             for (TaggingPreset t : presetsWithPattern) {
                 Collection<TaggingPresetType> type = Collections.singleton(TaggingPresetType.forPrimitive(primitive));
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetReader.java	(revision 8510)
@@ -342,5 +342,5 @@
     public static Collection<TaggingPreset> readAll(Collection<String> sources, boolean validate, boolean displayErrMsg) {
         HashSetWithLast<TaggingPreset> allPresets = new HashSetWithLast<>();
-        for(String source : sources)  {
+        for (String source : sources)  {
             try {
                 readAll(source, validate, allPresets);
@@ -354,5 +354,5 @@
                     JOptionPane.showMessageDialog(
                             Main.parent,
-                            tr("Could not read tagging preset source: {0}",source),
+                            tr("Could not read tagging preset source: {0}", source),
                             tr("Error"),
                             JOptionPane.ERROR_MESSAGE
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java	(revision 8510)
@@ -222,5 +222,7 @@
         edSearchText.getDocument().addDocumentListener(new DocumentListener() {
             @Override public void removeUpdate(DocumentEvent e) { filterPresets(); }
+
             @Override public void insertUpdate(DocumentEvent e) { filterPresets(); }
+
             @Override public void changedUpdate(DocumentEvent e) { filterPresets(); }
         });
@@ -257,9 +259,9 @@
             @Override
             public void mouseClicked(MouseEvent e) {
-                if (e.getClickCount()>1) {
-                    if (dblClickListener!=null)
+                if (e.getClickCount() > 1) {
+                    if (dblClickListener != null)
                         dblClickListener.actionPerformed(null);
                 } else {
-                    if (clickListener!=null)
+                    if (clickListener != null)
                         clickListener.actionPerformed(null);
                 }
@@ -336,5 +338,5 @@
 
         DataSet ds = Main.main.getCurrentDataSet();
-        Collection<OsmPrimitive> selected = (ds==null)? Collections.<OsmPrimitive>emptyList() : ds.getSelected();
+        Collection<OsmPrimitive> selected = (ds == null) ? Collections.<OsmPrimitive>emptyList() : ds.getSelected();
         final List<PresetClassification> result = classifications.getMatchingPresets(
                 text, onlyApplicable, inTags, getTypesInSelection(), selected);
@@ -461,5 +463,5 @@
                 typesInSelectionDirty = false;
                 typesInSelection.clear();
-                if (Main.main==null || Main.main.getCurrentDataSet() == null) return typesInSelection;
+                if (Main.main == null || Main.main.getCurrentDataSet() == null) return typesInSelection;
                 for (OsmPrimitive primitive : Main.main.getCurrentDataSet().getSelected()) {
                     typesInSelection.add(TaggingPresetType.forPrimitive(primitive));
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresets.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresets.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresets.java	(revision 8510)
@@ -52,5 +52,5 @@
         } else {
             AutoCompletionManager.cachePresets(taggingPresets);
-            Map<TaggingPresetMenu,JMenu> submenus = new HashMap<>();
+            Map<TaggingPresetMenu, JMenu> submenus = new HashMap<>();
             for (final TaggingPreset p : taggingPresets) {
                 JMenu m = p.group != null ? submenus.get(p.group) : Main.main.menu.presetsMenu;
@@ -60,6 +60,6 @@
                     JMenu submenu = new JMenu(p);
                     submenu.setText(p.getLocaleName());
-                    ((TaggingPresetMenu)p).menu = submenu;
-                    submenus.put((TaggingPresetMenu)p, submenu);
+                    ((TaggingPresetMenu) p).menu = submenu;
+                    submenus.put((TaggingPresetMenu) p, submenu);
                     m.add(submenu);
                 } else {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java	(revision 8510)
@@ -130,5 +130,5 @@
                 }
             }
-            JTextComponent editorComponent = (JTextComponent)comboBox.getEditor().getEditorComponent();
+            JTextComponent editorComponent = (JTextComponent) comboBox.getEditor().getEditorComponent();
             // save unix system selection (middle mouse paste)
             Clipboard sysSel = Toolkit.getDefaultToolkit().getSystemSelection();
@@ -190,4 +190,5 @@
                         }
                     }
+
                     @Override
                     public void focusGained(FocusEvent e) {
@@ -230,5 +231,5 @@
             cbEditor.setItem(item);
         } else if (item instanceof AutoCompletionListItem) {
-            cbEditor.setItem(((AutoCompletionListItem)item).getValue());
+            cbEditor.setItem(((AutoCompletionListItem) item).getValue());
         } else
             throw new IllegalArgumentException("Unsupported item: "+item);
@@ -248,5 +249,5 @@
             String s = (String) item;
             // find the string in the model or create a new item
-            for (int i=0; i< getModel().getSize(); i++) {
+            for (int i = 0; i < getModel().getSize(); i++) {
                 AutoCompletionListItem acItem = getModel().getElementAt(i);
                 if (s.equals(acItem.getValue())) {
@@ -266,5 +267,5 @@
      */
     public void setPossibleItems(Collection<String> elems) {
-        DefaultComboBoxModel<AutoCompletionListItem> model = (DefaultComboBoxModel<AutoCompletionListItem>)this.getModel();
+        DefaultComboBoxModel<AutoCompletionListItem> model = (DefaultComboBoxModel<AutoCompletionListItem>) this.getModel();
         Object oldValue = this.getEditor().getItem(); // Do not use getSelectedItem(); (fix #8013)
         model.removeAllElements();
@@ -283,5 +284,5 @@
      */
     public void setPossibleACItems(Collection<AutoCompletionListItem> elems) {
-        DefaultComboBoxModel<AutoCompletionListItem> model = (DefaultComboBoxModel<AutoCompletionListItem>)this.getModel();
+        DefaultComboBoxModel<AutoCompletionListItem> model = (DefaultComboBoxModel<AutoCompletionListItem>) this.getModel();
         Object oldValue = getSelectedItem();
         Object editorOldValue = this.getEditor().getItem();
Index: trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java	(revision 8510)
@@ -89,7 +89,6 @@
                     super.insertString(offs, str, a);
                     return;
-                } catch(NumberFormatException e) {
-                    // either the new text or the current text isn't a number. We continue with
-                    // autocompletion
+                } catch (NumberFormatException e) {
+                    // either the new text or the current text isn't a number. We continue with autocompletion
                 }
             }
@@ -97,10 +96,8 @@
             autoCompletionList.applyFilter(prefix+str);
             if (autoCompletionList.getFilteredSize() > 0 && !Objects.equals(str, noAutoCompletionString)) {
-                // there are matches. Insert the new text and highlight the
-                // auto completed suffix
-                //
+                // there are matches. Insert the new text and highlight the auto completed suffix
                 String matchingString = autoCompletionList.getFilteredItem(0).getValue();
-                remove(0,getLength());
-                super.insertString(0,matchingString,a);
+                remove(0, getLength());
+                super.insertString(0, matchingString, a);
 
                 // highlight from insert position to end position to put the caret at the end
@@ -111,8 +108,7 @@
                 //
                 String newText = prefix + str;
-                remove(0,getLength());
-                super.insertString(0,newText,a);
+                remove(0, getLength());
+                super.insertString(0, newText, a);
                 setCaretPosition(getLength());
-
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionList.java	(revision 8510)
@@ -39,5 +39,5 @@
     private String filter = null;
     /** map from value to priority */
-    private transient Map<String,AutoCompletionListItem> valutToItemMap;
+    private transient Map<String, AutoCompletionListItem> valutToItemMap;
 
     /**
@@ -140,5 +140,5 @@
                 continue;
             }
-            AutoCompletionListItem item = new AutoCompletionListItem(value,priority);
+            AutoCompletionListItem item = new AutoCompletionListItem(value, priority);
             appendOrUpdatePriority(item);
 
@@ -211,5 +211,5 @@
         if (key == null)
             return;
-        for (int i=0;i< list.size();i++) {
+        for (int i = 0; i < list.size(); i++) {
             AutoCompletionListItem item = list.get(i);
             if (item.getValue().equals(key)) {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionListItem.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionListItem.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionListItem.java	(revision 8510)
@@ -116,5 +116,5 @@
         if (getClass() != obj.getClass())
             return false;
-        final AutoCompletionListItem other = (AutoCompletionListItem)obj;
+        final AutoCompletionListItem other = (AutoCompletionListItem) obj;
         if (priority == null) {
             if (other.priority != null)
Index: trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java	(revision 8510)
@@ -195,5 +195,5 @@
      * @param relation the relation
      */
-    protected void cacheRelationMemberRoles(Relation relation){
+    protected void cacheRelationMemberRoles(Relation relation) {
         for (RelationMember m: relation.getMembers()) {
             if (m.hasRole()) {
Index: trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java	(revision 8510)
@@ -68,5 +68,5 @@
         Component[] children = root.getComponents();
         for (Component child : children) {
-            if(child instanceof Container) {
+            if (child instanceof Container) {
                 setEnabledRec((Container) child, enabled);
             } else {
@@ -160,5 +160,5 @@
                     new ImageProvider("cancel").setMaxSize(ImageSizes.LARGEICON).get(),
                     new ImageProvider("upload").setMaxSize(ImageSizes.LARGEICON).addOverlay(
-                            new ImageOverlay(new ImageProvider("warning-small"), 0.5,0.5,1.0,1.0)).get()});
+                            new ImageOverlay(new ImageProvider("warning-small"), 0.5, 0.5, 1.0, 1.0)).get()});
         dlg.setToolTipTexts(new String[] {
                 tr("Cancel"),
@@ -228,5 +228,5 @@
                     Window window = SwingUtilities.getWindowAncestor(pane);
                     if (window instanceof Dialog) {
-                        Dialog dialog = (Dialog)window;
+                        Dialog dialog = (Dialog) window;
                         if (!dialog.isResizable()) {
                             dialog.setResizable(true);
@@ -265,5 +265,5 @@
         String[] s = code.trim().split("[^\\.0-9]+");
 
-        if (s.length==0) return new BasicStroke();
+        if (s.length == 0) return new BasicStroke();
         float w;
         try {
@@ -272,9 +272,9 @@
             w = 1.0f;
         }
-        if (s.length>1) {
-            float[] dash= new float[s.length-1];
+        if (s.length > 1) {
+            float[] dash = new float[s.length-1];
             float sumAbs = 0;
             try {
-                for (int i=0; i<s.length-1; i++) {
+                for (int i = 0; i < s.length-1; i++) {
                    dash[i] = Float.parseFloat(s[i+1]);
                    sumAbs += Math.abs(dash[i]);
@@ -292,5 +292,5 @@
                     BasicStroke.JOIN_MITER, 10.0f, dash, 0.0f);
         } else {
-            if (w>1) {
+            if (w > 1) {
                 // thick stroke
                 return new BasicStroke(w, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
@@ -387,5 +387,5 @@
             Object value = UIManager.get(key);
             if (value != null && value instanceof FontUIResource) {
-                FontUIResource fui = (FontUIResource)value;
+                FontUIResource fui = (FontUIResource) value;
                 UIManager.put(key, new FontUIResource(name, fui.getStyle(), fui.getSize()));
             }
Index: trunk/src/org/openstreetmap/josm/gui/util/HighlightHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/util/HighlightHelper.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/util/HighlightHelper.java	(revision 8510)
@@ -118,5 +118,5 @@
     public void findAllHighlighted() {
         DataSet ds = Main.main.getCurrentDataSet();
-        if (ds!=null) {
+        if (ds != null) {
             highlightedPrimitives.addAll(ds.allNonDeletedPrimitives());
         }
@@ -128,5 +128,5 @@
     public static void clearAllHighlighted() {
         DataSet ds = Main.main.getCurrentDataSet();
-        if (ds!=null) {
+        if (ds != null) {
             for (OsmPrimitive p: ds.allNonDeletedPrimitives()) {
                 p.setHighlighted(false);
Index: trunk/src/org/openstreetmap/josm/gui/util/TableHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/util/TableHelper.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/util/TableHelper.java	(revision 8510)
@@ -11,9 +11,9 @@
  */
 public final class TableHelper {
-    
+
     private TableHelper() {
         // Hide default constructor for utils classes
     }
-    
+
     /**
      * (originally from @class org.openstreetmap.josm.gui.preferences.SourceEditor)
@@ -23,5 +23,5 @@
     public static void adjustColumnWidth(JTable tbl, int col, int maxColumnWidth) {
         int maxwidth = 0;
-        for (int row=0; row<tbl.getRowCount(); row++) {
+        for (int row = 0; row < tbl.getRowCount(); row++) {
             TableCellRenderer tcr = tbl.getCellRenderer(row, col);
             Object val = tbl.getValueAt(row, col);
Index: trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/AbstractTextComponentValidator.java	(revision 8510)
@@ -34,5 +34,5 @@
 public abstract class AbstractTextComponentValidator implements ActionListener, FocusListener, DocumentListener, PropertyChangeListener{
     private static final Border ERROR_BORDER = BorderFactory.createLineBorder(Color.RED, 1);
-    private static final Color ERROR_BACKGROUND =  new Color(255,224,224);
+    private static final Color ERROR_BACKGROUND =  new Color(255, 224, 224);
 
     private JTextComponent tc;
@@ -108,5 +108,5 @@
         if (addActionListener) {
             if (tc instanceof JosmTextField) {
-                JosmTextField tf = (JosmTextField)tc;
+                JosmTextField tf = (JosmTextField) tc;
                 tf.addActionListener(this);
             }
@@ -172,5 +172,5 @@
     public void propertyChange(PropertyChangeEvent evt) {
         if ("enabled".equals(evt.getPropertyName())) {
-            boolean enabled = (Boolean)evt.getNewValue();
+            boolean enabled = (Boolean) evt.getNewValue();
             if (enabled) {
                 validate();
Index: trunk/src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java	(revision 8510)
@@ -33,7 +33,7 @@
     protected void buildInputFields() {
         tfLatLon = new JosmTextField[4];
-        for(int i=0; i< 4; i++) {
+        for (int i = 0; i < 4; i++) {
             tfLatLon[i] = new JosmTextField(11);
-            tfLatLon[i].setMinimumSize(new Dimension(100,new JosmTextField().getMinimumSize().height));
+            tfLatLon[i].setMinimumSize(new Dimension(100, new JosmTextField().getMinimumSize().height));
             SelectAllOnFocusGainedDecorator.decorate(tfLatLon[i]);
         }
@@ -46,5 +46,5 @@
     protected final void build() {
         buildInputFields();
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
         setLayout(new GridBagLayout());
         tfOsmUrl.getDocument().addDocumentListener(new OsmUrlRefresher());
@@ -55,11 +55,11 @@
         tfOsmUrl.addFocusListener(new SelectAllOnFocusGainedDecorator());
 
-        add(new JLabel(tr("Min. latitude")), GBC.std().insets(0,0,3,5));
-        add(tfLatLon[0], GBC.std().insets(0,0,3,5));
-        add(new JLabel(tr("Min. longitude")), GBC.std().insets(0,0,3,5));
+        add(new JLabel(tr("Min. latitude")), GBC.std().insets(0, 0, 3, 5));
+        add(tfLatLon[0], GBC.std().insets(0, 0, 3, 5));
+        add(new JLabel(tr("Min. longitude")), GBC.std().insets(0, 0, 3, 5));
         add(tfLatLon[1], GBC.eol());
-        add(new JLabel(tr("Max. latitude")), GBC.std().insets(0,0,3,5));
-        add(tfLatLon[2], GBC.std().insets(0,0,3,5));
-        add(new JLabel(tr("Max. longitude")), GBC.std().insets(0,0,3,5));
+        add(new JLabel(tr("Max. latitude")), GBC.std().insets(0, 0, 3, 5));
+        add(tfLatLon[2], GBC.std().insets(0, 0, 3, 5));
+        add(new JLabel(tr("Max. longitude")), GBC.std().insets(0, 0, 3, 5));
         add(tfLatLon[3], GBC.eol());
 
@@ -70,12 +70,15 @@
         gc.fill = GridBagConstraints.HORIZONTAL;
         gc.weightx = 1.0;
-        gc.insets = new Insets(10,0,0,3);
+        gc.insets = new Insets(10, 0, 0, 3);
         add(new JMultilineLabel(tr("URL from www.openstreetmap.org (you can paste a download URL here to specify a bounding box)")), gc);
 
         gc.gridy = 3;
-        gc.insets = new Insets(3,0,0,3);
+        gc.insets = new Insets(3, 0, 0, 3);
         add(tfOsmUrl, gc);
     }
 
+    /**
+     * Constructs a new {@code BoundingBoxSelectionPanel}.
+     */
     public BoundingBoxSelectionPanel() {
         build();
@@ -87,5 +90,5 @@
 
     public Bounds getBoundingBox() {
-        double minlon, minlat, maxlon,maxlat;
+        double minlon, minlat, maxlon, maxlat;
         try {
             minlat = Double.parseDouble(tfLatLon[0].getText().trim());
@@ -93,5 +96,5 @@
             maxlat = Double.parseDouble(tfLatLon[2].getText().trim());
             maxlon = Double.parseDouble(tfLatLon[3].getText().trim());
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             return null;
         }
@@ -103,10 +106,10 @@
         if (minlat > maxlat)
             return null;
-        return new Bounds(minlon,minlat,maxlon,maxlat);
+        return new Bounds(minlon, minlat, maxlon, maxlat);
     }
 
     private boolean parseURL() {
         Bounds b = OsmUrlToBounds.parse(tfOsmUrl.getText());
-        if(b == null) return false;
+        if (b == null) return false;
         updateBboxFields(b);
         return true;
@@ -136,5 +139,5 @@
             try {
                 value = Double.parseDouble(getComponent().getText());
-            } catch(NumberFormatException ex) {
+            } catch (NumberFormatException ex) {
                 feedbackInvalid(tr("The string ''{0}'' is not a valid double value.", getComponent().getText()));
                 return;
@@ -152,5 +155,5 @@
             try {
                 value = Double.parseDouble(getComponent().getText());
-            } catch(NumberFormatException ex) {
+            } catch (NumberFormatException ex) {
                 return false;
             }
@@ -176,5 +179,5 @@
             try {
                 value = Double.parseDouble(getComponent().getText());
-            } catch(NumberFormatException ex) {
+            } catch (NumberFormatException ex) {
                 feedbackInvalid(tr("The string ''{0}'' is not a valid double value.", getComponent().getText()));
                 return;
@@ -192,5 +195,5 @@
             try {
                 value = Double.parseDouble(getComponent().getText());
-            } catch(NumberFormatException ex) {
+            } catch (NumberFormatException ex) {
                 return false;
             }
@@ -204,6 +207,8 @@
         @Override
         public void changedUpdate(DocumentEvent e) { parseURL(); }
+
         @Override
         public void insertUpdate(DocumentEvent e) { parseURL(); }
+
         @Override
         public void removeUpdate(DocumentEvent e) { parseURL(); }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/ChangesetIdTextField.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/ChangesetIdTextField.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/ChangesetIdTextField.java	(revision 8510)
@@ -80,5 +80,5 @@
                         return true;
                     }
-                } catch(NumberFormatException e) {
+                } catch (NumberFormatException e) {
                     // Ignored
                 }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/ComboBoxHistory.java	(revision 8510)
@@ -35,5 +35,5 @@
         for (int i = 0; i < getSize(); i++) {
             String oldEntry = getElementAt(i).getValue();
-            if(oldEntry.equals(newEntry)) {
+            if (oldEntry.equals(newEntry)) {
                 removeElementAt(i);
             }
@@ -44,5 +44,5 @@
 
         // remove an element, if the history gets too large
-        if(getSize()> maxSize) {
+        if (getSize() > maxSize) {
             removeElementAt(getSize()-1);
         }
@@ -67,5 +67,5 @@
             @Override
             public boolean hasNext() {
-                if(position < getSize()-1 && getSize()>0)
+                if (position < getSize()-1 && getSize() > 0)
                     return true;
                 return false;
@@ -82,5 +82,5 @@
     public void setItemsAsString(List<String> items) {
         removeAllElements();
-        for (int i = items.size()-1; i>=0; i--) {
+        for (int i = items.size()-1; i >= 0; i--) {
             addElement(new AutoCompletionListItem(items.get(i)));
         }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/DateEditorWithSlider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/DateEditorWithSlider.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/DateEditorWithSlider.java	(revision 8510)
@@ -32,5 +32,5 @@
     private Date dateMin;
     private Date dateMax;
-    private static final int MAX_SLIDER=300;
+    private static final int MAX_SLIDER = 300;
     private boolean watchSlider = true;
 
@@ -44,6 +44,6 @@
         super(new GridBagLayout());
         spinner = new JSpinner(new SpinnerDateModel());
-        String pattern = ((SimpleDateFormat)DateUtils.getDateFormat(DateFormat.DEFAULT)).toPattern();
-        JSpinner.DateEditor timeEditor = new JSpinner.DateEditor(spinner,pattern);
+        String pattern = ((SimpleDateFormat) DateUtils.getDateFormat(DateFormat.DEFAULT)).toPattern();
+        JSpinner.DateEditor timeEditor = new JSpinner.DateEditor(spinner, pattern);
         spinner.setEditor(timeEditor);
 
@@ -51,5 +51,5 @@
         spinner.getPreferredSize().height));
 
-        slider = new JSlider(0,MAX_SLIDER);
+        slider = new JSlider(0, MAX_SLIDER);
         spinner.addChangeListener(new ChangeListener() {
             @Override
@@ -58,8 +58,8 @@
                 Date d = (Date) spinner.getValue();
                 int j = intFromDate(d);
-                if (i!=j) {
-                    watchSlider=false;
+                if (i != j) {
+                    watchSlider = false;
                     slider.setValue(j);
-                    watchSlider=true;
+                    watchSlider = true;
                 }
                 for (ChangeListener l : listeners) {
@@ -79,7 +79,7 @@
             }
         });
-        add(new JLabel(labelText),GBC.std());
-        add(spinner,GBC.std().insets(10,0,0,0));
-        add(slider,GBC.eol().insets(10,0,0,0).fill(GBC.HORIZONTAL));
+        add(new JLabel(labelText), GBC.std());
+        add(spinner, GBC.std().insets(10, 0, 0, 0));
+        add(slider, GBC.eol().insets(10, 0, 0, 0).fill(GBC.HORIZONTAL));
 
         dateMin = new Date(0);
@@ -89,9 +89,9 @@
     protected Date dateFromInt(int value) {
         double k = 1.0*value/MAX_SLIDER;
-        return new Date((long)(dateMax.getTime()*k+ dateMin.getTime()*(1-k)));
+        return new Date((long) (dateMax.getTime()*k+ dateMin.getTime()*(1-k)));
     }
 
     protected int intFromDate(Date date) {
-        return (int)(300.0*(date.getTime()-dateMin.getTime()) /
+        return (int) (300.0*(date.getTime()-dateMin.getTime()) /
                 (dateMax.getTime()-dateMin.getTime()));
     }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/DisableShortcutsOnFocusGainedTextField.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/DisableShortcutsOnFocusGainedTextField.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/DisableShortcutsOnFocusGainedTextField.java	(revision 8510)
@@ -91,5 +91,5 @@
     }
 
-    private final transient List<Pair<Action,Shortcut>> unregisteredActionShortcuts = new ArrayList<>();
+    private final transient List<Pair<Action, Shortcut>> unregisteredActionShortcuts = new ArrayList<>();
     private final Set<JosmAction> disabledMenuActions = new HashSet<>();
 
@@ -150,5 +150,5 @@
                 if (action != null) {
                     Main.unregisterActionShortcut(action, shortcut);
-                    unregisteredActionShortcuts.add(new Pair<>(action,shortcut));
+                    unregisteredActionShortcuts.add(new Pair<>(action, shortcut));
                 }
             }
@@ -179,5 +179,5 @@
      */
     protected void restoreActionShortcuts() {
-        for (Pair<Action,Shortcut> p : unregisteredActionShortcuts) {
+        for (Pair<Action, Shortcut> p : unregisteredActionShortcuts) {
             Main.registerActionShortcut(p.a, p.b);
         }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/HistoryComboBox.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/HistoryComboBox.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/HistoryComboBox.java	(revision 8510)
@@ -6,6 +6,6 @@
 import javax.swing.text.JTextComponent;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletingComboBox;
-import org.openstreetmap.josm.Main;
 
 public class HistoryComboBox extends AutoCompletingComboBox {
@@ -24,15 +24,15 @@
 
     public String getText() {
-        return ((JTextComponent)getEditor().getEditorComponent()).getText();
+        return ((JTextComponent) getEditor().getEditorComponent()).getText();
     }
 
     public void setText(String value) {
         setAutocompleteEnabled(false);
-        ((JTextComponent)getEditor().getEditorComponent()).setText(value);
+        ((JTextComponent) getEditor().getEditorComponent()).setText(value);
         setAutocompleteEnabled(true);
     }
 
     public void addCurrentItemToHistory() {
-        model.addElement((String)getEditor().getItem());
+        model.addElement((String) getEditor().getItem());
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/widgets/ImageLabel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/ImageLabel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/ImageLabel.java	(revision 8510)
@@ -31,6 +31,6 @@
         setLayout(new GridBagLayout());
         setBackground(background);
-        add(new JLabel(ImageProvider.get("statusline/"+img+".png")), GBC.std().anchor(GBC.WEST).insets(0,1,1,0));
-        add(tf = new JLabel(), GBC.std().fill(GBC.BOTH).anchor(GBC.WEST).insets(2,1,1,0));
+        add(new JLabel(ImageProvider.get("statusline/"+img+".png")), GBC.std().anchor(GBC.WEST).insets(0, 1, 1, 0));
+        add(tf = new JLabel(), GBC.std().fill(GBC.BOTH).anchor(GBC.WEST).insets(2, 1, 1, 0));
         setToolTipText(tooltip);
         this.charCount = charCount;
Index: trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java	(revision 8510)
@@ -76,5 +76,5 @@
         super(aModel);
         List<E> list = new ArrayList<>(aModel.getSize());
-        for (int i = 0; i<aModel.getSize(); i++) {
+        for (int i = 0; i < aModel.getSize(); i++) {
             list.add(aModel.getElementAt(i));
         }
@@ -143,5 +143,5 @@
             Accessible child = getUI().getAccessibleChild(this, i);
             if (child instanceof ComboPopup) {
-                return ((ComboPopup)child).getList();
+                return ((ComboPopup) child).getList();
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java	(revision 8510)
@@ -151,5 +151,5 @@
             // Taken from http://stackoverflow.com/a/24571681/2257172
             int h = getHeight();
-            ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
+            ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
             Insets ins = getInsets();
             FontMetrics fm = g.getFontMetrics();
Index: trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java	(revision 8510)
@@ -108,4 +108,5 @@
         }
     }
+
     public void removePropertyChangeListener(PropertyChangeListener listener) {
         if (listener != null) {
@@ -113,4 +114,5 @@
         }
     }
+
     public PropertyChangeListener[] getPropertyChangeListeners() {
         return pcs.getPropertyChangeListeners();
@@ -240,5 +242,5 @@
     private Component childForNode(Node node) {
         if (node instanceof Leaf) {
-            Leaf leaf = (Leaf)node;
+            Leaf leaf = (Leaf) node;
             String name = leaf.getName();
             return (name != null) ? childMap.get(name) : null;
@@ -260,10 +262,10 @@
             return new Dimension(dividerSize, dividerSize);
         } else {
-            Split split = (Split)root;
+            Split split = (Split) root;
             List<Node> splitChildren = split.getChildren();
             int width = 0;
             int height = 0;
             if (split.isRowLayout()) {
-                for(Node splitChild : splitChildren) {
+                for (Node splitChild : splitChildren) {
                     Dimension size = preferredNodeSize(splitChild);
                     width += size.width;
@@ -271,5 +273,5 @@
                 }
             } else {
-                for(Node splitChild : splitChildren) {
+                for (Node splitChild : splitChildren) {
                     Dimension size = preferredNodeSize(splitChild);
                     width = Math.max(width, size.width);
@@ -289,10 +291,10 @@
             return new Dimension(dividerSize, dividerSize);
         } else {
-            Split split = (Split)root;
+            Split split = (Split) root;
             List<Node> splitChildren = split.getChildren();
             int width = 0;
             int height = 0;
             if (split.isRowLayout()) {
-                for(Node splitChild : splitChildren) {
+                for (Node splitChild : splitChildren) {
                     Dimension size = minimumNodeSize(splitChild);
                     width += size.width;
@@ -300,5 +302,5 @@
                 }
             } else {
-                for(Node splitChild : splitChildren) {
+                for (Node splitChild : splitChildren) {
                     Dimension size = minimumNodeSize(splitChild);
                     width = Math.max(width, size.width);
@@ -331,5 +333,5 @@
     private Rectangle boundsWithYandHeight(Rectangle bounds, double y, double height) {
         Rectangle r = new Rectangle();
-        r.setBounds((int)(bounds.getX()), (int)y, (int)(bounds.getWidth()), (int)height);
+        r.setBounds((int) (bounds.getX()), (int) y, (int) (bounds.getWidth()), (int) height);
         return r;
     }
@@ -337,5 +339,5 @@
     private Rectangle boundsWithXandWidth(Rectangle bounds, double x, double width) {
         Rectangle r = new Rectangle();
-        r.setBounds((int)x, (int)(bounds.getY()), (int)width, (int)(bounds.getHeight()));
+        r.setBounds((int) x, (int) (bounds.getY()), (int) width, (int) (bounds.getHeight()));
         return r;
     }
@@ -364,5 +366,5 @@
             int minWeightedWidth = 0;    // sum of the weighted childrens' min widths
             int totalWeightedWidth = 0;  // sum of the weighted childrens' widths
-            for(Node splitChild : split.getChildren()) {
+            for (Node splitChild : split.getChildren()) {
                 int nodeWidth = splitChild.getBounds().width;
                 int nodeMinWidth = Math.min(nodeWidth, minimumNodeSize(splitChild).width);
@@ -380,5 +382,5 @@
                 (totalWeightedWidth - minWeightedWidth) > extraWidth;
 
-            while(splitChildren.hasNext()) {
+            while (splitChildren.hasNext()) {
                 Node splitChild = splitChildren.next();
                 Rectangle splitChildBounds = splitChild.getBounds();
@@ -410,5 +412,5 @@
             int minWeightedHeight = 0;    // sum of the weighted childrens' min heights
             int totalWeightedHeight = 0;  // sum of the weighted childrens' heights
-            for(Node splitChild : split.getChildren()) {
+            for (Node splitChild : split.getChildren()) {
                 int nodeHeight = splitChild.getBounds().height;
                 int nodeMinHeight = Math.min(nodeHeight, minimumNodeSize(splitChild).height);
@@ -426,5 +428,5 @@
                 (totalWeightedHeight - minWeightedHeight) > extraHeight;
 
-            while(splitChildren.hasNext()) {
+            while (splitChildren.hasNext()) {
                 Node splitChild = splitChildren.next();
                 Rectangle splitChildBounds = splitChild.getBounds();
@@ -485,5 +487,5 @@
             double availableWidth = extraWidth;
 
-            while(splitChildren.hasNext()) {
+            while (splitChildren.hasNext()) {
                 Node splitChild = splitChildren.next();
                 Rectangle splitChildBounds = splitChild.getBounds();
@@ -523,5 +525,5 @@
             double availableHeight = extraHeight;
 
-            while(splitChildren.hasNext()) {
+            while (splitChildren.hasNext()) {
                 Node splitChild = splitChildren.next();
                 Rectangle splitChildBounds = splitChild.getBounds();
@@ -563,5 +565,5 @@
             root.setBounds(bounds);
         } else if (root instanceof Split) {
-            Split split = (Split)root;
+            Split split = (Split) root;
             boolean grow = split.isRowLayout()
             ? split.getBounds().width <= bounds.width
@@ -595,5 +597,5 @@
             root.setBounds(bounds);
         } else if (root instanceof Split) {
-            Split split = (Split)root;
+            Split split = (Split) root;
             Iterator<Node> splitChildren = split.getChildren().iterator();
             Rectangle childBounds = null;
@@ -609,8 +611,8 @@
             if (split.isRowLayout()) {
                 double x = bounds.getX();
-                while(splitChildren.hasNext()) {
+                while (splitChildren.hasNext()) {
                     Node splitChild = splitChildren.next();
                     Divider dividerChild =
-                        (splitChildren.hasNext()) ? (Divider)(splitChildren.next()) : null;
+                        (splitChildren.hasNext()) ? (Divider) (splitChildren.next()) : null;
 
                     double childWidth = 0.0;
@@ -643,8 +645,8 @@
                  */
                 double y = bounds.getY();
-                while(splitChildren.hasNext()) {
+                while (splitChildren.hasNext()) {
                     Node splitChild = splitChildren.next();
                     Divider dividerChild =
-                        (splitChildren.hasNext()) ? (Divider)(splitChildren.next()) : null;
+                        (splitChildren.hasNext()) ? (Divider) (splitChildren.next()) : null;
 
                         double childHeight = 0.0;
@@ -687,8 +689,10 @@
     public static class InvalidLayoutException extends RuntimeException {
         private final transient Node node;
+
         public InvalidLayoutException(String msg, Node node) {
             super(msg);
             this.node = node;
         }
+
         /**
          * @return the invalid Node.
@@ -705,5 +709,5 @@
     private void checkLayout(Node root) {
         if (root instanceof Split) {
-            Split split = (Split)root;
+            Split split = (Split) root;
             if (split.getChildren().size() <= 2) {
                 throwInvalidLayout("Split must have > 2 children", root);
@@ -711,5 +715,5 @@
             Iterator<Node> splitChildren = split.getChildren().iterator();
             double weight = 0.0;
-            while(splitChildren.hasNext()) {
+            while (splitChildren.hasNext()) {
                 Node splitChild = splitChildren.next();
                 if (splitChild instanceof Divider) {
@@ -750,9 +754,9 @@
     private Divider dividerAt(Node root, int x, int y) {
         if (root instanceof Divider) {
-            Divider divider = (Divider)root;
+            Divider divider = (Divider) root;
             return (divider.getBounds().contains(x, y)) ? divider : null;
         } else if (root instanceof Split) {
-            Split split = (Split)root;
-            for(Node child : split.getChildren()) {
+            Split split = (Split) root;
+            for (Node child : split.getChildren()) {
                 if (child.getBounds().contains(x, y))
                     return dividerAt(child, x, y);
@@ -784,8 +788,8 @@
         if (nodeOverlapsRectangle(root, r) && (root instanceof Split)) {
             List<Divider> dividers = new ArrayList<>();
-            for(Node child : ((Split)root).getChildren()) {
+            for (Node child : ((Split) root).getChildren()) {
                 if (child instanceof Divider) {
                     if (nodeOverlapsRectangle(child, r)) {
-                        dividers.add((Divider)child);
+                        dividers.add((Divider) child);
                     }
                 } else if (child instanceof Split) {
@@ -897,5 +901,5 @@
          */
         public void setWeight(double weight) {
-            if ((weight < 0.0)|| (weight > 1.0))
+            if ((weight < 0.0) || (weight > 1.0))
                 throw new IllegalArgumentException("invalid weight");
             this.weight = weight;
@@ -999,9 +1003,9 @@
             if (children == null)
                 throw new IllegalArgumentException("children must be a non-null List");
-            for(Node child : this.children) {
+            for (Node child : this.children) {
                 child.parent_set(null);
             }
             this.children = new ArrayList<>(children);
-            for(Node child : this.children) {
+            for (Node child : this.children) {
                 child.parent_set(this);
             }
@@ -1019,5 +1023,5 @@
             List<Node> children = getChildren();
             Node weightedChild = null;
-            for(Node child : children) {
+            for (Node child : children) {
                 if (child.getWeight() > 0.0) {
                     weightedChild = child;
@@ -1146,5 +1150,5 @@
             if (st.nextToken() == StreamTokenizer.TT_WORD) {
                 if (node instanceof Leaf) {
-                    ((Leaf)node).setName(st.sval);
+                    ((Leaf) node).setName(st.sval);
                 } else {
                     throwParseException(st, "can't specify name for " + node);
Index: trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitPane.java	(revision 8510)
@@ -65,6 +65,5 @@
 
     /**
-     * A convenience method that returns the layout manager cast
-     * to MutliSplitLayout.
+     * A convenience method that returns the layout manager cast to MultiSplitLayout.
      *
      * @return this MultiSplitPane's layout manager
@@ -73,5 +72,5 @@
      */
     public final MultiSplitLayout getMultiSplitLayout() {
-        return (MultiSplitLayout)getLayout();
+        return (MultiSplitLayout) getLayout();
     }
 
@@ -159,5 +158,5 @@
         public void paint(Graphics g, Divider divider) {
             if ((divider == activeDivider()) && !isContinuousLayout()) {
-                Graphics2D g2d = (Graphics2D)g;
+                Graphics2D g2d = (Graphics2D) g;
                 g2d.setColor(Color.black);
                 g2d.fill(divider.getBounds());
@@ -211,5 +210,5 @@
             try {
                 MultiSplitLayout msl = getMultiSplitLayout();
-                for(Divider divider : msl.dividersThatOverlap(clipR)) {
+                for (Divider divider : msl.dividersThatOverlap(clipR)) {
                     dp.paint(dpg, divider);
                 }
@@ -366,12 +365,15 @@
             startDrag(e.getX(), e.getY());
         }
+
         @Override
         public void mouseReleased(MouseEvent e) {
             finishDrag();
         }
+
         @Override
         public void mouseDragged(MouseEvent e) {
             updateDrag(e.getX(), e.getY());
         }
+
         @Override
         public void keyPressed(KeyEvent e) {
@@ -380,6 +382,8 @@
             }
         }
+
         @Override
         public void keyReleased(KeyEvent e) { }
+
         @Override
         public void keyTyped(KeyEvent e) { }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/PopupMenuLauncher.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/PopupMenuLauncher.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/PopupMenuLauncher.java	(revision 8510)
@@ -52,6 +52,9 @@
     }
 
-    @Override public void mousePressed(MouseEvent e) { processEvent(e); }
-    @Override public void mouseReleased(MouseEvent e) { processEvent(e); }
+    @Override
+    public void mousePressed(MouseEvent e) { processEvent(e); }
+
+    @Override
+    public void mouseReleased(MouseEvent e) { processEvent(e); }
 
     private void processEvent(MouseEvent e) {
@@ -89,6 +92,9 @@
         if (component != null && component.isFocusable() && !component.hasFocus() && component.requestFocusInWindow()) {
             component.addFocusListener(new FocusListener() {
-                @Override public void focusLost(FocusEvent e) {}
-                @Override public void focusGained(FocusEvent e) {
+                @Override
+                public void focusLost(FocusEvent e) {}
+
+                @Override
+                public void focusGained(FocusEvent e) {
                     showMenu(evt);
                     component.removeFocusListener(this);
Index: trunk/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java	(revision 8510)
@@ -184,6 +184,9 @@
         /** Filter: No one may change the armed/selected/pressed status except us. */
         @Override public void setArmed(boolean b) { }
+
         @Override public void setSelected(boolean b) { }
+
         @Override public void setPressed(boolean b) { }
+
         /** We disable focusing on the component when it is not enabled. */
         @Override public void setEnabled(boolean b) {
@@ -194,38 +197,55 @@
          * that is being decorated. */
         @Override public boolean isArmed() { return other.isArmed(); }
+
         @Override public boolean isSelected() { return other.isSelected(); }
+
         @Override public boolean isEnabled() { return other.isEnabled(); }
+
         @Override public boolean isPressed() { return other.isPressed(); }
+
         @Override public boolean isRollover() { return other.isRollover(); }
+
         @Override public void setRollover(boolean b) { other.setRollover(b); }
+
         @Override public void setMnemonic(int key) { other.setMnemonic(key); }
+
         @Override public int getMnemonic() { return other.getMnemonic(); }
+
         @Override public void setActionCommand(String s) {
             other.setActionCommand(s);
         }
+
         @Override public String getActionCommand() {
             return other.getActionCommand();
         }
+
         @Override public void setGroup(ButtonGroup group) {
             other.setGroup(group);
         }
+
         @Override public void addActionListener(ActionListener l) {
             other.addActionListener(l);
         }
+
         @Override public void removeActionListener(ActionListener l) {
             other.removeActionListener(l);
         }
+
         @Override public void addItemListener(ItemListener l) {
             other.addItemListener(l);
         }
+
         @Override public void removeItemListener(ItemListener l) {
             other.removeItemListener(l);
         }
+
         @Override public void addChangeListener(ChangeListener l) {
             other.addChangeListener(l);
         }
+
         @Override public void removeChangeListener(ChangeListener l) {
             other.removeChangeListener(l);
         }
+
         @Override public Object[] getSelectedObjects() {
             return other.getSelectedObjects();
Index: trunk/src/org/openstreetmap/josm/gui/widgets/SelectAllOnFocusGainedDecorator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/SelectAllOnFocusGainedDecorator.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/SelectAllOnFocusGainedDecorator.java	(revision 8510)
@@ -19,5 +19,5 @@
         Component c = e.getComponent();
         if (c instanceof JTextComponent) {
-            JTextComponent tc = (JTextComponent)c;
+            JTextComponent tc = (JTextComponent) c;
             tc.selectAll();
         }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/UrlLabel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/UrlLabel.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/UrlLabel.java	(revision 8510)
@@ -1,4 +1,6 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.widgets;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
 
 import java.awt.Cursor;
@@ -11,6 +13,4 @@
 import org.openstreetmap.josm.tools.OpenBrowser;
 import org.openstreetmap.josm.tools.Utils;
-
-import static org.openstreetmap.josm.tools.I18n.tr;
 
 /**
@@ -67,5 +67,5 @@
         setUrl(url);
         setDescription(description);
-        if (fontPlus!=0) {
+        if (fontPlus != 0) {
             setFont(getFont().deriveFont(0, getFont().getSize()+fontPlus));
         }
@@ -102,5 +102,5 @@
      */
     public final void setDescription(String description) {
-        this.description = description == null? "" : description;
+        this.description = description == null ? "" : description;
         this.description = this.description.replace("&", "&amp;").replace(">", "&gt;").replace("<", "&lt;");
         refresh();
Index: trunk/src/org/openstreetmap/josm/io/AbstractParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/AbstractParser.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/AbstractParser.java	(revision 8510)
@@ -47,5 +47,5 @@
         try {
             l = Long.parseLong(v);
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             throwException(tr("Illegal value for mandatory attribute ''{0}'' of type long. Got ''{1}''.", name, v), e);
         }
@@ -63,5 +63,5 @@
         try {
             l = Long.valueOf(v);
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             throwException(tr("Illegal value for mandatory attribute ''{0}'' of type long. Got ''{1}''.", name, v), e);
         }
@@ -80,5 +80,5 @@
         try {
             d = Double.parseDouble(v);
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             throwException(tr("Illegal value for attribute ''{0}'' of type double. Got ''{1}''.", name, v), e);
         }
@@ -106,8 +106,8 @@
 
     protected final HistoryOsmPrimitive createPrimitive(Attributes atts, OsmPrimitiveType type) throws SAXException {
-        long id = getMandatoryAttributeLong(atts,"id");
-        long version = getMandatoryAttributeLong(atts,"version");
-        long changesetId = getMandatoryAttributeLong(atts,"changeset");
-        boolean visible= getMandatoryAttributeBoolean(atts, "visible");
+        long id = getMandatoryAttributeLong(atts, "id");
+        long version = getMandatoryAttributeLong(atts, "version");
+        long changesetId = getMandatoryAttributeLong(atts, "changeset");
+        boolean visible = getMandatoryAttributeBoolean(atts, "visible");
 
         Long uid = getAttributeLong(atts, "uid");
@@ -130,17 +130,11 @@
             Double lat = getAttributeDouble(atts, "lat");
             Double lon = getAttributeDouble(atts, "lon");
-            LatLon coor = (lat != null && lon != null) ? new LatLon(lat,lon) : null;
-            primitive = new HistoryNode(
-                    id,version,visible,user,changesetId,timestamp,coor
-            );
+            LatLon coor = (lat != null && lon != null) ? new LatLon(lat, lon) : null;
+            primitive = new HistoryNode(id, version, visible, user, changesetId, timestamp, coor);
 
         } else if (type.equals(OsmPrimitiveType.WAY)) {
-            primitive = new HistoryWay(
-                    id,version,visible,user,changesetId,timestamp
-            );
+            primitive = new HistoryWay(id, version, visible, user, changesetId, timestamp);
         } else if (type.equals(OsmPrimitiveType.RELATION)) {
-            primitive = new HistoryRelation(
-                    id,version,visible,user,changesetId,timestamp
-            );
+            primitive = new HistoryRelation(id, version, visible, user, changesetId, timestamp);
         }
         return primitive;
@@ -162,10 +156,10 @@
         String key = getMandatoryAttributeString(atts, "k");
         String value = getMandatoryAttributeString(atts, "v");
-        currentPrimitive.put(key,value);
+        currentPrimitive.put(key, value);
     }
 
     protected final void handleNodeReference(Attributes atts) throws SAXException {
         long ref = getMandatoryAttributeLong(atts, "ref");
-        ((HistoryWay)currentPrimitive).addNode(ref);
+        ((HistoryWay) currentPrimitive).addNode(ref);
     }
 
@@ -176,10 +170,10 @@
         try {
             type = OsmPrimitiveType.fromApiTypeName(v);
-        } catch(IllegalArgumentException e) {
+        } catch (IllegalArgumentException e) {
             throwException(tr("Illegal value for mandatory attribute ''{0}'' of type OsmPrimitiveType. Got ''{1}''.", "type", v), e);
         }
         String role = getMandatoryAttributeString(atts, "role");
-        RelationMemberData member = new RelationMemberData(role, type,ref);
-        ((HistoryRelation)currentPrimitive).addMember(member);
+        RelationMemberData member = new RelationMemberData(role, type, ref);
+        ((HistoryRelation) currentPrimitive).addMember(member);
     }
 
Index: trunk/src/org/openstreetmap/josm/io/AbstractReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/AbstractReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/AbstractReader.java	(revision 8510)
@@ -82,11 +82,11 @@
      * @throws IllegalDataException if a data integrity problem is detected
      */
-    protected void processWaysAfterParsing() throws IllegalDataException{
+    protected void processWaysAfterParsing() throws IllegalDataException {
         for (Entry<Long, Collection<Long>> entry : ways.entrySet()) {
             Long externalWayId = entry.getKey();
-            Way w = (Way)externalIdMap.get(new SimplePrimitiveId(externalWayId, OsmPrimitiveType.WAY));
+            Way w = (Way) externalIdMap.get(new SimplePrimitiveId(externalWayId, OsmPrimitiveType.WAY));
             List<Node> wayNodes = new ArrayList<>();
             for (long id : entry.getValue()) {
-                Node n = (Node)externalIdMap.get(new SimplePrimitiveId(id, OsmPrimitiveType.NODE));
+                Node n = (Node) externalIdMap.get(new SimplePrimitiveId(id, OsmPrimitiveType.NODE));
                 if (n == null) {
                     if (id <= 0)
@@ -96,6 +96,5 @@
                                         id));
                     // create an incomplete node if necessary
-                    //
-                    n = (Node)ds.getPrimitiveById(id,OsmPrimitiveType.NODE);
+                    n = (Node) ds.getPrimitiveById(id, OsmPrimitiveType.NODE);
                     if (n == null) {
                         n = new Node(id);
Index: trunk/src/org/openstreetmap/josm/io/AllFormatsImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/AllFormatsImporter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/AllFormatsImporter.java	(revision 8510)
@@ -33,7 +33,7 @@
         Iterator<FileImporter> imp = ExtensionFileFilter.importers.iterator();
         StringBuilder ext = new StringBuilder();
-        while(imp.hasNext()) {
+        while (imp.hasNext()) {
             FileImporter fi = imp.next();
-            if(fi instanceof AllFormatsImporter) {
+            if (fi instanceof AllFormatsImporter) {
                 continue;
             }
Index: trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java	(revision 8510)
@@ -49,5 +49,5 @@
         GpxData result = null;
         String url = "trackpoints?bbox="+b.getMinLon()+","+b.getMinLat()+","+b.getMaxLon()+","+b.getMaxLat()+"&page=";
-        for (int i = 0;!done;++i) {
+        for (int i = 0; !done; ++i) {
             progressMonitor.subTask(tr("Downloading points {0} to {1}...", i * 5000, (i + 1) * 5000));
             try (InputStream in = getInputStream(url+i, progressMonitor.createSubTaskMonitor(1, true))) {
@@ -63,5 +63,5 @@
                 } else if (currentGpx.hasTrackPoints()) {
                     result.mergeFrom(currentGpx);
-                } else{
+                } else {
                     done = true;
                 }
@@ -150,5 +150,5 @@
             }
             return ds;
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             throw e;
         } catch (Exception e) {
@@ -188,5 +188,5 @@
      * Indicates that the number of fetched notes equals the specified limit. Thus there might be more notes to download.
      */
-    public static class MoreNotesException extends RuntimeException{
+    public static class MoreNotesException extends RuntimeException {
         /**
          * The downloaded notes
Index: trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java	(revision 8510)
@@ -134,5 +134,5 @@
         this.data = updateData();
         saveToDisk();
-        Main.pref.putInteger("cache." + ident, (int)(System.currentTimeMillis()/1000));
+        Main.pref.putInteger("cache." + ident, (int) (System.currentTimeMillis()/1000));
         return data;
     }
Index: trunk/src/org/openstreetmap/josm/io/CacheFiles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CacheFiles.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/CacheFiles.java	(revision 8510)
@@ -78,5 +78,5 @@
             this.dir.mkdirs();
             dir_writeable = true;
-        } catch(Exception e) {
+        } catch (Exception e) {
             // We have no access to this directory, so don't do anything
             dir_writeable = false;
@@ -84,9 +84,9 @@
         this.enabled = dir_writeable;
         this.expire = Main.pref.getLong("cache." + ident + "." + "expire", EXPIRE_DAILY);
-        if(this.expire < 0) {
+        if (this.expire < 0) {
             this.expire = CacheFiles.EXPIRE_NEVER;
         }
         this.maxsize = Main.pref.getLong("cache." + ident + "." + "maxsize", 50);
-        if(this.maxsize < 0) {
+        if (this.maxsize < 0) {
             this.maxsize = -1;
         }
@@ -99,11 +99,11 @@
      */
     public byte[] getData(String ident) {
-        if(!enabled) return null;
+        if (!enabled) return null;
         try {
             File data = getPath(ident);
-            if(!data.exists())
+            if (!data.exists())
                 return null;
 
-            if(isExpired(data)) {
+            if (isExpired(data)) {
                 data.delete();
                 return null;
@@ -111,5 +111,5 @@
 
             // Update last mod time so we don't expire recently used data
-            if(updateModTime) {
+            if (updateModTime) {
                 data.setLastModified(System.currentTimeMillis());
             }
@@ -132,5 +132,5 @@
      */
     public void saveData(String ident, byte[] data) {
-        if(!enabled) return;
+        if (!enabled) return;
         try {
             File f = getPath(ident);
@@ -156,16 +156,16 @@
      */
     public BufferedImage getImg(String ident) {
-        if(!enabled) return null;
+        if (!enabled) return null;
         try {
             File img = getPath(ident, "png");
-            if(!img.exists())
+            if (!img.exists())
                 return null;
 
-            if(isExpired(img)) {
+            if (isExpired(img)) {
                 img.delete();
                 return null;
             }
             // Update last mod time so we don't expire recently used images
-            if(updateModTime) {
+            if (updateModTime) {
                 img.setLastModified(System.currentTimeMillis());
             }
@@ -201,5 +201,5 @@
     public void setExpire(int amount, boolean force) {
         String key = "cache." + ident + "." + "expire";
-        if(!Main.pref.get(key).isEmpty() && !force)
+        if (!Main.pref.get(key).isEmpty() && !force)
             return;
 
@@ -215,5 +215,5 @@
     public void setMaxSize(int amount, boolean force) {
         String key = "cache." + ident + "." + "maxsize";
-        if(!Main.pref.get(key).isEmpty() && !force)
+        if (!Main.pref.get(key).isEmpty() && !force)
             return;
 
@@ -235,5 +235,5 @@
      */
     public void checkCleanUp() {
-        if(this.writes > CLEANUP_INTERVAL) {
+        if (this.writes > CLEANUP_INTERVAL) {
             cleanUp();
         }
@@ -244,5 +244,5 @@
      */
     public void cleanUp() {
-        if(!this.enabled || maxsize == -1) return;
+        if (!this.enabled || maxsize == -1) return;
 
         SortedMap<Long, File> modtime = new TreeMap<>();
@@ -251,6 +251,6 @@
         File[] files = dir.listFiles();
         if (files != null) {
-            for(File f : files) {
-                if(isExpired(f)) {
+            for (File f : files) {
+                if (isExpired(f)) {
                     f.delete();
                 } else {
@@ -261,9 +261,9 @@
         }
 
-        if(dirsize < maxsize*1000*1000) return;
+        if (dirsize < maxsize*1000*1000) return;
 
         Set<Long> keySet = modtime.keySet();
         Iterator<Long> it = keySet.iterator();
-        int i=0;
+        int i = 0;
         while (it.hasNext()) {
             i++;
@@ -271,5 +271,5 @@
 
             // Delete a couple of files, then check again
-            if(i % CLEANUP_TRESHOLD == 0 && getDirSize() < maxsize)
+            if (i % CLEANUP_TRESHOLD == 0 && getDirSize() < maxsize)
                 return;
         }
@@ -318,10 +318,10 @@
      */
     private long getDirSize() {
-        if(!enabled) return -1;
+        if (!enabled) return -1;
         long dirsize = 0;
 
         File[] files = dir.listFiles();
         if (files != null) {
-            for(File f : files) {
+            for (File f : files) {
                 dirsize += f.length();
             }
@@ -339,5 +339,5 @@
             BigInteger number = new BigInteger(1, md.digest(ident.getBytes(StandardCharsets.UTF_8)));
             return number.toString(16);
-        } catch(Exception e) {
+        } catch (Exception e) {
             // Fall back. Remove unsuitable characters and some random ones to shrink down path length.
             // Limit it to 70 characters, that leaves about 190 for the path on Windows/NTFS
@@ -373,5 +373,5 @@
      */
     private boolean isExpired(File file) {
-        if(CacheFiles.EXPIRE_NEVER == this.expire)
+        if (CacheFiles.EXPIRE_NEVER == this.expire)
             return false;
         return file.lastModified() < (System.currentTimeMillis() - expire*1000);
Index: trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 8510)
@@ -59,4 +59,5 @@
         IfModifiedSince
     }
+
     protected String name;
     protected long maxAge;
@@ -320,5 +321,5 @@
                 if (localPath.size() == 2) {
                     File lfile = new File(localPath.get(1));
-                    if(lfile.exists()) {
+                    if (lfile.exists()) {
                         lfile.delete();
                     }
@@ -342,5 +343,5 @@
         }
         prefKey.append(url.toString());
-        return prefKey.toString().replaceAll("=","_");
+        return prefKey.toString().replaceAll("=", "_");
     }
 
@@ -469,5 +470,5 @@
 
         int numRedirects = 0;
-        while(true) {
+        while (true) {
             HttpURLConnection con = Utils.openHttpConnection(downloadUrl);
             if (ifModifiedSince != null) {
@@ -475,6 +476,6 @@
             }
             con.setInstanceFollowRedirects(false);
-            con.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
-            con.setReadTimeout(Main.pref.getInteger("socket.timeout.read",30)*1000);
+            con.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect", 15)*1000);
+            con.setReadTimeout(Main.pref.getInteger("socket.timeout.read", 30)*1000);
             if (Main.isDebugEnabled()) {
                 Main.debug("GET "+downloadString);
Index: trunk/src/org/openstreetmap/josm/io/Capabilities.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/Capabilities.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/Capabilities.java	(revision 8510)
@@ -51,5 +51,5 @@
 public class Capabilities {
 
-    private final Map<String, Map<String,String>> capabilities;
+    private final Map<String, Map<String, String>> capabilities;
     private final List<String> imageryBlacklist;
 
@@ -132,5 +132,5 @@
         } else {
             if (!capabilities.containsKey(element))  {
-                Map<String,String> h = new HashMap<>();
+                Map<String, String> h = new HashMap<>();
                 capabilities.put(element, h);
             }
@@ -248,5 +248,5 @@
         @Override
         public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
-            for (int i=0; i< atts.getLength(); i++) {
+            for (int i = 0; i < atts.getLength(); i++) {
                 capabilities.put(qName, atts.getQName(i), atts.getValue(i));
             }
Index: trunk/src/org/openstreetmap/josm/io/ChangesetClosedException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/ChangesetClosedException.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/ChangesetClosedException.java	(revision 8510)
@@ -77,5 +77,5 @@
             try {
                 closedOn = DateUtils.newOsmApiDateTimeFormat().parse(m.group(2));
-            } catch(ParseException ex) {
+            } catch (ParseException ex) {
                 Main.error(tr("Failed to parse date ''{0}'' replied by server.", m.group(2)));
                 Main.error(ex);
Index: trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/ChangesetQuery.java	(revision 8510)
@@ -31,5 +31,5 @@
      * @throws ChangesetQueryUrlException if query doesn't consist of valid query parameters
      */
-    public static ChangesetQuery buildFromUrlQuery(String query) throws ChangesetQueryUrlException{
+    public static ChangesetQuery buildFromUrlQuery(String query) throws ChangesetQueryUrlException {
         return new ChangesetQueryUrlParser().parse(query);
     }
@@ -151,5 +151,5 @@
         CheckParameterUtil.ensureParameterNotNull(min, "min");
         CheckParameterUtil.ensureParameterNotNull(max, "max");
-        this.bounds  = new Bounds(min,max);
+        this.bounds  = new Bounds(min, max);
         return this;
     }
@@ -341,5 +341,5 @@
                     throw new ChangesetQueryUrlException(
                             tr("Unexpected value for ''{0}'' in changeset query url, got {1}", "uid", value));
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 throw new ChangesetQueryUrlException(
                         tr("Unexpected value for ''{0}'' in changeset query url, got {1}", "uid", value), e);
@@ -370,5 +370,5 @@
             try {
                 return formatter.parse(value);
-            } catch(ParseException e) {
+            } catch (ParseException e) {
                 throw new ChangesetQueryUrlException(
                         tr("Unexpected value for ''{0}'' in changeset query url, got {1}", parameter, value), e);
@@ -456,6 +456,6 @@
         }
 
-        protected Map<String,String> createMapFromQueryString(String query) {
-            Map<String,String> queryParams  = new HashMap<>();
+        protected Map<String, String> createMapFromQueryString(String query) {
+            Map<String, String> queryParams  = new HashMap<>();
             String[] keyValuePairs = query.split("&");
             for (String keyValuePair: keyValuePairs) {
@@ -488,5 +488,5 @@
             if (query.isEmpty())
                 return new ChangesetQuery();
-            Map<String,String> queryParams = createMapFromQueryString(query);
+            Map<String, String> queryParams = createMapFromQueryString(query);
             return createFromMap(queryParams);
         }
Index: trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java	(revision 8510)
@@ -138,5 +138,5 @@
         if (proxyPolicy.equals(ProxyPolicy.USE_SOCKS_PROXY)) {
             if (host != null && !host.trim().isEmpty() && port > 0) {
-                socksProxySocketAddress = new InetSocketAddress(host,port);
+                socksProxySocketAddress = new InetSocketAddress(host, port);
             } else {
                 Main.warn(tr("Unexpected parameters for SOCKS proxy. Got host ''{0}'' and port ''{1}''.", host, port));
@@ -203,5 +203,6 @@
         case USE_SYSTEM_SETTINGS:
             if (!JVM_WILL_USE_SYSTEM_PROXIES) {
-                Main.warn(tr("The JVM is not configured to lookup proxies from the system settings. The property ''java.net.useSystemProxies'' was missing at startup time.  Will not use a proxy."));
+                Main.warn(tr("The JVM is not configured to lookup proxies from the system settings. "+
+                        "The property ''java.net.useSystemProxies'' was missing at startup time.  Will not use a proxy."));
                 return NO_PROXY_LIST;
             }
Index: trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java	(revision 8510)
@@ -85,7 +85,7 @@
             InputSource inputSource = new InputSource(new StringReader(diffUploadResponse));
             Utils.parseSafeSAX(inputSource, new Parser());
-        } catch(XmlParsingException e) {
+        } catch (XmlParsingException e) {
             throw e;
-        } catch(IOException | ParserConfigurationException | SAXException e) {
+        } catch (IOException | ParserConfigurationException | SAXException e) {
             throw new XmlParsingException(e);
         } finally {
Index: trunk/src/org/openstreetmap/josm/io/FileWatcher.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/FileWatcher.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/FileWatcher.java	(revision 8510)
@@ -87,5 +87,5 @@
             throw new IllegalArgumentException("Resource "+obj+" does not have a parent directory");
         }
-        synchronized(this) {
+        synchronized (this) {
             // Register directory. Can be called several times for a same directory without problem
             // (it returns the same key so it should not send events several times)
@@ -121,5 +121,5 @@
                 // The filename is the context of the event.
                 @SuppressWarnings("unchecked")
-                WatchEvent<Path> ev = (WatchEvent<Path>)event;
+                WatchEvent<Path> ev = (WatchEvent<Path>) event;
                 Path filename = ev.context();
                 if (filename == null) {
@@ -128,7 +128,7 @@
 
                 // Only way to get full path (http://stackoverflow.com/a/7802029/2257172)
-                Path fullPath = ((Path)key.watchable()).resolve(filename);
+                Path fullPath = ((Path) key.watchable()).resolve(filename);
 
-                synchronized(this) {
+                synchronized (this) {
                     StyleSource style = styleMap.get(fullPath);
                     SourceEntry rule = ruleMap.get(fullPath);
Index: trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java	(revision 8510)
@@ -93,5 +93,5 @@
             if (w instanceof Way) {
                 JsonArrayBuilder array = Json.createArrayBuilder();
-                for (Node n : ((Way)w).getNodes()) {
+                for (Node n : ((Way) w).getNodes()) {
                     LatLon ll = n.getCoor();
                     if (ll != null) {
Index: trunk/src/org/openstreetmap/josm/io/GpxExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GpxExporter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/GpxExporter.java	(revision 8510)
@@ -248,5 +248,5 @@
             final JLabel warning) {
 
-        ActionListener authorActionListener = new ActionListener(){
+        ActionListener authorActionListener = new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
@@ -278,5 +278,5 @@
         author.addActionListener(authorActionListener);
 
-        KeyAdapter authorNameListener = new KeyAdapter(){
+        KeyAdapter authorNameListener = new KeyAdapter() {
             @Override public void keyReleased(KeyEvent e) {
                 boolean b = !authorName.getText().isEmpty() && author.isSelected();
@@ -286,5 +286,5 @@
         authorName.addKeyListener(authorNameListener);
 
-        predefined.addActionListener(new ActionListener(){
+        predefined.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
Index: trunk/src/org/openstreetmap/josm/io/GpxReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 8510)
@@ -44,10 +44,9 @@
 public class GpxReader implements GpxConstants {
 
+    private enum State { init, gpx, metadata, wpt, rte, trk, ext, author, link, trkseg, copyright}
+
     private String version;
-    /**
-     * The resulting gpx data
-     */
+    /** The resulting gpx data */
     private GpxData gpxData;
-    private enum State { init, gpx, metadata, wpt, rte, trk, ext, author, link, trkseg, copyright}
     private InputSource inputSource;
 
@@ -252,5 +251,5 @@
              */
             if (nokiaSportsTrackerBug) {
-                for (int i=0; i<ch.length; ++i) {
+                for (int i = 0; i < ch.length; ++i) {
                     if (ch[i] == 1) {
                         ch[i] = 32;
@@ -398,5 +397,5 @@
                     try {
                         currentWayPoint.put(localName, Float.valueOf(accumulator.toString()));
-                    } catch(Exception e) {
+                    } catch (Exception e) {
                         currentWayPoint.put(localName, new Float(0));
                     }
@@ -506,5 +505,5 @@
         public void tryToFinish() throws SAXException {
             List<String> remainingElements = new ArrayList<>(elements);
-            for (int i=remainingElements.size() - 1; i >= 0; i--) {
+            for (int i = remainingElements.size() - 1; i >= 0; i--) {
                 endElement(null, remainingElements.get(i), remainingElements.get(i));
             }
@@ -549,5 +548,5 @@
                 String message = e.getMessage();
                 if (e instanceof SAXParseException) {
-                    SAXParseException spe = (SAXParseException)e;
+                    SAXParseException spe = (SAXParseException) e;
                     message += " " + tr("(at line {0}, column {1})", spe.getLineNumber(), spe.getColumnNumber());
                 }
Index: trunk/src/org/openstreetmap/josm/io/MessageNotifier.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/MessageNotifier.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/MessageNotifier.java	(revision 8510)
@@ -95,5 +95,5 @@
         } else if (!isRunning() && interval > 0 && isUserEnoughIdentified()) {
             task = EXECUTOR.scheduleAtFixedRate(WORKER, 0, interval * 60, TimeUnit.SECONDS);
-            Main.info("Message notifier active (checks every "+interval+" minute"+(interval>1?"s":"")+")");
+            Main.info("Message notifier active (checks every "+interval+" minute"+(interval > 1 ? "s" : "")+")");
         }
     }
Index: trunk/src/org/openstreetmap/josm/io/MissingOAuthAccessTokenException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/MissingOAuthAccessTokenException.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/MissingOAuthAccessTokenException.java	(revision 8510)
@@ -3,5 +3,5 @@
 
 
-public class MissingOAuthAccessTokenException extends OsmTransferException{
+public class MissingOAuthAccessTokenException extends OsmTransferException {
     public MissingOAuthAccessTokenException() {
         super();
Index: trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 8510)
@@ -114,5 +114,5 @@
      * @throws NoSuchElementException if ds does not include an {@link OsmPrimitive} with id=<code>id</code>
      */
-    protected void remember(DataSet ds, long id, OsmPrimitiveType type) throws NoSuchElementException{
+    protected void remember(DataSet ds, long id, OsmPrimitiveType type) throws NoSuchElementException {
         CheckParameterUtil.ensureParameterNotNull(ds, "ds");
         if (id <= 0) return;
@@ -134,12 +134,12 @@
      */
     public MultiFetchServerObjectReader append(DataSet ds, long id, OsmPrimitiveType type) {
-        OsmPrimitive p = ds.getPrimitiveById(id,type);
+        OsmPrimitive p = ds.getPrimitiveById(id, type);
         switch(type) {
         case NODE:
-            return appendNode((Node)p);
+            return appendNode((Node) p);
         case WAY:
-            return appendWay((Way)p);
+            return appendWay((Way) p);
         case RELATION:
-            return appendRelation((Relation)p);
+            return appendRelation((Relation) p);
         }
         return this;
@@ -209,7 +209,7 @@
         if (primitive != null) {
             switch (OsmPrimitiveType.from(primitive)) {
-                case NODE: return appendNode((Node)primitive);
-                case WAY: return appendWay((Way)primitive);
-                case RELATION: return appendRelation((Relation)primitive);
+                case NODE: return appendNode((Node) primitive);
+                case WAY: return appendWay((Way) primitive);
+                case RELATION: return appendRelation((Relation) primitive);
             }
         }
@@ -246,5 +246,5 @@
         if (ids.size() > MAX_IDS_PER_REQUEST) {
             Iterator<Long> it = ids.iterator();
-            for (int i=0; i<MAX_IDS_PER_REQUEST; i++) {
+            for (int i = 0; i < MAX_IDS_PER_REQUEST; i++) {
                 pkg.add(it.next());
             }
@@ -271,5 +271,5 @@
 
         Iterator<Long> it = idPackage.iterator();
-        for (int i=0; i<idPackage.size(); i++) {
+        for (int i = 0; i < idPackage.size(); i++) {
             sb.append(it.next());
             if (i < idPackage.size()-1) {
@@ -314,5 +314,5 @@
      */
     protected void merge(DataSet from) {
-        final DataSetMerger visitor = new DataSetMerger(outputDataSet,from);
+        final DataSetMerger visitor = new DataSetMerger(outputDataSet, from);
         visitor.merge();
     }
@@ -395,9 +395,9 @@
             missingPrimitives = new HashSet<>();
             if (isCanceled()) return null;
-            fetchPrimitives(ways,OsmPrimitiveType.WAY, progressMonitor);
+            fetchPrimitives(ways, OsmPrimitiveType.WAY, progressMonitor);
             if (isCanceled()) return null;
-            fetchPrimitives(nodes,OsmPrimitiveType.NODE, progressMonitor);
+            fetchPrimitives(nodes, OsmPrimitiveType.NODE, progressMonitor);
             if (isCanceled()) return null;
-            fetchPrimitives(relations,OsmPrimitiveType.RELATION, progressMonitor);
+            fetchPrimitives(relations, OsmPrimitiveType.RELATION, progressMonitor);
             if (outputDataSet != null) {
                 outputDataSet.deleteInvisible();
Index: trunk/src/org/openstreetmap/josm/io/NmeaReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 8510)
@@ -59,5 +59,5 @@
     // GPVTG
     public static enum GPVTG {
-        COURSE(1),COURSE_REF(2), // true course
+        COURSE(1), COURSE_REF(2), // true course
         COURSE_M(3), COURSE_M_REF(4), // magnetic course
         SPEED_KN(5), SPEED_KN_UNIT(6), // speed in knots
@@ -107,5 +107,5 @@
         HEIGHT(9), HEIGHT_UNTIS(10), // height above NN (above geoid)
         HEIGHT_2(11), HEIGHT_2_UNTIS(12), // height geoid - height ellipsoid (WGS84)
-        GPS_AGE(13),// Age of differential GPS data
+        GPS_AGE(13), // Age of differential GPS data
         REF(14); // REF station
 
@@ -153,13 +153,17 @@
         return ps.unknown;
     }
+
     public int getParserZeroCoordinates() {
         return ps.zeroCoord;
     }
+
     public int getParserChecksumErrors() {
         return ps.checksumErrors+ps.noChecksum;
     }
+
     public int getParserMalformed() {
         return ps.malformed;
     }
+
     public int getNumberOfCoordinates() {
         return ps.success;
@@ -176,25 +180,25 @@
             int loopstart_char = rd.read();
             ps = new NMEAParserState();
-            if(loopstart_char == -1)
+            if (loopstart_char == -1)
                 //TODO tell user about the problem?
                 return;
-            sb.append((char)loopstart_char);
-            ps.pDate="010100"; // TODO date problem
-            while(true) {
+            sb.append((char) loopstart_char);
+            ps.pDate = "010100"; // TODO date problem
+            while (true) {
                 // don't load unparsable files completely to memory
-                if(sb.length()>=1020) {
+                if (sb.length() >= 1020) {
                     sb.delete(0, sb.length()-1);
                 }
                 int c = rd.read();
-                if(c=='$') {
+                if (c == '$') {
                     parseNMEASentence(sb.toString(), ps);
                     sb.delete(0, sb.length());
                     sb.append('$');
-                } else if(c == -1) {
+                } else if (c == -1) {
                     // EOF: add last WayPoint if it works out
-                    parseNMEASentence(sb.toString(),ps);
+                    parseNMEASentence(sb.toString(), ps);
                     break;
                 } else {
-                    sb.append((char)c);
+                    sb.append((char) c);
                 }
             }
@@ -237,11 +241,11 @@
             if (chkstrings.length > 1) {
                 byte[] chb = chkstrings[0].getBytes(StandardCharsets.UTF_8);
-                int chk=0;
+                int chk = 0;
                 for (int i = 1; i < chb.length; i++) {
                     chk ^= chb[i];
                 }
-                if (Integer.parseInt(chkstrings[1].substring(0,2),16) != chk) {
+                if (Integer.parseInt(chkstrings[1].substring(0, 2), 16) != chk) {
                     ps.checksumErrors++;
-                    ps.pWp=null;
+                    ps.pWp = null;
                     return false;
                 }
@@ -257,5 +261,5 @@
 
             // handle the packet content
-            if("$GPGGA".equals(e[0]) || "$GNGGA".equals(e[0])) {
+            if ("$GPGGA".equals(e[0]) || "$GNGGA".equals(e[0])) {
                 // Position
                 LatLon latLon = parseLatLon(
@@ -265,5 +269,5 @@
                         e[GPGGA.LONGITUDE.position]
                 );
-                if (latLon==null) {
+                if (latLon == null) {
                     throw new IllegalDataException("Malformed lat/lon");
                 }
@@ -278,12 +282,11 @@
                 Date d = readTime(currentDate+accu);
 
-                if((ps.pTime==null) || (currentwp==null) || !ps.pTime.equals(accu)) {
+                if ((ps.pTime == null) || (currentwp == null) || !ps.pTime.equals(accu)) {
                     // this node is newer than the previous, create a new waypoint.
-                    // no matter if previous WayPoint was null, we got something
-                    // better now.
-                    ps.pTime=accu;
+                    // no matter if previous WayPoint was null, we got something better now.
+                    ps.pTime = accu;
                     currentwp = new WayPoint(latLon);
                 }
-                if(!currentwp.attr.containsKey("time")) {
+                if (!currentwp.attr.containsKey("time")) {
                     // As this sentence has no complete time only use it
                     // if there is no time so far
@@ -291,13 +294,13 @@
                 }
                 // elevation
-                accu=e[GPGGA.HEIGHT_UNTIS.position];
-                if("M".equals(accu)) {
+                accu = e[GPGGA.HEIGHT_UNTIS.position];
+                if ("M".equals(accu)) {
                     // Ignore heights that are not in meters for now
-                    accu=e[GPGGA.HEIGHT.position];
-                    if(!accu.isEmpty()) {
+                    accu = e[GPGGA.HEIGHT.position];
+                    if (!accu.isEmpty()) {
                         Double.parseDouble(accu);
                         // if it throws it's malformed; this should only happen if the
                         // device sends nonstandard data.
-                        if(!accu.isEmpty()) { // FIX ? same check
+                        if (!accu.isEmpty()) { // FIX ? same check
                             currentwp.put(GpxConstants.PT_ELE, accu);
                         }
@@ -305,18 +308,18 @@
                 }
                 // number of sattelites
-                accu=e[GPGGA.SATELLITE_COUNT.position];
+                accu = e[GPGGA.SATELLITE_COUNT.position];
                 int sat = 0;
-                if(!accu.isEmpty()) {
+                if (!accu.isEmpty()) {
                     sat = Integer.parseInt(accu);
                     currentwp.put(GpxConstants.PT_SAT, accu);
                 }
                 // h-dilution
-                accu=e[GPGGA.HDOP.position];
-                if(!accu.isEmpty()) {
+                accu = e[GPGGA.HDOP.position];
+                if (!accu.isEmpty()) {
                     currentwp.put(GpxConstants.PT_HDOP, Float.valueOf(accu));
                 }
                 // fix
-                accu=e[GPGGA.QUALITY.position];
-                if(!accu.isEmpty()) {
+                accu = e[GPGGA.QUALITY.position];
+                if (!accu.isEmpty()) {
                     int fixtype = Integer.parseInt(accu);
                     switch(fixtype) {
@@ -325,5 +328,5 @@
                         break;
                     case 1:
-                        if(sat < 4) {
+                        if (sat < 4) {
                             currentwp.put(GpxConstants.PT_FIX, "2d");
                         } else {
@@ -338,11 +341,11 @@
                     }
                 }
-            } else if("$GPVTG".equals(e[0]) || "$GNVTG".equals(e[0])) {
+            } else if ("$GPVTG".equals(e[0]) || "$GNVTG".equals(e[0])) {
                 // COURSE
                 accu = e[GPVTG.COURSE_REF.position];
-                if("T".equals(accu)) {
+                if ("T".equals(accu)) {
                     // other values than (T)rue are ignored
                     accu = e[GPVTG.COURSE.position];
-                    if(!accu.isEmpty()) {
+                    if (!accu.isEmpty()) {
                         Double.parseDouble(accu);
                         currentwp.put("course", accu);
@@ -351,7 +354,7 @@
                 // SPEED
                 accu = e[GPVTG.SPEED_KMH_UNIT.position];
-                if(accu.startsWith("K")) {
+                if (accu.startsWith("K")) {
                     accu = e[GPVTG.SPEED_KMH.position];
-                    if(!accu.isEmpty()) {
+                    if (!accu.isEmpty()) {
                         double speed = Double.parseDouble(accu);
                         speed /= 3.6; // speed in m/s
@@ -359,21 +362,21 @@
                     }
                 }
-            } else if("$GPGSA".equals(e[0]) || "$GNGSA".equals(e[0])) {
+            } else if ("$GPGSA".equals(e[0]) || "$GNGSA".equals(e[0])) {
                 // vdop
-                accu=e[GPGSA.VDOP.position];
-                if(!accu.isEmpty()) {
+                accu = e[GPGSA.VDOP.position];
+                if (!accu.isEmpty()) {
                     currentwp.put(GpxConstants.PT_VDOP, Float.valueOf(accu));
                 }
                 // hdop
-                accu=e[GPGSA.HDOP.position];
-                if(!accu.isEmpty()) {
+                accu = e[GPGSA.HDOP.position];
+                if (!accu.isEmpty()) {
                     currentwp.put(GpxConstants.PT_HDOP, Float.valueOf(accu));
                 }
                 // pdop
-                accu=e[GPGSA.PDOP.position];
-                if(!accu.isEmpty()) {
+                accu = e[GPGSA.PDOP.position];
+                if (!accu.isEmpty()) {
                     currentwp.put(GpxConstants.PT_PDOP, Float.valueOf(accu));
                 }
-            } else if("$GPRMC".equals(e[0]) || "$GNRMC".equals(e[0])) {
+            } else if ("$GPRMC".equals(e[0]) || "$GNRMC".equals(e[0])) {
                 // coordinates
                 LatLon latLon = parseLatLon(
@@ -393,7 +396,7 @@
                 Date d = readTime(currentDate+time);
 
-                if(ps.pTime==null || currentwp==null || !ps.pTime.equals(time)) {
+                if (ps.pTime == null || currentwp == null || !ps.pTime.equals(time)) {
                     // this node is newer than the previous, create a new waypoint.
-                    ps.pTime=time;
+                    ps.pTime = time;
                     currentwp = new WayPoint(latLon);
                 }
@@ -402,5 +405,5 @@
                 // speed
                 accu = e[GPRMC.SPEED.position];
-                if(!accu.isEmpty() && !currentwp.attr.containsKey("speed")) {
+                if (!accu.isEmpty() && !currentwp.attr.containsKey("speed")) {
                     double speed = Double.parseDouble(accu);
                     speed *= 0.514444444; // to m/s
@@ -409,5 +412,5 @@
                 // course
                 accu = e[GPRMC.COURSE.position];
-                if(!accu.isEmpty() && !currentwp.attr.containsKey("course")) {
+                if (!accu.isEmpty() && !currentwp.attr.containsKey("course")) {
                     Double.parseDouble(accu);
                     currentwp.put("course", accu);
@@ -426,6 +429,6 @@
             }
             ps.pDate = currentDate;
-            if(ps.pWp != currentwp) {
-                if(ps.pWp!=null) {
+            if (ps.pWp != currentwp) {
+                if (ps.pWp != null) {
                     ps.pWp.setTime();
                 }
@@ -440,5 +443,5 @@
             // out of bounds and such
             ps.malformed++;
-            ps.pWp=null;
+            ps.pWp = null;
             return false;
         }
@@ -452,5 +455,5 @@
         // return a zero latlon instead of null so it is logged as zero coordinate
         // instead of malformed sentence
-        if(widthNorth.isEmpty() && lengthEast.isEmpty()) return new LatLon(0.0,0.0);
+        if (widthNorth.isEmpty() && lengthEast.isEmpty()) return new LatLon(0.0, 0.0);
 
         // The format is xxDDLL.LLLL
@@ -463,5 +466,5 @@
         int latdeg = Integer.parseInt(widthNorth.substring(0, latdegsep));
         double latmin = Double.parseDouble(widthNorth.substring(latdegsep));
-        if(latdeg < 0) {
+        if (latdeg < 0) {
             latmin *= -1.0;
         }
@@ -476,5 +479,5 @@
         int londeg = Integer.parseInt(lengthEast.substring(0, londegsep));
         double lonmin = Double.parseDouble(lengthEast.substring(londegsep));
-        if(londeg < 0) {
+        if (londeg < 0) {
             lonmin *= -1.0;
         }
Index: trunk/src/org/openstreetmap/josm/io/NoteReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/NoteReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/NoteReader.java	(revision 8510)
@@ -79,5 +79,5 @@
 
             if (parseMode == NoteParseMode.API) {
-                if("note".equals(qName)) {
+                if ("note".equals(qName)) {
                     double lat = Double.parseDouble(attrs.getValue("lat"));
                     double lon = Double.parseDouble(attrs.getValue("lon"));
@@ -97,5 +97,5 @@
                 thisNote.setId(Long.parseLong(attrs.getValue("id")));
                 String closedTimeStr = attrs.getValue("closed_at");
-                if(closedTimeStr == null) { //no closed_at means the note is still open
+                if (closedTimeStr == null) { //no closed_at means the note is still open
                     thisNote.setState(Note.State.open);
                 } else {
@@ -107,5 +107,5 @@
             case "comment":
                 String uidStr = attrs.getValue("uid");
-                if(uidStr == null) {
+                if (uidStr == null) {
                     commentUid = 0;
                 } else {
@@ -116,5 +116,5 @@
                 commentCreateDate = DateUtils.fromString(attrs.getValue("timestamp"));
                 String isNew = attrs.getValue("is_new");
-                if(isNew == null) {
+                if (isNew == null) {
                     commentIsNew = false;
                 } else {
@@ -127,16 +127,16 @@
         @Override
         public void endElement(String namespaceURI, String localName, String qName) {
-            if("note".equals(qName)) {
+            if ("note".equals(qName)) {
                 notes.add(thisNote);
             }
-            if("comment".equals(qName)) {
+            if ("comment".equals(qName)) {
                 User commentUser = User.createOsmUser(commentUid, commentUsername);
                 if (commentUid == 0) {
                     commentUser = User.getAnonymous();
                 }
-                if(parseMode == NoteParseMode.API) {
+                if (parseMode == NoteParseMode.API) {
                     commentIsNew = false;
                 }
-                if(parseMode == NoteParseMode.DUMP) {
+                if (parseMode == NoteParseMode.DUMP) {
                     commentText = buffer.toString();
                 }
@@ -148,5 +148,5 @@
                 commentText = null;
             }
-            if(parseMode == NoteParseMode.DUMP) {
+            if (parseMode == NoteParseMode.DUMP) {
                 return;
             }
Index: trunk/src/org/openstreetmap/josm/io/OsmApi.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 8510)
@@ -95,5 +95,5 @@
         if (api == null) {
             api = new OsmApi(serverUrl);
-            instances.put(serverUrl,api);
+            instances.put(serverUrl, api);
         }
         return api;
@@ -357,8 +357,8 @@
             ensureValidChangeset();
             initialize(monitor);
-            ret = sendRequest("PUT", OsmPrimitiveType.from(osm).getAPIName()+"/create", toXml(osm, true),monitor);
+            ret = sendRequest("PUT", OsmPrimitiveType.from(osm).getAPIName()+"/create", toXml(osm, true), monitor);
             osm.setOsmId(Long.parseLong(ret.trim()), 1);
             osm.setChangesetId(getChangeset().getId());
-        } catch(NumberFormatException e){
+        } catch (NumberFormatException e) {
             throw new OsmTransferException(tr("Unexpected format of ID replied by the server. Got ''{0}''.", ret), e);
         }
@@ -382,5 +382,5 @@
             osm.setChangesetId(getChangeset().getId());
             osm.setVisible(true);
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             throw new OsmTransferException(tr("Unexpected format of new version of modified primitive ''{0}''. Got ''{1}''.",
                     osm.getId(), ret), e);
@@ -423,11 +423,11 @@
             String ret = "";
             try {
-                ret = sendRequest("PUT", "changeset/create", toXml(changeset),progressMonitor);
+                ret = sendRequest("PUT", "changeset/create", toXml(changeset), progressMonitor);
                 changeset.setId(Integer.parseInt(ret.trim()));
                 changeset.setOpen(true);
-            } catch(NumberFormatException e){
+            } catch (NumberFormatException e) {
                 throw new OsmTransferException(tr("Unexpected format of ID replied by the server. Got ''{0}''.", ret), e);
             }
-            progressMonitor.setCustomText(tr("Successfully opened changeset {0}",changeset.getId()));
+            progressMonitor.setCustomText(tr("Successfully opened changeset {0}", changeset.getId()));
         } finally {
             progressMonitor.finishTask();
@@ -464,8 +464,8 @@
                     monitor
             );
-        } catch(ChangesetClosedException e) {
+        } catch (ChangesetClosedException e) {
             e.setSource(ChangesetClosedException.Source.UPDATE_CHANGESET);
             throw e;
-        } catch(OsmApiException e) {
+        } catch (OsmApiException e) {
             String errorHeader = e.getErrorHeader();
             if (e.getResponseCode() == HttpURLConnection.HTTP_CONFLICT && ChangesetClosedException.errorHeaderMatchesPattern(errorHeader))
@@ -536,5 +536,5 @@
             monitor.indeterminateSubTask(
                     trn("Uploading {0} object...", "Uploading {0} objects...", list.size(), list.size()));
-            String diffUploadResponse = sendRequest("POST", "changeset/" + changeset.getId() + "/upload", diffUploadRequest,monitor);
+            String diffUploadResponse = sendRequest("POST", "changeset/" + changeset.getId() + "/upload", diffUploadRequest, monitor);
 
             // Process the response from the server
@@ -546,7 +546,7 @@
                     monitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false)
             );
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             throw e;
-        } catch(XmlParsingException e) {
+        } catch (XmlParsingException e) {
             throw new OsmTransferException(e);
         } finally {
@@ -557,7 +557,7 @@
     private void sleepAndListen(int retry, ProgressMonitor monitor) throws OsmTransferCanceledException {
         Main.info(tr("Waiting 10 seconds ... "));
-        for (int i=0; i < 10; i++) {
+        for (int i = 0; i < 10; i++) {
             if (monitor != null) {
-                monitor.setCustomText(tr("Starting retry {0} of {1} in {2} seconds ...", getMaxRetries() - retry,getMaxRetries(), 10-i));
+                monitor.setCustomText(tr("Starting retry {0} of {1} in {2} seconds ...", getMaxRetries() - retry, getMaxRetries(), 10-i));
             }
             if (cancel)
@@ -579,5 +579,5 @@
     protected int getMaxRetries() {
         int ret = Main.pref.getInteger("osm-server.max-num-retries", DEFAULT_MAX_NUM_RETRIES);
-        return Math.max(ret,0);
+        return Math.max(ret, 0);
     }
 
@@ -591,5 +591,5 @@
     }
 
-    protected final String sendRequest(String requestMethod, String urlSuffix,String requestBody, ProgressMonitor monitor)
+    protected final String sendRequest(String requestMethod, String urlSuffix, String requestBody, ProgressMonitor monitor)
             throws OsmTransferException {
         return sendRequest(requestMethod, urlSuffix, requestBody, monitor, true, false);
@@ -615,10 +615,10 @@
      *    been exhausted), or rewrapping a Java exception.
      */
-    protected final String sendRequest(String requestMethod, String urlSuffix,String requestBody, ProgressMonitor monitor,
+    protected final String sendRequest(String requestMethod, String urlSuffix, String requestBody, ProgressMonitor monitor,
             boolean doAuthenticate, boolean fastFail) throws OsmTransferException {
         StringBuilder responseBody = new StringBuilder();
         int retries = fastFail ? 0 : getMaxRetries();
 
-        while(true) { // the retry loop
+        while (true) { // the retry loop
             try {
                 url = new URL(new URL(getBaseUrl()), urlSuffix);
@@ -627,5 +627,5 @@
                 // fix #5369, see http://www.tikalk.com/java/forums/httpurlconnection-disable-keep-alive
                 activeConnection = Utils.openHttpConnection(url, false);
-                activeConnection.setConnectTimeout(fastFail ? 1000 : Main.pref.getInteger("socket.timeout.connect",15)*1000);
+                activeConnection.setConnectTimeout(fastFail ? 1000 : Main.pref.getInteger("socket.timeout.connect", 15)*1000);
                 if (fastFail) {
                     activeConnection.setReadTimeout(1000);
@@ -662,5 +662,5 @@
                     if (retries-- > 0) {
                         sleepAndListen(retries, monitor);
-                        Main.info(tr("Starting retry {0} of {1}.", getMaxRetries() - retries,getMaxRetries()));
+                        Main.info(tr("Starting retry {0} of {1}.", getMaxRetries() - retries, getMaxRetries()));
                         continue;
                     }
@@ -670,15 +670,12 @@
                 responseBody.setLength(0);
 
-                // If the API returned an error code like 403 forbidden, getInputStream
-                // will fail with an IOException.
+                // If the API returned an error code like 403 forbidden, getInputStream will fail with an IOException.
                 InputStream i = getConnectionStream();
                 if (i != null) {
                     // the input stream can be null if both the input and the error stream
-                    // are null. Seems to be the case if the OSM server replies a 401
-                    // Unauthorized, see #3887.
-                    //
+                    // are null. Seems to be the case if the OSM server replies a 401 Unauthorized, see #3887.
                     String s;
                     try (BufferedReader in = new BufferedReader(new InputStreamReader(i, StandardCharsets.UTF_8))) {
-                        while((s = in.readLine()) != null) {
+                        while ((s = in.readLine()) != null) {
                             responseBody.append(s);
                             responseBody.append('\n');
@@ -691,5 +688,5 @@
                     errorHeader = activeConnection.getHeaderField("Error");
                     Main.error("Error header: " + errorHeader);
-                } else if (retCode != HttpURLConnection.HTTP_OK && responseBody.length()>0) {
+                } else if (retCode != HttpURLConnection.HTTP_OK && responseBody.length() > 0) {
                     Main.error("Error body: " + responseBody);
                 }
@@ -700,6 +697,6 @@
                 }
 
-                errorHeader = errorHeader == null? null : errorHeader.trim();
-                String errorBody = responseBody.length() == 0? null : responseBody.toString().trim();
+                errorHeader = errorHeader == null ? null : errorHeader.trim();
+                String errorBody = responseBody.length() == 0 ? null : responseBody.toString().trim();
                 switch(retCode) {
                 case HttpURLConnection.HTTP_OK:
@@ -724,7 +721,7 @@
                 }
                 throw new OsmTransferException(e);
-            } catch(IOException e) {
+            } catch (IOException e) {
                 throw new OsmTransferException(e);
-            } catch(OsmTransferException e) {
+            } catch (OsmTransferException e) {
                 throw e;
             }
@@ -884,10 +881,10 @@
         try {
             List<Note> newNotes = new NoteReader(xml).parse();
-            if(newNotes.size() == 1) {
+            if (newNotes.size() == 1) {
                 return newNotes.get(0);
             }
             //Shouldn't ever execute. Server will either respond with an error (caught elsewhere) or one note
             throw new OsmTransferException(tr("Note upload failed"));
-        } catch (SAXException|IOException e) {
+        } catch (SAXException | IOException e) {
             Main.error(e, true);
             throw new OsmTransferException(tr("Error parsing note response from server"), e);
Index: trunk/src/org/openstreetmap/josm/io/OsmApiException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 8510)
@@ -135,5 +135,5 @@
         String eh = "";
         try {
-            if(errorHeader != null)
+            if (errorHeader != null)
                 eh = tr(errorHeader.trim());
             if (!eh.isEmpty()) {
Index: trunk/src/org/openstreetmap/josm/io/OsmApiPrimitiveGoneException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmApiPrimitiveGoneException.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmApiPrimitiveGoneException.java	(revision 8510)
@@ -13,5 +13,5 @@
  *
  */
-public class OsmApiPrimitiveGoneException extends OsmApiException{
+public class OsmApiPrimitiveGoneException extends OsmApiException {
     /**
      * The regexp pattern for the error header replied by the OSM API
Index: trunk/src/org/openstreetmap/josm/io/OsmChangeBuilder.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmChangeBuilder.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmChangeBuilder.java	(revision 8510)
@@ -52,5 +52,5 @@
 
     private void switchMode(String newMode) {
-        if ((newMode != null && !newMode.equals(currentMode))||(newMode == null && currentMode != null)) {
+        if ((newMode != null && !newMode.equals(currentMode)) || (newMode == null && currentMode != null)) {
             if (currentMode != null) {
                 writer.print("</");
@@ -78,5 +78,5 @@
         writer.print(apiVersion);
         writer.println("\" generator=\"JOSM\">");
-        prologWritten=true;
+        prologWritten = true;
     }
 
Index: trunk/src/org/openstreetmap/josm/io/OsmChangesetContentParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmChangesetContentParser.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmChangesetContentParser.java	(revision 8510)
@@ -152,5 +152,5 @@
             progressMonitor.indeterminateSubTask(tr("Parsing changeset content ..."));
             Utils.parseSafeSAX(source, new Parser());
-        } catch(XmlParsingException e) {
+        } catch (XmlParsingException e) {
             throw e;
         } catch (ParserConfigurationException | SAXException | IOException e) {
Index: trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java	(revision 8510)
@@ -127,5 +127,5 @@
                 try {
                     minLon = Double.parseDouble(min_lon);
-                } catch(NumberFormatException e) {
+                } catch (NumberFormatException e) {
                     throwException(tr("Illegal value for attribute ''{0}''. Got ''{1}''.", "min_lon", min_lon));
                 }
@@ -133,5 +133,5 @@
                 try {
                     minLat = Double.parseDouble(min_lat);
-                } catch(NumberFormatException e) {
+                } catch (NumberFormatException e) {
                     throwException(tr("Illegal value for attribute ''{0}''. Got ''{1}''.", "min_lat", min_lat));
                 }
@@ -143,5 +143,5 @@
                 try {
                     maxLon = Double.parseDouble(max_lon);
-                } catch(NumberFormatException e) {
+                } catch (NumberFormatException e) {
                     throwException(tr("Illegal value for attribute ''{0}''. Got ''{1}''.", "max_lon", max_lon));
                 }
@@ -149,5 +149,5 @@
                 try {
                     maxLat = Double.parseDouble(max_lat);
-                } catch(NumberFormatException e) {
+                } catch (NumberFormatException e) {
                     throwException(tr("Illegal value for attribute ''{0}''. Got ''{1}''.", "max_lat", max_lat));
                 }
@@ -177,5 +177,5 @@
             try {
                 att = Integer.parseInt(value);
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 throwException(tr("Illegal value for attribute ''{0}''. Got ''{1}''.", "id", value));
             }
@@ -256,5 +256,5 @@
                 long id = Long.parseLong(uid);
                 return User.createOsmUser(id, name);
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 throwException(MessageFormat.format("Illegal value for attribute ''uid''. Got ''{0}''.", uid));
             }
@@ -281,7 +281,7 @@
             Utils.parseSafeSAX(inputSource, parser.new Parser());
             return parser.getChangesets();
-        } catch(ParserConfigurationException | SAXException e) {
+        } catch (ParserConfigurationException | SAXException e) {
             throw new IllegalDataException(e.getMessage(), e);
-        } catch(Exception e) {
+        } catch (Exception e) {
             throw new IllegalDataException(e);
         } finally {
Index: trunk/src/org/openstreetmap/josm/io/OsmConnection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmConnection.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmConnection.java	(revision 8510)
@@ -93,5 +93,5 @@
             return;
         } else {
-            String username= response.getUsername() == null ? "" : response.getUsername();
+            String username = response.getUsername() == null ? "" : response.getUsername();
             String password = response.getPassword() == null ? "" : String.valueOf(response.getPassword());
             token = username + ":" + password;
@@ -99,5 +99,5 @@
                 ByteBuffer bytes = encoder.encode(CharBuffer.wrap(token));
                 con.addRequestProperty("Authorization", "Basic "+Base64.encode(bytes));
-            } catch(CharacterCodingException e) {
+            } catch (CharacterCodingException e) {
                 throw new OsmTransferException(e);
             }
@@ -124,5 +124,5 @@
         try {
             consumer.sign(connection);
-        } catch(OAuthException e) {
+        } catch (OAuthException e) {
             throw new OsmTransferException(tr("Failed to sign a HTTP connection with an OAuth Authentication header"), e);
         }
Index: trunk/src/org/openstreetmap/josm/io/OsmReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 8510)
@@ -189,6 +189,6 @@
             ds.dataSources.add(src);
         } else {
-            throwException(tr(
-                    "Missing mandatory attributes on element ''bounds''. Got minlon=''{0}'',minlat=''{1}'',maxlon=''{3}'',maxlat=''{4}'', origin=''{5}''.",
+            throwException(tr("Missing mandatory attributes on element ''bounds''. " +
+                    "Got minlon=''{0}'',minlat=''{1}'',maxlon=''{3}'',maxlat=''{4}'', origin=''{5}''.",
                     minlon, minlat, maxlon, maxlat, origin
             ));
@@ -312,10 +312,10 @@
         String value = parser.getAttributeValue(null, "ref");
         if (value == null) {
-            throwException(tr("Missing attribute ''ref'' on member in relation {0}.",r.getUniqueId()));
+            throwException(tr("Missing attribute ''ref'' on member in relation {0}.", r.getUniqueId()));
         }
         try {
             id = Long.parseLong(value);
-        } catch(NumberFormatException e) {
-            throwException(tr("Illegal value for attribute ''ref'' on member in relation {0}. Got {1}", Long.toString(r.getUniqueId()),value), e);
+        } catch (NumberFormatException e) {
+            throwException(tr("Illegal value for attribute ''ref'' on member in relation {0}. Got {1}", Long.toString(r.getUniqueId()), value), e);
         }
         value = parser.getAttributeValue(null, "type");
@@ -325,5 +325,5 @@
         try {
             type = OsmPrimitiveType.fromApiTypeName(value);
-        } catch(IllegalArgumentException e) {
+        } catch (IllegalArgumentException e) {
             throwException(tr("Illegal value for attribute ''type'' on member {0} in relation {1}. Got {2}.",
                     Long.toString(id), Long.toString(r.getUniqueId()), value), e);
@@ -421,5 +421,5 @@
             long id = Long.parseLong(uid);
             return User.createOsmUser(id, name);
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             throwException(MessageFormat.format("Illegal value for attribute ''uid''. Got ''{0}''.", uid), e);
         }
@@ -455,5 +455,5 @@
             try {
                 version = Integer.parseInt(versionString);
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 throwException(tr("Illegal value for attribute ''version'' on OSM primitive with ID {0}. Got {1}.",
                         Long.toString(current.getUniqueId()), versionString), e);
@@ -529,10 +529,10 @@
         String value = parser.getAttributeValue(null, name);
         if (value == null) {
-            throwException(tr("Missing required attribute ''{0}''.",name));
+            throwException(tr("Missing required attribute ''{0}''.", name));
         }
         try {
             return Long.parseLong(value);
-        } catch(NumberFormatException e) {
-            throwException(tr("Illegal long value for attribute ''{0}''. Got ''{1}''.",name, value), e);
+        } catch (NumberFormatException e) {
+            throwException(tr("Illegal long value for attribute ''{0}''. Got ''{1}''.", name, value), e);
         }
         return 0; // should not happen
@@ -616,9 +616,9 @@
             }
             return getDataSet();
-        } catch(IllegalDataException e) {
+        } catch (IllegalDataException e) {
             throw e;
-        } catch(OsmParsingException e) {
+        } catch (OsmParsingException e) {
             throw new IllegalDataException(e.getMessage(), e);
-        } catch(XMLStreamException e) {
+        } catch (XMLStreamException e) {
             String msg = e.getMessage();
             Pattern p = Pattern.compile("Message: (.+)");
@@ -632,5 +632,5 @@
             else
                 throw new IllegalDataException(msg, e);
-        } catch(Exception e) {
+        } catch (Exception e) {
             throw new IllegalDataException(e);
         } finally {
Index: trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(revision 8510)
@@ -133,5 +133,5 @@
                 return OsmReader.parseDataSet(in, progressMonitor.createSubTaskMonitor(1, true));
             }
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             throw e;
         } catch (Exception e) {
@@ -189,5 +189,5 @@
         try {
             Collection<Way> waysToCheck = new ArrayList<>(ds.getWays());
-            if (isReadFull() ||primitiveType.equals(OsmPrimitiveType.NODE)) {
+            if (isReadFull() || primitiveType.equals(OsmPrimitiveType.NODE)) {
                 for (Way way: waysToCheck) {
                     if (!way.isNew() && way.hasIncompleteNodes()) {
@@ -234,10 +234,10 @@
             if (primitiveType.equals(OsmPrimitiveType.NODE)) {
                 DataSet ds = getReferringWays(progressMonitor.createSubTaskMonitor(1, false));
-                DataSetMerger visitor = new DataSetMerger(ret,ds);
+                DataSetMerger visitor = new DataSetMerger(ret, ds);
                 visitor.merge();
                 ret = visitor.getTargetDataSet();
             }
             DataSet ds = getReferringRelations(progressMonitor.createSubTaskMonitor(1, false));
-            DataSetMerger visitor = new DataSetMerger(ret,ds);
+            DataSetMerger visitor = new DataSetMerger(ret, ds);
             visitor.merge();
             ret = visitor.getTargetDataSet();
Index: trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java	(revision 8510)
@@ -79,7 +79,7 @@
                 Main.warn(e);
             }
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             throw e;
-        } catch(IllegalDataException e) {
+        } catch (IllegalDataException e) {
             throw new OsmTransferException(e);
         } finally {
@@ -108,5 +108,5 @@
         Changeset result = null;
         try {
-            monitor.beginTask(tr("Reading changeset {0} ...",id));
+            monitor.beginTask(tr("Reading changeset {0} ...", id));
             try (InputStream in = getChangesetInputStream(id, includeDiscussion, monitor)) {
                 if (in == null)
@@ -120,7 +120,7 @@
                 Main.warn(e);
             }
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             throw e;
-        } catch(IllegalDataException e) {
+        } catch (IllegalDataException e) {
             throw new OsmTransferException(e);
         } finally {
@@ -148,8 +148,8 @@
         }
         try {
-            monitor.beginTask(trn("Downloading {0} changeset ...", "Downloading {0} changesets ...",ids.size(),ids.size()));
+            monitor.beginTask(trn("Downloading {0} changeset ...", "Downloading {0} changesets ...", ids.size(), ids.size()));
             monitor.setTicksCount(ids.size());
             List<Changeset> ret = new ArrayList<>();
-            int i=0;
+            int i = 0;
             for (int id : ids) {
                 if (id <= 0) {
@@ -172,7 +172,7 @@
             }
             return ret;
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             throw e;
-        } catch(IllegalDataException e) {
+        } catch (IllegalDataException e) {
             throw new OsmTransferException(e);
         } finally {
@@ -210,5 +210,5 @@
                 Main.warn(e);
             }
-        } catch(XmlParsingException e) {
+        } catch (XmlParsingException e) {
             throw new OsmTransferException(e);
         } finally {
Index: trunk/src/org/openstreetmap/josm/io/OsmServerHistoryReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerHistoryReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerHistoryReader.java	(revision 8510)
@@ -69,5 +69,5 @@
                 return reader.parse(progressMonitor.createSubTaskMonitor(1, true));
             }
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             throw e;
         } catch (Exception e) {
Index: trunk/src/org/openstreetmap/josm/io/OsmServerLocationReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerLocationReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerLocationReader.java	(revision 8510)
@@ -50,5 +50,5 @@
         try {
             return parser.parse();
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             throw e;
         } catch (Exception e) {
Index: trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java	(revision 8510)
@@ -131,5 +131,5 @@
                 return OsmReader.parseDataSet(in, progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));
             }
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             if (cancel) return null;
             throw e;
Index: trunk/src/org/openstreetmap/josm/io/OsmServerReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerReader.java	(revision 8510)
@@ -126,5 +126,5 @@
             try {
                 url = new URL(urlStr.replace(" ", "%20"));
-            } catch(MalformedURLException e) {
+            } catch (MalformedURLException e) {
                 throw new OsmTransferException(e);
             }
@@ -132,5 +132,5 @@
                 // fix #7640, see http://www.tikalk.com/java/forums/httpurlconnection-disable-keep-alive
                 activeConnection = Utils.openHttpConnection(url, false);
-            } catch(Exception e) {
+            } catch (Exception e) {
                 throw new OsmTransferException(tr("Failed to open connection to API {0}.", url.toExternalForm()), e);
             }
@@ -149,5 +149,5 @@
             }
 
-            activeConnection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
+            activeConnection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect", 15)*1000);
 
             try {
@@ -170,5 +170,5 @@
                 }
                 if (activeConnection.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED)
-                    throw new OsmApiException(HttpURLConnection.HTTP_UNAUTHORIZED,null,null);
+                    throw new OsmApiException(HttpURLConnection.HTTP_UNAUTHORIZED, null, null);
 
                 if (activeConnection.getResponseCode() == HttpURLConnection.HTTP_PROXY_AUTH)
@@ -184,10 +184,10 @@
                             BufferedReader in = new BufferedReader(new InputStreamReader(i, StandardCharsets.UTF_8));
                             String s;
-                            while((s = in.readLine()) != null) {
+                            while ((s = in.readLine()) != null) {
                                 errorBody.append(s);
                                 errorBody.append('\n');
                             }
                         }
-                    } catch(Exception e) {
+                    } catch (Exception e) {
                         errorBody.append(tr("Reading error text failed."));
                     }
Index: trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java	(revision 8510)
@@ -41,5 +41,5 @@
             XPath xpath = factory.newXPath();
             UserInfo userInfo = new UserInfo();
-            Node xmlNode = (Node)xpath.compile("/osm/user[1]").evaluate(document, XPathConstants.NODE);
+            Node xmlNode = (Node) xpath.compile("/osm/user[1]").evaluate(document, XPathConstants.NODE);
             if (xmlNode == null)
                 throw new XmlParsingException(tr("XML tag <user> is missing."));
@@ -51,5 +51,5 @@
             try {
                 userInfo.setId(Integer.parseInt(v));
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 throw new XmlParsingException(tr("Illegal value for attribute ''{0}'' on XML tag ''{1}''. Got {2}.", "id", "user", v), e);
             }
@@ -59,14 +59,14 @@
             // -- account_created
             v = getAttribute(xmlNode, "account_created");
-            if (v!=null) {
+            if (v != null) {
                 userInfo.setAccountCreated(DateUtils.fromString(v));
             }
             // -- description
-            xmlNode = (Node)xpath.compile("/osm/user[1]/description[1]/text()").evaluate(document, XPathConstants.NODE);
+            xmlNode = (Node) xpath.compile("/osm/user[1]/description[1]/text()").evaluate(document, XPathConstants.NODE);
             if (xmlNode != null) {
                 userInfo.setDescription(xmlNode.getNodeValue());
             }
             // -- home
-            xmlNode = (Node)xpath.compile("/osm/user[1]/home").evaluate(document, XPathConstants.NODE);
+            xmlNode = (Node) xpath.compile("/osm/user[1]/home").evaluate(document, XPathConstants.NODE);
             if (xmlNode != null) {
                 v = getAttribute(xmlNode, "lat");
@@ -76,5 +76,5 @@
                 try {
                     lat = Double.parseDouble(v);
-                } catch(NumberFormatException e) {
+                } catch (NumberFormatException e) {
                     throw new XmlParsingException(tr("Illegal value for attribute ''{0}'' on XML tag ''{1}''. Got {2}.",
                             "lat", "home", v), e);
@@ -87,5 +87,5 @@
                 try {
                     lon = Double.parseDouble(v);
-                } catch(NumberFormatException e) {
+                } catch (NumberFormatException e) {
                     throw new XmlParsingException(tr("Illegal value for attribute ''{0}'' on XML tag ''{1}''. Got {2}.",
                             "lon", "home", v), e);
@@ -98,17 +98,17 @@
                 try {
                     zoom = Integer.parseInt(v);
-                } catch(NumberFormatException e) {
+                } catch (NumberFormatException e) {
                     throw new XmlParsingException(tr("Illegal value for attribute ''{0}'' on XML tag ''{1}''. Got {2}.",
                             "zoom", "home", v), e);
                 }
-                userInfo.setHome(new LatLon(lat,lon));
+                userInfo.setHome(new LatLon(lat, lon));
                 userInfo.setHomeZoom(zoom);
             }
 
             // -- language list
-            NodeList xmlNodeList = (NodeList)xpath.compile("/osm/user[1]/languages[1]/lang/text()").evaluate(document, XPathConstants.NODESET);
+            NodeList xmlNodeList = (NodeList) xpath.compile("/osm/user[1]/languages[1]/lang/text()").evaluate(document, XPathConstants.NODESET);
             if (xmlNodeList != null) {
                 List<String> languages = new LinkedList<>();
-                for (int i=0; i < xmlNodeList.getLength(); i++) {
+                for (int i = 0; i < xmlNodeList.getLength(); i++) {
                     languages.add(xmlNodeList.item(i).getNodeValue());
                 }
@@ -117,5 +117,5 @@
 
             // -- messages
-            xmlNode = (Node)xpath.compile("/osm/user[1]/messages/received").evaluate(document, XPathConstants.NODE);
+            xmlNode = (Node) xpath.compile("/osm/user[1]/messages/received").evaluate(document, XPathConstants.NODE);
             if (xmlNode != null) {
                 v = getAttribute(xmlNode, "unread");
@@ -124,5 +124,5 @@
                 try {
                     userInfo.setUnreadMessages(Integer.parseInt(v));
-                } catch(NumberFormatException e) {
+                } catch (NumberFormatException e) {
                     throw new XmlParsingException(tr("Illegal value for attribute ''{0}'' on XML tag ''{1}''. Got {2}.", "unread", "received", v), e);
                 }
@@ -130,5 +130,5 @@
 
             return userInfo;
-        } catch(XPathException e) {
+        } catch (XPathException e) {
             throw new XmlParsingException(e);
         }
@@ -175,7 +175,7 @@
                 );
             }
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             throw e;
-        } catch(Exception e) {
+        } catch (Exception e) {
             throw new OsmTransferException(e);
         } finally {
Index: trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java	(revision 8510)
@@ -44,4 +44,5 @@
         postprocessors.add(pp);
     }
+
     public static void unregisterPostprocessor(OsmServerWritePostprocessor pp) {
         if (postprocessors != null) {
@@ -65,7 +66,7 @@
             elapsed = 1;
         }
-        double uploads_per_ms = (double)progress / elapsed;
+        double uploads_per_ms = (double) progress / elapsed;
         double uploads_left = list_size - progress;
-        long ms_left = (long)(uploads_left / uploads_per_ms);
+        long ms_left = (long) (uploads_left / uploads_per_ms);
         long minutes_left = ms_left / MSECS_PER_MINUTE;
         long seconds_left = (ms_left / MSECS_PER_SECOND) % SECONDS_PER_MINUTE;
@@ -107,11 +108,11 @@
                                 osm.getName() == null ? osm.getId() : osm.getName(),
                                         osm.getId()));
-                makeApiRequest(osm,progressMonitor);
+                makeApiRequest(osm, progressMonitor);
                 processed.add(osm);
                 progressMonitor.worked(1);
             }
-        } catch(OsmTransferException e) {
-            throw e;
-        } catch(Exception e) {
+        } catch (OsmTransferException e) {
+            throw e;
+        } catch (Exception e) {
             throw new OsmTransferException(e);
         } finally {
@@ -132,5 +133,5 @@
             progressMonitor.beginTask(tr("Starting to upload in one request ..."));
             processed.addAll(api.uploadDiff(primitives, progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false)));
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             throw e;
         } finally {
@@ -150,5 +151,5 @@
     protected void uploadChangesInChunks(Collection<? extends OsmPrimitive> primitives, ProgressMonitor progressMonitor, int chunkSize)
             throws OsmTransferException, IllegalArgumentException {
-        if (chunkSize <=0)
+        if (chunkSize <= 0)
             throw new IllegalArgumentException(tr("Value >0 expected for parameter ''{0}'', got {1}", "chunkSize", chunkSize));
         try {
@@ -156,12 +157,12 @@
             List<OsmPrimitive> chunk = new ArrayList<>(chunkSize);
             Iterator<? extends OsmPrimitive> it = primitives.iterator();
-            int numChunks = (int)Math.ceil((double)primitives.size() / (double)chunkSize);
-            int i= 0;
-            while(it.hasNext()) {
+            int numChunks = (int) Math.ceil((double) primitives.size() / (double) chunkSize);
+            int i = 0;
+            while (it.hasNext()) {
                 i++;
                 if (canceled) return;
                 int j = 0;
                 chunk.clear();
-                while(it.hasNext() && j < chunkSize) {
+                while (it.hasNext() && j < chunkSize) {
                     if (canceled) return;
                     j++;
@@ -174,5 +175,5 @@
                 processed.addAll(api.uploadDiff(chunk, progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false)));
             }
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             throw e;
         } finally {
@@ -192,5 +193,6 @@
      * @throws OsmTransferException if something goes wrong
      */
-    public void uploadOsm(UploadStrategySpecification strategy, Collection<? extends OsmPrimitive> primitives, Changeset changeset, ProgressMonitor monitor) throws OsmTransferException {
+    public void uploadOsm(UploadStrategySpecification strategy, Collection<? extends OsmPrimitive> primitives,
+            Changeset changeset, ProgressMonitor monitor) throws OsmTransferException {
         CheckParameterUtil.ensureParameterNotNull(changeset, "changeset");
         processed = new LinkedList<>();
@@ -201,21 +203,21 @@
             // check whether we can use diff upload
             if (changeset.getId() == 0) {
-                api.openChangeset(changeset,monitor.createSubTaskMonitor(0, false));
+                api.openChangeset(changeset, monitor.createSubTaskMonitor(0, false));
             } else {
-                api.updateChangeset(changeset,monitor.createSubTaskMonitor(0, false));
+                api.updateChangeset(changeset, monitor.createSubTaskMonitor(0, false));
             }
             api.setChangeset(changeset);
             switch(strategy.getStrategy()) {
             case SINGLE_REQUEST_STRATEGY:
-                uploadChangesAsDiffUpload(primitives,monitor.createSubTaskMonitor(0,false));
+                uploadChangesAsDiffUpload(primitives, monitor.createSubTaskMonitor(0, false));
                 break;
             case INDIVIDUAL_OBJECTS_STRATEGY:
-                uploadChangesIndividually(primitives,monitor.createSubTaskMonitor(0,false));
+                uploadChangesIndividually(primitives, monitor.createSubTaskMonitor(0, false));
                 break;
             case CHUNKED_DATASET_STRATEGY:
-                uploadChangesInChunks(primitives,monitor.createSubTaskMonitor(0,false), strategy.getChunkSize());
+                uploadChangesInChunks(primitives, monitor.createSubTaskMonitor(0, false), strategy.getChunkSize());
                 break;
             }
-        } catch(OsmTransferException e) {
+        } catch (OsmTransferException e) {
             throw e;
         } finally {
Index: trunk/src/org/openstreetmap/josm/io/OsmWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmWriter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmWriter.java	(revision 8510)
@@ -65,4 +65,5 @@
         this.changeset = cs;
     }
+
     public void setVersion(String v) {
         this.version = v;
@@ -90,5 +91,5 @@
     protected static final Comparator<OsmPrimitive> byIdComparator = new Comparator<OsmPrimitive>() {
         @Override public int compare(OsmPrimitive o1, OsmPrimitive o2) {
-            return o1.getUniqueId()<o2.getUniqueId() ? -1 : (o1.getUniqueId()==o2.getUniqueId() ? 0 : 1);
+            return o1.getUniqueId() < o2.getUniqueId() ? -1 : (o1.getUniqueId() == o2.getUniqueId() ? 0 : 1);
         }
     };
@@ -198,5 +199,5 @@
         } else {
             out.println(">");
-            for (int i=0; i<w.getNodesCount(); ++i) {
+            for (int i = 0; i < w.getNodesCount(); ++i) {
                 out.println("    <nd ref='"+w.getNodeId(i) +"' />");
             }
@@ -213,5 +214,5 @@
         } else {
             out.println(">");
-            for (int i=0; i<e.getMembersCount(); ++i) {
+            for (int i = 0; i < e.getMembersCount(); ++i) {
                 out.print("    <member type='");
                 out.print(e.getMemberType(i).getAPIName());
@@ -249,6 +250,7 @@
     }
 
-    protected static final Comparator<Entry<String, String>> byKeyComparator = new Comparator<Entry<String,String>>() {
-        @Override public int compare(Entry<String, String> o1, Entry<String, String> o2) {
+    protected static final Comparator<Entry<String, String>> byKeyComparator = new Comparator<Entry<String, String>>() {
+        @Override
+        public int compare(Entry<String, String> o1, Entry<String, String> o2) {
             return o1.getKey().compareTo(o2.getKey());
         }
@@ -301,5 +303,5 @@
             // user and visible added with 0.4 API
             if (osm.getUser() != null) {
-                if(osm.getUser().isLocalUser()) {
+                if (osm.getUser().isLocalUser()) {
                     out.print(" user='"+XmlWriter.encode(osm.getUser().getName())+"'");
                 } else if (osm.getUser().isOsmUser()) {
Index: trunk/src/org/openstreetmap/josm/io/OsmWriterFactory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmWriterFactory.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/OsmWriterFactory.java	(revision 8510)
@@ -27,4 +27,5 @@
         return theFactory.createOsmWriterImpl(out, osmConform, version);
     }
+
     protected OsmWriter createOsmWriterImpl(PrintWriter out, boolean osmConform, String version) {
         return new OsmWriter(out, osmConform, version);
Index: trunk/src/org/openstreetmap/josm/io/UTFInputStreamReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/UTFInputStreamReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/UTFInputStreamReader.java	(revision 8510)
@@ -69,4 +69,5 @@
         super(in);
     }
+
     private UTFInputStreamReader(InputStream in, String cs) throws UnsupportedEncodingException {
         super(in, cs);
Index: trunk/src/org/openstreetmap/josm/io/WMSLayerExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/WMSLayerExporter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/WMSLayerExporter.java	(revision 8510)
@@ -31,5 +31,5 @@
         if (layer instanceof WMSLayer) {
             try (ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(file))) {
-                ((WMSLayer)layer).writeExternal(oos);
+                ((WMSLayer) layer).writeExternal(oos);
             }
         }
Index: trunk/src/org/openstreetmap/josm/io/XmlWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/XmlWriter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/XmlWriter.java	(revision 8510)
@@ -53,5 +53,5 @@
             if (encS != null) {
                 if (buffer == null) {
-                    buffer = new StringBuilder(unencoded.substring(0,i));
+                    buffer = new StringBuilder(unencoded.substring(0, i));
                 }
                 buffer.append(encS);
Index: trunk/src/org/openstreetmap/josm/io/auth/CredentialsAgentException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/auth/CredentialsAgentException.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/auth/CredentialsAgentException.java	(revision 8510)
@@ -3,8 +3,28 @@
 
 public class CredentialsAgentException extends Exception {
-    public CredentialsAgentException() {super();}
-    public CredentialsAgentException(String message, Throwable cause) {super(message, cause);}
-    public CredentialsAgentException(String message) {super(message);}
-    public CredentialsAgentException(Throwable cause) {super(cause);}
 
+    /**
+     * Constructs a new {@code CredentialsAgentException}.
+     * @param message the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
+     * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
+     */
+    public CredentialsAgentException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    /**
+     * Constructs a new {@code CredentialsAgentException}.
+     * @param message the detail message (which is saved for later retrieval by the {@link #getMessage()} method).
+     */
+    public CredentialsAgentException(String message) {
+        super(message);
+    }
+
+    /**
+     * Constructs a new {@code CredentialsAgentException}.
+     * @param cause the cause (which is saved for later retrieval by the {@link #getCause()} method).
+     */
+    public CredentialsAgentException(Throwable cause) {
+        super(cause);
+    }
 }
Index: trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java	(revision 8510)
@@ -118,5 +118,5 @@
         if (requestorType == RequestorType.SERVER && Objects.equals(OsmApi.getOsmApi().getHost(), host)) {
             String username = credentials.getUserName();
-            if(username != null && !username.trim().isEmpty()) {
+            if (username != null && !username.trim().isEmpty()) {
                 JosmUserIdentityManager.getInstance().setPartiallyIdentified(username);
             }
Index: trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/auth/DefaultAuthenticator.java	(revision 8510)
@@ -57,5 +57,5 @@
             credentialsTried.put(getRequestorType(), true);
             return new PasswordAuthentication(response.getUsername(), response.getPassword());
-        } catch(CredentialsAgentException e) {
+        } catch (CredentialsAgentException e) {
             Main.error(e);
             return null;
Index: trunk/src/org/openstreetmap/josm/io/auth/JosmPreferencesCredentialAgent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/auth/JosmPreferencesCredentialAgent.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/auth/JosmPreferencesCredentialAgent.java	(revision 8510)
@@ -28,5 +28,5 @@
      */
     @Override
-    public PasswordAuthentication lookup(RequestorType requestorType, String host) throws CredentialsAgentException{
+    public PasswordAuthentication lookup(RequestorType requestorType, String host) throws CredentialsAgentException {
         if (requestorType == null)
             return null;
@@ -38,5 +38,5 @@
                 user = Main.pref.get("osm-server.username", null);
                 password = Main.pref.get("osm-server.password", null);
-            } else if(host != null) {
+            } else if (host != null) {
                 user = Main.pref.get("server.username."+host, null);
                 password = Main.pref.get("server.password."+host, null);
@@ -74,5 +74,5 @@
                     Main.pref.put("osm-server.password", String.valueOf(credentials.getPassword()));
                 }
-            } else if(host != null) {
+            } else if (host != null) {
                 Main.pref.put("server.username."+host, credentials.getUserName());
                 if (credentials.getPassword() == null) {
@@ -130,9 +130,9 @@
     public Component getPreferencesDecorationPanel() {
         HtmlPanel pnlMessage = new HtmlPanel();
-        HTMLEditorKit kit = (HTMLEditorKit)pnlMessage.getEditorPane().getEditorKit();
+        HTMLEditorKit kit = (HTMLEditorKit) pnlMessage.getEditorPane().getEditorKit();
         kit.getStyleSheet().addRule(
-                ".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
-        pnlMessage.setText(
-                tr(
+                ".warning-body {background-color:rgb(253,255,221);padding: 10pt; " +
+                "border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
+        pnlMessage.setText(tr(
                         "<html><body>"
                         + "<p class=\"warning-body\">"
Index: trunk/src/org/openstreetmap/josm/io/imagery/HTMLGrabber.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/HTMLGrabber.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/imagery/HTMLGrabber.java	(revision 8510)
@@ -30,5 +30,5 @@
         String urlstring = url.toExternalForm();
 
-        Main.info("Grabbing HTML " + (attempt > 1? "(attempt " + attempt + ") ":"") + url);
+        Main.info("Grabbing HTML " + (attempt > 1 ? "(attempt " + attempt + ") " : "") + url);
 
         List<String> cmdParams = new ArrayList<>();
@@ -52,5 +52,6 @@
         BufferedImage img = layer.normalizeImage(ImageProvider.read(bais, true, WMSLayer.PROP_ALPHA_CHANNEL.get()));
         bais.reset();
-        layer.cache.saveToCache(layer.isOverlapEnabled()?img:null, bais, Main.getProjection(), request.getPixelPerDegree(), b.minEast, b.minNorth);
+        layer.cache.saveToCache(layer.isOverlapEnabled() ? img : null,
+                bais, Main.getProjection(), request.getPixelPerDegree(), b.minEast, b.minNorth);
 
         return img;
Index: trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 8510)
@@ -274,5 +274,5 @@
                     try {
                         val = Integer.valueOf(accumulator.toString());
-                    } catch(NumberFormatException e) {
+                    } catch (NumberFormatException e) {
                         val = null;
                     }
@@ -315,5 +315,5 @@
                     try {
                         tileSize = Integer.valueOf(accumulator.toString());
-                    } catch(NumberFormatException e) {
+                    } catch (NumberFormatException e) {
                         tileSize = null;
                     }
Index: trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java	(revision 8510)
@@ -83,5 +83,5 @@
         Matcher matcher = pattern.matcher(this.baseURL);
         while (matcher.find()) {
-            props.put(matcher.group(1),matcher.group(2));
+            props.put(matcher.group(1), matcher.group(2));
             matcher.appendReplacement(output, "");
         }
@@ -113,5 +113,5 @@
                     Main.debug("Ignoring "+request+" (precache only + exact match)");
                 }
-            } else if (!loadFromCache(request)){
+            } else if (!loadFromCache(request)) {
                 attempt(request);
             } else if (Main.isDebugEnabled()) {
@@ -122,5 +122,5 @@
     }
 
-    protected void attempt(WMSRequest request){ // try to fetch the image
+    protected void attempt(WMSRequest request) { // try to fetch the image
         int maxTries = 5; // n tries for every image
         for (int i = 1; i <= maxTries; i++) {
@@ -153,5 +153,5 @@
 
     public static int random(int min, int max) {
-        return (int)(Math.random() * ((max+1)-min)) + min;
+        return (int) (Math.random() * ((max+1)-min)) + min;
     }
 
@@ -177,5 +177,5 @@
     public static final NumberFormat latLonFormat = new DecimalFormat("###0.0000000", new DecimalFormatSymbols(Locale.US));
 
-    protected URL getURL(double w, double s,double e,double n,
+    protected URL getURL(double w, double s, double e, double n,
             int wi, int ht) throws MalformedURLException {
         String myProj = Main.getProjection().toCode();
@@ -247,5 +247,5 @@
         }
 
-        if (!request.isReal() && !layer.hasAutoDownload()){
+        if (!request.isReal() && !layer.hasAutoDownload()) {
             request.finish(State.NOT_IN_CACHE, null, null);
             return true;
@@ -256,5 +256,5 @@
 
     protected BufferedImage grab(WMSRequest request, URL url, int attempt) throws WMSException, IOException, OsmTransferException {
-        Main.info("Grabbing WMS " + (attempt > 1? "(attempt " + attempt + ") ":"") + url);
+        Main.info("Grabbing WMS " + (attempt > 1 ? "(attempt " + attempt + ") " : "") + url);
 
         HttpURLConnection conn = Utils.openHttpConnection(url);
@@ -263,5 +263,5 @@
             conn.setRequestProperty(e.getKey(), e.getValue());
         }
-        conn.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15) * 1000);
+        conn.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect", 15) * 1000);
         conn.setReadTimeout(Main.pref.getInteger("socket.timeout.read", 30) * 1000);
 
@@ -293,5 +293,6 @@
         BufferedImage img = layer.normalizeImage(ImageProvider.read(bais, true, WMSLayer.PROP_ALPHA_CHANNEL.get()));
         bais.reset();
-        layer.cache.saveToCache(layer.isOverlapEnabled()?img:null, bais, Main.getProjection(), request.getPixelPerDegree(), b.minEast, b.minNorth);
+        layer.cache.saveToCache(layer.isOverlapEnabled() ? img : null,
+                bais, Main.getProjection(), request.getPixelPerDegree(), b.minEast, b.minNorth);
         return img;
     }
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java	(revision 8510)
@@ -58,7 +58,9 @@
     static class DeleteTagMarker {
         private int num;
+
         public DeleteTagMarker(int num) {
             this.num = num;
         }
+
         @Override
         public String toString() {
@@ -71,13 +73,15 @@
      */
     static class ExistingValues {
-        private String tag;
-        private Map<String, Integer> valueCount;
+        private final String tag;
+        private final Map<String, Integer> valueCount;
+
         public ExistingValues(String tag) {
-            this.tag=tag; valueCount=new HashMap<>();
+            this.tag = tag;
+            this.valueCount = new HashMap<>();
         }
 
         int addValue(String val) {
             Integer c = valueCount.get(val);
-            int r = c==null? 1 : (c.intValue()+1);
+            int r = c == null ? 1 : (c.intValue()+1);
             valueCount.put(val, r);
             return r;
@@ -86,7 +90,7 @@
         @Override
         public String toString() {
-            StringBuilder sb=new StringBuilder();
+            StringBuilder sb = new StringBuilder();
             for (String k: valueCount.keySet()) {
-                if (sb.length()>0) sb.append(", ");
+                if (sb.length() > 0) sb.append(", ");
                 sb.append(k);
             }
@@ -135,5 +139,5 @@
         count = new int[tags.length];
 
-        for (int i = 0; i<tags.length; i++) {
+        for (int i = 0; i < tags.length; i++) {
             count[i] = 0;
             String key = tags[i][0];
@@ -143,5 +147,5 @@
             for (OsmPrimitive osm : sel) {
                 oldValue  = osm.get(key);
-                if (oldValue!=null) {
+                if (oldValue != null) {
                     old.addValue(oldValue);
                     if (!oldValue.equals(value)) {
@@ -162,5 +166,5 @@
             public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
                 Component c = super.prepareRenderer(renderer, row, column);
-                if (count[row]>0) {
+                if (count[row] > 0) {
                     c.setFont(c.getFont().deriveFont(Font.ITALIC));
                     c.setForeground(new Color(100, 100, 100));
@@ -174,5 +178,5 @@
             @Override
             public TableCellEditor getCellEditor(int row, int column) {
-                Object value = getValueAt(row,column);
+                Object value = getValueAt(row, column);
                 if (value instanceof DeleteTagMarker) return null;
                 if (value instanceof ExistingValues) return null;
@@ -185,6 +189,6 @@
                 int c = columnAtPoint(event.getPoint());
                 Object o = getValueAt(r, c);
-                if (c==1 || c==2) return o.toString();
-                if (c==3) return ((ExistingValues)o).getToolTip();
+                if (c == 1 || c == 2) return o.toString();
+                if (c == 3) return ((ExistingValues) o).getToolTip();
                 return tr("Enable the checkbox to accept the value");
             }
@@ -221,5 +225,5 @@
                 }
             });
-            tablePanel.add(c , GBC.eol().insets(20,10,0,0));
+            tablePanel.add(c , GBC.eol().insets(20, 10, 0, 0));
         }
         setContent(tablePanel);
@@ -237,7 +241,7 @@
         if (Main.main.getCurrentDataSet() != null  && buttonIndex != 2) {
             TableModel tm = propertyTable.getModel();
-            for (int i=0; i<tm.getRowCount(); i++) {
-                if (buttonIndex==1 || (Boolean)tm.getValueAt(i, 0)) {
-                    String key =(String)tm.getValueAt(i, 1);
+            for (int i = 0; i < tm.getRowCount(); i++) {
+                if (buttonIndex == 1 || (Boolean) tm.getValueAt(i, 0)) {
+                    String key = (String) tm.getValueAt(i, 1);
                     Object value = tm.getValueAt(i, 2);
                     Main.main.undoRedo.add(new ChangePropertyCommand(sel,
@@ -275,7 +279,7 @@
                         for (String tag : tagSet) {
                             // support a  =   b===c as "a"="b===c"
-                            String[] pair = tag.split("\\s*=\\s*",2);
+                            String[] pair = tag.split("\\s*=\\s*", 2);
                             keyValue[i][0] = pair[0];
-                            keyValue[i][1] = pair.length<2 ? "": pair[1];
+                            keyValue[i][1] = pair.length < 2 ? "" : pair[1];
                             i++;
                         }
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/DNSName.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/DNSName.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/DNSName.java	(revision 8510)
@@ -80,5 +80,5 @@
         //startIndex is the index of the first character of a component
         //endIndex is the index of the last character of a component plus 1
-        for (int endIndex,startIndex=0; startIndex < name.length(); startIndex = endIndex+1) {
+        for (int endIndex, startIndex = 0; startIndex < name.length(); startIndex = endIndex+1) {
             endIndex = name.indexOf('.', startIndex);
             if (endIndex < 0) {
@@ -89,5 +89,5 @@
 
             //nonStartIndex: index for characters in the component beyond the first one
-            for (int nonStartIndex=startIndex+1; nonStartIndex < endIndex; nonStartIndex++) {
+            for (int nonStartIndex = startIndex+1; nonStartIndex < endIndex; nonStartIndex++) {
                 char x = name.charAt(nonStartIndex);
                 if ((alphaDigitsAndHyphen).indexOf(x) < 0)
@@ -147,5 +147,5 @@
             return false;
 
-        DNSName other = (DNSName)obj;
+        DNSName other = (DNSName) obj;
 
         // RFC2459 mandates that these names are
@@ -203,5 +203,5 @@
         else {
             String inName =
-                (((DNSName)inputName).getName()).toLowerCase(Locale.ENGLISH);
+                (((DNSName) inputName).getName()).toLowerCase(Locale.ENGLISH);
             String thisName = name.toLowerCase(Locale.ENGLISH);
             if (inName.equals(thisName))
@@ -236,10 +236,10 @@
     @Override
     public int subtreeDepth() {
-        String subtree=name;
-        int i=1;
+        String subtree = name;
+        int i = 1;
 
         /* count dots */
         for (; subtree.lastIndexOf('.') >= 0; i++) {
-            subtree=subtree.substring(0,subtree.lastIndexOf('.'));
+            subtree = subtree.substring(0, subtree.lastIndexOf('.'));
         }
 
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/PermissionPrefWithDefault.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/PermissionPrefWithDefault.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/PermissionPrefWithDefault.java	(revision 8510)
@@ -2,8 +2,10 @@
 package org.openstreetmap.josm.io.remotecontrol;
 
+import static org.openstreetmap.josm.tools.I18n.tr;
+
 import java.util.Arrays;
 import java.util.List;
+
 import org.openstreetmap.josm.Main;
-import static org.openstreetmap.josm.tools.I18n.tr;
 
 /**
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControl.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControl.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControl.java	(revision 8510)
@@ -86,6 +86,6 @@
      */
     public static InetAddress getInet6Address() throws UnknownHostException {
-        for(InetAddress a : InetAddress.getAllByName(Main.pref.get("remote.control.host.ipv6", "::1"))) {
-            if(a instanceof Inet6Address) {
+        for (InetAddress a : InetAddress.getAllByName(Main.pref.get("remote.control.host.ipv6", "::1"))) {
+            if (a instanceof Inet6Address) {
                 return a;
             }
@@ -102,6 +102,6 @@
     public static InetAddress getInet4Address() throws UnknownHostException {
         // Return an address to the loopback interface by default
-        for(InetAddress a : InetAddress.getAllByName(Main.pref.get("remote.control.host.ipv4", "127.0.0.1"))) {
-            if(a instanceof Inet4Address) {
+        for (InetAddress a : InetAddress.getAllByName(Main.pref.get("remote.control.host.ipv4", "127.0.0.1"))) {
+            if (a instanceof Inet4Address) {
                 return a;
             }
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpServer.java	(revision 8510)
@@ -45,5 +45,5 @@
         } catch (Exception ex) {
             /* only show error when we also have no IPv4 */
-            if(instance4 == null) {
+            if (instance4 == null) {
                 Main.warn(marktr("Cannot start IPv6 remotecontrol server on port {0}: {1}"),
                     Integer.toString(port), ex.getLocalizedMessage());
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java	(revision 8510)
@@ -177,5 +177,5 @@
             String[] ps = san.split(",");
             GeneralNames gnames = new GeneralNames();
-            for(String item: ps) {
+            for (String item: ps) {
                 colonpos = item.indexOf(':');
                 if (colonpos < 0) {
@@ -197,5 +197,5 @@
 
         // Update the algorithm, and resign.
-        algo = (AlgorithmId)cert.get(X509CertImpl.SIG_ALG);
+        algo = (AlgorithmId) cert.get(X509CertImpl.SIG_ALG);
         info.set(CertificateAlgorithmId.NAME + "." + CertificateAlgorithmId.ALGORITHM, algo);
         cert = new X509CertImpl(info);
@@ -337,5 +337,5 @@
             } catch (Exception ex) {
                 /* only show error when we also have no IPv4 */
-                if(instance4 == null) {
+                if (instance4 == null) {
                     Main.warn(marktr("Cannot start IPv6 remotecontrol https server on port {0}: {1}"),
                         Integer.toString(port), ex.getLocalizedMessage());
@@ -392,5 +392,5 @@
 
         if (Main.isTraceEnabled()) {
-            if(server instanceof SSLServerSocket) {
+            if (server instanceof SSLServerSocket) {
                 SSLServerSocket sslServer = (SSLServerSocket) server;
                 Main.trace("SSL server - Enabled Cipher suites: "+Arrays.toString(sslServer.getEnabledCipherSuites()));
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/RequestProcessor.java	(revision 8510)
@@ -106,5 +106,5 @@
     private static void addRequestHandlerClass(String command,
                 Class<? extends RequestHandler> handler, boolean silent) {
-        if(command.charAt(0) == '/') {
+        if (command.charAt(0) == '/') {
             command = command.substring(1);
         }
@@ -176,12 +176,12 @@
             String command = questionPos < 0 ? url : url.substring(0, questionPos);
 
-            Map<String,String> headers = new HashMap<>();
-            int k=0, MAX_HEADERS=20;
-            while (k<MAX_HEADERS) {
-                get=in.readLine();
-                if (get==null) break;
+            Map<String, String> headers = new HashMap<>();
+            int k = 0, MAX_HEADERS = 20;
+            while (k < MAX_HEADERS) {
+                get = in.readLine();
+                if (get == null) break;
                 k++;
                 String[] h = get.split(": ", 2);
-                if (h.length==2) {
+                if (h.length == 2) {
                     headers.put(h[0], h[1]);
                 } else break;
@@ -198,5 +198,5 @@
                 String ref = headers.get("Referer");
                 Pattern r = Pattern.compile("(https?://)?([^/]*)");
-                if (ref!=null) {
+                if (ref != null) {
                     Matcher m = r.matcher(ref);
                     if (m.find()) {
@@ -390,5 +390,5 @@
             try {
                 Class<?> c = handlers.get(cmd);
-                if (c==null) return null;
+                if (c == null) return null;
                 handler = handlers.get(cmd).newInstance();
             } catch (InstantiationException | IllegalAccessException ex) {
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java	(revision 8510)
@@ -78,5 +78,5 @@
      * @param args request arguments
      */
-    private void addNode(Map<String, String> args){
+    private void addNode(Map<String, String> args) {
 
         // Parse the arguments
@@ -91,10 +91,10 @@
             Point p = Main.map.mapView.getPoint(ll);
             node = Main.map.mapView.getNearestNode(p, OsmPrimitive.isUsablePredicate);
-            if (node!=null && node.getCoor().greatCircleDistance(ll) > Main.pref.getDouble("remotecontrol.tolerance", 0.1)) {
+            if (node != null && node.getCoor().greatCircleDistance(ll) > Main.pref.getDouble("remotecontrol.tolerance", 0.1)) {
                 node = null; // node is too far
             }
         }
 
-        if (node==null) {
+        if (node == null) {
             node = new Node(ll);
             // Now execute the commands to add this node.
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java	(revision 8510)
@@ -127,5 +127,5 @@
             Point p = Main.map.mapView.getPoint(ll);
             nd = Main.map.mapView.getNearestNode(p, OsmPrimitive.isUsablePredicate);
-            if (nd!=null && nd.getCoor().greatCircleDistance(ll) > Main.pref.getDouble("remote.tolerance", 0.1)) {
+            if (nd != null && nd.getCoor().greatCircleDistance(ll) > Main.pref.getDouble("remote.tolerance", 0.1)) {
                 nd = null; // node is too far
             }
@@ -141,7 +141,7 @@
         }
 
-        if (prev!=null) {
+        if (prev != null) {
             nd = prev;
-        } else if (nd==null) {
+        } else if (nd == null) {
             nd = new Node(ll);
             // Now execute the commands to add this node.
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/FeaturesHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/FeaturesHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/FeaturesHandler.java	(revision 8510)
@@ -23,6 +23,6 @@
             RequestHandlerBadRequestException {
         StringBuilder buf = new StringBuilder();
-        String q=args.get("q");
-        if (q!=null) {
+        String q = args.get("q");
+        if (q != null) {
             buf.append('[');
             boolean first = true;
@@ -34,5 +34,5 @@
                }
                String info = RequestProcessor.getHandlerInfoAsJSON("/"+s);
-               if (info!=null) {
+               if (info != null) {
                    buf.append(info);
                } else {
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java	(revision 8510)
@@ -140,7 +140,10 @@
             }
         }));
-        return new String[] {"/imagery?title=osm&type=tms&url=https://a.tile.openstreetmap.org/%7Bzoom%7D/%7Bx%7D/%7By%7D.png",
-            "/imagery?title=landsat&type=wms&url=http://irs.gis-lab.info/?layers=landsat&SRS=%7Bproj%7D&WIDTH=%7Bwidth%7D&HEIGHT=%7Bheight%7D&BBOX=%7Bbbox%7D",
-            "/imagery?title=...&type={"+types+"}&url=....[&cookies=...][&min_zoom=...][&max_zoom=...]"};
+        return new String[] {
+            "/imagery?title=osm&type=tms&url=https://a.tile.openstreetmap.org/%7Bzoom%7D/%7Bx%7D/%7By%7D.png",
+            "/imagery?title=landsat&type=wms&url=http://irs.gis-lab.info/?" +
+                    "layers=landsat&SRS=%7Bproj%7D&WIDTH=%7Bwidth%7D&HEIGHT=%7Bheight%7D&BBOX=%7Bbbox%7D",
+            "/imagery?title=...&type={"+types+"}&url=....[&cookies=...][&min_zoom=...][&max_zoom=...]"
+            };
     }
 }
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 8510)
@@ -90,5 +90,6 @@
         if (command.equals(cmd)) {
             return new String[] {
-                    "/load_and_zoom?addtags=wikipedia:de=Wei%C3%9Fe_Gasse|maxspeed=5&select=way23071688,way23076176,way23076177,&left=13.740&right=13.741&top=51.05&bottom=51.049",
+                    "/load_and_zoom?addtags=wikipedia:de=Wei%C3%9Fe_Gasse|maxspeed=5&select=way23071688,way23076176,way23076177," +
+                            "&left=13.740&right=13.741&top=51.05&bottom=51.049",
                     "/load_and_zoom?left=8.19&right=8.20&top=48.605&bottom=48.590&select=node413602999&new_layer=true"};
         } else {
@@ -123,5 +124,5 @@
                         }
                         if (present != null && !present.isEmpty()) {
-                            toDownload = new Area(new Rectangle2D.Double(minlon,minlat,maxlon-minlon,maxlat-minlat));
+                            toDownload = new Area(new Rectangle2D.Double(minlon, minlat, maxlon-minlon, maxlat-minlat));
                             toDownload.subtract(present);
                             if (!toDownload.isEmpty()) {
@@ -138,5 +139,5 @@
                         Main.info("RemoteControl: no download necessary");
                     } else {
-                        Future<?> future = osmTask.download(newLayer, new Bounds(minlat,minlon,maxlat,maxlon),
+                        Future<?> future = osmTask.download(newLayer, new Bounds(minlat, minlon, maxlat, maxlon),
                                 null /* let the task manage the progress monitor */);
                         Main.worker.submit(new PostDownloadHandler(osmTask, future));
@@ -158,5 +159,5 @@
                 public void run() {
                     DataSet ds = Main.main.getCurrentDataSet();
-                    if(ds == null) // e.g. download failed
+                    if (ds == null) // e.g. download failed
                         return;
                     ds.clearSelection();
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java	(revision 8510)
@@ -73,5 +73,5 @@
                     final List<PrimitiveId> downloaded = task.getDownloadedId();
                     final DataSet ds = Main.main.getCurrentDataSet();
-                    if(downloaded != null) {
+                    if (downloaded != null) {
                         GuiHelper.runInEDT(new Runnable() {
                             @Override
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java	(revision 8510)
@@ -35,5 +35,5 @@
 
     /** The GET request arguments */
-    protected Map<String,String> args;
+    protected Map<String, String> args;
 
     /** The request URL without "GET". */
@@ -220,5 +220,5 @@
         List<String> missingKeys = new LinkedList<>();
         boolean error = false;
-        if(mandatory != null) for (String key : mandatory) {
+        if (mandatory != null) for (String key : mandatory) {
             String value = args.get(key);
             if (value == null || value.isEmpty()) {
@@ -312,4 +312,5 @@
             super(message);
         }
+
         public RequestHandlerBadRequestException(String message, Throwable cause) {
             super(message, cause);
Index: trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionExporter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionExporter.java	(revision 8510)
@@ -48,5 +48,5 @@
         p.add(export, GBC.std());
         p.add(lbl, GBC.std());
-        p.add(GBC.glue(1,0), GBC.std().fill(GBC.HORIZONTAL));
+        p.add(GBC.glue(1, 0), GBC.std().fill(GBC.HORIZONTAL));
         return p;
     }
Index: trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java	(revision 8510)
@@ -33,5 +33,5 @@
         NodeList imgNodes = elem.getChildNodes();
         boolean useThumbs = false;
-        for (int i=0; i<imgNodes.getLength(); ++i) {
+        for (int i = 0; i < imgNodes.getLength(); ++i) {
             Node imgNode = imgNodes.item(i);
             if (imgNode.getNodeType() == Node.ELEMENT_NODE) {
@@ -40,5 +40,5 @@
                     ImageEntry entry = new ImageEntry();
                     NodeList attrNodes = imgElem.getChildNodes();
-                    for (int j=0; j<attrNodes.getLength(); ++j) {
+                    for (int j = 0; j < attrNodes.getLength(); ++j) {
                         Node attrNode = attrNodes.item(j);
                         if (attrNode.getNodeType() == Node.ELEMENT_NODE) {
Index: trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/session/GpxTracksSessionExporter.java	(revision 8510)
@@ -121,10 +121,10 @@
         topRow.add(export, GBC.std());
         topRow.add(lbl, GBC.std());
-        topRow.add(GBC.glue(1,0), GBC.std().fill(GBC.HORIZONTAL));
+        topRow.add(GBC.glue(1, 0), GBC.std().fill(GBC.HORIZONTAL));
         p.add(topRow, GBC.eol().fill(GBC.HORIZONTAL));
-        p.add(lblData, GBC.std().insets(10,0,0,0));
+        p.add(lblData, GBC.std().insets(10, 0, 0, 0));
         p.add(link, GBC.std());
         p.add(include, GBC.eol());
-        p.add(cards, GBC.eol().insets(15,0,3,3));
+        p.add(cards, GBC.eol().insets(15, 0, 3, 3));
 
         export.addItemListener(new ItemListener() {
Index: trunk/src/org/openstreetmap/josm/io/session/ImagerySessionExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/ImagerySessionExporter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/session/ImagerySessionExporter.java	(revision 8510)
@@ -60,5 +60,5 @@
         p.add(export, GBC.std());
         p.add(lbl, GBC.std());
-        p.add(GBC.glue(1,0), GBC.std().fill(GBC.HORIZONTAL));
+        p.add(GBC.glue(1, 0), GBC.std().fill(GBC.HORIZONTAL));
         return p;
     }
@@ -80,5 +80,5 @@
         layerElem.setAttribute("version", "0.1");
         ImageryPreferenceEntry e = new ImageryPreferenceEntry(layer.getInfo());
-        Map<String,String> data = new LinkedHashMap<>(Preferences.serializeStruct(e, ImageryPreferenceEntry.class));
+        Map<String, String> data = new LinkedHashMap<>(Preferences.serializeStruct(e, ImageryPreferenceEntry.class));
         if (layer instanceof WMSLayer) {
             WMSLayer wms = (WMSLayer) layer;
@@ -86,5 +86,5 @@
             data.put("automatically-change-resolution", Boolean.toString(wms.isAutoResolution()));
         }
-        for (Map.Entry<String,String> entry : data.entrySet()) {
+        for (Map.Entry<String, String> entry : data.entrySet()) {
             Element attrElem = support.createElement(entry.getKey());
             layerElem.appendChild(attrElem);
Index: trunk/src/org/openstreetmap/josm/io/session/ImagerySessionImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/ImagerySessionImporter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/session/ImagerySessionImporter.java	(revision 8510)
@@ -36,5 +36,5 @@
         NodeList nodes = elem.getChildNodes();
 
-        for (int i=0; i<nodes.getLength(); ++i) {
+        for (int i = 0; i < nodes.getLength(); ++i) {
             Node node = nodes.item(i);
             if (node.getNodeType() == Node.ELEMENT_NODE) {
Index: trunk/src/org/openstreetmap/josm/io/session/MarkerSessionExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/MarkerSessionExporter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/session/MarkerSessionExporter.java	(revision 8510)
@@ -55,5 +55,5 @@
         p.add(export, GBC.std());
         p.add(lbl, GBC.std());
-        p.add(GBC.glue(1,0), GBC.std().fill(GBC.HORIZONTAL));
+        p.add(GBC.glue(1, 0), GBC.std().fill(GBC.HORIZONTAL));
         return p;
     }
Index: trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/session/OsmDataSessionExporter.java	(revision 8510)
@@ -110,6 +110,6 @@
             tf.setEditable(false);
             cardLink.add(tf, GBC.std());
-            save.setMargin(new Insets(0,0,0,0));
-            cardLink.add(save, GBC.eol().insets(2,0,0,0));
+            save.setMargin(new Insets(0, 0, 0, 0));
+            cardLink.add(save, GBC.eol().insets(2, 0, 0, 0));
         } else {
             cardLink.add(new JLabel(tr("No file association")), GBC.eol());
@@ -150,10 +150,10 @@
         topRow.add(export, GBC.std());
         topRow.add(lbl, GBC.std());
-        topRow.add(GBC.glue(1,0), GBC.std().fill(GBC.HORIZONTAL));
+        topRow.add(GBC.glue(1, 0), GBC.std().fill(GBC.HORIZONTAL));
         p.add(topRow, GBC.eol().fill(GBC.HORIZONTAL));
-        p.add(lblData, GBC.std().insets(10,0,0,0));
+        p.add(lblData, GBC.std().insets(10, 0, 0, 0));
         p.add(link, GBC.std());
         p.add(include, GBC.eol());
-        p.add(cards, GBC.eol().insets(15,0,3,3));
+        p.add(cards, GBC.eol().insets(15, 0, 3, 3));
 
         export.addItemListener(new ItemListener() {
Index: trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 8510)
@@ -58,5 +58,6 @@
 public class SessionReader {
 
-    private static Map<String, Class<? extends SessionLayerImporter>> sessionLayerImporters = new HashMap<>();
+    private static final Map<String, Class<? extends SessionLayerImporter>> sessionLayerImporters = new HashMap<>();
+
     static {
         registerSessionLayerImporter("osm-data", OsmDataSessionImporter.class);
@@ -352,5 +353,5 @@
         NodeList nodes = layersEl.getChildNodes();
 
-        for (int i=0; i<nodes.getLength(); ++i) {
+        for (int i = 0; i < nodes.getLength(); ++i) {
             Node node = nodes.item(i);
             if (node.getNodeType() == Node.ELEMENT_NODE) {
Index: trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java	(revision 8510)
@@ -49,4 +49,5 @@
 
     private static Map<Class<? extends Layer>, Class<? extends SessionLayerExporter>> sessionLayerExporters = new HashMap<>();
+
     static {
         registerSessionLayerExporter(OsmDataLayer.class , OsmDataSessionExporter.class);
@@ -196,5 +197,5 @@
         root.appendChild(layersEl);
 
-        for (int index=0; index<layers.size(); ++index) {
+        for (int index = 0; index < layers.size(); ++index) {
             Layer layer = layers.get(index);
             SessionLayerExporter exporter = exporters.get(layer);
Index: trunk/src/org/openstreetmap/josm/plugins/Plugin.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/Plugin.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/plugins/Plugin.java	(revision 8510)
@@ -121,5 +121,5 @@
             }
             byte[] buffer = new byte[8192];
-            for(int len = in.read(buffer); len > 0; len = in.read(buffer)) {
+            for (int len = in.read(buffer); len > 0; len = in.read(buffer)) {
                 out.write(buffer, 0, len);
             }
Index: trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java	(revision 8510)
@@ -71,5 +71,5 @@
      */
     public PluginDownloadTask(ProgressMonitor monitor, Collection<PluginInformation> toUpdate, String title) {
-        super(title, monitor == null? NullProgressMonitor.INSTANCE: monitor, false /* don't ignore exceptions */);
+        super(title, monitor == null ? NullProgressMonitor.INSTANCE : monitor, false /* don't ignore exceptions */);
         CheckParameterUtil.ensureParameterNotNull(toUpdate, "toUpdate");
         this.toUpdate.addAll(toUpdate);
@@ -91,5 +91,5 @@
     protected void cancel() {
         this.canceled = true;
-        synchronized(this) {
+        synchronized (this) {
             if (downloadConnection != null) {
                 downloadConnection.disconnect();
@@ -101,5 +101,5 @@
     protected void finish() {}
 
-    protected void download(PluginInformation pi, File file) throws PluginDownloadException{
+    protected void download(PluginInformation pi, File file) throws PluginDownloadException {
         if (pi.mainversion > Version.getInstance().getVersion()) {
             ExtendedDialog dialog = new ExtendedDialog(
@@ -124,5 +124,5 @@
             }
             URL url = new URL(pi.downloadlink);
-            synchronized(this) {
+            synchronized (this) {
                 downloadConnection = CachedFile.connectFollowingRedirect(url, PLUGIN_MIME_TYPES, null);
             }
@@ -146,5 +146,5 @@
             throw new PluginDownloadException(e);
         } finally {
-            synchronized(this) {
+            synchronized (this) {
                 downloadConnection = null;
             }
@@ -168,5 +168,5 @@
             try {
                 download(d, pluginFile);
-            } catch(PluginDownloadException e) {
+            } catch (PluginDownloadException e) {
                 Main.error(e);
                 failed.add(d);
Index: trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8510)
@@ -100,9 +100,9 @@
             new DeprecatedPlugin("tways-0.2", IN_CORE),
             new DeprecatedPlugin("geotagged", IN_CORE),
-            new DeprecatedPlugin("landsat", tr("replaced by new {0} plugin","lakewalker")),
+            new DeprecatedPlugin("landsat", tr("replaced by new {0} plugin", "lakewalker")),
             new DeprecatedPlugin("namefinder", IN_CORE),
             new DeprecatedPlugin("waypoints", IN_CORE),
             new DeprecatedPlugin("slippy_map_chooser", IN_CORE),
-            new DeprecatedPlugin("tcx-support", tr("replaced by new {0} plugin","dataimport")),
+            new DeprecatedPlugin("tcx-support", tr("replaced by new {0} plugin", "dataimport")),
             new DeprecatedPlugin("usertools", IN_CORE),
             new DeprecatedPlugin("AgPifoJ", IN_CORE),
@@ -117,7 +117,7 @@
             new DeprecatedPlugin("wmsplugin", IN_CORE),
             new DeprecatedPlugin("ParallelWay", IN_CORE),
-            new DeprecatedPlugin("dumbutils", tr("replaced by new {0} plugin","utilsplugin2")),
+            new DeprecatedPlugin("dumbutils", tr("replaced by new {0} plugin", "utilsplugin2")),
             new DeprecatedPlugin("ImproveWayAccuracy", IN_CORE),
-            new DeprecatedPlugin("Curves", tr("replaced by new {0} plugin","utilsplugin2")),
+            new DeprecatedPlugin("Curves", tr("replaced by new {0} plugin", "utilsplugin2")),
             new DeprecatedPlugin("epsg31287", tr("replaced by new {0} plugin", "proj4j")),
             new DeprecatedPlugin("licensechange", tr("no longer required")),
@@ -241,5 +241,4 @@
      */
     private static final List<ClassLoader> sources = new LinkedList<>();
-
     static {
         try {
@@ -321,5 +320,5 @@
                     + "<br>This plugin is no longer developed and very likely will produce errors."
                     +"<br>It should be disabled.<br>Delete from preferences?</html>", unmaintained);
-            if (confirmDisablePlugin(parent, msg,unmaintained)) {
+            if (confirmDisablePlugin(parent, msg, unmaintained)) {
                 Main.pref.removeFromCollection("plugins", unmaintained);
                 plugins.remove(unmaintained);
@@ -818,8 +817,8 @@
             try {
                 future.get();
-            } catch(ExecutionException e) {
+            } catch (ExecutionException e) {
                 Main.error(e);
                 return null;
-            } catch(InterruptedException e) {
+            } catch (InterruptedException e) {
                 Main.warn("InterruptedException in "+PluginHandler.class.getSimpleName()+" while loading locally available plugin information");
                 return null;
@@ -879,5 +878,5 @@
             monitor.subTask(tr("Removing unmaintained plugins..."));
             filterUnmaintainedPlugins(parent, plugins);
-            Map<String, PluginInformation> infos = loadLocallyAvailablePluginInformation(monitor.createSubTaskMonitor(1,false));
+            Map<String, PluginInformation> infos = loadLocallyAvailablePluginInformation(monitor.createSubTaskMonitor(1, false));
             List<PluginInformation> ret = new LinkedList<>();
             for (Iterator<String> it = plugins.iterator(); it.hasNext();) {
@@ -1042,5 +1041,5 @@
                 //
                 pluginDownloadTask = new PluginDownloadTask(
-                        monitor.createSubTaskMonitor(1,false),
+                        monitor.createSubTaskMonitor(1, false),
                         pluginsToDownload,
                         tr("Update plugins")
@@ -1050,9 +1049,9 @@
                 try {
                     future.get();
-                } catch(ExecutionException e) {
+                } catch (ExecutionException e) {
                     Main.error(e);
                     alertFailedPluginUpdate(parent, pluginsToUpdate);
                     return plugins;
-                } catch(InterruptedException e) {
+                } catch (InterruptedException e) {
                     Main.warn("InterruptedException in "+PluginHandler.class.getSimpleName()+" while updating plugins");
                     alertFailedPluginUpdate(parent, pluginsToUpdate);
@@ -1174,5 +1173,6 @@
             if (plugin.exists() && !plugin.delete() && dowarn) {
                 Main.warn(tr("Failed to delete outdated plugin ''{0}''.", plugin.toString()));
-                Main.warn(tr("Failed to install already downloaded plugin ''{0}''. Skipping installation. JOSM is still going to load the old plugin version.",
+                Main.warn(tr("Failed to install already downloaded plugin ''{0}''. " +
+                        "Skipping installation. JOSM is still going to load the old plugin version.",
                         pluginName));
                 continue;
@@ -1192,5 +1192,6 @@
                 Main.warn(tr("Failed to install plugin ''{0}'' from temporary download file ''{1}''. Renaming failed.",
                         plugin.toString(), updatedPlugin.toString()));
-                Main.warn(tr("Failed to install already downloaded plugin ''{0}''. Skipping installation. JOSM is still going to load the old plugin version.",
+                Main.warn(tr("Failed to install already downloaded plugin ''{0}''. " +
+                        "Skipping installation. JOSM is still going to load the old plugin version.",
                         pluginName));
             }
@@ -1250,5 +1251,5 @@
             try {
                 pi.updateFromJar(new PluginInformation(downloadedPluginFile, pi.name));
-            } catch(PluginException e) {
+            } catch (PluginException e) {
                 Main.error(e);
             }
@@ -1273,5 +1274,5 @@
                         tr("Keep plugin"),
                         ImageProvider.get("cancel"),
-                        tr("Click to keep the plugin ''{0}''",plugin.getPluginInformation().name),
+                        tr("Click to keep the plugin ''{0}''", plugin.getPluginInformation().name),
                         null /* no specific help context */
                 )
@@ -1358,5 +1359,5 @@
 
         Set<String> plugins = new HashSet<>(
-                Main.pref.getCollection("plugins",Collections.<String>emptySet())
+                Main.pref.getCollection("plugins", Collections.<String>emptySet())
         );
         final PluginInformation pluginInfo = plugin.getPluginInformation();
@@ -1473,5 +1474,5 @@
             gc.weightx = 1.0;
             gc.weighty = 1.0;
-            gc.insets = new Insets(5,5,5,5);
+            gc.insets = new Insets(5, 5, 5, 5);
             add(lblMessage = new JMultilineLabel(""), gc);
             lblMessage.setFont(lblMessage.getFont().deriveFont(Font.PLAIN));
Index: trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 8510)
@@ -97,5 +97,5 @@
      * @throws PluginException if reading the manifest fails
      */
-    public PluginInformation(File file) throws PluginException{
+    public PluginInformation(File file) throws PluginException {
         this(file, file.getName().substring(0, file.getName().length()-4));
     }
@@ -143,5 +143,5 @@
             Manifest manifest = new Manifest();
             manifest.read(manifestStream);
-            if(url != null) {
+            if (url != null) {
                 downloadlink = url;
             }
@@ -238,5 +238,5 @@
             try {
                 mainversion = Integer.parseInt(s);
-            } catch(NumberFormatException e) {
+            } catch (NumberFormatException e) {
                 Main.warn(tr("Invalid plugin main version ''{0}'' in plugin {1}", s, name));
             }
@@ -259,19 +259,19 @@
             for (Map.Entry<Object, Object> entry : attr.entrySet()) {
                 try {
-                    String key = ((Attributes.Name)entry.getKey()).toString();
+                    String key = ((Attributes.Name) entry.getKey()).toString();
                     if (key.endsWith("_Plugin-Url")) {
-                        int mv = Integer.parseInt(key.substring(0,key.length()-11));
+                        int mv = Integer.parseInt(key.substring(0, key.length()-11));
                         if (mv <= myv && (mv > mainversion || mainversion > myv)) {
-                            String v = (String)entry.getValue();
+                            String v = (String) entry.getValue();
                             int i = v.indexOf(';');
                             if (i > 0) {
                                 downloadlink = v.substring(i+1);
                                 mainversion = mv;
-                                version = v.substring(0,i);
+                                version = v.substring(0, i);
                                 oldmode = true;
                             }
                         }
                     }
-                } catch(Exception e) {
+                } catch (Exception e) {
                     Main.error(e);
                 }
@@ -333,5 +333,5 @@
             Object plugin = c.newInstance(this);
             return new PluginProxy(plugin, this);
-        } catch(NoSuchMethodException | IllegalAccessException | InstantiationException | InvocationTargetException e) {
+        } catch (NoSuchMethodException | IllegalAccessException | InstantiationException | InvocationTargetException e) {
             throw new PluginException(name, e);
         }
@@ -436,5 +436,5 @@
     public boolean isUpdateRequired(String referenceVersion) {
         if (this.downloadlink == null) return false;
-        if (this.version == null && referenceVersion!= null)
+        if (this.version == null && referenceVersion != null)
             return true;
         if (this.version != null && !this.version.equals(referenceVersion))
Index: trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java	(revision 8510)
@@ -34,5 +34,5 @@
      * @throws PluginListParseException if plugin manifest cannot be parsed
      */
-    protected static PluginInformation createInfo(String name, String url, String manifest) throws PluginListParseException{
+    protected static PluginInformation createInfo(String name, String url, String manifest) throws PluginListParseException {
         try {
             return new PluginInformation(
@@ -57,5 +57,5 @@
      * @throws PluginListParseException if something goes wrong while parsing
      */
-    public List<PluginInformation> parse(InputStream in) throws PluginListParseException{
+    public List<PluginInformation> parse(InputStream in) throws PluginListParseException {
         List<PluginInformation> ret = new LinkedList<>();
         BufferedReader r = null;
@@ -77,5 +77,5 @@
                 addPluginInformation(ret, name, url, manifest.toString());
                 String[] x = line.split(";");
-                if(x.length != 2)
+                if (x.length != 2)
                     throw new IOException(tr("Illegal entry in plugin list."));
                 name = x[0];
Index: trunk/src/org/openstreetmap/josm/plugins/PluginProxy.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginProxy.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginProxy.java	(revision 8510)
@@ -38,5 +38,5 @@
     @Override public PreferenceSetting getPreferenceSetting() {
         try {
-            return (PreferenceSetting)plugin.getClass().getMethod("getPreferenceSetting").invoke(plugin);
+            return (PreferenceSetting) plugin.getClass().getMethod("getPreferenceSetting").invoke(plugin);
         } catch (NoSuchMethodException e) {
             Main.debug("Plugin "+plugin+" does not define getPreferenceSetting");
Index: trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java	(revision 8510)
@@ -47,5 +47,5 @@
 
     public ReadLocalPluginInformationTask(ProgressMonitor monitor) {
-        super(tr("Reading local plugin information.."),monitor, false);
+        super(tr("Reading local plugin information.."), monitor, false);
         availablePlugins = new HashMap<>();
     }
@@ -59,5 +59,5 @@
     protected void finish() {}
 
-    protected void processJarFile(File f, String pluginName) throws PluginException{
+    protected void processJarFile(File f, String pluginName) throws PluginException {
         PluginInformation info = new PluginInformation(
                 f,
@@ -95,5 +95,5 @@
             try {
                 processLocalPluginInformationFile(f);
-            } catch(PluginListParseException e) {
+            } catch (PluginListParseException e) {
                 Main.warn(tr("Failed to scan file ''{0}'' for plugin information. Skipping.", fname));
                 Main.error(e);
@@ -127,5 +127,5 @@
                     processJarFile(f, pluginName);
                 }
-            } catch (PluginException e){
+            } catch (PluginException e) {
                 Main.warn("PluginException: "+e.getMessage());
                 Main.warn(tr("Failed to scan file ''{0}'' for plugin information. Skipping.", fname));
@@ -147,5 +147,5 @@
     }
 
-    protected void processLocalPluginInformationFile(File file) throws PluginListParseException{
+    protected void processLocalPluginInformationFile(File file) throws PluginListParseException {
         try (FileInputStream fin = new FileInputStream(file)) {
             List<PluginInformation> pis = new PluginListParser().parse(fin);
@@ -157,5 +157,5 @@
                 availablePlugins.put(pi.name, pi);
             }
-        } catch(IOException e) {
+        } catch (IOException e) {
             throw new PluginListParseException(e);
         }
@@ -165,5 +165,5 @@
         for (PluginProxy proxy : PluginHandler.pluginList) {
             PluginInformation info = proxy.getPluginInformation();
-            if (canceled)return;
+            if (canceled) return;
             if (!availablePlugins.containsKey(info.name)) {
                 availablePlugins.put(info.name, info);
@@ -176,5 +176,5 @@
     protected void filterOldPlugins() {
         for (PluginHandler.DeprecatedPlugin p : PluginHandler.DEPRECATED_PLUGINS) {
-            if (canceled)return;
+            if (canceled) return;
             if (availablePlugins.containsKey(p.name)) {
                 availablePlugins.remove(p.name);
@@ -194,9 +194,9 @@
             );
             getProgressMonitor().worked(1);
-            if (canceled)return;
+            if (canceled) return;
         }
         analyseInProcessPlugins();
         getProgressMonitor().worked(1);
-        if (canceled)return;
+        if (canceled) return;
         filterOldPlugins();
         getProgressMonitor().worked(1);
Index: trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 8510)
@@ -84,5 +84,5 @@
      */
     public ReadRemotePluginInformationTask(ProgressMonitor monitor, Collection<String> sites, boolean displayErrMsg) {
-        super(tr("Download plugin list..."), monitor == null ? NullProgressMonitor.INSTANCE: monitor, false /* don't ignore exceptions */);
+        super(tr("Download plugin list..."), monitor == null ? NullProgressMonitor.INSTANCE : monitor, false /* don't ignore exceptions */);
         init(sites, displayErrMsg);
     }
@@ -91,5 +91,5 @@
     protected void cancel() {
         canceled = true;
-        synchronized(this) {
+        synchronized (this) {
             if (connection != null) {
                 connection.disconnect();
@@ -120,5 +120,5 @@
             }
             String path = url.getPath();
-            for (int i =0;i<path.length(); i++) {
+            for (int i = 0; i < path.length(); i++) {
                 char c = path.charAt(i);
                 if (Character.isLetterOrDigit(c)) {
@@ -130,5 +130,5 @@
             sb.append(".txt");
             name = sb.toString();
-        } catch(MalformedURLException e) {
+        } catch (MalformedURLException e) {
             name = "site-unknown.txt";
         }
@@ -158,5 +158,5 @@
 
             URL url = new URL(site);
-            synchronized(this) {
+            synchronized (this) {
                 connection = Utils.openHttpConnection(url);
                 connection.setRequestProperty("Cache-Control", "no-cache");
@@ -181,5 +181,5 @@
             return null;
         } finally {
-            synchronized(this) {
+            synchronized (this) {
                 if (connection != null) {
                     connection.disconnect();
@@ -264,5 +264,5 @@
             writer.write(list);
             writer.flush();
-        } catch(IOException e) {
+        } catch (IOException e) {
             // just failed to write the cache file. No big deal, but log the exception anyway
             Main.error(e);
@@ -328,5 +328,5 @@
                     }
             );
-            if(f != null && f.length > 0) {
+            if (f != null && f.length > 0) {
                 siteCacheFiles.addAll(Arrays.asList(f));
             }
Index: trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/AudioPlayer.java	(revision 8510)
@@ -29,7 +29,10 @@
 
     private enum State { INITIALIZING, NOTPLAYING, PLAYING, PAUSED, INTERRUPTED }
+
+    private enum Command { PLAY, PAUSE }
+
+    private enum Result { WAITING, OK, FAILED }
+
     private State state;
-    private enum Command { PLAY, PAUSE }
-    private enum Result { WAITING, OK, FAILED }
     private URL playingUrl;
     private double leadIn; // seconds
@@ -62,8 +65,10 @@
             send();
         }
+
         protected void pause() throws Exception {
             command = Command.PAUSE;
             send();
         }
+
         private void send() throws Exception {
             result = Result.WAITING;
@@ -75,8 +80,10 @@
                 throw exception;
         }
+
         private void possiblyInterrupt() throws InterruptedException {
             if (interrupted() || result == Result.WAITING)
                 throw new InterruptedException();
         }
+
         protected void failed(Exception e) {
             exception = e;
@@ -84,17 +91,22 @@
             state = State.NOTPLAYING;
         }
+
         protected void ok(State newState) {
             result = Result.OK;
             state = newState;
         }
+
         protected double offset() {
             return offset;
         }
+
         protected double speed() {
             return speed;
         }
+
         protected URL url() {
             return url;
         }
+
         protected Command command() {
             return command;
@@ -202,8 +214,8 @@
      */
     public static void reset() {
-        if(audioPlayer != null) {
+        if (audioPlayer != null) {
             try {
                 pause();
-            } catch(Exception e) {
+            } catch (Exception e) {
                 Main.warn(e);
             }
@@ -235,5 +247,5 @@
         SourceDataLine audioOutputLine = null;
         AudioFormat audioFormat = null;
-        byte[] abData = new byte[(int)chunk];
+        byte[] abData = new byte[(int) chunk];
 
         for (;;) {
@@ -250,5 +262,5 @@
                     case PLAYING:
                         command.possiblyInterrupt();
-                        for(;;) {
+                        for (;;) {
                             int nBytesRead = 0;
                             nBytesRead = audioInputStream.read(abData, 0, abData.length);
@@ -301,9 +313,6 @@
                                 }
                                 if (calibratedOffset > 0.0) {
-                                    long bytesToSkip = (long)(
-                                            calibratedOffset /* seconds (double) */ * bytesPerSecond);
-                                    /* skip doesn't seem to want to skip big chunks, so
-                                     * reduce it to smaller ones
-                                     */
+                                    long bytesToSkip = (long) (calibratedOffset /* seconds (double) */ * bytesPerSecond);
+                                    // skip doesn't seem to want to skip big chunks, so reduce it to smaller ones
                                     // audioInputStream.skip(bytesToSkip);
                                     while (bytesToSkip > chunk) {
@@ -361,5 +370,5 @@
     public static void audioMalfunction(Exception ex) {
         String msg = ex.getMessage();
-        if(msg == null)
+        if (msg == null)
             msg = tr("unspecified reason");
         else
Index: trunk/src/org/openstreetmap/josm/tools/Base64.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Base64.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/Base64.java	(revision 8510)
@@ -45,12 +45,10 @@
             int l = Math.min(3, s.length()-i*3);
             String buf = s.substring(i*3, i*3+l);
-            out.append(enc.charAt(buf.charAt(0)>>2));
+            out.append(enc.charAt(buf.charAt(0) >> 2));
             out.append(enc.charAt(
                                   (buf.charAt(0) & 0x03) << 4 |
-                                  (l==1?
-                                   0:
-                                   (buf.charAt(1) & 0xf0) >> 4)));
-            out.append(l>1?enc.charAt((buf.charAt(1) & 0x0f) << 2 | (l==2?0:(buf.charAt(2) & 0xc0) >> 6)):'=');
-            out.append(l>2?enc.charAt(buf.charAt(2) & 0x3f):'=');
+                                  (l == 1 ? 0 : (buf.charAt(1) & 0xf0) >> 4)));
+            out.append(l > 1 ? enc.charAt((buf.charAt(1) & 0x0f) << 2 | (l == 2 ? 0 : (buf.charAt(2) & 0xc0) >> 6)) : '=');
+            out.append(l > 2 ? enc.charAt(buf.charAt(2) & 0x3f) : '=');
         }
         return out.toString();
@@ -82,15 +80,13 @@
             int l = Math.min(3, s.limit()-i*3);
             int byte0 = s.get() & 0xff;
-            int byte1 = l>1? s.get() & 0xff : 0;
-            int byte2 = l>2? s.get() & 0xff : 0;
+            int byte1 = l > 1 ? s.get() & 0xff : 0;
+            int byte2 = l > 2 ? s.get() & 0xff : 0;
 
-            out.append(enc.charAt(byte0>>2));
+            out.append(enc.charAt(byte0 >> 2));
             out.append(enc.charAt(
                                   (byte0 & 0x03) << 4 |
-                                  (l==1?
-                                   0:
-                                   (byte1 & 0xf0) >> 4)));
-            out.append(l>1?enc.charAt((byte1 & 0x0f) << 2 | (l==2?0:(byte2 & 0xc0) >> 6)):'=');
-            out.append(l>2?enc.charAt(byte2 & 0x3f):'=');
+                                  (l == 1 ? 0 : (byte1 & 0xf0) >> 4)));
+            out.append(l > 1 ? enc.charAt((byte1 & 0x0f) << 2 | (l == 2 ? 0 : (byte2 & 0xc0) >> 6)) : '=');
+            out.append(l > 2 ? enc.charAt(byte2 & 0x3f) : '=');
         }
         return out.toString();
Index: trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(revision 8510)
@@ -199,11 +199,11 @@
 
             String text = ShowStatusReportAction.getReportHeader() + stack.getBuffer().toString();
-            String urltext = text.replaceAll("\r","");
+            String urltext = text.replaceAll("\r", "");
             if (urltext.length() > maxlen) {
-                urltext = urltext.substring(0,maxlen);
+                urltext = urltext.substring(0, maxlen);
                 int idx = urltext.lastIndexOf('\n');
                 // cut whole line when not loosing too much
                 if (maxlen-idx < 200) {
-                    urltext = urltext.substring(0,idx+1);
+                    urltext = urltext.substring(0, idx+1);
                 }
                 urltext += "...<snip>...\n";
@@ -215,10 +215,10 @@
                             "make sure you have updated to the latest version of JOSM here:")),
                             GBC.eol().fill(GridBagConstraints.HORIZONTAL));
-            p.add(new UrlLabel(Main.getJOSMWebsite(),2), GBC.eop().insets(8,0,0,0));
+            p.add(new UrlLabel(Main.getJOSMWebsite(), 2), GBC.eop().insets(8, 0, 0, 0));
             p.add(new JMultilineLabel(
                     tr("You should also update your plugins. If neither of those help please " +
                             "file a bug report in our bugtracker using this link:")),
                             GBC.eol().fill(GridBagConstraints.HORIZONTAL));
-            p.add(getBugReportUrlLabel(urltext), GBC.eop().insets(8,0,0,0));
+            p.add(getBugReportUrlLabel(urltext), GBC.eop().insets(8, 0, 0, 0));
             p.add(new JMultilineLabel(
                     tr("There the error information provided below should already be " +
@@ -229,5 +229,5 @@
                     tr("Alternatively, if that does not work you can manually fill in the information " +
                             "below at this URL:")), GBC.eol().fill(GridBagConstraints.HORIZONTAL));
-            p.add(new UrlLabel(Main.getJOSMWebsite()+"/newticket",2), GBC.eop().insets(8,0,0,0));
+            p.add(new UrlLabel(Main.getJOSMWebsite()+"/newticket", 2), GBC.eop().insets(8, 0, 0, 0));
 
             // Wiki formatting for manual copy-paste
@@ -246,5 +246,5 @@
             for (Component c: p.getComponents()) {
                 if (c instanceof JMultilineLabel) {
-                    ((JMultilineLabel)c).setMaxWidth(400);
+                    ((JMultilineLabel) c).setMaxWidth(400);
                 }
             }
Index: trunk/src/org/openstreetmap/josm/tools/ColorHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ColorHelper.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/ColorHelper.java	(revision 8510)
@@ -30,8 +30,8 @@
         try {
             return new Color(
-                    Integer.parseInt(html.substring(0,2),16),
-                    Integer.parseInt(html.substring(2,4),16),
-                    Integer.parseInt(html.substring(4,6),16),
-                    html.length() == 8 ? Integer.parseInt(html.substring(6,8),16) : 255);
+                    Integer.parseInt(html.substring(0, 2), 16),
+                    Integer.parseInt(html.substring(2, 4), 16),
+                    Integer.parseInt(html.substring(4, 6), 16),
+                    html.length() == 8 ? Integer.parseInt(html.substring(6, 8), 16) : 255);
         } catch (NumberFormatException e) {
             return null;
Index: trunk/src/org/openstreetmap/josm/tools/ColorScale.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ColorScale.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/ColorScale.java	(revision 8510)
@@ -88,10 +88,10 @@
 
     public final Color getColor(double value) {
-        if (value<min) return belowMinColor;
-        if (value>max) return aboveMaxColor;
+        if (value < min) return belowMinColor;
+        if (value > max) return aboveMaxColor;
         if (Double.isNaN(value)) return noDataColor;
         final int n = colors.length;
         int idx = (int) ((value-min)*colors.length / (max-min));
-        if (idx<colors.length) {
+        if (idx < colors.length) {
             return colors[idx];
         } else {
@@ -101,5 +101,5 @@
 
     public final Color getColor(Number value) {
-        return (value==null)? noDataColor : getColor(value.doubleValue());
+        return (value == null) ? noDataColor : getColor(value.doubleValue());
     }
 
@@ -132,5 +132,5 @@
         int n = colors.length;
         Color tmp;
-        for (int i=0; i<n/2; i++) {
+        for (int i = 0; i < n/2; i++) {
             tmp = colors[i];
             colors[i] = colors[n-1-i];
@@ -144,9 +144,9 @@
 
     public void drawColorBar(Graphics2D g, int x, int y, int w, int h, double valueScale) {
-        int n=colors.length;
+        int n = colors.length;
 
-        for (int i=0; i<n; i++) {
+        for (int i = 0; i < n; i++) {
             g.setColor(colors[i]);
-            if (w<h) {
+            if (w < h) {
                 g.fillRect(x, y+i*h/n, w, h/n+1);
             } else {
@@ -158,14 +158,15 @@
         FontMetrics fm = g.getFontMetrics();
         fh = fm.getHeight()/2;
-        fw = fm.stringWidth(String.valueOf(Math.max((int)Math.abs(max*valueScale), (int)Math.abs(min*valueScale)))) + fm.stringWidth("0.123");
+        fw = fm.stringWidth(String.valueOf(Math.max((int) Math.abs(max*valueScale),
+                (int) Math.abs(min*valueScale)))) + fm.stringWidth("0.123");
         g.setColor(noDataColor);
         if (title != null) {
             g.drawString(title, x-fw-3, y-fh*3/2);
         }
-        for (int i=0; i<=intervalCount; i++) {
-            g.setColor(colors[(int)(1.0*i*n/intervalCount-1e-10)]);
+        for (int i = 0; i <= intervalCount; i++) {
+            g.setColor(colors[(int) (1.0*i*n/intervalCount-1e-10)]);
             final double val =  min+i*(max-min)/intervalCount;
             final String txt = String.format("%.3f", val*valueScale);
-            if (w<h) {
+            if (w < h) {
                 g.drawString(txt, x-fw-3, y+i*h/intervalCount+fh/2);
             } else {
Index: trunk/src/org/openstreetmap/josm/tools/CompositeList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/CompositeList.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/CompositeList.java	(revision 8510)
@@ -13,5 +13,5 @@
  */
 public class CompositeList<T> extends AbstractList<T> {
-    private List<? extends T> a,b;
+    private List<? extends T> a, b;
 
     /**
Index: trunk/src/org/openstreetmap/josm/tools/Diff.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Diff.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/Diff.java	(revision 8510)
@@ -96,6 +96,6 @@
      */
     public Diff(Object[] a, Object[] b) {
-        Map<Object,Integer> h = new HashMap<>(a.length + b.length);
-        filevec = new FileData[] {new FileData(a,h), new FileData(b,h)};
+        Map<Object, Integer> h = new HashMap<>(a.length + b.length);
+        filevec = new FileData[] {new FileData(a, h), new FileData(b, h)};
     }
 
@@ -396,6 +396,6 @@
          */
         public Change build_script(
-                boolean[] changed0,int len0,
-                boolean[] changed1,int len1
+                boolean[] changed0, int len0,
+                boolean[] changed1, int len1
         );
     }
@@ -407,6 +407,6 @@
         @Override
         public  Change build_script(
-                final boolean[] changed0,int len0,
-                final boolean[] changed1,int len1) {
+                final boolean[] changed0, int len0,
+                final boolean[] changed1, int len1) {
             Change script = null;
             int i0 = 0, i1 = 0;
@@ -440,6 +440,6 @@
         @Override
         public Change build_script(
-                final boolean[] changed0,int len0,
-                final boolean[] changed1,int len1) {
+                final boolean[] changed0, int len0,
+                final boolean[] changed1, int len1) {
             Change script = null;
             int i0 = len0, i1 = len1;
@@ -570,5 +570,5 @@
         @Override
         public String toString() {
-            String s = String.format("%d -%d +%d %d",line0,deleted,inserted,line1);
+            String s = String.format("%d -%d +%d %d", line0, deleted, inserted, line1);
             return (link != null) ? s = s + '\n' + link : s;
         }
@@ -577,5 +577,4 @@
     /** Data on one input file being compared.
      */
-
     class FileData {
 
@@ -801,5 +800,5 @@
         }
 
-        FileData(Object[] data, Map<Object,Integer> h) {
+        FileData(Object[] data, Map<Object, Integer> h) {
             this(data.length);
             // FIXME: diff 2.7 removes common prefix and common suffix
@@ -807,5 +806,5 @@
                 Integer ir = h.get(data[i]);
                 if (ir == null) {
-                    h.put(data[i],equivs[i] = equivMax++);
+                    h.put(data[i], equivs[i] = equivMax++);
                 } else {
                     equivs[i] = ir.intValue();
Index: trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 8510)
@@ -56,5 +56,4 @@
     }
 
-
     public static String explainMissingOAuthAccessTokenException(MissingOAuthAccessTokenException e) {
         Main.error(e);
@@ -129,5 +128,5 @@
             OsmPrimitive firstRefs = conflict.b.iterator().next();
             String objId = Long.toString(conflict.a.getId());
-            Collection<Long> refIds= Utils.transform(conflict.b, new Utils.Function<OsmPrimitive, Long>() {
+            Collection<Long> refIds = Utils.transform(conflict.b, new Utils.Function<OsmPrimitive, Long>() {
 
                 @Override
@@ -653,5 +652,5 @@
 
         if (e instanceof ChangesetClosedException)
-            return explainChangesetClosedException((ChangesetClosedException)e);
+            return explainChangesetClosedException((ChangesetClosedException) e);
 
         if (e instanceof OsmApiException) {
Index: trunk/src/org/openstreetmap/josm/tools/GBC.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/GBC.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/GBC.java	(revision 8510)
@@ -48,5 +48,5 @@
      */
     public static GBC eop() {
-        return eol().insets(0,0,0,10);
+        return eol().insets(0, 0, 0, 10);
     }
 
@@ -119,5 +119,5 @@
         short maxx = x > 0 ? Short.MAX_VALUE : 0;
         short maxy = y > 0 ? Short.MAX_VALUE : 0;
-        return new Box.Filler(new Dimension(x,y), new Dimension(x,y), new Dimension(maxx,maxy));
+        return new Box.Filler(new Dimension(x, y), new Dimension(x, y), new Dimension(maxx, maxy));
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/GeoPropertyIndex.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/GeoPropertyIndex.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/GeoPropertyIndex.java	(revision 8510)
@@ -73,6 +73,6 @@
     public static int index(LatLon ll, int level) {
         long noParts = 1 << level;
-        long x = ((long)((ll.lon() + 180.0) * noParts / 360.0)) & 1;
-        long y = ((long)((ll.lat() + 90.0) * noParts / 180.0)) & 1;
+        long x = ((long) ((ll.lon() + 180.0) * noParts / 360.0)) & 1;
+        long y = ((long) ((ll.lat() + 90.0) * noParts / 180.0)) & 1;
         return (int) (2 * x + y);
     }
@@ -149,5 +149,5 @@
                 if (DEBUG) System.err.println(" - new with idx "+idx);
                 LatLon center = bbox.getCenter();
-                BBox b = new BBox(lon1,lat1, center.lon(), center.lat());
+                BBox b = new BBox(lon1, lat1, center.lon(), center.lat());
                 children[idx] = new GPLevel<>(level + 1, b, this, owner);
             }
Index: trunk/src/org/openstreetmap/josm/tools/Geometry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 8510)
@@ -93,7 +93,7 @@
 
                     //iterate over secondary segment
-                    int seg2Start = seg1Way != seg2Way ? 0: seg1Pos + 2;//skip the adjacent segment
-
-                    for (int seg2Pos = seg2Start; seg2Pos + 1< way2Nodes.size(); seg2Pos++) {
+                    int seg2Start = seg1Way != seg2Way ? 0 : seg1Pos + 2; //skip the adjacent segment
+
+                    for (int seg2Pos = seg2Start; seg2Pos + 1 < way2Nodes.size(); seg2Pos++) {
 
                         //need to get them again every time, because other segments may be changed
@@ -298,7 +298,7 @@
         if (Math.abs(det) > 1e-12 * mag) {
             double u = uu/det, v = vv/det;
-            if (u>-1e-8 && u < 1+1e-8 && v>-1e-8 && v < 1+1e-8) {
-                if (u<0) u=0;
-                if (u>1) u=1.0;
+            if (u > -1e-8 && u < 1+1e-8 && v > -1e-8 && v < 1+1e-8) {
+                if (u < 0) u = 0;
+                if (u > 1) u = 1.0;
                 return new EastNorth(x1+a1*u, y1+a2*u);
             } else {
@@ -654,5 +654,5 @@
     }
 
-    protected static double calcY(Node p1){
+    protected static double calcY(Node p1) {
         double lat1, lon1, lat2, lon2;
         double dlon, dlat;
@@ -813,5 +813,5 @@
     public static EastNorth getCenter(List<Node> nodes) {
         int nc = nodes.size();
-        if(nc < 3) return null;
+        if (nc < 3) return null;
         /**
          * Equation of each bisector ax + by + c = 0
@@ -821,5 +821,5 @@
         double[] c = new double[nc];
         // Compute equation of bisector
-        for(int i = 0; i < nc; i++) {
+        for (int i = 0; i < nc; i++) {
             EastNorth pt1 = nodes.get(i).getEastNorth();
             EastNorth pt2 = nodes.get((i+1) % nc).getEastNorth();
@@ -827,5 +827,5 @@
             b[i] = pt1.north() - pt2.north();
             double d = Math.sqrt(a[i]*a[i] + b[i]*b[i]);
-            if(d == 0) return null;
+            if (d == 0) return null;
             a[i] /= d;
             b[i] /= d;
@@ -838,5 +838,5 @@
         // At.Y = [bi]
         double b1 = 0, b2 = 0;
-        for(int i = 0; i < nc; i++) {
+        for (int i = 0; i < nc; i++) {
             a11 += a[i]*a[i];
             a12 += a[i]*b[i];
@@ -847,5 +847,5 @@
         // (At.A)^-1 = [invij]
         double det = a11*a22 - a12*a12;
-        if(Math.abs(det) < 1e-5) return null;
+        if (Math.abs(det) < 1e-5) return null;
         double inv11 = a22/det;
         double inv12 = -a12/det;
Index: trunk/src/org/openstreetmap/josm/tools/I18n.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 8510)
@@ -219,5 +219,5 @@
         if (text == null)
             return null;
-        return MessageFormat.format(gettext(text, context), (Object)null);
+        return MessageFormat.format(gettext(text, context), (Object) null);
     }
 
@@ -227,5 +227,5 @@
         if (text == null)
             return null;
-        return MessageFormat.format(gettext_lazy(text, context), (Object)null);
+        return MessageFormat.format(gettext_lazy(text, context), (Object) null);
     }
 
@@ -304,17 +304,17 @@
     private static String gettext(String text, String ctx, boolean lazy) {
         int i;
-        if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) {
-            ctx = text.substring(2,i-1);
+        if (ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) {
+            ctx = text.substring(2, i-1);
             text = text.substring(i+1);
         }
-        if(strings != null) {
+        if (strings != null) {
             String trans = strings.get(ctx == null ? text : "_:"+ctx+"\n"+text);
-            if(trans != null)
+            if (trans != null)
                 return trans;
         }
-        if(pstrings != null) {
+        if (pstrings != null) {
             i = pluralEval(1);
             String[] trans = pstrings.get(ctx == null ? text : "_:"+ctx+"\n"+text);
-            if(trans != null && trans.length > i)
+            if (trans != null && trans.length > i)
                 return trans[i];
         }
@@ -333,12 +333,12 @@
     private static String gettextn(String text, String plural, String ctx, long num) {
         int i;
-        if(ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) {
-            ctx = text.substring(2,i-1);
+        if (ctx == null && text.startsWith("_:") && (i = text.indexOf('\n')) >= 0) {
+            ctx = text.substring(2, i-1);
             text = text.substring(i+1);
         }
-        if(pstrings != null) {
+        if (pstrings != null) {
             i = pluralEval(num);
             String[] trans = pstrings.get(ctx == null ? text : "_:"+ctx+"\n"+text);
-            if(trans != null && trans.length > i)
+            if (trans != null && trans.length > i)
                 return trans[i];
         }
@@ -353,5 +353,5 @@
 
     private static URL getTranslationFile(String lang) {
-        return Main.class.getResource("/data/"+lang.replace("@","-")+".lang");
+        return Main.class.getResource("/data/"+lang.replace("@", "-")+".lang");
     }
 
@@ -362,7 +362,7 @@
     public static Locale[] getAvailableTranslations() {
         Collection<Locale> v = new ArrayList<>(languages.size());
-        if(getTranslationFile("en") != null) {
+        if (getTranslationFile("en") != null) {
             for (String loc : languages.keySet()) {
-                if(getTranslationFile(loc) != null) {
+                if (getTranslationFile(loc) != null) {
                     v.add(LanguageInfo.getLocale(loc));
                 }
@@ -444,5 +444,5 @@
 
         /* try initial language settings, may be changed later again */
-        if(!load(LanguageInfo.getJOSMLocaleCode())) {
+        if (!load(LanguageInfo.getJOSMLocaleCode())) {
             Locale.setDefault(Locale.ENGLISH);
         }
@@ -471,5 +471,5 @@
                 ) {
                     found = false;
-                    while(!found && (e = jarTrans.getNextEntry()) != null) {
+                    while (!found && (e = jarTrans.getNextEntry()) != null) {
                         String name = e.getName();
                         if (name.equals(langfile))
@@ -553,44 +553,44 @@
             boolean multimode = false;
             byte[] str = new byte[4096];
-            for(;;) {
-                if(multimode) {
+            for (;;) {
+                if (multimode) {
                     int ennum = ens.read();
                     int trnum = trs.read();
-                    if(trnum == 0xFE) /* marks identical string, handle equally to non-translated */
+                    if (trnum == 0xFE) /* marks identical string, handle equally to non-translated */
                         trnum = 0;
-                    if((ennum == -1 && trnum != -1) || (ennum != -1 && trnum == -1)) /* files do not match */
+                    if ((ennum == -1 && trnum != -1) || (ennum != -1 && trnum == -1)) /* files do not match */
                         return false;
-                    if(ennum == -1) {
+                    if (ennum == -1) {
                         break;
                     }
                     String[] enstrings = new String[ennum];
                     String[] trstrings = new String[trnum];
-                    for(int i = 0; i < ennum; ++i) {
+                    for (int i = 0; i < ennum; ++i) {
                         int val = ens.read(enlen);
-                        if(val != 2) /* file corrupt */
+                        if (val != 2) /* file corrupt */
                             return false;
-                        val = (enlen[0] < 0 ? 256+enlen[0]:enlen[0])*256+(enlen[1] < 0 ? 256+enlen[1]:enlen[1]);
-                        if(val > str.length) {
+                        val = (enlen[0] < 0 ? 256+enlen[0] : enlen[0])*256+(enlen[1] < 0 ? 256+enlen[1] : enlen[1]);
+                        if (val > str.length) {
                             str = new byte[val];
                         }
                         int rval = ens.read(str, 0, val);
-                        if(rval != val) /* file corrupt */
+                        if (rval != val) /* file corrupt */
                             return false;
                         enstrings[i] = new String(str, 0, val, StandardCharsets.UTF_8);
                     }
-                    for(int i = 0; i < trnum; ++i) {
+                    for (int i = 0; i < trnum; ++i) {
                         int val = trs.read(trlen);
-                        if(val != 2) /* file corrupt */
+                        if (val != 2) /* file corrupt */
                             return false;
-                        val = (trlen[0] < 0 ? 256+trlen[0]:trlen[0])*256+(trlen[1] < 0 ? 256+trlen[1]:trlen[1]);
-                        if(val > str.length) {
+                        val = (trlen[0] < 0 ? 256+trlen[0] : trlen[0])*256+(trlen[1] < 0 ? 256+trlen[1] : trlen[1]);
+                        if (val > str.length) {
                             str = new byte[val];
                         }
                         int rval = trs.read(str, 0, val);
-                        if(rval != val) /* file corrupt */
+                        if (rval != val) /* file corrupt */
                             return false;
                         trstrings[i] = new String(str, 0, val, StandardCharsets.UTF_8);
                     }
-                    if(trnum > 0 && !p.containsKey(enstrings[0])) {
+                    if (trnum > 0 && !p.containsKey(enstrings[0])) {
                         p.put(enstrings[0], trstrings);
                     }
@@ -598,18 +598,18 @@
                     int enval = ens.read(enlen);
                     int trval = trs.read(trlen);
-                    if(enval != trval) /* files do not match */
+                    if (enval != trval) /* files do not match */
                         return false;
-                    if(enval == -1) {
+                    if (enval == -1) {
                         break;
                     }
-                    if(enval != 2) /* files corrupt */
+                    if (enval != 2) /* files corrupt */
                         return false;
-                    enval = (enlen[0] < 0 ? 256+enlen[0]:enlen[0])*256+(enlen[1] < 0 ? 256+enlen[1]:enlen[1]);
-                    trval = (trlen[0] < 0 ? 256+trlen[0]:trlen[0])*256+(trlen[1] < 0 ? 256+trlen[1]:trlen[1]);
-                    if(trval == 0xFFFE) /* marks identical string, handle equally to non-translated */
+                    enval = (enlen[0] < 0 ? 256+enlen[0] : enlen[0])*256+(enlen[1] < 0 ? 256+enlen[1] : enlen[1]);
+                    trval = (trlen[0] < 0 ? 256+trlen[0] : trlen[0])*256+(trlen[1] < 0 ? 256+trlen[1] : trlen[1]);
+                    if (trval == 0xFFFE) /* marks identical string, handle equally to non-translated */
                         trval = 0;
-                    if(enval == 0xFFFF) {
+                    if (enval == 0xFFFF) {
                         multimode = true;
-                        if(trval != 0xFFFF) /* files do not match */
+                        if (trval != 0xFFFF) /* files do not match */
                             return false;
                     } else {
@@ -621,13 +621,13 @@
                         }
                         int val = ens.read(str, 0, enval);
-                        if(val != enval) /* file corrupt */
+                        if (val != enval) /* file corrupt */
                             return false;
                         String enstr = new String(str, 0, enval, StandardCharsets.UTF_8);
                         if (trval != 0) {
                             val = trs.read(str, 0, trval);
-                            if(val != trval) /* file corrupt */
+                            if (val != trval) /* file corrupt */
                                 return false;
                             String trstr = new String(str, 0, trval, StandardCharsets.UTF_8);
-                            if(!s.containsKey(enstr))
+                            if (!s.containsKey(enstr))
                                 s.put(enstr, trstr);
                         }
@@ -655,5 +655,5 @@
      * @param localeName the locale name. Ignored if null.
      */
-    public static void set(String localeName){
+    public static void set(String localeName) {
         if (localeName != null) {
             Locale l = LanguageInfo.getLocale(localeName);
Index: trunk/src/org/openstreetmap/josm/tools/ImageOverlay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageOverlay.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/ImageOverlay.java	(revision 8510)
@@ -78,5 +78,5 @@
         }
         ImageIcon overlay;
-        if(width != -1 || height != -1) {
+        if (width != -1 || height != -1) {
             image = new ImageProvider(image).resetMaxSize(new Dimension(width, height));
         }
@@ -84,12 +84,12 @@
         int x, y;
         if (width == -1 && offsetLeft < 0) {
-            x = (int)(w*offsetRight) - overlay.getIconWidth();
+            x = (int) (w*offsetRight) - overlay.getIconWidth();
         } else {
-            x = (int)(w*offsetLeft);
+            x = (int) (w*offsetLeft);
         }
         if (height == -1 && offsetTop < 0) {
-            y = (int)(h*offsetBottom) - overlay.getIconHeight();
+            y = (int) (h*offsetBottom) - overlay.getIconHeight();
         } else {
-            y = (int)(h*offsetTop);
+            y = (int) (h*offsetTop);
         }
         overlay.paintIcon(null, ground.getGraphics(), x, y);
Index: trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 8510)
@@ -742,5 +742,5 @@
                     if (dirs != null && !dirs.isEmpty()) {
                         cacheName = "id:" + id + ":" + fullName;
-                        if(archive != null) {
+                        if (archive != null) {
                             cacheName += ":" + archive.getName();
                         }
@@ -895,5 +895,5 @@
             } else {
                 final String fn_md5 = Utils.md5Hex(fn);
-                url = b + fn_md5.substring(0,1) + "/" + fn_md5.substring(0,2) + "/" + fn;
+                url = b + fn_md5.substring(0, 1) + "/" + fn_md5.substring(0, 2) + "/" + fn;
             }
             result = getIfAvailableHttp(url, type);
@@ -924,5 +924,5 @@
             ZipEntry entry = zipFile.getEntry(entryName);
             if (entry != null) {
-                int size = (int)entry.getSize();
+                int size = (int) entry.getSize();
                 int offs = 0;
                 byte[] buf = new byte[size];
@@ -937,5 +937,5 @@
                         return svg == null ? null : new ImageResource(svg);
                     case OTHER:
-                        while(size > 0) {
+                        while (size > 0) {
                             int l = is.read(buf, offs, size);
                             offs += l;
@@ -1560,10 +1560,10 @@
                             Node root = metadata.getAsTree(f);
                             if (root instanceof Element) {
-                                NodeList list = ((Element)root).getElementsByTagName("TransparentColor");
+                                NodeList list = ((Element) root).getElementsByTagName("TransparentColor");
                                 if (list.getLength() > 0) {
                                     Node item = list.item(0);
                                     if (item instanceof Element) {
                                         // Handle different color spaces (tested with RGB and grayscale)
-                                        String value = ((Element)item).getAttribute("value");
+                                        String value = ((Element) item).getAttribute("value");
                                         if (!value.isEmpty()) {
                                             String[] s = value.split(" ");
@@ -1575,5 +1575,5 @@
                                                 int g = model.getGreen(pixel);
                                                 int b = model.getBlue(pixel);
-                                                return new Color(r,g,b);
+                                                return new Color(r, g, b);
                                             } else {
                                                 Main.warn("Unable to translate TransparentColor '"+value+"' with color model "+model);
@@ -1598,5 +1598,5 @@
         int[] rgb = new int[3];
         try {
-            for (int i = 0; i<3; i++) {
+            for (int i = 0; i < 3; i++) {
                 rgb[i] = Integer.parseInt(s[i]);
             }
Index: trunk/src/org/openstreetmap/josm/tools/InputMapUtils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/InputMapUtils.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/InputMapUtils.java	(revision 8510)
@@ -34,10 +34,10 @@
      */
     public static void unassignCtrlShiftUpDown(JComponent cmp, int condition) {
-        InputMap inputMap=SwingUtilities.getUIInputMap(cmp, condition);
-        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP,InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK));
-        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN,InputEvent.CTRL_MASK|InputEvent.SHIFT_MASK));
-        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP,InputEvent.ALT_MASK|InputEvent.SHIFT_MASK));
-        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN,InputEvent.ALT_MASK|InputEvent.SHIFT_MASK));
-        SwingUtilities.replaceUIInputMap(cmp,JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,inputMap);
+        InputMap inputMap = SwingUtilities.getUIInputMap(cmp, condition);
+        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK));
+        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.CTRL_MASK | InputEvent.SHIFT_MASK));
+        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK));
+        inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK));
+        SwingUtilities.replaceUIInputMap(cmp, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, inputMap);
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java	(revision 8510)
@@ -38,11 +38,11 @@
      */
     public static String getWikiLanguagePrefix(LocaleType type) {
-        if(type == LocaleType.ENGLISH)
+        if (type == LocaleType.ENGLISH)
           return "";
 
         String code = getJOSMLocaleCode();
-        if(type == LocaleType.BASELANGUAGE) {
-            if(code.matches("[^_]+_[^_]+")) {
-                code = code.substring(0,2);
+        if (type == LocaleType.BASELANGUAGE) {
+            if (code.matches("[^_]+_[^_]+")) {
+                code = code.substring(0, 2);
                 if ("en".equals(code))
                     return null;
@@ -50,11 +50,11 @@
                 return null;
             }
-        } else if(type == LocaleType.DEFAULTNOTENGLISH && "en".equals(code)) {
+        } else if (type == LocaleType.DEFAULTNOTENGLISH && "en".equals(code)) {
             return null;
-        } else if(code.matches(".+@.+")) {
-          return code.substring(0,1).toUpperCase(Locale.ENGLISH) + code.substring(1,2)
-          + "-" + code.substring(3,4).toUpperCase(Locale.ENGLISH) + code.substring(4) + ":";
-        }
-        return code.substring(0,1).toUpperCase(Locale.ENGLISH) + code.substring(1) + ":";
+        } else if (code.matches(".+@.+")) {
+          return code.substring(0, 1).toUpperCase(Locale.ENGLISH) + code.substring(1, 2)
+          + "-" + code.substring(3, 4).toUpperCase(Locale.ENGLISH) + code.substring(4) + ":";
+        }
+        return code.substring(0, 1).toUpperCase(Locale.ENGLISH) + code.substring(1) + ":";
     }
 
@@ -95,5 +95,5 @@
     public static String getJOSMLocaleCode(Locale locale) {
         if (locale == null) return "en";
-        for(String full : getLanguageCodes(locale)) {
+        for (String full : getLanguageCodes(locale)) {
             if ("iw_IL".equals(full))
                 return "he";
@@ -230,17 +230,17 @@
     public static Collection<String> getLanguageCodes(Locale l) {
         Collection<String> list = new LinkedList<String>();
-        if(l == null)
+        if (l == null)
             l = Locale.getDefault();
         String lang = l.getLanguage();
         String c = l.getCountry();
         String v = l.getVariant();
-        if(c.isEmpty())
+        if (c.isEmpty())
             c = null;
-        if(v != null && !v.isEmpty()) {
-            if(c != null)
+        if (v != null && !v.isEmpty()) {
+            if (c != null)
                 list.add(lang+"_"+c+"@"+v);
             list.add(lang+"@"+v);
         }
-        if(c != null)
+        if (c != null)
             list.add(lang+"_"+c);
         list.add(lang);
Index: trunk/src/org/openstreetmap/josm/tools/MultiMap.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/MultiMap.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/MultiMap.java	(revision 8510)
@@ -225,5 +225,5 @@
         if (!(obj instanceof MultiMap))
             return false;
-        return map.equals(((MultiMap<?,?>) obj).map);
+        return map.equals(((MultiMap<?, ?>) obj).map);
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java	(revision 8510)
@@ -233,5 +233,5 @@
     public void removeAction(MultikeyShortcutAction action) {
         MyAction a = myActions.get(action);
-        if (a!=null) {
+        if (a != null) {
             Main.unregisterActionShortcut(a, a.shortcut);
             myActions.remove(action);
Index: trunk/src/org/openstreetmap/josm/tools/MultikeyShortcutAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/MultikeyShortcutAction.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/MultikeyShortcutAction.java	(revision 8510)
@@ -23,9 +23,9 @@
         public char getShortcut() {
             if (index < 9)
-                return (char)('1' + index);
+                return (char) ('1' + index);
             else if (index == 9)
                 return '0';
             else
-                return (char)('A' +  index - 10);
+                return (char) ('A' +  index - 10);
         }
 
@@ -38,5 +38,7 @@
 
     void executeMultikeyAction(int index, boolean repeatLastAction);
+
     List<MultikeyInfo> getMultikeyCombinations();
+
     MultikeyInfo getLastMultikeyAction();
 
Index: trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java	(revision 8510)
@@ -146,5 +146,5 @@
         final Map<Character, Integer> array = new HashMap<>();
 
-        for (int i=0; i<SHORTLINK_CHARS.length; ++i) {
+        for (int i = 0; i < SHORTLINK_CHARS.length; ++i) {
             array.put(SHORTLINK_CHARS[i], i);
         }
@@ -159,5 +159,5 @@
             if (array.containsKey(ch)) {
                 int val = array.get(ch);
-                for (int i=0; i<3; ++i) {
+                for (int i = 0; i < 3; ++i) {
                     x <<= 1;
                     if ((val & 32) != 0) {
Index: trunk/src/org/openstreetmap/josm/tools/Pair.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Pair.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/Pair.java	(revision 8510)
@@ -10,5 +10,5 @@
  * @since 429
  */
-public final class Pair<A,B> {
+public final class Pair<A, B> {
 
     /**
@@ -40,5 +40,5 @@
     public boolean equals(Object other) {
         if (other instanceof Pair<?, ?>) {
-            Pair<?, ?> o = (Pair<?, ?>)other;
+            Pair<?, ?> o = (Pair<?, ?>) other;
             return a.equals(o.a) && b.equals(o.b);
         } else
@@ -53,5 +53,5 @@
     }
 
-    public static <T> Pair<T,T> sort(Pair<T,T> p) {
+    public static <T> Pair<T, T> sort(Pair<T, T> p) {
         if (p.b.hashCode() < p.a.hashCode()) {
             T tmp = p.a;
@@ -73,6 +73,6 @@
      * @return The newly created Pair(u,v)
      */
-    public static <U,V> Pair<U,V> create(U u, V v) {
-        return new Pair<>(u,v);
+    public static <U, V> Pair<U, V> create(U u, V v) {
+        return new Pair<>(u, v);
     }
 }
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 8510)
@@ -49,5 +49,5 @@
             Class<?> eawtOpenFilesHandler = Class.forName("com.apple.eawt.OpenFilesHandler");
             Class<?> eawtPreferencesHandler = Class.forName("com.apple.eawt.PreferencesHandler");
-            Object appli = eawtApplication.getConstructor((Class[])null).newInstance((Object[])null);
+            Object appli = eawtApplication.getConstructor((Class[]) null).newInstance((Object[]) null);
             Object proxy = Proxy.newProxyInstance(PlatformHookOsx.class.getClassLoader(), new Class<?>[] {
                 eawtQuitHandler, eawtAboutHandler, eawtOpenFilesHandler, eawtPreferencesHandler}, ivhandler);
@@ -98,5 +98,5 @@
                     Object oFiles = args[0].getClass().getMethod("getFiles").invoke(args[0]);
                     if (oFiles instanceof List) {
-                        Main.worker.submit(new OpenFileTask((List<File>)oFiles, null) {
+                        Main.worker.submit(new OpenFileTask((List<File>) oFiles, null) {
                             @Override
                             protected void realRun() throws SAXException, IOException, OsmTransferException {
@@ -143,4 +143,5 @@
     @Override
     public void initSystemShortcuts() {
+        // CHECKSTYLE.OFF: LineLength
         Shortcut.registerSystemShortcut("apple-reserved-01", tr("reserved"), KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK).setAutomatic(); // Show or hide the Spotlight search field (when multiple languages are installed, may rotate through enabled script systems).
         Shortcut.registerSystemShortcut("apple-reserved-02", tr("reserved"), KeyEvent.VK_SPACE, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK).setAutomatic(); // Apple reserved.
@@ -277,4 +278,5 @@
         Shortcut.registerSystemShortcut("view:zoomin", tr("reserved"), KeyEvent.VK_ADD, KeyEvent.META_DOWN_MASK); // Zoom in
         Shortcut.registerSystemShortcut("view:zoomout", tr("reserved"), KeyEvent.VK_SUBTRACT, KeyEvent.META_DOWN_MASK); // Zoom out
+        // CHECKSTYLE.ON: LineLength
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 8510)
@@ -131,5 +131,5 @@
     public void initSystemShortcuts() {
         // TODO: Insert system shortcuts here. See Windows and especially OSX to see how to.
-        for(int i = KeyEvent.VK_F1; i <= KeyEvent.VK_F12; ++i)
+        for (int i = KeyEvent.VK_F1; i <= KeyEvent.VK_F12; ++i)
             Shortcut.registerSystemShortcut("screen:toogle"+i, tr("reserved"),
                     i, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic();
@@ -265,9 +265,9 @@
                     String line = Utils.strip(input.readLine());
                     if (line != null && !line.isEmpty()) {
-                        line = line.replaceAll("\"+","");
-                        line = line.replaceAll("NAME=",""); // strange code for some Gentoo's
-                        if(line.startsWith("Linux ")) // e.g. Linux Mint
+                        line = line.replaceAll("\"+", "");
+                        line = line.replaceAll("NAME=", ""); // strange code for some Gentoo's
+                        if (line.startsWith("Linux ")) // e.g. Linux Mint
                             return line;
-                        else if(!line.isEmpty())
+                        else if (!line.isEmpty())
                             return "Linux " + line;
                     }
@@ -381,6 +381,6 @@
                 result = prefix + result;
             }
-            if(result != null)
-                result = result.replaceAll("\"+","");
+            if (result != null)
+                result = result.replaceAll("\"+", "");
             return result;
         }
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 8510)
@@ -103,4 +103,5 @@
     @Override
     public void initSystemShortcuts() {
+        // CHECKSTYLE.OFF: LineLength
         //Shortcut.registerSystemCut("system:menuexit", tr("reserved"), VK_Q, CTRL_DOWN_MASK);
         Shortcut.registerSystemShortcut("system:duplicate", tr("reserved"), VK_D, CTRL_DOWN_MASK); // not really system, but to avoid odd results
@@ -169,4 +170,5 @@
         Shortcut.registerSystemShortcut("microsoft-reserved-52", tr("reserved"), VK_SHIFT, CTRL_DOWN_MASK).setAutomatic();  // Switch the keyboard layout when multiple keyboard layouts are enabled
         //Shortcut.registerSystemCut("microsoft-reserved-53", tr("reserved"), ); // Change the reading direction of text in right-to-left reading languages (TODO: unclear)
+        // CHECKSTYLE.ON: LineLength
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/Shortcut.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 8510)
@@ -35,14 +35,26 @@
  */
 public final class Shortcut {
-    private String shortText;        // the unique ID of the shortcut
-    private String longText;         // a human readable description that will be shown in the preferences
-    private final int requestedKey;  // the key, the caller requested
-    private final int requestedGroup;// the group, the caller requested
-    private int assignedKey;         // the key that actually is used
-    private int assignedModifier;    // the modifiers that are used
-    private boolean assignedDefault; // true if it got assigned what was requested. (Note: modifiers will be ignored in favour of group when loading it from the preferences then.)
-    private boolean assignedUser;    // true if the user changed this shortcut
-    private boolean automatic;       // true if the user cannot change this shortcut (Note: it also will not be saved into the preferences)
-    private boolean reset;           // true if the user requested this shortcut to be set to its default value (will happen on next restart, as this shortcut will not be saved to the preferences)
+    /** the unique ID of the shortcut */
+    private final String shortText;
+    /** a human readable description that will be shown in the preferences */
+    private String longText;
+    /** the key, the caller requested */
+    private final int requestedKey;
+    /** the group, the caller requested */
+    private final int requestedGroup;
+    /** the key that actually is used */
+    private int assignedKey;
+    /** the modifiers that are used */
+    private int assignedModifier;
+    /** true if it got assigned what was requested.
+     * (Note: modifiers will be ignored in favour of group when loading it from the preferences then.) */
+    private boolean assignedDefault;
+    /** true if the user changed this shortcut */
+    private boolean assignedUser;
+    /** true if the user cannot change this shortcut (Note: it also will not be saved into the preferences) */
+    private boolean automatic;
+    /** true if the user requested this shortcut to be set to its default value
+     * (will happen on next restart, as this shortcut will not be saved to the preferences) */
+    private boolean reset;
 
     // simple constructor
@@ -218,5 +230,5 @@
         if (keyStroke == null) return "";
         String modifText = KeyEvent.getKeyModifiersText(keyStroke.getModifiers());
-        if ("".equals (modifText)) return KeyEvent.getKeyText(keyStroke.getKeyCode());
+        if ("".equals(modifText)) return KeyEvent.getKeyText(keyStroke.getKeyCode());
         return modifText + "+" + KeyEvent.getKeyText(keyStroke.getKeyCode());
     }
@@ -235,5 +247,5 @@
 
     // and here our modifier groups
-    private static Map<Integer, Integer> groups= new HashMap<>();
+    private static Map<Integer, Integer> groups = new HashMap<>();
 
     // check if something collides with an existing shortcut
@@ -301,8 +313,8 @@
         groups.put(SHIFT, KeyEvent.SHIFT_DOWN_MASK);
         groups.put(CTRL, commandDownMask);
-        groups.put(ALT_SHIFT, KeyEvent.ALT_DOWN_MASK|KeyEvent.SHIFT_DOWN_MASK);
-        groups.put(ALT_CTRL, KeyEvent.ALT_DOWN_MASK|commandDownMask);
-        groups.put(CTRL_SHIFT, commandDownMask|KeyEvent.SHIFT_DOWN_MASK);
-        groups.put(ALT_CTRL_SHIFT, KeyEvent.ALT_DOWN_MASK|commandDownMask|KeyEvent.SHIFT_DOWN_MASK);
+        groups.put(ALT_SHIFT, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK);
+        groups.put(ALT_CTRL, KeyEvent.ALT_DOWN_MASK | commandDownMask);
+        groups.put(CTRL_SHIFT, commandDownMask | KeyEvent.SHIFT_DOWN_MASK);
+        groups.put(ALT_CTRL_SHIFT, KeyEvent.ALT_DOWN_MASK | commandDownMask | KeyEvent.SHIFT_DOWN_MASK);
 
         // (1) System reserved shortcuts
@@ -310,9 +322,9 @@
         // (2) User defined shortcuts
         List<Shortcut> newshortcuts = new LinkedList<>();
-        for(String s : Main.pref.getAllPrefixCollectionKeys("shortcut.entry.")) {
+        for (String s : Main.pref.getAllPrefixCollectionKeys("shortcut.entry.")) {
             newshortcuts.add(new Shortcut(s));
         }
 
-        for(Shortcut sc : newshortcuts) {
+        for (Shortcut sc : newshortcuts) {
             if (sc.isAssignedUser()
             && findShortcut(sc.getAssignedKey(), sc.getAssignedModifier()) == null) {
@@ -321,5 +333,5 @@
         }
         // Shortcuts at their default values
-        for(Shortcut sc : newshortcuts) {
+        for (Shortcut sc : newshortcuts) {
             if (!sc.isAssignedUser() && sc.isAssignedDefault()
             && findShortcut(sc.getAssignedKey(), sc.getAssignedModifier()) == null) {
@@ -328,5 +340,5 @@
         }
         // Shortcuts that were automatically moved
-        for(Shortcut sc : newshortcuts) {
+        for (Shortcut sc : newshortcuts) {
             if (!sc.isAssignedUser() && !sc.isAssignedDefault()
             && findShortcut(sc.getAssignedKey(), sc.getAssignedModifier()) == null) {
@@ -338,5 +350,5 @@
     private static int getGroupModifier(int group) {
         Integer m = groups.get(group);
-        if(m == null)
+        if (m == null)
             m = -1;
         return m;
@@ -344,5 +356,5 @@
 
     private static int findModifier(int group, Integer modifier) {
-        if(modifier == null) {
+        if (modifier == null) {
             modifier = getGroupModifier(group);
             if (modifier == null) { // garbage in, no shortcut out
@@ -440,7 +452,7 @@
         switch (requestedGroup) {
             case CTRL: return KeyEvent.CTRL_DOWN_MASK;
-            case ALT_CTRL: return KeyEvent.ALT_DOWN_MASK|KeyEvent.CTRL_DOWN_MASK;
-            case CTRL_SHIFT: return KeyEvent.CTRL_DOWN_MASK|KeyEvent.SHIFT_DOWN_MASK;
-            case ALT_CTRL_SHIFT: return KeyEvent.ALT_DOWN_MASK|KeyEvent.CTRL_DOWN_MASK|KeyEvent.SHIFT_DOWN_MASK;
+            case ALT_CTRL: return KeyEvent.ALT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK;
+            case CTRL_SHIFT: return KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK;
+            case ALT_CTRL_SHIFT: return KeyEvent.ALT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK;
             default: return 0;
         }
Index: trunk/src/org/openstreetmap/josm/tools/TextTagParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 8510)
@@ -95,5 +95,5 @@
                     pos++;
                     break;
-                } else if (!quotesStarted && (Arrays.binarySearch(stop, c)>=0)) {
+                } else if (!quotesStarted && (Arrays.binarySearch(stop, c) >= 0)) {
                     // stop-symbol found
                     pos++;
@@ -101,5 +101,5 @@
                 } else {
                     // skip non-printable characters
-                    if(c>=32) s.append(c);
+                    if (c >= 32) s.append(c);
                 }
                 pos++;
@@ -118,5 +118,5 @@
                 if (c == '\t' || c == '\n'  || c == ' ') {
                     pos++;
-                } else if (c== '=') {
+                } else if (c == '=') {
                     if (signFound) break; // a  =  =qwerty means "a"="=qwerty"
                     signFound = true;
@@ -150,5 +150,5 @@
             }
         }
-        String text = k.substring(1,k.length()-1);
+        String text = k.substring(1, k.length()-1);
         return (new TextAnalyzer(text)).parseString("\r\t\n");
     }
@@ -165,16 +165,17 @@
          Pattern p = Pattern.compile(tagRegex);
          Map<String, String> tags = new HashMap<>();
-         String k=null, v=null;
+         String k = null, v = null;
          for (String  line: lines) {
             if (line.trim().isEmpty()) continue; // skip empty lines
             Matcher m = p.matcher(line);
             if (m.matches()) {
-                 k=m.group(1).trim(); v=m.group(2).trim();
+                 k = m.group(1).trim();
+                 v = m.group(2).trim();
                  if (unescapeTextInQuotes) {
                      k = unescape(k);
                      v = unescape(v);
-                     if (k==null || v==null) return null;
+                     if (k == null || v == null) return null;
                  }
-                 tags.put(k,v);
+                 tags.put(k, v);
             } else {
                 return null;
@@ -188,6 +189,6 @@
     }
 
-    public static Map<String,String> getValidatedTagsFromText(String buf) {
-        Map<String,String> tags = readTagsFromText(buf);
+    public static Map<String, String> getValidatedTagsFromText(String buf) {
+        Map<String, String> tags = readTagsFromText(buf);
         return validateTags(tags) ? tags : null;
     }
@@ -198,6 +199,6 @@
      * @return null if no format is suitable
      */
-    public static Map<String,String> readTagsFromText(String buf) {
-        Map<String,String> tags;
+    public static Map<String, String> readTagsFromText(String buf) {
+        Map<String, String> tags;
 
         // Format
@@ -205,5 +206,5 @@
         tags = readTagsByRegexp(buf, "[\\r\\n]+", ".*?([a-zA-Z0-9:_]+).*\\t(.*?)", false);
                 // try "tag\tvalue\n" format
-        if (tags!=null) return tags;
+        if (tags != null) return tags;
 
         // Format
@@ -214,5 +215,5 @@
         tags = readTagsByRegexp(buf, "[\\n\\t\\r]+", "(.*?)=(.*?)", true);
                 // try format  t1=v1\n t2=v2\n ...
-        if (tags!=null) return tags;
+        if (tags != null) return tags;
 
         // JSON-format
@@ -223,5 +224,5 @@
         tags = readTagsByRegexp(bufJson, "[\\s]*,[\\s]*",
                 "[\\s]*(\\\".*?[^\\\\]\\\")"+"[\\s]*:[\\s]*"+"(\\\".*?[^\\\\]\\\")[\\s]*", true);
-        if (tags!=null) return tags;
+        if (tags != null) return tags;
 
         // Free format
@@ -240,8 +241,8 @@
         if (s > MAX_KEY_COUNT) {
             // Use trn() even if for english it makes no sense, as s > 30
-            r=warning(trn("There was {0} tag found in the buffer, it is suspicious!",
+            r = warning(trn("There was {0} tag found in the buffer, it is suspicious!",
             "There were {0} tags found in the buffer, it is suspicious!", s,
             s), "", "tags.paste.toomanytags");
-            if (r==2 || r==3) return false; if (r==4) return true;
+            if (r == 2 || r == 3) return false; if (r == 4) return true;
         }
         for (Entry<String, String> entry : tags.entrySet()) {
@@ -250,13 +251,13 @@
             if (key.length() > MAX_KEY_LENGTH) {
                 r = warning(tr("Key is too long (max {0} characters):", MAX_KEY_LENGTH), key+"="+value, "tags.paste.keytoolong");
-                if (r==2 || r==3) return false; if (r==4) return true;
+                if (r == 2 || r == 3) return false; if (r == 4) return true;
             }
             if (!key.matches(KEY_PATTERN)) {
                 r = warning(tr("Suspicious characters in key:"), key, "tags.paste.keydoesnotmatch");
-                if (r==2 || r==3) return false; if (r==4) return true;
+                if (r == 2 || r == 3) return false; if (r == 4) return true;
             }
             if (value.length() > MAX_VALUE_LENGTH) {
                 r = warning(tr("Value is too long (max {0} characters):", MAX_VALUE_LENGTH), value, "tags.paste.valuetoolong");
-                if (r==2 || r==3) return false; if (r==4) return true;
+                if (r == 2 || r == 3) return false; if (r == 4) return true;
             }
         }
@@ -270,5 +271,5 @@
                     new String[]{tr("Ok"), tr("Cancel"), tr("Clear buffer"), tr("Ignore warnings")});
         ed.setButtonIcons(new String[]{"ok", "cancel", "dialogs/delete", "pastetags"});
-        ed.setContent("<html><b>"+text + "</b><br/><br/><div width=\"300px\">"+XmlWriter.encode(data,true)+"</html>");
+        ed.setContent("<html><b>"+text + "</b><br/><br/><div width=\"300px\">"+XmlWriter.encode(data, true)+"</html>");
         ed.setDefaultButton(2);
         ed.setCancelButton(2);
@@ -277,7 +278,7 @@
         ed.showDialog();
         int r = ed.getValue();
-        if (r==0) r = 2;
+        if (r == 0) r = 2;
         // clean clipboard if user asked
-        if (r==3) Utils.copyToClipboard("");
+        if (r == 3) Utils.copyToClipboard("");
         return r;
     }
@@ -292,5 +293,5 @@
             + " or suitable text. </p></html>");
         JPanel p = new JPanel(new GridBagLayout());
-        p.add(new JLabel(msg),GBC.eop());
+        p.add(new JLabel(msg), GBC.eop());
         String helpUrl = HelpUtil.getHelpTopicUrl(HelpUtil.buildAbsoluteHelpTopic(helpTopic, LocaleType.DEFAULT));
         if (helpUrl != null) {
@@ -314,5 +315,5 @@
         int r = ed.getValue();
         // clean clipboard if user asked
-        if (r==2) Utils.copyToClipboard("");
+        if (r == 2) Utils.copyToClipboard("");
     }
 }
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 8510)
@@ -214,5 +214,5 @@
         if (!condition)
             throw new AssertionError(
-                    MessageFormat.format(message,data)
+                    MessageFormat.format(message, data)
             );
     }
@@ -574,5 +574,5 @@
     }
 
-    private static final char[] HEX_ARRAY = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
+    private static final char[] HEX_ARRAY = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
 
     /**
@@ -611,6 +611,6 @@
      * @return the list of sorted objects
      */
-    public static <T> List<T> topologicalSort(final MultiMap<T,T> dependencies) {
-        MultiMap<T,T> deps = new MultiMap<>();
+    public static <T> List<T> topologicalSort(final MultiMap<T, T> dependencies) {
+        MultiMap<T, T> deps = new MultiMap<>();
         for (T key : dependencies.keySet()) {
             deps.putVoid(key);
@@ -623,5 +623,5 @@
         int size = deps.size();
         List<T> sorted = new ArrayList<>();
-        for (int i=0; i<size; ++i) {
+        for (int i = 0; i < size; ++i) {
             T parentless = null;
             for (T key : deps.keySet()) {
@@ -839,6 +839,6 @@
         if (connection != null) {
             connection.setRequestProperty("User-Agent", Version.getInstance().getFullAgentString());
-            connection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
-            connection.setReadTimeout(Main.pref.getInteger("socket.timeout.read",30)*1000);
+            connection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect", 15)*1000);
+            connection.setReadTimeout(Main.pref.getInteger("socket.timeout.read", 30)*1000);
         }
         return connection;
@@ -1158,5 +1158,5 @@
         StringBuilder sb = new StringBuilder(url.substring(0, url.indexOf('?') + 1));
 
-        for (int i=0; i<query.length(); i++) {
+        for (int i = 0; i < query.length(); i++) {
             String c = query.substring(i, i+1);
             if (URL_CHARS.contains(c)) {
Index: trunk/src/org/openstreetmap/josm/tools/WikiReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/WikiReader.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/WikiReader.java	(revision 8510)
@@ -72,23 +72,23 @@
 
         languageCode = LanguageInfo.getWikiLanguagePrefix(LocaleType.DEFAULTNOTENGLISH);
-        if(languageCode != null) {
+        if (languageCode != null) {
             res = readLang(new URL(getBaseUrlWiki() + languageCode + text));
         }
 
-        if(res.isEmpty()) {
+        if (res.isEmpty()) {
             languageCode = LanguageInfo.getWikiLanguagePrefix(LocaleType.BASELANGUAGE);
-            if(languageCode != null) {
+            if (languageCode != null) {
                 res = readLang(new URL(getBaseUrlWiki() + languageCode + text));
             }
         }
 
-        if(res.isEmpty()) {
+        if (res.isEmpty()) {
             languageCode = LanguageInfo.getWikiLanguagePrefix(LocaleType.ENGLISH);
-            if(languageCode != null) {
+            if (languageCode != null) {
                 res = readLang(new URL(getBaseUrlWiki() + languageCode + text));
             }
         }
 
-        if(res.isEmpty()) {
+        if (res.isEmpty()) {
             throw new IOException(text + " does not exist");
         } else {
@@ -157,5 +157,5 @@
         || b.indexOf(" does not exist. You can create it here.</p>") >= 0)
             return "";
-        if(b.isEmpty())
+        if (b.isEmpty())
             b = full;
         return "<html><base href=\""+url.toExternalForm() +"\"> " + b + "</html>";
Index: trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 8510)
@@ -72,6 +72,6 @@
         }
         if (reference == null)
-            return new WindowGeometry(new Point(0,0), extent);
-        parentWindow = (Window)reference;
+            return new WindowGeometry(new Point(0, 0), extent);
+        parentWindow = (Window) reference;
         Point topLeft = new Point(
                 Math.max(0, (parentWindow.getSize().width - extent.width) /2),
@@ -139,8 +139,8 @@
         Rectangle oldScreen = getScreenInfo(getRectangle());
         Rectangle newScreen = getScreenInfo(new Rectangle(window.getLocationOnScreen(), window.getSize()));
-        if(oldScreen.x != newScreen.x) {
+        if (oldScreen.x != newScreen.x) {
             this.topLeft.x += newScreen.x - oldScreen.x;
         }
-        if(oldScreen.y != newScreen.y) {
+        if (oldScreen.y != newScreen.y) {
             this.topLeft.y += newScreen.y - oldScreen.y;
         }
@@ -150,5 +150,5 @@
         String v = "";
         try {
-            Pattern p = Pattern.compile(field + "=(-?\\d+)",Pattern.CASE_INSENSITIVE);
+            Pattern p = Pattern.compile(field + "=(-?\\d+)", Pattern.CASE_INSENSITIVE);
             Matcher m = p.matcher(preferenceValue);
             if (!m.find())
@@ -158,13 +158,15 @@
             v = m.group(1);
             return Integer.parseInt(v);
-        } catch(WindowGeometryException e) {
+        } catch (WindowGeometryException e) {
             throw e;
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             throw new WindowGeometryException(
-                    tr("Preference with key ''{0}'' does not provide an int value for ''{1}''. Got {2}. Cannot restore window geometry from preferences.",
+                    tr("Preference with key ''{0}'' does not provide an int value for ''{1}''. Got {2}. " +
+                       "Cannot restore window geometry from preferences.",
                             preferenceKey, field, v), e);
-        } catch(Exception e) {
+        } catch (Exception e) {
             throw new WindowGeometryException(
-                    tr("Failed to parse field ''{1}'' in preference with key ''{0}''. Exception was: {2}. Cannot restore window geometry from preferences.",
+                    tr("Failed to parse field ''{1}'' in preference with key ''{0}''. Exception was: {2}. " +
+                       "Cannot restore window geometry from preferences.",
                             preferenceKey, field, e.toString()), e);
         }
@@ -207,5 +209,5 @@
                     }
                 }
-                return new WindowGeometry(new Point(x,y), new Dimension(w,h));
+                return new WindowGeometry(new Point(x, y), new Dimension(w, h));
             } else {
                 Main.warn(tr("Ignoring malformed geometry: {0}", arg));
@@ -213,5 +215,5 @@
         }
         WindowGeometry def;
-        if(maximize) {
+        if (maximize) {
             def = new WindowGeometry(screenDimension);
         } else {
@@ -248,5 +250,5 @@
         try {
             initFromPreferences(preferenceKey);
-        } catch(WindowGeometryException e) {
+        } catch (WindowGeometryException e) {
             initFromWindowGeometry(defaultGeometry);
         }
@@ -413,5 +415,5 @@
         Rectangle g = new WindowGeometry(preferenceKey,
             /* default: something on screen 1 */
-            new WindowGeometry(new Point(0,0), new Dimension(10,10))).getRectangle();
+            new WindowGeometry(new Point(0, 0), new Dimension(10, 10))).getRectangle();
         return getScreenInfo(g);
     }
@@ -467,5 +469,5 @@
      */
     public static Rectangle getFullScreenInfo() {
-        return new Rectangle(new Point(0,0), Toolkit.getDefaultToolkit().getScreenSize());
+        return new Rectangle(new Point(0, 0), Toolkit.getDefaultToolkit().getScreenSize());
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 8510)
@@ -300,5 +300,5 @@
             filter.setContentHandler(validator);
             return start(in, filter);
-        } catch(IOException e) {
+        } catch (IOException e) {
             throw new SAXException(tr("Failed to load XML schema."), e);
         }
@@ -306,13 +306,13 @@
 
     public void map(String tagName, Class<?> klass) {
-        mapping.put(tagName, new Entry(klass,false,false));
+        mapping.put(tagName, new Entry(klass, false, false));
     }
 
     public void mapOnStart(String tagName, Class<?> klass) {
-        mapping.put(tagName, new Entry(klass,true,false));
+        mapping.put(tagName, new Entry(klass, true, false));
     }
 
     public void mapBoth(String tagName, Class<?> klass) {
-        mapping.put(tagName, new Entry(klass,false,true));
+        mapping.put(tagName, new Entry(klass, false, true));
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java	(revision 8510)
@@ -54,5 +54,5 @@
         try {
             fact = DatatypeFactory.newInstance();
-        } catch(DatatypeConfigurationException ce) {
+        } catch (DatatypeConfigurationException ce) {
             Main.error(ce);
         }
@@ -77,5 +77,5 @@
                 parsePart(str, 8, 2),
                 parsePart(str, 11, 2),
-                parsePart(str, 14,2),
+                parsePart(str, 14, 2),
                 parsePart(str, 17, 2));
 
@@ -87,5 +87,5 @@
 
             return calendar.getTime();
-        } else if(checkLayout(str, "xxxx-xx-xxTxx:xx:xx.xxxZ") ||
+        } else if (checkLayout(str, "xxxx-xx-xxTxx:xx:xx.xxxZ") ||
                 checkLayout(str, "xxxx-xx-xxTxx:xx:xx.xxx") ||
                 checkLayout(str, "xxxx-xx-xxTxx:xx:xx.xxx+xx:00") ||
@@ -96,5 +96,5 @@
                 parsePart(str, 8, 2),
                 parsePart(str, 11, 2),
-                parsePart(str, 14,2),
+                parsePart(str, 14, 2),
                 parsePart(str, 17, 2));
             long millis = parsePart(str, 20, 3);
@@ -108,5 +108,5 @@
             SimpleDateFormat f = new SimpleDateFormat("dd-MMM-yy HH:mm:ss");
             Date d = f.parse(str, new ParsePosition(0));
-            if(d != null)
+            if (d != null)
                 return d;
         }
@@ -133,9 +133,9 @@
     private static boolean checkLayout(String text, String pattern) {
         if (text.length() != pattern.length()) return false;
-        for (int i=0; i<pattern.length(); i++) {
+        for (int i = 0; i < pattern.length(); i++) {
             char pc = pattern.charAt(i);
             char tc = text.charAt(i);
-            if(pc == 'x' && tc >= '0' && tc <= '9') continue;
-            else if(pc == 'x' || pc != tc) return false;
+            if (pc == 'x' && tc >= '0' && tc <= '9') continue;
+            else if (pc == 'x' || pc != tc) return false;
         }
         return true;
Index: trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java	(revision 8510)
@@ -42,4 +42,5 @@
     private abstract class ContextProvider extends Match {
         protected Match condition;
+
         abstract List<OsmPrimitive> getPrimitives(OsmPrimitive root);
     }
@@ -51,8 +52,10 @@
             this.childCondition = child;
         }
-        @Override
-        public boolean match(OsmPrimitive osm) {
-            throw new UnsupportedOperationException();
-        }
+
+        @Override
+        public boolean match(OsmPrimitive osm) {
+            throw new UnsupportedOperationException();
+        }
+
         @Override
         List<OsmPrimitive> getPrimitives(OsmPrimitive root) {
@@ -194,5 +197,5 @@
 
             if (lhs instanceof ContextProvider && rhs instanceof ContextProvider)
-                return new AndSet((ContextProvider)lhs, (ContextProvider)rhs);
+                return new AndSet((ContextProvider) lhs, (ContextProvider) rhs);
             else if (lhs instanceof ContextProvider) {
                 ContextProvider cp = (ContextProvider) lhs;
@@ -218,5 +221,5 @@
 
             if (lhs instanceof ContextProvider && rhs instanceof ContextProvider)
-                return new OrSet((ContextProvider)lhs, (ContextProvider)rhs);
+                return new OrSet((ContextProvider) lhs, (ContextProvider) rhs);
             else if (lhs instanceof ContextProvider)
                 throw new ParseError(
Index: trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEngineDataProvider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEngineDataProvider.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEngineDataProvider.java	(revision 8510)
@@ -8,5 +8,7 @@
 public interface TemplateEngineDataProvider {
     Collection<String> getTemplateKeys();
+
     Object getTemplateValue(String name, boolean special);
+
     boolean evaluateCondition(Match condition);
 }
Index: trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEntry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEntry.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateEntry.java	(revision 8510)
@@ -4,4 +4,5 @@
 public interface TemplateEntry {
     void appendText(StringBuilder result, TemplateEngineDataProvider dataProvider);
+
     boolean isValid(TemplateEngineDataProvider dataProvider);
 }
Index: trunk/src/org/openstreetmap/josm/tools/template_engine/Tokenizer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/template_engine/Tokenizer.java	(revision 8509)
+++ trunk/src/org/openstreetmap/josm/tools/template_engine/Tokenizer.java	(revision 8510)
@@ -36,5 +36,5 @@
         @Override
         public String toString() {
-            return type + (text != null?" " + text:"");
+            return type + (text != null ? " " + text : "");
         }
     }
@@ -85,5 +85,5 @@
                 return new Token(TokenType.CONDITION_START, position);
             } else
-                throw ParseError.unexpectedChar('{', (char)c, position);
+                throw ParseError.unexpectedChar('{', (char) c, position);
         case '!':
             getChar();
@@ -92,5 +92,5 @@
                 return new Token(TokenType.CONTEXT_SWITCH_START, position);
             } else
-                throw ParseError.unexpectedChar('{', (char)c, position);
+                throw ParseError.unexpectedChar('{', (char) c, position);
         case '}':
             getChar();
@@ -103,5 +103,5 @@
             return new Token(TokenType.APOSTROPHE, position);
         default:
-            while (c != -1 && !specialCharaters.contains((char)c)) {
+            while (c != -1 && !specialCharaters.contains((char) c)) {
                 if (c == '\\') {
                     getChar();
@@ -110,5 +110,5 @@
                     }
                 }
-                text.append((char)c);
+                text.append((char) c);
                 getChar();
             }
@@ -132,9 +132,8 @@
                 getChar();
             }
-            result.append((char)c);
+            result.append((char) c);
             getChar();
         }
         return new Token(TokenType.TEXT, position, result.toString());
     }
-
 }
