Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 11893)
@@ -866,9 +866,5 @@
         boolean prevSegmentParallel = Geometry.segmentsParallel(n1en, prevNode.getEastNorth(), n1en, n2en);
         boolean nextSegmentParallel = Geometry.segmentsParallel(n2en, nextNode.getEastNorth(), n1en, n2en);
-        if (prevSegmentParallel || nextSegmentParallel) {
-            return false;
-        }
-
-        return true;
+        return !prevSegmentParallel && !nextSegmentParallel;
     }
 
Index: trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java	(revision 11893)
@@ -424,8 +424,5 @@
      */
     protected boolean isResponseLoadable(Map<String, List<String>> headerFields, int responseCode, byte[] raw) {
-        if (raw == null || raw.length == 0 || responseCode >= 400) {
-            return false;
-        }
-        return true;
+        return raw != null && raw.length != 0 && responseCode < 400;
     }
 
Index: trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java	(revision 11893)
@@ -26,4 +26,8 @@
     public int dir;
 
+    /**
+     * Constructs a new {@code WayPoint} from an existing one.
+     * @param p existing waypoint
+     */
     public WayPoint(WayPoint p) {
         attr.putAll(p.attr);
@@ -38,4 +42,8 @@
     }
 
+    /**
+     * Constructs a new {@code WayPoint} from lat/lon coordinates.
+     * @param ll lat/lon coordinates
+     */
     public WayPoint(LatLon ll) {
         lat = ll.lat();
@@ -64,4 +72,8 @@
     }
 
+    /**
+     * Returns the waypoint coordinates.
+     * @return the waypoint coordinates
+     */
     public final LatLon getCoor() {
         return new LatLon(lat, lon);
@@ -138,4 +150,8 @@
     }
 
+    /**
+     * Returns the waypoint time.
+     * @return the waypoint time
+     */
     public Date getTime() {
         return new Date((long) (time * 1000));
@@ -177,16 +193,10 @@
         if (this == obj)
             return true;
-        if (!super.equals(obj))
-            return false;
-        if (getClass() != obj.getClass())
+        if (obj == null || !super.equals(obj) || getClass() != obj.getClass())
             return false;
         WayPoint other = (WayPoint) obj;
-        if (Double.doubleToLongBits(lat) != Double.doubleToLongBits(other.lat))
-            return false;
-        if (Double.doubleToLongBits(lon) != Double.doubleToLongBits(other.lon))
-            return false;
-        if (Double.doubleToLongBits(time) != Double.doubleToLongBits(other.time))
-            return false;
-        return true;
+        return Double.doubleToLongBits(lat) == Double.doubleToLongBits(other.lat)
+            && Double.doubleToLongBits(lon) == Double.doubleToLongBits(other.lon)
+            && Double.doubleToLongBits(time) == Double.doubleToLongBits(other.time);
     }
 }
Index: trunk/src/org/openstreetmap/josm/data/osm/Changeset.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/Changeset.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/data/osm/Changeset.java	(revision 11893)
@@ -380,8 +380,5 @@
         } else if (!user.equals(other.user))
             return false;
-        if (commentsCount != other.commentsCount) {
-            return false;
-        }
-        return true;
+        return commentsCount == other.commentsCount;
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 11893)
@@ -1152,7 +1152,5 @@
         if (!isNew() && id != other.id)
             return false;
-        if (isIncomplete() ^ other.isIncomplete()) // exclusive or operator for performance (see #7159)
-            return false;
-        return true;
+        return !(isIncomplete() ^ other.isIncomplete()); // exclusive or operator for performance (see #7159)
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/WaySegment.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/WaySegment.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/data/osm/WaySegment.java	(revision 11893)
@@ -121,9 +121,6 @@
      */
     public boolean isSimilar(WaySegment s2) {
-        if (getFirstNode().equals(s2.getFirstNode()) && getSecondNode().equals(s2.getSecondNode()))
-            return true;
-        if (getFirstNode().equals(s2.getSecondNode()) && getSecondNode().equals(s2.getFirstNode()))
-            return true;
-        return false;
+        return (getFirstNode().equals(s2.getFirstNode()) && getSecondNode().equals(s2.getSecondNode()))
+            || (getFirstNode().equals(s2.getSecondNode()) && getSecondNode().equals(s2.getFirstNode()));
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 11893)
@@ -1454,12 +1454,13 @@
         if (bounds.isEmpty()) return false;
         MapViewPoint p = mapState.getPointFor(new EastNorth(bounds.getX(), bounds.getY()));
-        if (p.getInViewX() > mapState.getViewWidth()) return false;
-        if (p.getInViewY() < 0) return false;
+        if (p.getInViewY() < 0 || p.getInViewX() > mapState.getViewWidth()) return false;
         p = mapState.getPointFor(new EastNorth(bounds.getX() + bounds.getWidth(), bounds.getY() + bounds.getHeight()));
-        if (p.getInViewX() < 0) return false;
-        if (p.getInViewY() > mapState.getViewHeight()) return false;
-        return true;
-    }
-
+        return p.getInViewX() >= 0 && p.getInViewY() <= mapState.getViewHeight();
+    }
+
+    /**
+     * Determines if the paint visitor shall render OSM objects such that they look inactive.
+     * @return {@code true} if the paint visitor shall render OSM objects such that they look inactive
+     */
     public boolean isInactiveMode() {
         return isInactiveMode;
Index: trunk/src/org/openstreetmap/josm/data/validation/PaintVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/PaintVisitor.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/data/validation/PaintVisitor.java	(revision 11893)
@@ -225,6 +225,5 @@
     /**
      * Checks if the given segment is in the visible area.
-     * NOTE: This will return true for a small number of non-visible
-     *       segments.
+     * NOTE: This will return true for a small number of non-visible segments.
      * @param n1 The first point of the segment to check
      * @param n2 The second point of the segment to check
@@ -234,13 +233,8 @@
         Point p1 = mv.getPoint(n1);
         Point p2 = mv.getPoint(n2);
-        if ((p1.x < 0) && (p2.x < 0))
-            return false;
-        if ((p1.y < 0) && (p2.y < 0))
-            return false;
-        if ((p1.x > mv.getWidth()) && (p2.x > mv.getWidth()))
-            return false;
-        if ((p1.y > mv.getHeight()) && (p2.y > mv.getHeight()))
-            return false;
-        return true;
+        return (p1.x >= 0 || p2.x >= 0)
+            && (p1.y >= 0 || p2.y >= 0)
+            && (p1.x <= mv.getWidth() || p2.x <= mv.getWidth())
+            && (p1.y <= mv.getHeight() || p2.y <= mv.getHeight());
     }
 
Index: trunk/src/org/openstreetmap/josm/data/validation/routines/InetAddressValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/routines/InetAddressValidator.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/data/validation/routines/InetAddressValidator.java	(revision 11893)
@@ -191,8 +191,5 @@
             validOctets++;
         }
-        if (validOctets < IPV6_MAX_HEX_GROUPS && !containsCompressedZeroes) {
-            return false;
-        }
-        return true;
+        return validOctets >= IPV6_MAX_HEX_GROUPS || containsCompressedZeroes;
     }
 }
Index: trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java	(revision 11893)
@@ -373,9 +373,5 @@
         }
 
-        if (isOff(ALLOW_ALL_SCHEMES) && !allowedSchemes.contains(scheme.toLowerCase(Locale.ENGLISH))) {
-            return false;
-        }
-
-        return true;
+        return isOn(ALLOW_ALL_SCHEMES) || allowedSchemes.contains(scheme.toLowerCase(Locale.ENGLISH));
     }
 
@@ -458,10 +454,5 @@
         }
 
-        int slash2Count = countToken("//", path);
-        if (slash2Count > 0 && isOff(ALLOW_2_SLASHES)) {
-            return false;
-        }
-
-        return true;
+        return isOn(ALLOW_2_SLASHES) || countToken("//", path) <= 0;
     }
 
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java	(revision 11893)
@@ -84,8 +84,5 @@
                 return true;
             }
-            if (isProposedOrAbandoned(w2)) {
-                return true;
-            }
-            return false;
+            return isProposedOrAbandoned(w2);
         }
 
@@ -160,8 +157,5 @@
         @Override
         boolean ignoreWaySegmentCombination(Way w1, Way w2) {
-            if (!Objects.equals(getLayer(w1), getLayer(w2))) {
-                return true;
-            }
-            return false;
+            return !Objects.equals(getLayer(w1), getLayer(w2));
         }
 
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 11893)
@@ -343,7 +343,6 @@
         // cannot merge nodes outside download area
         final Iterator<? extends OsmPrimitive> it = testError.getPrimitives().iterator();
-        if (!it.hasNext() || it.next().isOutsideDownloadArea()) return false;
+        return it.hasNext() && !it.next().isOutsideDownloadArea();
         // everything else is ok to merge
-        return true;
     }
 }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 11893)
@@ -768,7 +768,5 @@
     @Override
     public boolean isFixable(TestError testError) {
-        if (testError.getCode() == REPEATED_MEMBER_SAME_ROLE)
-            return true;
-        return false;
+        return testError.getCode() == REPEATED_MEMBER_SAME_ROLE;
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 11893)
@@ -606,7 +606,5 @@
                 return false;
             }
-            if (tileIndex < 0 || tileIndex >= Math.pow(2, zoomLevel)) return false;
-
-            return true;
+            return tileIndex >= 0 && tileIndex < Math.pow(2, zoomLevel);
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java	(revision 11893)
@@ -276,17 +276,17 @@
     }
 
+    /**
+     * Determines if a cell is enabled.
+     * @param row row index
+     * @param column column index
+     * @return {@code true} if the cell at (row, column) is enabled
+     */
     public boolean isCellEnabled(int row, int column) {
-        if (!filters.get(row).enable && column != 0)
-            return false;
-        return true;
+        return filters.get(row).enable || column == 0;
     }
 
     @Override
     public boolean isCellEditable(int row, int column) {
-        if (!filters.get(row).enable && column != 0)
-            return false;
-        if (column < 4)
-            return true;
-        return false;
+        return column < 4 && isCellEnabled(row, column);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 11893)
@@ -985,7 +985,5 @@
         @Override
         public boolean isCellEditable(int row, int col) {
-            if (col == 0 && getActiveLayer() == getLayers().get(row))
-                return false;
-            return true;
+            return col != 0 || getActiveLayer() != getLayers().get(row);
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerListTransferHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerListTransferHandler.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerListTransferHandler.java	(revision 11893)
@@ -74,10 +74,6 @@
         }
 
-        if (support.getDropAction() == LINK) {
-            // cannot link yet.
-            return false;
-        }
-
-        return true;
+        // cannot link yet.
+        return support.getDropAction() != LINK;
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 11893)
@@ -334,7 +334,5 @@
 
     public boolean canRemove(int... rows) {
-        if (rows == null || rows.length == 0)
-            return false;
-        return true;
+        return rows != null && rows.length != 0;
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java	(revision 11893)
@@ -124,10 +124,7 @@
 
     private static boolean canWrite(File f) {
-        if (f == null) return false;
-        if (f.isDirectory()) return false;
+        if (f == null || f.isDirectory()) return false;
         if (f.exists() && f.canWrite()) return true;
-        if (!f.exists() && f.getParentFile() != null && f.getParentFile().canWrite())
-            return true;
-        return false;
+        return !f.exists() && f.getParentFile() != null && f.getParentFile().canWrite();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 11893)
@@ -1071,7 +1071,5 @@
             return false;
         int status = Toolkit.getDefaultToolkit().checkImage(i, -1, -1, this);
-        if ((status & ALLBITS) != 0)
-            return true;
-        return false;
+        return (status & ALLBITS) != 0;
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 11893)
@@ -1026,5 +1026,5 @@
 
         ConflictCollection conflictsCol = getConflicts();
-        if (conflictsCol != null && !conflictsCol.isEmpty() && 1 != GuiHelper.runInEDTAndWaitAndReturn(() -> {
+        return conflictsCol == null || conflictsCol.isEmpty() || 1 == GuiHelper.runInEDTAndWaitAndReturn(() -> {
             ExtendedDialog dialog = new ExtendedDialog(
                     Main.parent,
@@ -1037,8 +1037,5 @@
             dialog.setButtonIcons(new String[] {"save", "cancel"});
             return dialog.showDialog().getValue();
-        })) {
-            return false;
-        }
-        return true;
+        });
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/imagery/ReprojectionTile.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/imagery/ReprojectionTile.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/gui/layer/imagery/ReprojectionTile.java	(revision 11893)
@@ -53,8 +53,6 @@
         if (Utils.equalsEpsilon(nativeScale, currentScale))
             return false;
-        if (maxZoomReached && currentScale < nativeScale)
-            // zoomed in even more - max zoom already reached, so no update
-            return false;
-        return true;
+        // zoomed in even more - max zoom already reached, so no update
+        return !maxZoomReached || currentScale >= nativeScale;
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/imagery/TileSourceDisplaySettings.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/imagery/TileSourceDisplaySettings.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/gui/layer/imagery/TileSourceDisplaySettings.java	(revision 11893)
@@ -295,16 +295,10 @@
         if (this == obj)
             return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
+        if (obj == null || getClass() != obj.getClass())
             return false;
         TileSourceDisplaySettings other = (TileSourceDisplaySettings) obj;
-        if (autoLoad != other.autoLoad)
-            return false;
-        if (autoZoom != other.autoZoom)
-            return false;
-        if (showErrors != other.showErrors)
-            return false;
-        return true;
+        return autoLoad == other.autoLoad
+            && autoZoom == other.autoZoom
+            && showErrors == other.showErrors;
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactory.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactory.java	(revision 11893)
@@ -625,7 +625,5 @@
             if (e.osm instanceof Way && ((Way) e.osm).isClosed())
                 return true;
-            if (e.osm instanceof Relation && ((Relation) e.osm).isMultipolygon())
-                return true;
-            return false;
+            return e.osm instanceof Relation && ((Relation) e.osm).isMultipolygon();
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/util/RotationAngle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/util/RotationAngle.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/gui/util/RotationAngle.java	(revision 11893)
@@ -57,13 +57,6 @@
                 return true;
             }
-            if (obj == null) {
-                return false;
-            }
-            if (getClass() != obj.getClass()) {
-                return false;
-            }
-            return true;
+            return obj != null && getClass() == obj.getClass();
         }
-
     }
 
@@ -92,6 +85,5 @@
             final int prime = 31;
             int result = 1;
-            long temp;
-            temp = Double.doubleToLongBits(angle);
+            long temp = Double.doubleToLongBits(angle);
             result = prime * result + (int) (temp ^ (temp >>> 32));
             return result;
@@ -103,15 +95,9 @@
                 return true;
             }
-            if (obj == null) {
-                return false;
-            }
-            if (getClass() != obj.getClass()) {
+            if (obj == null || getClass() != obj.getClass()) {
                 return false;
             }
             StaticRotationAngle other = (StaticRotationAngle) obj;
-            if (Double.doubleToLongBits(angle) != Double.doubleToLongBits(other.angle)) {
-                return false;
-            }
-            return true;
+            return Double.doubleToLongBits(angle) == Double.doubleToLongBits(other.angle);
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java	(revision 11893)
@@ -152,13 +152,9 @@
         @Override
         public boolean isValid() {
-            double value = 0;
-            try {
-                value = Double.parseDouble(getComponent().getText());
+            try {
+                return LatLon.isValidLat(Double.parseDouble(getComponent().getText()));
             } catch (NumberFormatException ex) {
                 return false;
             }
-            if (!LatLon.isValidLat(value))
-                return false;
-            return true;
         }
     }
@@ -192,13 +188,9 @@
         @Override
         public boolean isValid() {
-            double value = 0;
-            try {
-                value = Double.parseDouble(getComponent().getText());
+            try {
+                return LatLon.isValidLon(Double.parseDouble(getComponent().getText()));
             } catch (NumberFormatException ex) {
                 return false;
             }
-            if (!LatLon.isValidLon(value))
-                return false;
-            return true;
         }
     }
Index: trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 11893)
@@ -430,7 +430,5 @@
         if (this.version == null && referenceVersion != null)
             return true;
-        if (this.version != null && !this.version.equals(referenceVersion))
-            return true;
-        return false;
+        return this.version != null && !this.version.equals(referenceVersion);
     }
 
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 11892)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 11893)
@@ -1192,7 +1192,5 @@
      */
     public static boolean isLocalUrl(String url) {
-        if (url == null || url.startsWith("http://") || url.startsWith("https://") || url.startsWith("resource://"))
-            return false;
-        return true;
+        return url != null && !url.startsWith("http://") && !url.startsWith("https://") && !url.startsWith("resource://");
     }
 
