Index: /applications/editors/josm/plugins/sds/.checkstyle
===================================================================
--- /applications/editors/josm/plugins/sds/.checkstyle	(revision 32703)
+++ /applications/editors/josm/plugins/sds/.checkstyle	(revision 32703)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+  <local-check-config name="JOSM" location="/JOSM/tools/checkstyle/josm_checks.xml" type="project" description="">
+    <additional-data name="protect-config-file" value="false"/>
+  </local-check-config>
+  <fileset name="all" enabled="true" check-config-name="JOSM" local="true">
+    <file-match-pattern match-pattern="." include-pattern="true"/>
+  </fileset>
+  <filter name="DerivedFiles" enabled="true"/>
+  <filter name="FilesFromPackage" enabled="true">
+    <filter-data value="data"/>
+    <filter-data value="images"/>
+    <filter-data value="styles"/>
+    <filter-data value="resources"/>
+    <filter-data value="scripts"/>
+  </filter>
+</fileset-config>
Index: /applications/editors/josm/plugins/sds/.project
===================================================================
--- /applications/editors/josm/plugins/sds/.project	(revision 32702)
+++ /applications/editors/josm/plugins/sds/.project	(revision 32703)
@@ -16,7 +16,13 @@
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
 	</natures>
 </projectDescription>
Index: /applications/editors/josm/plugins/sds/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- /applications/editors/josm/plugins/sds/.settings/org.eclipse.jdt.ui.prefs	(revision 32703)
+++ /applications/editors/josm/plugins/sds/.settings/org.eclipse.jdt.ui.prefs	(revision 32703)
@@ -0,0 +1,61 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=false
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_jautodoc.cleanup.add_header=false
+sp_jautodoc.cleanup.replace_header=false
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/DetermineSdsModificationsUploadHook.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/DetermineSdsModificationsUploadHook.java	(revision 32702)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/DetermineSdsModificationsUploadHook.java	(revision 32703)
@@ -1,3 +1,3 @@
-// License: GPL. See LICENSE file for details.
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.hot.sds;
 
@@ -16,30 +16,30 @@
 /**
  * This upload hook does the following things:
- * 
- * 1. Find out if there are any changes in the special tags that need to 
+ *
+ * 1. Find out if there are any changes in the special tags that need to
  *    be uploaded to a different server.
- * 2. Find out if any objects that did have special tags have now been 
+ * 2. Find out if any objects that did have special tags have now been
  *    deleted, resulting in tag deletions on the special server.
  * 3. Find out if any objects carrying special tags have been newly created.
  * 4. Also, if it is determined that an object modification consists exclusively
- *    of special tags, then skip uploading that object, by removing it from 
+ *    of special tags, then skip uploading that object, by removing it from
  *    the apiDataSet.
- *    
+ *
  * This upload hook stores its findings with the SeparateDataStorePlugin, and
  * changes are sent to the SDS server only after the OSM upload has sucessfully
  * completed. The UploadSuccessHook is responsible for that.
  */
-public class DetermineSdsModificationsUploadHook implements UploadHook
-{
+public class DetermineSdsModificationsUploadHook implements UploadHook {
     private SeparateDataStorePlugin plugin;
 
-    DetermineSdsModificationsUploadHook(SeparateDataStorePlugin plugin)    {
+    DetermineSdsModificationsUploadHook(SeparateDataStorePlugin plugin) {
         this.plugin = plugin;
     }
-    
+
+    @Override
     public boolean checkUpload(APIDataSet apiDataSet) {
-        
+
         ArrayList<OsmPrimitive> droplist = new ArrayList<>();
-        
+
         // check deleted primitives for special tags.
         for (OsmPrimitive del : apiDataSet.getPrimitivesToDelete()) {
@@ -53,8 +53,8 @@
         // check modified primitives.
            for (OsmPrimitive upd : apiDataSet.getPrimitivesToUpdate()) {
-               
+
                HashSet<String> allKeys = new HashSet<>();
                boolean specialTags = false;
-               
+
                // process tags of new object
                for (String key : upd.keySet()) {
@@ -62,5 +62,5 @@
                    if (!specialTags && isSpecialKey(key)) specialTags = true;
                }
-               
+
                // process tags of old object
                IPrimitive old = plugin.getOriginalPrimitive(upd);
@@ -72,5 +72,5 @@
                // if neither has special tags, done with this object.
                if (!specialTags) continue;
-               
+
                // special tags are involved. find out what, exactly, has changed.
                boolean changeInSpecialTags = false;
@@ -82,8 +82,8 @@
                    }
                }
-               
+
                // change *only* in standard tags - done with this object.
                if (!changeInSpecialTags) continue;
-               
+
                // assemble new set of special tags. might turn out to be empty.
                HashMap<String, String> newSpecialTags = new HashMap<>();
@@ -91,10 +91,10 @@
                    if (isSpecialKey(key)) newSpecialTags.put(key, upd.get(key));
                }
-               
+
                boolean uploadToOsm = changeInOtherTags;
-               
-               // not done yet: if no changes in standard tags, we need to find out if 
+
+               // not done yet: if no changes in standard tags, we need to find out if
                // there were changes in the other properties (node: lat/lon, way/relation:
-               // member list). If the answer is no, then the object must be removed from 
+               // member list). If the answer is no, then the object must be removed from
                // JOSM's normal upload queue, else we would be uploading a non-edit.
                if (!changeInOtherTags) {
@@ -111,5 +111,5 @@
                            uploadToOsm = true;
                            break;
-                       } 
+                       }
                        for (int i = 0; i < wold.getNodesCount(); i++) {
                            if (wold.getNodeId(i) != wupd.getNodeId(i)) {
@@ -122,8 +122,8 @@
                        IRelation rold = (IRelation) old;
                        IRelation rupd = (IRelation) upd;
-                       if (rold.getMembersCount()!= rupd.getMembersCount()) {
+                       if (rold.getMembersCount() != rupd.getMembersCount()) {
                            uploadToOsm = true;
                            break;
-                       } 
+                       }
                        for (int i = 0; i < rold.getMembersCount(); i++) {
                            if (rold.getMemberType(i) != rupd.getMemberType(i) ||
@@ -136,17 +136,17 @@
                    }
                }
-               
+
                // request that new set of special tags be uploaded
                plugin.enqueueForUpload(upd, newSpecialTags, !uploadToOsm);
-               
-               // we cannot remove from getPrimitivesToUpdate, this would result in a 
+
+               // we cannot remove from getPrimitivesToUpdate, this would result in a
                // ConcurrentModificationException.
                if (!uploadToOsm) droplist.add(upd);
-               
+
         }
-           
+
         apiDataSet.getPrimitivesToUpdate().removeAll(droplist);
-                   
-           // check added primitives. 
+
+           // check added primitives.
            for (OsmPrimitive add : apiDataSet.getPrimitivesToAdd()) {
                // assemble new set of special tags. might turn out to be empty.
@@ -157,17 +157,17 @@
                if (!newSpecialTags.isEmpty()) plugin.enqueueForUpload(add, newSpecialTags, false);
         }
-        
+
            // FIXME it is possible that the list of OSM edits is totally empty.
         return true;
 
     }
-    
+
     boolean hasSpecialTags(IPrimitive p) {
         for (String key : p.keySet()) {
             if (isSpecialKey(key)) return true;
-        }    
+        }
         return false;
     }
-    
+
     boolean isSpecialKey(String key) {
         return key.startsWith(plugin.getIgnorePrefix());
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/ReadPostprocessor.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/ReadPostprocessor.java	(revision 32702)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/ReadPostprocessor.java	(revision 32703)
@@ -24,9 +24,9 @@
 
 public class ReadPostprocessor implements OsmServerReadPostprocessor {
-    
+
     private ArrayList<Long> nodeList;
     private ArrayList<Long> wayList;
     private ArrayList<Long> relationList;
-    
+
     private SeparateDataStorePlugin plugin;
 
@@ -34,8 +34,8 @@
         this.plugin = plugin;
     }
-    
+
     @Override
     public void postprocessDataSet(DataSet ds, ProgressMonitor progress) {
-        
+
         nodeList = new ArrayList<>();
         wayList = new ArrayList<>();
@@ -48,4 +48,5 @@
                 plugin.originalNodes.put(n.getId(), n.save());
             }
+
             @Override
             public void visit(Way w) {
@@ -53,4 +54,5 @@
                 plugin.originalWays.put(w.getId(), w.save());
             }
+
             @Override
             public void visit(Relation e) {
@@ -58,12 +60,13 @@
                 plugin.originalNodes.put(e.getId(), e.save());
             }
+
             @Override
             public void visit(Changeset cs) {}
         };
-        
+
         for (OsmPrimitive p : ds.allPrimitives()) {
             p.accept(adder);
         }
-            
+
         SdsApi api = SdsApi.getSdsApi();
         String rv = "";
@@ -74,6 +77,6 @@
             e.printStackTrace();
         }
-        
-        // this is slightly inefficient, as we're re-making the string into 
+
+        // this is slightly inefficient, as we're re-making the string into
         // an input stream when there was an input stream to be had inside the
         // SdsApi already, but this encapsulates things better.
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsApi.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsApi.java	(revision 32702)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsApi.java	(revision 32703)
@@ -1,3 +1,3 @@
-//License: GPL. See README for details.
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.hot.sds;
 
@@ -38,5 +38,5 @@
 public class SdsApi extends SdsConnection {
     /** max number of retries to send a request in case of HTTP 500 errors or timeouts */
-    static public final int DEFAULT_MAX_NUM_RETRIES = 5;
+    public static final int DEFAULT_MAX_NUM_RETRIES = 5;
 
     /** the collection of instantiated OSM APIs */
@@ -51,12 +51,13 @@
      *
      */
-    static public SdsApi getSdsApi(String serverUrl) {
+    public static SdsApi getSdsApi(String serverUrl) {
         SdsApi api = instances.get(serverUrl);
         if (api == null) {
             api = new SdsApi(serverUrl);
-            instances.put(serverUrl,api);
+            instances.put(serverUrl, api);
         }
         return api;
     }
+
     /**
      * replies the {@see OsmApi} for the URL given by the preference <code>sds-server.url</code>
@@ -65,5 +66,5 @@
      *
      */
-    static public SdsApi getSdsApi() {
+    public static SdsApi getSdsApi() {
         String serverUrl = Main.pref.get("sds-server.url", "http://datastore.hotosm.org");
         if (serverUrl == null)
@@ -86,5 +87,5 @@
      * @exception IllegalArgumentException thrown, if serverUrl is null
      */
-    protected SdsApi(String serverUrl)  {
+    protected SdsApi(String serverUrl) {
         CheckParameterUtil.ensureParameterNotNull(serverUrl, "serverUrl");
         this.serverUrl = serverUrl;
@@ -98,5 +99,4 @@
         return version;
     }
-
 
     /**
@@ -113,9 +113,12 @@
         // this works around a ruby (or lighttpd) bug where two consecutive slashes in
         // an URL will cause a "404 not found" response.
-        int p; while ((p = rv.indexOf("//", 6)) > -1) { rv.delete(p, p + 1); }
+        int p;
+        while ((p = rv.indexOf("//", 6)) > -1) {
+            rv.delete(p, p + 1);
+        }
         return rv.toString();
     }
 
-    /**
+    /*
      * Creates an OSM primitive on the server. The OsmPrimitive object passed in
      * is modified by giving it the server-assigned id.
@@ -123,5 +126,4 @@
      * @param osm the primitive
      * @throws SdsTransferException if something goes wrong
-
     public void createPrimitive(IPrimitive osm, ProgressMonitor monitor) throws SdsTransferException {
         String ret = "";
@@ -132,5 +134,5 @@
             osm.setOsmId(Long.parseLong(ret.trim()), 1);
             osm.setChangesetId(getChangeset().getId());
-        } catch(NumberFormatException e){
+        } catch (NumberFormatException e){
             throw new SdsTransferException(tr("Unexpected format of ID replied by the server. Got ''{0}''.", ret));
         }
@@ -138,5 +140,5 @@
     */
 
-    /**
+    /*
      * Modifies an OSM primitive on the server.
      *
@@ -144,5 +146,4 @@
      * @param monitor the progress monitor
      * @throws SdsTransferException if something goes wrong
-
     public void modifyPrimitive(IPrimitive osm, ProgressMonitor monitor) throws SdsTransferException {
         String ret = null;
@@ -155,5 +156,5 @@
             osm.setChangesetId(getChangeset().getId());
             osm.setVisible(true);
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             throw new SdsTransferException(tr("Unexpected format of new version of modified primitive ''{0}''. Got ''{1}''.", osm.getId(), ret));
         }
@@ -161,9 +162,8 @@
     */
 
-    /**
+    /*
      * Deletes an OSM primitive on the server.
      * @param osm the primitive
      * @throws SdsTransferException if something goes wrong
-
     public void deletePrimitive(IPrimitive osm, ProgressMonitor monitor) throws SdsTransferException {
         ensureValidChangeset();
@@ -177,5 +177,5 @@
     */
 
-    /**
+    /*
      * Uploads a list of changes in "diff" form to the server.
      *
@@ -186,5 +186,4 @@
      * @throws SdsTransferException
      * @throws SdsTransferException if something is wrong
-
     public Collection<IPrimitive> uploadDiff(Collection<? extends IPrimitive> list, ProgressMonitor monitor) throws SdsTransferException {
         try {
@@ -218,7 +217,7 @@
                     monitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false)
             );
-        } catch(SdsTransferException e) {
+        } catch (SdsTransferException e) {
             throw e;
-        } catch(OsmDataParsingException e) {
+        } catch (OsmDataParsingException e) {
             throw new SdsTransferException(e);
         } finally {
@@ -228,5 +227,6 @@
     */
 
-    public String requestShadowsFromSds(List<Long> nodes, List<Long> ways, List<Long> relations, ProgressMonitor pm) throws SdsTransferException {
+    public String requestShadowsFromSds(List<Long> nodes, List<Long> ways, List<Long> relations, ProgressMonitor pm)
+            throws SdsTransferException {
 
         StringBuilder request = new StringBuilder();
@@ -268,13 +268,12 @@
         }
 
-        return sendRequest("POST", "collectshadows", request.toString(), pm ,true);
-
+        return sendRequest("POST", "collectshadows", request.toString(), pm, true);
     }
 
     private void sleepAndListen(int retry, ProgressMonitor monitor) throws SdsTransferException {
         System.out.print(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)
@@ -282,5 +281,7 @@
             try {
                 Thread.sleep(1000);
-            } catch (InterruptedException ex) {}
+            } catch (InterruptedException ex) {
+                Main.trace(ex);
+            }
         }
         System.out.println(tr("OK - trying again."));
@@ -294,5 +295,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);
     }
 
@@ -301,5 +302,6 @@
     }
 
-    private String sendRequest(String requestMethod, String urlSuffix, String requestBody, ProgressMonitor monitor, boolean doAuth) throws SdsTransferException {
+    private String sendRequest(String requestMethod, String urlSuffix, String requestBody, ProgressMonitor monitor, boolean doAuth)
+            throws SdsTransferException {
         return sendRequest(requestMethod, urlSuffix, requestBody, monitor, doAuth, false);
     }
@@ -334,14 +336,15 @@
      *    been exhausted), or rewrapping a Java exception.
      */
-    private String sendRequest(String requestMethod, String urlSuffix, String requestBody, ProgressMonitor monitor, boolean doAuthenticate, boolean fastFail) throws SdsTransferException {
+    private String sendRequest(String requestMethod, String urlSuffix, String requestBody, ProgressMonitor monitor,
+            boolean doAuthenticate, boolean fastFail) throws SdsTransferException {
         StringBuffer responseBody = new StringBuffer();
         int retries = getMaxRetries();
 
-        while(true) { // the retry loop
+        while (true) { // the retry loop
             try {
                 URL url = new URL(new URL(getBaseUrl()), urlSuffix);
                 System.out.print(requestMethod + " " + url + "... ");
-                activeConnection = (HttpURLConnection)url.openConnection();
-                activeConnection.setConnectTimeout(fastFail ? 1000 : Main.pref.getInteger("socket.timeout.connect",15)*1000);
+                activeConnection = (HttpURLConnection) url.openConnection();
+                activeConnection.setConnectTimeout(fastFail ? 1000 : Main.pref.getInteger("socket.timeout.connect", 15)*1000);
                 activeConnection.setRequestMethod(requestMethod);
                 if (doAuthenticate) {
@@ -375,5 +378,5 @@
                     if (retries-- > 0) {
                         sleepAndListen(retries, monitor);
-                        System.out.println(tr("Starting retry {0} of {1}.", getMaxRetries() - retries,getMaxRetries()));
+                        System.out.println(tr("Starting retry {0} of {1}.", getMaxRetries() - retries, getMaxRetries()));
                         continue;
                     }
@@ -398,5 +401,5 @@
                     BufferedReader in = new BufferedReader(new InputStreamReader(i));
                     String s;
-                    while((s = in.readLine()) != null) {
+                    while ((s = in.readLine()) != null) {
                         responseBody.append(s);
                         responseBody.append("\n");
@@ -408,11 +411,11 @@
                     errorHeader = activeConnection.getHeaderField("Error");
                     System.err.println("Error header: " + errorHeader);
-                } else if (retCode != 200 && responseBody.length()>0) {
+                } else if (retCode != 200 && responseBody.length() > 0) {
                     System.err.println("Error body: " + responseBody);
                 }
                 activeConnection.disconnect();
 
-                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:
@@ -435,7 +438,7 @@
                 }
                 throw new SdsTransferException(e);
-            } catch(IOException e){
+            } catch (IOException e) {
                 throw new SdsTransferException(e);
-            } catch(SdsTransferException e) {
+            } catch (SdsTransferException e) {
                 throw e;
             }
@@ -449,10 +452,10 @@
             try {
                 url = new URL(urlStr.replace(" ", "%20"));
-            } catch(MalformedURLException e) {
+            } catch (MalformedURLException e) {
                 throw new SdsTransferException(e);
             }
             try {
-                activeConnection = (HttpURLConnection)url.openConnection();
-            } catch(Exception e) {
+                activeConnection = (HttpURLConnection) url.openConnection();
+            } catch (Exception e) {
                 throw new SdsTransferException(tr("Failed to open connection to API {0}.", url.toExternalForm()), e);
             }
@@ -470,5 +473,5 @@
             }
 
-            activeConnection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
+            activeConnection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect", 15)*1000);
 
             try {
@@ -481,5 +484,5 @@
             try {
                 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)
@@ -490,17 +493,15 @@
                     String errorHeader = activeConnection.getHeaderField("Error");
                     StringBuilder errorBody = new StringBuilder();
-                    try
-                    {
+                    try {
                         InputStream i = FixEncoding(activeConnection.getErrorStream(), encoding);
                         if (i != null) {
                             BufferedReader in = new BufferedReader(new InputStreamReader(i));
                             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."));
                     }
@@ -510,7 +511,7 @@
 
                 return FixEncoding(new ProgressInputStream(activeConnection, progressMonitor), encoding);
-            } catch(Exception e) {
+            } catch (Exception e) {
                 if (e instanceof SdsTransferException)
-                    throw (SdsTransferException)e;
+                    throw (SdsTransferException) e;
                 else
                     throw new SdsTransferException(e);
@@ -522,15 +523,11 @@
     }
 
-    private InputStream FixEncoding(InputStream stream, String encoding) throws IOException
-    {
+    private InputStream FixEncoding(InputStream stream, String encoding) throws IOException {
         if (encoding != null && encoding.equalsIgnoreCase("gzip")) {
             stream = new GZIPInputStream(stream);
-        }
-        else if (encoding != null && encoding.equalsIgnoreCase("deflate")) {
+        } else if (encoding != null && encoding.equalsIgnoreCase("deflate")) {
             stream = new InflaterInputStream(stream, new Inflater(true));
         }
         return stream;
     }
-
-
 }
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsConnection.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsConnection.java	(revision 32702)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsConnection.java	(revision 32703)
@@ -1,3 +1,3 @@
-// License: GPL. Copyright 2007 by Immanuel Scholz and others
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.hot.sds;
 
@@ -7,4 +7,5 @@
 import java.util.Base64;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.io.auth.CredentialsAgentException;
 import org.openstreetmap.josm.io.auth.CredentialsAgentResponse;
@@ -13,13 +14,13 @@
  * Base class that handles common things like authentication for the reader and writer
  * to the SDS server.
- * 
+ *
  * Modeled after JOSM's OsmConnection class.
  */
 public class SdsConnection {
-    
+
     protected boolean cancel = false;
     protected HttpURLConnection activeConnection;
     private SdsCredentialAgent credAgent = new SdsCredentialAgent();
-    
+
     /**
      * Initialize the http defaults and the authenticator.
@@ -44,4 +45,5 @@
             Thread.sleep(100);
         } catch (InterruptedException ex) {
+            Main.trace(ex);
         }
 
@@ -63,5 +65,6 @@
         String token;
         try {
-            response = credAgent.getCredentials(RequestorType.SERVER, con.getURL().getHost(), false /* don't know yet whether the credentials will succeed */);
+            response = credAgent.getCredentials(RequestorType.SERVER, con.getURL().getHost(),
+                    false /* don't know yet whether the credentials will succeed */);
         } catch (CredentialsAgentException e) {
             throw new SdsTransferException(e);
@@ -73,5 +76,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;
@@ -88,5 +91,4 @@
      *
      * @return true if this connection is canceled
-     * @return
      */
     public boolean isCanceled() {
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsCredentialAgent.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsCredentialAgent.java	(revision 32702)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsCredentialAgent.java	(revision 32703)
@@ -23,5 +23,5 @@
 
 /**
- * Factored after JOSM's JosmPreferencesCredentialAgent. 
+ * Factored after JOSM's JosmPreferencesCredentialAgent.
  */
 public class SdsCredentialAgent extends AbstractCredentialsAgent {
@@ -33,5 +33,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;
@@ -101,6 +101,8 @@
     public Component getPreferencesDecorationPanel() {
         HtmlPanel pnlMessage = new HtmlPanel();
-        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;}");
+        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(
@@ -114,5 +116,5 @@
         return pnlMessage;
     }
-    
+
     @Override
     public String getSaveUsernameAndPasswordCheckboxText() {
@@ -124,12 +126,13 @@
             throws CredentialsAgentException {
         // no-op
-        
-    }
-    
-    @Override
-    public CredentialsAgentResponse getCredentials(RequestorType requestorType, String host, boolean noSuccessWithLastResponse) throws CredentialsAgentException{
+
+    }
+
+    @Override
+    public CredentialsAgentResponse getCredentials(RequestorType requestorType, String host, boolean noSuccessWithLastResponse)
+            throws CredentialsAgentException {
         if (requestorType == null)
             return null;
-        PasswordAuthentication credentials =  lookup(requestorType, host);
+        PasswordAuthentication credentials = lookup(requestorType, host);
         String username = (credentials == null || credentials.getUserName() == null) ? "" : credentials.getUserName();
         String password = (credentials == null || credentials.getPassword() == null) ? "" : String.valueOf(credentials.getPassword());
@@ -158,6 +161,10 @@
             CredentialDialog dialog = null;
             switch(requestorType) {
-            case SERVER: dialog = SdsCredentialDialog.getSdsApiCredentialDialog(username, password, host, getSaveUsernameAndPasswordCheckboxText()); break;
-            case PROXY: dialog = CredentialDialog.getHttpProxyCredentialDialog(username, password, host, getSaveUsernameAndPasswordCheckboxText()); break;
+            case SERVER:
+                dialog = SdsCredentialDialog.getSdsApiCredentialDialog(username, password, host, getSaveUsernameAndPasswordCheckboxText());
+                break;
+            case PROXY:
+                dialog = CredentialDialog.getHttpProxyCredentialDialog(username, password, host, getSaveUsernameAndPasswordCheckboxText());
+                break;
             }
             dialog.setVisible(true);
@@ -190,4 +197,4 @@
         return response;
     }
-    
+
 }
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsCredentialDialog.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsCredentialDialog.java	(revision 32702)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsCredentialDialog.java	(revision 32703)
@@ -11,5 +11,6 @@
 public class SdsCredentialDialog extends CredentialDialog {
 
-    static public SdsCredentialDialog getSdsApiCredentialDialog(String username, String password, String host, String saveUsernameAndPasswordCheckboxText) {
+    public static SdsCredentialDialog getSdsApiCredentialDialog(String username, String password, String host,
+            String saveUsernameAndPasswordCheckboxText) {
         SdsCredentialDialog dialog = new SdsCredentialDialog(saveUsernameAndPasswordCheckboxText);
         dialog.prepareForSdsApiCredentials(username, password);
@@ -23,5 +24,5 @@
         super(saveUsernameAndPasswordCheckboxText);
     }
-         
+
     public void prepareForSdsApiCredentials(String username, String password) {
         setTitle(tr("Enter credentials for Separate Data Store API"));
@@ -30,5 +31,5 @@
         validate();
     }
- 
+
     private static class SdsApiCredentialsPanel extends CredentialPanel {
 
@@ -44,9 +45,8 @@
         }
 
-        public SdsApiCredentialsPanel(SdsCredentialDialog owner) {
+        SdsApiCredentialsPanel(SdsCredentialDialog owner) {
             super(owner);
             build();
         }
     }
-
-  }
+}
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsDiskAccessAction.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsDiskAccessAction.java	(revision 32702)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsDiskAccessAction.java	(revision 32703)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.hot.sds;
 
@@ -16,5 +17,5 @@
 @SuppressWarnings("serial")
 public abstract class SdsDiskAccessAction extends DiskAccessAction {
-    
+
     public SdsDiskAccessAction(String name, String iconName, String tooltip,
             Shortcut shortcut) {
@@ -35,9 +36,16 @@
         fc.setMultiSelectionEnabled(multiple);
         fc.setAcceptAllFileFilterUsed(false);
-                
+
         fc.setFileFilter(new FileFilter() {
-            public boolean accept(File pathname) { return pathname.getName().endsWith(".sds") || pathname.isDirectory(); }
-            public String getDescription() { return (tr("SDS data file")); }
-        });     
+            @Override
+            public boolean accept(File pathname) {
+                return pathname.getName().endsWith(".sds") || pathname.isDirectory();
+            }
+
+            @Override
+            public String getDescription() {
+                return (tr("SDS data file"));
+            }
+        });
 
         int answer = open ? fc.showOpenDialog(Main.parent) : fc.showSaveDialog(Main.parent);
@@ -81,10 +89,17 @@
         fc.setMultiSelectionEnabled(false);
         fc.setAcceptAllFileFilterUsed(false);
-        
+
         fc.setFileFilter(new FileFilter() {
-            public boolean accept(File pathname) { return pathname.getName().endsWith(".sds") || pathname.isDirectory(); }
-            public String getDescription() { return (tr("SDS data file")); }
-        }); 
-        
+            @Override
+            public boolean accept(File pathname) {
+                return pathname.getName().endsWith(".sds") || pathname.isDirectory();
+            }
+
+            @Override
+            public String getDescription() {
+                return (tr("SDS data file"));
+            }
+        });
+
         int answer = fc.showSaveDialog(Main.parent);
         if (answer != JFileChooser.APPROVE_OPTION)
@@ -101,5 +116,5 @@
         return file;
     }
-    
+
     public static boolean confirmOverwrite(File file) {
         if (file == null || (file.exists())) {
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsLoadAction.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsLoadAction.java	(revision 32702)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsLoadAction.java	(revision 32703)
@@ -1,3 +1,3 @@
-//License: GPL.
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.hot.sds;
 
@@ -26,5 +26,5 @@
 @SuppressWarnings("serial")
 public class SdsLoadAction extends SdsDiskAccessAction {
-    
+
     private SeparateDataStorePlugin plugin;
 
@@ -33,5 +33,6 @@
         plugin = p;
     }
-    
+
+    @Override
     public void actionPerformed(ActionEvent e) {
         SwingFileChooser fc = createAndOpenFileChooser(true, true, null);
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsMenu.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsMenu.java	(revision 32702)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsMenu.java	(revision 32703)
@@ -1,3 +1,3 @@
-//License: GPL. See README for details.
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.hot.sds;
 
@@ -52,5 +52,5 @@
         aboutItem = new JMenuItem(new SdsAboutAction());
         menu.add(aboutItem);
-        
+
         Main.getLayerManager().addLayerChangeListener(this);
         Main.getLayerManager().addActiveLayerChangeListener(this);
@@ -63,7 +63,9 @@
         saveItem.setEnabled(en);
     }
-  
+
     @Override
-    public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) {    setEnabledState(); }
+    public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) {
+        setEnabledState();
+    }
 
     @Override
@@ -71,15 +73,20 @@
 
     @Override
-    public void layerAdded(LayerAddEvent e) { setEnabledState(); }
+    public void layerAdded(LayerAddEvent e) {
+        setEnabledState();
+    }
 
     @Override
-    public void layerRemoving(LayerRemoveEvent e) { setEnabledState(); }
+    public void layerRemoving(LayerRemoveEvent e) {
+        setEnabledState();
+    }
 
     private class SdsAboutAction extends JosmAction {
 
-        public SdsAboutAction() {
+        SdsAboutAction() {
             super(tr("About"), "sds", tr("Information about SDS."), null, true);
         }
 
+        @Override
         public void actionPerformed(ActionEvent e) {
             JPanel about = new JPanel();
@@ -89,22 +96,25 @@
             l.setWrapStyleWord(true);
             l.setEditable(false);
-            l.setText("Separate Data Store\n\nThis plugin provides access to a \"Separate Data Store\" server. " +
-                    "Whenever data is loaded from the OSM API, it queries the SDS for additional tags that have been stored for the objects just loaded, " +
-                    "and adds these tags. When you upload data to JOSM, SDS tags will again be separated and, instead of sending them to OSM, they will be uplaoded to SDS." +
-                    "\n\n" +
-                    "This depends on SDS tags starting with a special prefix, which can be configured in the SDS preferences." + 
-                    "\n\n" + 
-                    "Using the SDS server will usually require an account to be set up there, which is completely independent of your OSM account.");
-            
-            l.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+            l.setText(
+                "Separate Data Store\n\nThis plugin provides access to a \"Separate Data Store\" server. " +
+                "Whenever data is loaded from the OSM API, " +
+                "it queries the SDS for additional tags that have been stored for the objects just loaded, " +
+                "and adds these tags. When you upload data to JOSM, SDS tags will again be separated and, " +
+                "instead of sending them to OSM, they will be uploaded to SDS." +
+                "\n\n" +
+                "This depends on SDS tags starting with a special prefix, which can be configured in the SDS preferences." +
+                "\n\n" +
+                "Using the SDS server will usually require an account to be set up there, which is completely independent of your OSM account.");
+
+            l.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
             l.setOpaque(false);
-            l.setPreferredSize(new Dimension(500,300));
+            l.setPreferredSize(new Dimension(500, 300));
             JScrollPane sp = new JScrollPane(l);
             sp.setBorder(null);
             sp.setOpaque(false);
-                        
+
             about.add(sp);
-            
-            about.setPreferredSize(new Dimension(500,300));
+
+            about.setPreferredSize(new Dimension(500, 300));
 
             JOptionPane.showMessageDialog(Main.parent, about, tr("About SDS..."),
@@ -112,6 +122,6 @@
         }
     }
-    
-    private class SdsPreferencesAction extends JosmAction implements Runnable {
+
+    private final class SdsPreferencesAction extends JosmAction implements Runnable {
 
         private SdsPreferencesAction() {
@@ -124,11 +134,13 @@
          * Launch the preferences dialog.
          */
+        @Override
         public void actionPerformed(ActionEvent e) {
             run();
         }
 
+        @Override
         public void run() {
             PreferenceDialog pd = new PreferenceDialog(Main.parent);
-            // unusual reflection mechanism to cater for older JOSM versions where 
+            // unusual reflection mechanism to cater for older JOSM versions where
             // the selectPreferencesTabByName method was not public
             try {
@@ -136,10 +148,8 @@
                 sptbn.invoke(pd, "sds");
             } catch (Exception ex) {
-                // ignore
+                Main.trace(ex);
             }
             pd.setVisible(true);
         }
     }
-
-
 }
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsOsmWriter.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsOsmWriter.java	(revision 32702)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsOsmWriter.java	(revision 32703)
@@ -1,3 +1,3 @@
-// License: GPL. Copyright 2007 by Immanuel Scholz and others
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.hot.sds;
 
@@ -17,9 +17,9 @@
  * sure that special tags are never written to JOSM's standard
  * output channels.
- * 
+ *
  * In the context of HOT's separate data store, this is very
  * important as otherwise private/confidential information could
  * end up on public servers.
- * 
+ *
  * @author Frederik Ramm
  *
@@ -28,5 +28,5 @@
 
     private SeparateDataStorePlugin plugin;
-    
+
     public SdsOsmWriter(SeparateDataStorePlugin plugin, PrintWriter out, boolean osmConform, String version) {
         super(out, osmConform, version);
@@ -45,5 +45,5 @@
                 String key = e.getKey();
                 if (!(osm instanceof Changeset) && ("created_by".equals(key))) continue;
-                if (key.startsWith(plugin.getIgnorePrefix())) continue;          
+                if (key.startsWith(plugin.getIgnorePrefix())) continue;
                 out.println("    <tag k='"+ XmlWriter.encode(e.getKey()) +
                             "' v='"+XmlWriter.encode(e.getValue())+ "' />");
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsParser.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsParser.java	(revision 32702)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsParser.java	(revision 32703)
@@ -11,5 +11,5 @@
 /**
  * Parser for answers from SDS. These anwers look like this:
- * 
+ *
  * <pre>
 <?xml version="1.0" encoding="UTF-8"?>
@@ -24,11 +24,10 @@
  * @author Frederik Ramm
  */
-public class SdsParser extends DefaultHandler
-{
+public class SdsParser extends DefaultHandler {
     private DataSet dataSet;
     private OsmPrimitive currentPrimitive;
     private SeparateDataStorePlugin plugin;
     private boolean ensureMatch;
-    
+
     public SdsParser(DataSet ds, SeparateDataStorePlugin p, boolean ensureMatch) {
         this.dataSet = ds;
@@ -36,11 +35,10 @@
         this.ensureMatch = ensureMatch;
     }
-    
+
     public SdsParser(DataSet ds, SeparateDataStorePlugin p) {
         this(ds, p, true);
     }
-    
-    @Override public void endElement(String namespaceURI, String localName, String qName)
-    {
+
+    @Override public void endElement(String namespaceURI, String localName, String qName) {
         // after successfully reading a full set of tags from the separate data store,
         // update it in our cache so we can determine changes later.
@@ -49,17 +47,14 @@
         }
     }
-    @Override public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
-    {
-        if ("osm_shadow".equals(qName))
-        {
+
+    @Override public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
+        if ("osm_shadow".equals(qName)) {
             String type = atts.getValue("osm_type");
-            String id = atts.getValue("osm_id");         
+            String id = atts.getValue("osm_id");
             currentPrimitive = dataSet.getPrimitiveById(Long.parseLong(id), OsmPrimitiveType.fromApiTypeName(type));
             if (currentPrimitive == null && ensureMatch) {
                 throw new SAXException("unexpected object in response");
             }
-        }
-        else if ("tag".equals(qName))
-        {
+        } else if ("tag".equals(qName)) {
             String v = atts.getValue("v");
             String k = atts.getValue("k");
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsPluginPreferences.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsPluginPreferences.java	(revision 32702)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsPluginPreferences.java	(revision 32703)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.hot.sds;
 
@@ -33,12 +34,13 @@
     private final JPasswordField password = new JPasswordField(8);
     private final JTextField prefix = new JTextField(8);
-   
+
     public SdsPluginPreferences() {
         super("sds", tr("Separate Data Store"), tr("Configures access to the Separate Data Store."));
     }
+
     @Override
     public void addGui(final PreferenceTabbedPane gui) {
         final JPanel tab = gui.createPreferenceTab(this);
-            
+
         final JPanel access = new JPanel(new GridBagLayout());
         access.setBorder(BorderFactory.createTitledBorder(tr("Server")));
@@ -54,23 +56,24 @@
 
         access.add(new JLabel(tr("SDS server URL")), GBC.std());
-        access.add(server, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+        access.add(server, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 5));
 
         access.add(new JLabel(tr("SDS username")), GBC.std());
-        access.add(username, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+        access.add(username, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 5));
 
         access.add(new JLabel(tr("SDS password")), GBC.std());
-        access.add(password, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+        access.add(password, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 5));
 
         JButton test = new JButton(tr("Test credentials now"));
-        access.add(test, GBC.eol().anchor(GBC.EAST).insets(5,0,0,5));
+        access.add(test, GBC.eol().anchor(GBC.EAST).insets(5, 0, 0, 5));
 
         tab.add(access, GBC.eol().fill(GBC.HORIZONTAL));
 
         tab.add(new JLabel(tr("SDS tag prefix")), GBC.std());
-        tab.add(prefix, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
+        tab.add(prefix, GBC.eol().fill(GBC.HORIZONTAL).insets(5, 0, 0, 5));
 
         tab.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.VERTICAL));
 
         test.addActionListener(new ActionListener() {
+            @Override
             public void actionPerformed(ActionEvent ev) {
                 SdsApi api = new SdsApi(server.getText());
@@ -87,13 +90,13 @@
                             JOptionPane.PLAIN_MESSAGE
                     );
-                } catch(Exception ex) {
+                } catch (Exception ex) {
                     JOptionPane.showMessageDialog(
                             Main.parent,
-                            tr("Cannot connect to SDS server: ") + ex.getMessage(), 
+                            tr("Cannot connect to SDS server: ") + ex.getMessage(),
                             tr("Error"),
                             JOptionPane.ERROR_MESSAGE
                     );
                 }
-                // restore old credentials even if successful; user might still 
+                // restore old credentials even if successful; user might still
                 // choose to press cancel!
                 Main.pref.put(SDS_USERNAME, olduser);
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsSaveAction.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsSaveAction.java	(revision 32702)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsSaveAction.java	(revision 32703)
@@ -1,3 +1,3 @@
-//License: GPL.
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.hot.sds;
 
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsWriter.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsWriter.java	(revision 32702)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsWriter.java	(revision 32703)
@@ -1,3 +1,3 @@
-// License: GPL. Copyright 2007 by Immanuel Scholz and others
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.hot.sds;
 
@@ -24,9 +24,10 @@
         out.print("<osm_sds>");
     }
+
     public void footer() {
         out.println("</osm_sds>");
     }
 
-    public void write(IPrimitive what, Map<String,String> tags) {
+    public void write(IPrimitive what, Map<String, String> tags) {
         out.print("<osm_shadow osm_type=\"");
         out.print(what.getType().getAPIName());
@@ -34,15 +35,16 @@
         out.print(what.getId());
         out.println("\">");
-        
+
         if (tags != null) {
-            for(Entry<String,String> e : tags.entrySet()) {
+            for (Entry<String, String> e : tags.entrySet()) {
                 out.println("    <tag k='"+ XmlWriter.encode(e.getKey()) +
                         "' v='"+XmlWriter.encode(e.getValue())+ "' />");
             }
         }
-        
+
         out.println("</osm_shadow>");
     }
 
+    @Override
     public void close() {
         out.close();
Index: /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SeparateDataStorePlugin.java
===================================================================
--- /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SeparateDataStorePlugin.java	(revision 32702)
+++ /applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SeparateDataStorePlugin.java	(revision 32703)
@@ -1,3 +1,3 @@
-// License: GPL. See LICENSE file for details.
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.hot.sds;
 
@@ -24,27 +24,37 @@
  * Plugin that loads extra data from HOT separate data store.
  *
- * @author Frederik Ramm <frederik.ramm@geofabrik.de>
+ * @author Frederik Ramm &lt;frederik.ramm@geofabrik.de&gt;
  */
-public class SeparateDataStorePlugin extends Plugin 
-{
+public class SeparateDataStorePlugin extends Plugin {
 
     public HashMap<Long, IPrimitive> originalNodes = new HashMap<>();
     public HashMap<Long, IPrimitive> originalWays = new HashMap<>();
     public HashMap<Long, IPrimitive> originalRelations = new HashMap<>();
-    
+
     public ArrayList<QueueItem> uploadQueue = new ArrayList<>();
-    
+
     private PrimitiveVisitor learnVisitor = new PrimitiveVisitor() {
-        public void visit(INode i) { originalNodes.put(i.getId(), i); }
-        public void visit(IWay i) { originalWays.put(i.getId(), i); }
-        public void visit(IRelation i) { originalRelations.put(i.getId(), i); }
+        @Override
+        public void visit(INode i) {
+            originalNodes.put(i.getId(), i);
+        }
+
+        @Override
+        public void visit(IWay i) {
+            originalWays.put(i.getId(), i);
+        }
+
+        @Override
+        public void visit(IRelation i) {
+            originalRelations.put(i.getId(), i);
+        }
     };
-    
+
     class QueueItem {
         public IPrimitive primitive;
-        public HashMap<String,String> tags;
+        public HashMap<String, String> tags;
         public boolean sdsOnly;
         public boolean processed;
-        public QueueItem(IPrimitive p, HashMap<String,String> t, boolean s) {
+        QueueItem(IPrimitive p, HashMap<String, String> t, boolean s) {
             primitive = p;
             tags = t;
@@ -53,23 +63,22 @@
         }
     }
-    
+
     /**
      * Creates the plugin
      */
-    public SeparateDataStorePlugin(PluginInformation info) 
-    {
+    public SeparateDataStorePlugin(PluginInformation info) {
         super(info);
         System.out.println("initializing SDS plugin");
-        
+
         // this lets us see what JOSM load from the server, and augment it with our data:
         OsmReader.registerPostprocessor(new ReadPostprocessor(this));
-        
+
         // this makes sure that our data is never written to the OSM server on a low level;
         OsmWriterFactory.theFactory = new SdsOsmWriterFactory(this);
-        
+
         // this lets us see what JOSM is planning to upload, and prepare our own uploads
         // accordingly
         UploadAction.registerUploadHook(new DetermineSdsModificationsUploadHook(this));
-        
+
         // this lets us perform our own uploads after JOSM has succeeded:
         OsmServerWriter.registerPostprocessor(new WritePostprocessor(this));
@@ -82,5 +91,5 @@
         return Main.pref.get("sds-server.tag-prefix", "hot:");
     }
-    
+
     public IPrimitive getOriginalPrimitive(IPrimitive other) {
         switch (other.getType()) {
@@ -89,24 +98,23 @@
         case RELATION: return originalRelations.get(other.getId());
         }
-        return null;    
+        return null;
     }
-    
+
     protected void enqueueForUpload(IPrimitive prim, HashMap<String, String> tags, boolean onlySds) {
         uploadQueue.add(new QueueItem(prim, tags, onlySds));
     }
-    
-    /** 
+
+    /**
      * Stores the given primitive in the plugin's cache in order to
      * determine changes later.
-     * @param prim
      */
     protected void learn(IPrimitive prim) {
         if (prim instanceof OsmPrimitive) {
-            ((OsmPrimitive)prim).save().accept(learnVisitor);
+            ((OsmPrimitive) prim).save().accept(learnVisitor);
         } else {
             prim.accept(learnVisitor);
         }
     }
-    
+
     /**
      * removes all elements from the upload queue that have the processed flag set.
@@ -119,5 +127,5 @@
         uploadQueue = newQueue;
     }
-    
+
     /**
      * reset the processed flag for all elements of the queue.
@@ -129,4 +137,5 @@
     }
 
+    @Override
     public PreferenceSetting getPreferenceSetting() {
         return new SdsPluginPreferences();
