Index: trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 11452)
@@ -414,5 +414,5 @@
                 } else
                     continue;
-                if (candidateWay.equals(lastWay) && candidateComingToHead)
+                if (candidateComingToHead && candidateWay.equals(lastWay))
                     continue;
 
Index: trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 11452)
@@ -252,5 +252,5 @@
             list.addListSelectionListener(e -> {
                 final Way selected = list.getSelectedValue();
-                if (Main.isDisplayingMapView() && selected != null && selected.getNodesCount() > 1) {
+                if (selected != null && Main.isDisplayingMapView() && selected.getNodesCount() > 1) {
                     final Collection<WaySegment> segments = new ArrayList<>(selected.getNodesCount() - 1);
                     final Iterator<Node> it = selected.getNodes().iterator();
Index: trunk/src/org/openstreetmap/josm/actions/audio/AudioPlayPauseAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/audio/AudioPlayPauseAction.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/actions/audio/AudioPlayPauseAction.java	(revision 11452)
@@ -36,5 +36,5 @@
         URL url = AudioPlayer.url();
         try {
-            if (AudioPlayer.paused() && url != null) {
+            if (url != null && AudioPlayer.paused()) {
                 AudioPlayer.play(url);
             } else if (AudioPlayer.playing()) {
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 11452)
@@ -229,5 +229,5 @@
         // update selection to reflect which way being modified
         OsmDataLayer editLayer = getLayerManager().getEditLayer();
-        if (getCurrentBaseNode() != null && editLayer != null && !editLayer.data.selectionEmpty()) {
+        if (editLayer != null && getCurrentBaseNode() != null && !editLayer.data.selectionEmpty()) {
             DataSet currentDataSet = editLayer.data;
             Way continueFrom = getWayForNode(getCurrentBaseNode());
@@ -1124,5 +1124,5 @@
 
         // This happens when nothing is selected, but we still want to highlight the "target node"
-        if (mouseOnExistingNode == null && getLayerManager().getEditDataSet().selectionEmpty() && mousePos != null) {
+        if (mouseOnExistingNode == null && mousePos != null && getLayerManager().getEditDataSet().selectionEmpty()) {
             mouseOnExistingNode = Main.map.mapView.getNearestNode(mousePos, OsmPrimitive::isSelectable);
         }
@@ -1161,5 +1161,5 @@
         if (Main.map.mapView == null || mousePos == null
                 // don't draw line if we don't know where from or where to
-                || getCurrentBaseNode() == null || currentMouseEastNorth == null
+                || currentMouseEastNorth == null || getCurrentBaseNode() == null
                 // don't draw line if mouse is outside window
                 || !Main.map.mapView.getBounds().contains(mousePos))
@@ -1238,5 +1238,5 @@
          * Check whether a connection will be made
          */
-        if (getCurrentBaseNode() != null && !wayIsFinished) {
+        if (!wayIsFinished && getCurrentBaseNode() != null) {
             if (alt) {
                 rv.append(' ').append(tr("Start new way from last node."));
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 11452)
@@ -586,5 +586,5 @@
 
             // Select Draw Tool if no selection has been made
-            if (getLayerManager().getEditDataSet().selectionEmpty() && !cancelDrawMode) {
+            if (!cancelDrawMode && getLayerManager().getEditDataSet().selectionEmpty()) {
                 Main.map.selectDrawTool(true);
                 updateStatusLine();
@@ -639,6 +639,6 @@
     @Override
     public void doKeyPressed(KeyEvent e) {
-        if (!Main.isDisplayingMapView() ||
-                !repeatedKeySwitchLassoOption || !getShortcut().isEvent(e)) return;
+        if (!repeatedKeySwitchLassoOption || !Main.isDisplayingMapView() || !getShortcut().isEvent(e))
+            return;
         if (Main.isDebugEnabled()) {
             Main.debug(getClass().getName()+" consuming event "+e);
Index: trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 11452)
@@ -776,6 +776,6 @@
                     mapCSSSearch == that.mapCSSSearch &&
                     allElements == that.allElements &&
-                    Objects.equals(text, that.text) &&
-                    mode == that.mode;
+                    mode == that.mode &&
+                    Objects.equals(text, that.text);
         }
 
Index: trunk/src/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommand.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommand.java	(revision 11452)
@@ -86,6 +86,5 @@
         if (!super.equals(obj)) return false;
         CoordinateConflictResolveCommand that = (CoordinateConflictResolveCommand) obj;
-        return Objects.equals(conflict, that.conflict) &&
-                decision == that.decision;
+        return decision == that.decision && Objects.equals(conflict, that.conflict);
     }
 }
Index: trunk/src/org/openstreetmap/josm/command/conflict/DeletedStateConflictResolveCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/conflict/DeletedStateConflictResolveCommand.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/command/conflict/DeletedStateConflictResolveCommand.java	(revision 11452)
@@ -101,6 +101,5 @@
         if (!super.equals(obj)) return false;
         DeletedStateConflictResolveCommand that = (DeletedStateConflictResolveCommand) obj;
-        return Objects.equals(conflict, that.conflict) &&
-                decision == that.decision;
+        return decision == that.decision && Objects.equals(conflict, that.conflict);
     }
 }
Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 11452)
@@ -444,5 +444,5 @@
         if (Main.isPlatformWindows()) {
             String appdata = System.getenv("APPDATA");
-            if (System.getenv("ALLUSERSPROFILE") != null && appdata != null
+            if (appdata != null && System.getenv("ALLUSERSPROFILE") != null
                     && appdata.lastIndexOf(File.separator) != -1) {
                 appdata = appdata.substring(appdata.lastIndexOf(File.separator));
@@ -613,5 +613,5 @@
 
         // Backup old preferences if there are old preferences
-        if (prefFile.exists() && prefFile.length() > 0 && initSuccessful) {
+        if (initSuccessful && prefFile.exists() && prefFile.length() > 0) {
             Utils.copyFile(prefFile, backupFile);
         }
Index: trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java	(revision 11452)
@@ -225,5 +225,5 @@
     public String getDistText(final double dist, final NumberFormat format, final double threshold) {
         double a = dist / aValue;
-        if (!Main.pref.getBoolean("system_of_measurement.use_only_lower_unit", false) && a > bValue / aValue)
+        if (a > bValue / aValue && !Main.pref.getBoolean("system_of_measurement.use_only_lower_unit", false))
             return formatText(dist / bValue, bName, format);
         else if (a < threshold)
Index: trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java	(revision 11452)
@@ -183,5 +183,5 @@
                     handleNoTileAtZoom();
                     int httpStatusCode = attributes.getResponseCode();
-                    if (!isNoTileAtZoom() && httpStatusCode >= 400) {
+                    if (httpStatusCode >= 400 && !isNoTileAtZoom()) {
                         if (attributes.getErrorMessage() == null) {
                             tile.setError(tr("HTTP error {0} when loading tiles", httpStatusCode));
Index: trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 11452)
@@ -296,5 +296,5 @@
         if (changesetId < 0)
             throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' >= 0 expected, got {1}", "changesetId", changesetId));
-        if (isNew() && changesetId > 0)
+        if (changesetId > 0 && isNew())
             throw new IllegalStateException(tr("Cannot assign a changesetId > 0 to a new primitive. Value of changesetId is {0}", changesetId));
 
@@ -380,5 +380,5 @@
     @Override
     public void setVisible(boolean visible) {
-        if (isNew() && !visible)
+        if (!visible && isNew())
             throw new IllegalStateException(tr("A primitive with ID = 0 cannot be invisible."));
         updateFlags(FLAG_VISIBLE, visible);
Index: trunk/src/org/openstreetmap/josm/data/osm/BBox.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/BBox.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/data/osm/BBox.java	(revision 11452)
@@ -313,5 +313,5 @@
      */
     public boolean isInWorld() {
-        return isValid() && xmin >= -180.0 && xmax <= 180.0 && ymin >= -90.0 && ymax <= 90.0;
+        return xmin >= -180.0 && xmax <= 180.0 && ymin >= -90.0 && ymax <= 90.0 && isValid();
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 11452)
@@ -1170,13 +1170,12 @@
      */
     public boolean hasEqualTechnicalAttributes(OsmPrimitive other) {
-        if (other == null) return false;
-
-        return isDeleted() == other.isDeleted()
-                && isModified() == other.isModified()
-                && timestamp == other.timestamp
-                && version == other.version
-                && isVisible() == other.isVisible()
-                && Objects.equals(user, other.user)
-                && changesetId == other.changesetId;
+        return other != null
+            && timestamp == other.timestamp
+            && version == other.version
+            && changesetId == other.changesetId
+            && isDeleted() == other.isDeleted()
+            && isModified() == other.isModified()
+            && isVisible() == other.isVisible()
+            && Objects.equals(user, other.user);
     }
 
Index: trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 11452)
@@ -274,5 +274,5 @@
             }
             doAddContent(o);
-            if (isLeaf() && content.size() > MAX_OBJECTS_PER_NODE && level < QuadTiling.NR_LEVELS) {
+            if (level < QuadTiling.NR_LEVELS && isLeaf() && content.size() > MAX_OBJECTS_PER_NODE) {
                 doSplit();
             }
Index: trunk/src/org/openstreetmap/josm/data/osm/RelationMemberData.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/RelationMemberData.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/data/osm/RelationMemberData.java	(revision 11452)
@@ -107,6 +107,6 @@
         RelationMemberData that = (RelationMemberData) obj;
         return memberId == that.memberId &&
-                Objects.equals(role, that.role) &&
-                memberType == that.memberType;
+               memberType == that.memberType &&
+               Objects.equals(role, that.role);
     }
 }
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 11452)
@@ -1089,5 +1089,5 @@
                 } else if (m.isNode()) {
                     Node n = m.getNode();
-                    if ("via".equals(m.getRole()) && via == null) {
+                    if (via == null && "via".equals(m.getRole())) {
                         via = n;
                     }
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java	(revision 11452)
@@ -297,5 +297,5 @@
         /* head only takes over control if the option is true,
            the direction should be shown at all and not only because it's selected */
-        boolean showOnlyHeadArrowOnly = showThisDirectionArrow && !ds.isSelected(w) && showHeadArrowOnly;
+        boolean showOnlyHeadArrowOnly = showThisDirectionArrow && showHeadArrowOnly && !ds.isSelected(w);
         Color wayColor;
 
Index: trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java	(revision 11452)
@@ -463,5 +463,5 @@
 
         int slash2Count = countToken("//", path);
-        if (isOff(ALLOW_2_SLASHES) && (slash2Count > 0)) {
+        if (slash2Count > 0 && isOff(ALLOW_2_SLASHES)) {
             return false;
         }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java	(revision 11452)
@@ -65,6 +65,6 @@
             RelMember relMember = (RelMember) obj;
             return relId == relMember.relId &&
+                    type == relMember.type &&
                     Objects.equals(role, relMember.role) &&
-                    type == relMember.type &&
                     Objects.equals(tags, relMember.tags) &&
                     Objects.equals(coor, relMember.coor);
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 11452)
@@ -319,18 +319,18 @@
                                     "Unexpected '='. Please only specify the key to remove!");
                             check.fixCommands.add(FixCommand.fixRemove(ai.val));
-                        } else if ("fixChangeKey".equals(ai.key) && val != null) {
+                        } else if (val != null && "fixChangeKey".equals(ai.key)) {
                             CheckParameterUtil.ensureThat(val.contains("=>"), "Separate old from new key by '=>'!");
                             final String[] x = val.split("=>", 2);
                             check.fixCommands.add(FixCommand.fixChangeKey(Tag.removeWhiteSpaces(x[0]), Tag.removeWhiteSpaces(x[1])));
-                        } else if ("fixDeleteObject".equals(ai.key) && val != null) {
+                        } else if (val != null && "fixDeleteObject".equals(ai.key)) {
                             CheckParameterUtil.ensureThat("this".equals(val), "fixDeleteObject must be followed by 'this'");
                             check.deletion = true;
-                        } else if ("suggestAlternative".equals(ai.key) && val != null) {
+                        } else if (val != null && "suggestAlternative".equals(ai.key)) {
                             check.alternatives.add(val);
-                        } else if ("assertMatch".equals(ai.key) && val != null) {
+                        } else if (val != null && "assertMatch".equals(ai.key)) {
                             check.assertions.put(val, Boolean.TRUE);
-                        } else if ("assertNoMatch".equals(ai.key) && val != null) {
+                        } else if (val != null && "assertNoMatch".equals(ai.key)) {
                             check.assertions.put(val, Boolean.FALSE);
-                        } else if ("group".equals(ai.key) && val != null) {
+                        } else if (val != null && "group".equals(ai.key)) {
                             check.group = val;
                         } else {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(revision 11452)
@@ -211,5 +211,5 @@
                     continue;
                 }
-                if (endnodesHighway.contains(en) && !s.highway && !s.w.concernsArea()) {
+                if (!s.highway && endnodesHighway.contains(en) && !s.w.concernsArea()) {
                     map.put(en, s.w);
                 } else if (endnodes.contains(en) && !s.w.concernsArea()) {
Index: trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 11452)
@@ -616,5 +616,5 @@
             double den = 100 * getScale();
             double scaleMin = 0.01 * den / dm / 100;
-            if (!Double.isInfinite(scaleMin) && newScale < scaleMin) {
+            if (newScale < scaleMin && !Double.isInfinite(scaleMin)) {
                 newScale = scaleMin;
             }
Index: trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapControler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapControler.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapControler.java	(revision 11452)
@@ -130,6 +130,6 @@
     @Override
     public void mouseDragged(MouseEvent e) {
-        if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) == MouseEvent.BUTTON1_DOWN_MASK &&
-                !(Main.isPlatformOsx() && e.getModifiersEx() == MAC_MOUSE_BUTTON3_MASK) && iStartSelectionPoint != null) {
+        if (iStartSelectionPoint != null && (e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) == MouseEvent.BUTTON1_DOWN_MASK
+                && !(Main.isPlatformOsx() && e.getModifiersEx() == MAC_MOUSE_BUTTON3_MASK)) {
             iEndSelectionPoint = e.getPoint();
             iSlippyMapChooser.setSelection(iStartSelectionPoint, iEndSelectionPoint);
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java	(revision 11452)
@@ -83,8 +83,8 @@
         RelationMemberConflictDecision that = (RelationMemberConflictDecision) obj;
         return pos == that.pos &&
-                Objects.equals(relation, that.relation) &&
-                Objects.equals(originalPrimitive, that.originalPrimitive) &&
-                Objects.equals(role, that.role) &&
-                decision == that.decision;
+               decision == that.decision &&
+               Objects.equals(relation, that.relation) &&
+               Objects.equals(originalPrimitive, that.originalPrimitive) &&
+               Objects.equals(role, that.role);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/DialogsPanel.java	(revision 11452)
@@ -246,5 +246,5 @@
             for (int i = 0; i < n; ++i) {
                 final ToggleDialog dlg = allDialogs.get(i);
-                if (dlg.isDialogInDefaultView() && dlg != triggeredBy) {
+                if (dlg != triggeredBy && dlg.isDialogInDefaultView()) {
                     final int ha = dlg.getSize().height;                              // current
                     final int h0 = ha * r / sumA;                                     // proportional shrinking
@@ -261,5 +261,5 @@
             for (int i = 0; i < n; ++i) {
                 final ToggleDialog dlg = allDialogs.get(i);
-                if (dlg.isDialogInDefaultView() && dlg != triggeredBy) {
+                if (dlg != triggeredBy && dlg.isDialogInDefaultView()) {
                     final int ha = dlg.getHeight();
                     final int h0 = ha * r / sumA;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/FilterTableModel.java	(revision 11452)
@@ -118,5 +118,5 @@
         }
 
-        if (Main.isDisplayingMapView() && changed) {
+        if (changed && Main.isDisplayingMapView()) {
             Main.map.mapView.repaint();
             Main.map.filterDialog.updateDialogHeader();
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java	(revision 11452)
@@ -159,5 +159,5 @@
                 txtMappaint.append(tr("The 2 selected objects have different style caches."));
             }
-            if (sc1.equals(sc2) && sc1 != sc2) {
+            if (sc1 != sc2 && sc1.equals(sc2)) {
                 txtMappaint.append(tr("Warning: The 2 selected objects have equal, but not identical style caches."));
             }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/MinimapDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/MinimapDialog.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/MinimapDialog.java	(revision 11452)
@@ -55,5 +55,5 @@
     @Override
     public void zoomChanged() {
-        if (Main.isDisplayingMapView() && !skipEvents) {
+        if (!skipEvents && Main.isDisplayingMapView()) {
             MapView mv = Main.map.mapView;
             final Bounds currentBounds = new Bounds(
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerListTransferHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerListTransferHandler.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/layer/LayerListTransferHandler.java	(revision 11452)
@@ -96,5 +96,5 @@
             boolean isSameLayerManager = tableModel.getLayerManager() == layers.getManager();
 
-            if (support.getDropAction() == MOVE && isSameLayerManager) {
+            if (isSameLayerManager && support.getDropAction() == MOVE) {
                 for (Layer layer : layers.getLayers()) {
                     boolean wasBeforeInsert = layers.getManager().getLayers().indexOf(layer) <= dropLocation;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 11452)
@@ -1207,5 +1207,5 @@
                          *  content lengths, so we have to be fuzzy.. (this is UGLY, recode if u know better)
                          */
-                        if (conn.getContentLength() != -1 && osize > -1 && Math.abs(conn.getContentLength() - osize) > 200) {
+                        if (osize > -1 && conn.getContentLength() != -1 && Math.abs(conn.getContentLength() - osize) > 200) {
                             Main.info("{0} is a mediawiki redirect", u);
                             conn.disconnect();
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/WayConnectionTypeCalculator.java	(revision 11452)
@@ -98,5 +98,5 @@
             }
 
-            if (!RelationSortUtils.isOneway(m) && lastWct != null) {
+            if (lastWct != null && !RelationSortUtils.isOneway(m)) {
                 wct.direction = determineDirection(i-1, lastWct.direction, i);
                 wct.linkPrev = wct.direction != NONE;
@@ -307,5 +307,5 @@
                         return FORWARD;
                 }
-                if (n == RelationNodeMap.lastOnewayNode(m) && reversed) {
+                if (reversed && n == RelationNodeMap.lastOnewayNode(m)) {
                     if (RelationSortUtils.isBackward(m))
                         return FORWARD;
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 11452)
@@ -643,6 +643,6 @@
         Collection<String> history = Main.pref.getCollection(historyKey, def);
         int age = (int) (System.currentTimeMillis() / 1000 - Main.pref.getInteger(BasicUploadSettingsPanel.HISTORY_LAST_USED_KEY, 0));
-        if (age < Main.pref.getLong(BasicUploadSettingsPanel.HISTORY_MAX_AGE_KEY, TimeUnit.HOURS.toMillis(4))
-                && history != null && !history.isEmpty()) {
+        if (history != null && age < Main.pref.getLong(BasicUploadSettingsPanel.HISTORY_MAX_AGE_KEY, TimeUnit.HOURS.toMillis(4))
+                && !history.isEmpty()) {
             return history.iterator().next();
         } else {
Index: trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 11452)
@@ -1584,5 +1584,5 @@
             List<Tile> newlyMissedTiles = new LinkedList<>();
             for (Tile missed : missedTiles) {
-                if ("no-tile".equals(missed.getValue("tile-info")) && zoomOffset > 0) {
+                if (zoomOffset > 0 && "no-tile".equals(missed.getValue("tile-info"))) {
                     // Don't try to paint from higher zoom levels when tile is overzoomed
                     newlyMissedTiles.add(missed);
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 11452)
@@ -1071,5 +1071,5 @@
             }
 
-            if (e.isTagged() && e.getExifCoor() == null && !tagged) {
+            if (!tagged && e.isTagged() && e.getExifCoor() == null) {
                 continue;
             }
@@ -1202,5 +1202,5 @@
             }
 
-            if (curImg.tmp.getPos() == null && prevWp != null) {
+            if (prevWp != null && curImg.tmp.getPos() == null) {
                 // The values of timeDiff are between 0 and 1, it is not seconds but a dimensionless variable
                 double timeDiff = (double) (imgTime - prevWpTime) / interval;
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java	(revision 11452)
@@ -306,5 +306,5 @@
             imageChanged = currentEntry != entry;
 
-            if (centerView && Main.isDisplayingMapView() && entry != null && entry.getPos() != null) {
+            if (centerView && entry != null && Main.isDisplayingMapView() && entry.getPos() != null) {
                 Main.map.mapView.zoomTo(entry.getPos());
             }
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(revision 11452)
@@ -175,5 +175,5 @@
         SystemOfMeasurement som = SystemOfMeasurement.getSystemOfMeasurement();
         velocityScale.addTitle(tr("Velocity, {0}", som.speedName));
-        if (Main.isDisplayingMapView() && oldSoM != null && newSoM != null) {
+        if (oldSoM != null && newSoM != null && Main.isDisplayingMapView()) {
             Main.map.mapView.repaint();
         }
@@ -1167,8 +1167,10 @@
      */
     private void checkCache() {
-        if ((computeCacheMaxLineLengthUsed != maxLineLength) || (!neutralColor.equals(computeCacheColorUsed))
-                || (computeCacheColored != colored) || (computeCacheColorTracksTune != colorTracksTune)
+        if ((computeCacheMaxLineLengthUsed != maxLineLength)
+                || (computeCacheColored != colored)
+                || (computeCacheColorTracksTune != colorTracksTune)
                 || (computeCacheColorDynamic != colorModeDynamic)
                 || (computeCacheHeatMapDrawColorTableIdx != heatMapDrawColorTableIdx)
+                || (!neutralColor.equals(computeCacheColorUsed))
       ) {
             computeCacheMaxLineLengthUsed = maxLineLength;
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(revision 11452)
@@ -166,5 +166,5 @@
 
         // (a) try explicit timestamped waypoints - unless suppressed
-        if (Main.pref.getBoolean("marker.audiofromexplicitwaypoints", true) && hasWaypoints) {
+        if (hasWaypoints && Main.pref.getBoolean("marker.audiofromexplicitwaypoints", true)) {
             for (WayPoint w : layer.data.waypoints) {
                 if (w.time > firstTime) {
@@ -177,5 +177,5 @@
 
         // (b) try explicit waypoints without timestamps - unless suppressed
-        if (Main.pref.getBoolean("marker.audiofromuntimedwaypoints", true) && hasWaypoints) {
+        if (hasWaypoints && Main.pref.getBoolean("marker.audiofromuntimedwaypoints", true)) {
             for (WayPoint w : layer.data.waypoints) {
                 if (waypoints.contains(w)) {
@@ -197,5 +197,5 @@
 
         // (c) use explicitly named track points, again unless suppressed
-        if ((Main.pref.getBoolean("marker.audiofromnamedtrackpoints", false)) && layer.data.tracks != null
+        if (layer.data.tracks != null && Main.pref.getBoolean("marker.audiofromnamedtrackpoints", false)
                 && !layer.data.tracks.isEmpty()) {
             for (GpxTrack track : layer.data.tracks) {
@@ -211,5 +211,5 @@
 
         // (d) use timestamp of file as location on track
-        if ((Main.pref.getBoolean("marker.audiofromwavtimestamps", false)) && hasTracks) {
+        if (hasTracks && Main.pref.getBoolean("marker.audiofromwavtimestamps", false)) {
             double lastModified = wavFile.lastModified() / 1000.0; // lastModified is in
             // milliseconds
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/BoxTextElement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/BoxTextElement.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/BoxTextElement.java	(revision 11452)
@@ -282,9 +282,9 @@
         if (!super.equals(obj)) return false;
         BoxTextElement that = (BoxTextElement) obj;
-        return Objects.equals(text, that.text) &&
-                Objects.equals(boxProvider, that.boxProvider) &&
-                Objects.equals(box, that.box) &&
-                hAlign == that.hAlign &&
-                vAlign == that.vAlign;
+        return hAlign == that.hAlign &&
+               vAlign == that.vAlign &&
+               Objects.equals(text, that.text) &&
+               Objects.equals(boxProvider, that.boxProvider) &&
+               Objects.equals(box, that.box);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineElement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineElement.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/LineElement.java	(revision 11452)
@@ -160,11 +160,11 @@
             return false;
         final LineElement other = (LineElement) obj;
-        return Objects.equals(line, other.line) &&
-            Objects.equals(color, other.color) &&
-            Objects.equals(dashesLine, other.dashesLine) &&
-            Objects.equals(dashesBackground, other.dashesBackground) &&
-            offset == other.offset &&
-            realWidth == other.realWidth &&
-            wayDirectionArrows == other.wayDirectionArrows;
+        return offset == other.offset &&
+               realWidth == other.realWidth &&
+               wayDirectionArrows == other.wayDirectionArrows &&
+               Objects.equals(line, other.line) &&
+               Objects.equals(color, other.color) &&
+               Objects.equals(dashesLine, other.dashesLine) &&
+               Objects.equals(dashesBackground, other.dashesBackground);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/RepeatImageElement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/RepeatImageElement.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/RepeatImageElement.java	(revision 11452)
@@ -96,9 +96,9 @@
         if (!super.equals(obj)) return false;
         RepeatImageElement that = (RepeatImageElement) obj;
-        return Float.compare(that.offset, offset) == 0 &&
-                Float.compare(that.spacing, spacing) == 0 &&
-                Float.compare(that.phase, phase) == 0 &&
-                Objects.equals(pattern, that.pattern) &&
-                align == that.align;
+        return align == that.align &&
+               Float.compare(that.offset, offset) == 0 &&
+               Float.compare(that.spacing, spacing) == 0 &&
+               Float.compare(that.phase, phase) == 0 &&
+               Objects.equals(pattern, that.pattern);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/StyleElement.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/StyleElement.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/StyleElement.java	(revision 11452)
@@ -199,8 +199,8 @@
         if (o == null || getClass() != o.getClass()) return false;
         StyleElement that = (StyleElement) o;
-        return Float.compare(that.majorZIndex, majorZIndex) == 0 &&
-                Float.compare(that.zIndex, zIndex) == 0 &&
-                Float.compare(that.objectZIndex, objectZIndex) == 0 &&
-                isModifier == that.isModifier;
+        return isModifier == that.isModifier &&
+               Float.compare(that.majorZIndex, majorZIndex) == 0 &&
+               Float.compare(that.zIndex, zIndex) == 0 &&
+               Float.compare(that.objectZIndex, objectZIndex) == 0;
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java	(revision 11452)
@@ -94,7 +94,7 @@
             }
             final UserInputTag other = (UserInputTag) obj;
-            return Objects.equals(this.key, other.key)
-                && Objects.equals(this.value, other.value)
-                && this.defaultKey == other.defaultKey;
+            return this.defaultKey == other.defaultKey
+                && Objects.equals(this.key, other.key)
+                && Objects.equals(this.value, other.value);
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Check.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Check.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Check.java	(revision 11452)
@@ -92,5 +92,5 @@
     public void addCommands(List<Tag> changedTags) {
         // if the user hasn't changed anything, don't create a command.
-        if (check.getState() == initialState && def == null) return;
+        if (def == null && check.getState() == initialState) return;
 
         // otherwise change things according to the selected value.
Index: trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Combo.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Combo.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Combo.java	(revision 11452)
@@ -85,5 +85,5 @@
             // all items were unset (and so is default)
             originalValue = lhm.get("");
-            if ("force".equals(use_last_as_default) && LAST_VALUES.containsKey(key) && !presetInitiallyMatches) {
+            if (!presetInitiallyMatches && "force".equals(use_last_as_default) && LAST_VALUES.containsKey(key)) {
                 combobox.setSelectedItem(lhm.get(LAST_VALUES.get(key)));
             } else {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/ComboMultiSelect.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/ComboMultiSelect.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/ComboMultiSelect.java	(revision 11452)
@@ -492,5 +492,5 @@
         }
 
-        if (Main.pref.getBoolean("taggingpreset.sortvalues", true) && values_sort) {
+        if (values_sort && Main.pref.getBoolean("taggingpreset.sortvalues", true)) {
             Collections.sort(entries);
         }
Index: trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java	(revision 11452)
@@ -88,5 +88,5 @@
             } else if (!usage.hadKeys() || PROP_FILL_DEFAULT.get() || "force".equals(use_last_as_default)) {
                 // selected osm primitives are untagged or filling default values feature is enabled
-                if (!"false".equals(use_last_as_default) && LAST_VALUES.containsKey(key) && !presetInitiallyMatches) {
+                if (!presetInitiallyMatches && !"false".equals(use_last_as_default) && LAST_VALUES.containsKey(key)) {
                     textField.setText(LAST_VALUES.get(key));
                 } else {
Index: trunk/src/org/openstreetmap/josm/gui/widgets/JMultilineLabel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/JMultilineLabel.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/JMultilineLabel.java	(revision 11452)
@@ -66,13 +66,11 @@
 
     /**
-     * Tries to determine a suitable height for the given contents and return
-     * that dimension.
+     * Tries to determine a suitable height for the given contents and return that dimension.
      */
     @Override
     public Dimension getPreferredSize() {
-        // Without this check it will result in an infinite loop calling
-        // getPreferredSize. Remember the old bounds and only recalculate if
-        // the size actually changed.
-        if (this.getBounds().equals(oldbounds) && oldPreferred != null) {
+        // Without this check it will result in an infinite loop calling getPreferredSize.
+        // Remember the old bounds and only recalculate if the size actually changed.
+        if (oldPreferred != null && this.getBounds().equals(oldbounds)) {
             return oldPreferred;
         }
Index: trunk/src/org/openstreetmap/josm/io/NameFinder.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/NameFinder.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/io/NameFinder.java	(revision 11452)
@@ -197,5 +197,5 @@
                 if ("searchresults".equals(qName)) {
                     // do nothing
-                } else if ("named".equals(qName) && (depth == 2)) {
+                } else if (depth == 2 && "named".equals(qName)) {
                     currentResult = new SearchResult();
                     currentResult.name = atts.getValue("name");
@@ -208,7 +208,7 @@
                     currentResult.zoom = Integer.parseInt(atts.getValue("zoom"));
                     data.add(currentResult);
-                } else if ("description".equals(qName) && (depth == 3)) {
+                } else if (depth == 3 && "description".equals(qName)) {
                     description = new StringBuilder();
-                } else if ("named".equals(qName) && (depth == 4)) {
+                } else if (depth == 4 && "named".equals(qName)) {
                     // this is a "named" place in the nearest places list.
                     String info = atts.getValue("info");
@@ -252,5 +252,5 @@
         @Override
         public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
-            if ("description".equals(qName) && description != null) {
+            if (description != null && "description".equals(qName)) {
                 currentResult.description = description.toString();
                 description = null;
Index: trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 11452)
@@ -291,5 +291,5 @@
                 break;
             case MIRROR:
-                if ("mirror".equals(qName) && mirrorEntry != null) {
+                if (mirrorEntry != null && "mirror".equals(qName)) {
                     entry.addMirror(mirrorEntry);
                     mirrorEntry = null;
Index: trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java	(revision 11451)
+++ trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java	(revision 11452)
@@ -251,5 +251,5 @@
     protected void buttonAction(int buttonIndex, ActionEvent evt) {
         // if layer all layers were closed, ignore all actions
-        if (Main.getLayerManager().getEditDataSet() != null && buttonIndex != 2) {
+        if (buttonIndex != 2 && Main.getLayerManager().getEditDataSet() != null) {
             TableModel tm = propertyTable.getModel();
             for (int i = 0; i < tm.getRowCount(); i++) {
