Index: trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java	(revision 9966)
+++ trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java	(revision 9968)
@@ -198,5 +198,5 @@
         Arrays.sort(angles, new PolarNodeComparator());
         int[] count = distributeNodes(angles,
-                numberOfNodesInCircle >= nodes.size() ? numberOfNodesInCircle - nodes.size() : 0);
+                numberOfNodesInCircle >= nodes.size() ? (numberOfNodesInCircle - nodes.size()) : 0);
 
         // now we can start doing things to OSM data
Index: trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 9966)
+++ trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java	(revision 9968)
@@ -319,5 +319,5 @@
             defaultExtension,
             description + (!extensionsForDescription.isEmpty()
-                ? " (" + Utils.join(", ", extensionsForDescription) + ")"
+                ? (" (" + Utils.join(", ", extensionsForDescription) + ")")
                 : "")
             );
Index: trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java	(revision 9966)
+++ trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java	(revision 9968)
@@ -76,7 +76,7 @@
         protected boolean isHeterogeneousSource() {
             int count = 0;
-            count = !getSourcePrimitivesByType(OsmPrimitiveType.NODE).isEmpty() ? count + 1 : count;
-            count = !getSourcePrimitivesByType(OsmPrimitiveType.WAY).isEmpty() ? count + 1 : count;
-            count = !getSourcePrimitivesByType(OsmPrimitiveType.RELATION).isEmpty() ? count + 1 : count;
+            count = !getSourcePrimitivesByType(OsmPrimitiveType.NODE).isEmpty() ? (count + 1) : count;
+            count = !getSourcePrimitivesByType(OsmPrimitiveType.WAY).isEmpty() ? (count + 1) : count;
+            count = !getSourcePrimitivesByType(OsmPrimitiveType.RELATION).isEmpty() ? (count + 1) : count;
             return count > 1;
         }
Index: trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 9966)
+++ trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 9968)
@@ -614,11 +614,5 @@
                         String role = rm.getRole();
                         if ("from".equals(role) || "to".equals(role)) {
-                            OsmPrimitive via = null;
-                            for (RelationMember rmv : r.getMembers()) {
-                                if ("restriction".equals(type) && "via".equals(rmv.getRole())
-                                        || "destination_sign".equals(type) && rmv.hasRole("sign", "intersection")) {
-                                    via = rmv.getMember();
-                                }
-                            }
+                            OsmPrimitive via = findVia(r, type);
                             List<Node> nodes = new ArrayList<>();
                             if (via != null) {
@@ -751,4 +745,14 @@
     }
 
+    static OsmPrimitive findVia(Relation r, String type) {
+        for (RelationMember rmv : r.getMembers()) {
+            if (("restriction".equals(type) && "via".equals(rmv.getRole()))
+             || ("destination_sign".equals(type) && rmv.hasRole("sign", "intersection"))) {
+                return rmv.getMember();
+            }
+        }
+        return null;
+    }
+
     /**
      * Splits the way {@code way} at the nodes in {@code atNodes} and replies
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 9966)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 9968)
@@ -535,5 +535,5 @@
                 // existing way or make a new way of its own? The "alt" modifier means that the
                 // user wants a new way.
-                Way way = alt ? null : (selectedWay != null) ? selectedWay : getWayForNode(n0);
+                Way way = alt ? null : (selectedWay != null ? selectedWay : getWayForNode(n0));
                 Way wayToSelect;
 
@@ -1565,5 +1565,5 @@
                     e0 = p0.east();
                     n0 = p0.north();
-                    buildLabelText((nearestAngle <= 180) ? nearestAngle : nearestAngle-360);
+                    buildLabelText((nearestAngle <= 180) ? nearestAngle : (nearestAngle-360));
 
                     phi = (nearestAngle + activeBaseHeading) * Math.PI / 180;
