Index: trunk/src/org/openstreetmap/josm/actions/mapmode/SplitMode.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/SplitMode.java	(revision 18760)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/SplitMode.java	(revision 18761)
@@ -109,6 +109,4 @@
     }
 
-
-
     @Override
     public void mousePressed(MouseEvent e) {
@@ -229,6 +227,4 @@
     }
 
-
-
     @Override
     public String getModeHelpText() {
@@ -442,6 +438,4 @@
     }
 
-
-
     /**
      * Split a specified {@link Way} at the given nodes
@@ -464,5 +458,5 @@
          * @param selection (Optional, can be null) Selection which should be updated
          */
-        public SplitWayActionConcrete(Way splitWay, List<Node> splitNodes, List<OsmPrimitive> selection) {
+        SplitWayActionConcrete(Way splitWay, List<Node> splitNodes, List<OsmPrimitive> selection) {
             super(tr("Split way {0}", DefaultNameFormatter.getInstance().format(splitWay)),
                     ImageProvider.get(splitWay.getType()));
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerAsserts.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerAsserts.java	(revision 18760)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerAsserts.java	(revision 18761)
@@ -67,7 +67,8 @@
             final boolean isError = pErrors.stream().anyMatch(e -> e.getTester() instanceof MapCSSTagChecker.MapCSSTagCheckerAndRule
                     && ((MapCSSTagChecker.MapCSSTagCheckerAndRule) e.getTester()).rule.equals(check.rule));
-            if (isError != i.getValue()) {
+            final boolean iValue = Boolean.TRUE.equals(i.getValue());
+            if (isError != iValue) {
                 assertionConsumer.accept(MessageFormat.format("Expecting test ''{0}'' (i.e., {1}) to {2} {3} (i.e., {4})",
-                        check.getMessage(p), check.rule.selectors, i.getValue() ? "match" : "not match", i.getKey(), p.getKeys()));
+                        check.getMessage(null, p), check.rule.selectors, iValue ? "match" : "not match", i.getKey(), p.getKeys()));
             }
             if (isError) {
@@ -76,5 +77,5 @@
                 if (fix != null && fix.executeCommand() && !MapCSSTagChecker.getErrorsForPrimitive(p, true, checksToRun).isEmpty()) {
                     assertionConsumer.accept(MessageFormat.format("Autofix does not work for test ''{0}'' (i.e., {1}). Failing test: {2}",
-                            check.getMessage(p), check.rule.selectors, i.getKey()));
+                            check.getMessage(null, p), check.rule.selectors, i.getKey()));
                 }
             }
@@ -84,4 +85,7 @@
     }
 
+    /**
+     * Clear previous checks (remove from memory)
+     */
     public static void clear() {
         previousChecks.clear();
@@ -106,5 +110,5 @@
         return check.rule.selectors.stream()
                 .filter(s -> s instanceof Selector.GeneralSelector)
-                .flatMap(s -> ((Selector.GeneralSelector) s).getConditions().stream())
+                .flatMap(s -> s.getConditions().stream())
                 .filter(c -> c instanceof ConditionFactory.ExpressionCondition)
                 .map(c -> ((ConditionFactory.ExpressionCondition) c).getExpression())
@@ -112,7 +116,7 @@
                 .map(c -> (ExpressionFactory.IsInsideFunction) c)
                 .map(ExpressionFactory.IsInsideFunction::getArg)
-                .filter(e -> e instanceof LiteralExpression)
+                .filter(LiteralExpression.class::isInstance)
                 .map(e -> ((LiteralExpression) e).getLiteral())
-                .filter(l -> l instanceof String)
+                .filter(String.class::isInstance)
                 .map(l -> ((String) l).split(",", -1)[0])
                 .findFirst();
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerRule.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerRule.java	(revision 18760)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerRule.java	(revision 18761)
@@ -267,8 +267,9 @@
      * Constructs a (localized) message for this deprecation check.
      *
+     * @param selector The selector to use
      * @param p OSM primitive
      * @return a message
      */
-    String getMessage(OsmPrimitive p) {
+    String getMessage(Selector selector, OsmPrimitive p) {
         if (errors.isEmpty()) {
             // Return something to avoid NPEs
@@ -276,7 +277,8 @@
         } else {
             final Object val = errors.keySet().iterator().next().val;
+            selector = selector == null ? whichSelectorMatchesPrimitive(p) : selector;
             return String.valueOf(
                     val instanceof Expression
-                            ? ((Expression) val).evaluate(new Environment(p).withSelector(p == null ? null : whichSelectorMatchesPrimitive(p)))
+                            ? ((Expression) val).evaluate(new Environment(p).withSelector(selector))
                             : val
             );
@@ -287,14 +289,15 @@
      * Constructs a (localized) description for this deprecation check.
      *
+     * @param selector The selector to use
      * @param p OSM primitive
      * @return a description (possibly with alternative suggestions)
      * @see #getDescriptionForMatchingSelector
      */
-    String getDescription(OsmPrimitive p) {
+    String getDescription(Selector selector, OsmPrimitive p) {
         if (alternatives.isEmpty()) {
-            return getMessage(p);
+            return getMessage(selector, p);
         } else {
             /* I18N: {0} is the test error message and {1} is an alternative */
-            return tr("{0}, use {1} instead", getMessage(p), String.join(tr(" or "), alternatives));
+            return tr("{0}, use {1} instead", getMessage(selector, p), String.join(tr(" or "), alternatives));
         }
     }
@@ -309,5 +312,5 @@
      */
     String getDescriptionForMatchingSelector(OsmPrimitive p, Selector matchingSelector) {
-        return insertArguments(matchingSelector, getDescription(p), p);
+        return insertArguments(matchingSelector, getDescription(matchingSelector, p), p);
     }
 
@@ -318,5 +321,5 @@
     @Override
     public String toString() {
-        return getDescription(null);
+        return getDescription(null, null);
     }
 
