Index: trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 11008)
+++ trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 11009)
@@ -445,22 +445,22 @@
             switch(column) {
             case 0:
-                setText(sr.name);
+                setText(sr.getName());
                 break;
             case 1:
-                setText(sr.info);
+                setText(sr.getInfo());
                 break;
             case 2:
-                setText(sr.nearestPlace);
+                setText(sr.getNearestPlace());
                 break;
             case 3:
-                if (sr.bounds != null) {
-                    setText(sr.bounds.toShortString(new DecimalFormat("0.000")));
+                if (sr.getBounds() != null) {
+                    setText(sr.getBounds().toShortString(new DecimalFormat("0.000")));
                 } else {
-                    setText(sr.zoom != 0 ? Integer.toString(sr.zoom) : tr("unknown"));
+                    setText(sr.getZoom() != 0 ? Integer.toString(sr.getZoom()) : tr("unknown"));
                 }
                 break;
             default: // Do nothing
             }
-            setToolTipText(lineWrapDescription(sr.description));
+            setToolTipText(lineWrapDescription(sr.getDescription()));
             return this;
         }
Index: trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 11008)
+++ trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 11009)
@@ -528,5 +528,5 @@
     /**
      * Clears the cached file
-     * @throws IOException
+     * @throws IOException if any I/O error occurs
      * @since 10993
      */
Index: trunk/src/org/openstreetmap/josm/io/NameFinder.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/NameFinder.java	(revision 11008)
+++ trunk/src/org/openstreetmap/josm/io/NameFinder.java	(revision 11009)
@@ -30,6 +30,9 @@
  * @since 11002
  */
-public class NameFinder {
-
+public final class NameFinder {
+
+    /**
+     * Nominatim URL.
+     */
     public static final String NOMINATIM_URL = "https://nominatim.openstreetmap.org/search?format=xml&q=";
 
@@ -62,14 +65,90 @@
      */
     public static class SearchResult {
-        public String name;
-        public String info;
-        public String nearestPlace;
-        public String description;
-        public double lat;
-        public double lon;
-        public int zoom;
-        public Bounds bounds;
-        public PrimitiveId osmId;
-
+        private String name;
+        private String info;
+        private String nearestPlace;
+        private String description;
+        private double lat;
+        private double lon;
+        private int zoom;
+        private Bounds bounds;
+        private PrimitiveId osmId;
+
+        /**
+         * Returns the name.
+         * @return the name
+         */
+        public final String getName() {
+            return name;
+        }
+
+        /**
+         * Returns the info.
+         * @return the info
+         */
+        public final String getInfo() {
+            return info;
+        }
+
+        /**
+         * Returns the nearest place.
+         * @return the nearest place
+         */
+        public final String getNearestPlace() {
+            return nearestPlace;
+        }
+
+        /**
+         * Returns the description.
+         * @return the description
+         */
+        public final String getDescription() {
+            return description;
+        }
+
+        /**
+         * Returns the latitude.
+         * @return the latitude
+         */
+        public final double getLat() {
+            return lat;
+        }
+
+        /**
+         * Returns the longitude.
+         * @return the longitude
+         */
+        public final double getLon() {
+            return lon;
+        }
+
+        /**
+         * Returns the zoom.
+         * @return the zoom
+         */
+        public final int getZoom() {
+            return zoom;
+        }
+
+        /**
+         * Returns the bounds.
+         * @return the bounds
+         */
+        public final Bounds getBounds() {
+            return bounds;
+        }
+
+        /**
+         * Returns the OSM id.
+         * @return the OSM id
+         */
+        public final PrimitiveId getOsmId() {
+            return osmId;
+        }
+
+        /**
+         * Returns the download area.
+         * @return the download area
+         */
         public Bounds getDownloadArea() {
             return bounds != null ? bounds : OsmUrlToBounds.positionToBounds(lat, lon, zoom);
Index: trunk/src/org/openstreetmap/josm/io/OverpassDownloadReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OverpassDownloadReader.java	(revision 11008)
+++ trunk/src/org/openstreetmap/josm/io/OverpassDownloadReader.java	(revision 11009)
@@ -8,4 +8,5 @@
 import java.util.EnumMap;
 import java.util.List;
+import java.util.NoSuchElementException;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -58,6 +59,6 @@
             return super.getRequestForBbox(lon1, lat1, lon2, lat2);
         else {
-            final String overpassQuery = this.overpassQuery.replace("{{bbox}}", lat1 + "," + lon1 + "," + lat2 + "," + lon2);
-            final String expandedOverpassQuery = expandExtendedQueries(overpassQuery);
+            final String query = this.overpassQuery.replace("{{bbox}}", lat1 + "," + lon1 + "," + lat2 + "," + lon2);
+            final String expandedOverpassQuery = expandExtendedQueries(query);
             return "interpreter?data=" + Utils.encodeUrl(expandedOverpassQuery);
         }
@@ -67,4 +68,6 @@
      * Evaluates some features of overpass turbo extended query syntax.
      * See https://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Turbo_Queries
+     * @param query unexpanded query
+     * @return expanded query
      */
     static String expandExtendedQueries(String query) {
@@ -77,5 +80,5 @@
                         matcher.appendReplacement(sb, geocodeArea(matcher.group(2)));
                 }
-            } catch (Exception ex) {
+            } catch (UncheckedParseException ex) {
                 final String msg = tr("Failed to evaluate {0}", matcher.group());
                 Main.warn(ex, msg);
@@ -91,11 +94,11 @@
         final EnumMap<OsmPrimitiveType, Long> idOffset = new EnumMap<>(OsmPrimitiveType.class);
         idOffset.put(OsmPrimitiveType.NODE, 0L);
-        idOffset.put(OsmPrimitiveType.WAY, 2400000000L);
-        idOffset.put(OsmPrimitiveType.RELATION, 3600000000L);
+        idOffset.put(OsmPrimitiveType.WAY, 2_400_000_000L);
+        idOffset.put(OsmPrimitiveType.RELATION, 3_600_000_000L);
         try {
             final List<NameFinder.SearchResult> results = NameFinder.queryNominatim(area);
-            final PrimitiveId osmId = results.iterator().next().osmId;
+            final PrimitiveId osmId = results.iterator().next().getOsmId();
             return String.format("area(%d)", osmId.getUniqueId() + idOffset.get(osmId.getType()));
-        } catch (IOException ex) {
+        } catch (IOException | NoSuchElementException ex) {
             throw new UncheckedParseException(ex);
         }
@@ -144,10 +147,8 @@
             @Override
             protected void parseUnknown(boolean printWarning) throws XMLStreamException {
-                if ("remark".equals(parser.getLocalName())) {
-                    if (parser.getEventType() == XMLStreamConstants.START_ELEMENT) {
-                        final String text = parser.getElementText();
-                        if (text.contains("runtime error")) {
-                            throw new XMLStreamException(text);
-                        }
+                if ("remark".equals(parser.getLocalName()) && parser.getEventType() == XMLStreamConstants.START_ELEMENT) {
+                    final String text = parser.getElementText();
+                    if (text.contains("runtime error")) {
+                        throw new XMLStreamException(text);
                     }
                 }
