Index: trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/Addresses.java	(revision 6240)
@@ -54,6 +54,6 @@
             this(code, collection, message, null, null);
         }
-        public AddressError(int code, Collection<OsmPrimitive> collection, String message, String description, String description_en) {
-            super(Addresses.this, Severity.WARNING, message, description, description_en, code, collection);
+        public AddressError(int code, Collection<OsmPrimitive> collection, String message, String description, String englishDescription) {
+            super(Addresses.this, Severity.WARNING, message, description, englishDescription, code, collection);
         }
     }
@@ -146,10 +146,10 @@
             }
             // Report duplicate house numbers
-            String description_en = marktr("House number ''{0}'' duplicated");
+            String englishDescription = marktr("House number ''{0}'' duplicated");
             for (String key : map.keySet()) {
                 List<OsmPrimitive> list = map.get(key);
                 if (list.size() > 1) {
                     errors.add(new AddressError(DUPLICATE_HOUSE_NUMBER, list,
-                            tr("Duplicate house numbers"), tr(description_en, key), description_en));
+                            tr("Duplicate house numbers"), tr(englishDescription, key), englishDescription));
                 }
             }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/BuildingInBuilding.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/BuildingInBuilding.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/BuildingInBuilding.java	(revision 6240)
@@ -25,10 +25,17 @@
 import org.openstreetmap.josm.tools.Predicate;
 
+/**
+ * Checks for building areas inside of buildings
+ * @since 4409
+ */
 public class BuildingInBuilding extends Test {
 
     protected static final int BUILDING_INSIDE_BUILDING = 2001;
-    protected List<OsmPrimitive> primitivesToCheck = new LinkedList<OsmPrimitive>();
-    protected QuadBuckets<Way> index = new QuadBuckets<Way>();
+    private final List<OsmPrimitive> primitivesToCheck = new LinkedList<OsmPrimitive>();
+    private final QuadBuckets<Way> index = new QuadBuckets<Way>();
 
+    /**
+     * Constructs a new {@code BuildingInBuilding} test.
+     */
     public BuildingInBuilding() {
         super(tr("Building inside building"), tr("Checks for building areas inside of buildings."));
@@ -67,6 +74,6 @@
 
     protected class MultiPolygonMembers {
-        public final Set<Way> outers = new HashSet<Way>();
-        public final Set<Way> inners = new HashSet<Way>();
+        private final Set<Way> outers = new HashSet<Way>();
+        private final Set<Way> inners = new HashSet<Way>();
         public MultiPolygonMembers(Relation multiPolygon) {
             for (RelationMember m : multiPolygon.getMembers()) {
@@ -144,8 +151,6 @@
                         // Else, test if w is inside one of the multipolygons
                         for (OsmPrimitive bmp : buildingMultiPolygons) {
-                            if (bmp instanceof Relation) {
-                                if (isWayInsideMultiPolygon(w, (Relation) bmp)) {
-                                    return true;
-                                }
+                            if (bmp instanceof Relation && isWayInsideMultiPolygon(w, (Relation) bmp)) {
+                                return true;
                             }
                         }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java	(revision 6240)
@@ -12,4 +12,5 @@
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.openstreetmap.josm.data.osm.Node;
@@ -32,9 +33,9 @@
 
     /** All way segments, grouped by cells */
-    Map<Point2D,List<ExtendedSegment>> cellSegments;
+    private Map<Point2D,List<ExtendedSegment>> cellSegments;
     /** The already detected errors */
-    HashSet<WaySegment> errorSegments;
+    private Set<WaySegment> errorSegments;
     /** The already detected ways in error */
-    Map<List<Way>, List<WaySegment>> ways_seen;
+    private Map<List<Way>, List<WaySegment>> seenWays;
 
     /**
@@ -51,5 +52,5 @@
         cellSegments = new HashMap<Point2D,List<ExtendedSegment>>(1000);
         errorSegments = new HashSet<WaySegment>();
-        ways_seen = new HashMap<List<Way>, List<WaySegment>>(50);
+        seenWays = new HashMap<List<Way>, List<WaySegment>>(50);
     }
 
@@ -59,5 +60,5 @@
         cellSegments = null;
         errorSegments = null;
-        ways_seen = null;
+        seenWays = null;
     }
 
@@ -90,6 +91,5 @@
             WaySegment ws = new WaySegment(w, i);
             ExtendedSegment es1 = new ExtendedSegment(ws, layer1, railway1, isCoastline1, waterway1);
-            List<List<ExtendedSegment>> cellSegments = getSegments(es1.n1, es1.n2);
-            for (List<ExtendedSegment> segments : cellSegments) {
+            for (List<ExtendedSegment> segments : getSegments(es1.n1, es1.n2)) {
                 for (ExtendedSegment es2 : segments) {
                     List<Way> prims;
@@ -130,5 +130,5 @@
 
                     prims = Arrays.asList(es1.ws.way, es2.ws.way);
-                    if ((highlight = ways_seen.get(prims)) == null) {
+                    if ((highlight = seenWays.get(prims)) == null) {
                         highlight = new ArrayList<WaySegment>();
                         highlight.add(es1.ws);
@@ -152,5 +152,5 @@
                                 prims,
                                 highlight));
-                        ways_seen.put(prims, highlight);
+                        seenWays.put(prims, highlight);
                     } else {
                         highlight.add(es1.ws);
@@ -187,22 +187,21 @@
     /**
      * A way segment with some additional information
-     * @author frsantos
      */
     public static class ExtendedSegment {
-        public Node n1, n2;
-
-        public WaySegment ws;
+        private Node n1, n2;
+
+        private WaySegment ws;
 
         /** The layer */
-        public String layer;
+        private String layer;
 
         /** The railway type */
-        public String railway;
+        private String railway;
 
         /** The waterway type */
-        public String waterway;
+        private String waterway;
 
         /** The coastline type */
-        public boolean coastline;
+        private boolean coastline;
 
         /**
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DeprecatedTags.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DeprecatedTags.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DeprecatedTags.java	(revision 6240)
@@ -155,8 +155,8 @@
     private static class DeprecationCheck {
 
-        int code;
-        List<Tag> test = new LinkedList<Tag>();
-        List<Tag> change = new LinkedList<Tag>();
-        List<Tag> alternatives = new LinkedList<Tag>();
+        private int code;
+        private final List<Tag> test = new LinkedList<Tag>();
+        private final List<Tag> change = new LinkedList<Tag>();
+        private final List<Tag> alternatives = new LinkedList<Tag>();
 
         public DeprecationCheck(int code) {
@@ -230,8 +230,8 @@
     private class DeprecationError extends TestError {
 
-        OsmPrimitive p;
-        DeprecationCheck check;
-
-        DeprecationError(OsmPrimitive p, DeprecationCheck check) {
+        private OsmPrimitive p;
+        private DeprecationCheck check;
+
+        public DeprecationError(OsmPrimitive p, DeprecationCheck check) {
             super(DeprecatedTags.this, Severity.WARNING, check.getDescription(), check.code, p);
             this.p = p;
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 6240)
@@ -43,5 +43,5 @@
     private static class NodeHash implements Hash<Object, Object> {
 
-        double precision = Main.pref.getDouble("validator.duplicatenodes.precision", 0.);
+        private double precision = Main.pref.getDouble("validator.duplicatenodes.precision", 0.);
 
         private LatLon roundCoord(LatLon coor) {
@@ -104,5 +104,5 @@
      * <pos, NodesByEqualTagsMap>
      */
-    Storage<Object> potentialDuplicates;
+    private Storage<Object> potentialDuplicates;
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java	(revision 6240)
@@ -51,9 +51,9 @@
 
         /** ID of the relation member in case it is a {@link Relation} */
-        private long rel_id;
+        private long relId;
 
         @Override
         public int hashCode() {
-            return role.hashCode()+(int)rel_id+tags.hashCode()+type.hashCode()+coor.hashCode();
+            return role.hashCode()+(int)relId+tags.hashCode()+type.hashCode()+coor.hashCode();
         }
 
@@ -62,5 +62,5 @@
             if (!(obj instanceof RelMember)) return false;
             RelMember rm = (RelMember) obj;
-            return rm.role.equals(role) && rm.type.equals(type) && rm.rel_id==rel_id && rm.tags.equals(tags) && rm.coor.equals(coor);
+            return rm.role.equals(role) && rm.type.equals(type) && rm.relId==relId && rm.tags.equals(tags) && rm.coor.equals(coor);
         }
 
@@ -71,5 +71,5 @@
             role = src.getRole();
             type = src.getType();
-            rel_id = 0;
+            relId = 0;
             coor = new ArrayList<LatLon>();
 
@@ -92,5 +92,5 @@
                 Relation r = src.getRelation();
                 tags = r.getKeys();
-                rel_id = r.getId();
+                relId = r.getId();
                 coor = new ArrayList<LatLon>();
             }
@@ -103,5 +103,5 @@
     private class RelationMembers {
         /** List of member objects of the relation */
-        public List<RelMember> members;
+        private List<RelMember> members;
 
         /** Store relation information
@@ -133,7 +133,7 @@
     private class RelationPair {
         /** Member objects of the relation */
-        public RelationMembers members;
+        private RelationMembers members;
         /** Tags of the relation */
-        public Map<String, String> keys;
+        private Map<String, String> keys;
 
         /** Store relation information
@@ -166,11 +166,11 @@
 
     /** MultiMap of all relations */
-    MultiMap<RelationPair, OsmPrimitive> relations;
+    private MultiMap<RelationPair, OsmPrimitive> relations;
 
     /** MultiMap of all relations, regardless of keys */
-    MultiMap<List<RelationMember>, OsmPrimitive> relations_nokeys;
+    private MultiMap<List<RelationMember>, OsmPrimitive> relations_nokeys;
 
     /** List of keys without useful information */
-    Collection<String> ignoreKeys = new HashSet<String>(OsmPrimitive.getUninterestingKeys());
+    private Collection<String> ignoreKeys = new HashSet<String>(OsmPrimitive.getUninterestingKeys());
 
     /**
@@ -229,24 +229,22 @@
         if (testError.getCode() == SAME_RELATION) return null;
         Collection<? extends OsmPrimitive> sel = testError.getPrimitives();
-        HashSet<Relation> rel_fix = new HashSet<Relation>();
+        HashSet<Relation> relFix = new HashSet<Relation>();
 
         for (OsmPrimitive osm : sel)
             if (osm instanceof Relation && !osm.isDeleted()) {
-                rel_fix.add((Relation)osm);
-            }
-
-        if( rel_fix.size() < 2 )
+                relFix.add((Relation)osm);
+            }
+
+        if (relFix.size() < 2)
             return null;
 
         long idToKeep = 0;
-        Relation relationToKeep = rel_fix.iterator().next();
+        Relation relationToKeep = relFix.iterator().next();
         // Only one relation will be kept - the one with lowest positive ID, if such exist
         // or one "at random" if no such exists. Rest of the relations will be deleted
-        for (Relation w: rel_fix) {
-            if (!w.isNew()) {
-                if (idToKeep == 0 || w.getId() < idToKeep) {
-                    idToKeep = w.getId();
-                    relationToKeep = w;
-                }
+        for (Relation w: relFix) {
+            if (!w.isNew() && (idToKeep == 0 || w.getId() < idToKeep)) {
+                idToKeep = w.getId();
+                relationToKeep = w;
             }
         }
@@ -254,6 +252,6 @@
         // Find the relation that is member of one or more relations. (If any)
         Relation relationWithRelations = null;
-        List<Relation> rel_ref = null;
-        for (Relation w : rel_fix) {
+        List<Relation> relRef = null;
+        for (Relation w : relFix) {
             List<Relation> rel = OsmPrimitive.getFilteredList(w.getReferrers(), Relation.class);
             if (!rel.isEmpty()) {
@@ -261,5 +259,5 @@
                     throw new AssertionError("Cannot fix duplicate relations: More than one relation is member of another relation.");
                 relationWithRelations = w;
-                rel_ref = rel;
+                relRef = rel;
             }
         }
@@ -269,5 +267,5 @@
         // Fix relations.
         if (relationWithRelations != null && relationToKeep != relationWithRelations) {
-            for (Relation rel : rel_ref) {
+            for (Relation rel : relRef) {
                 Relation newRel = new Relation(rel);
                 for (int i = 0; i < newRel.getMembers().size(); ++i) {
@@ -282,6 +280,6 @@
 
         //Delete all relations in the list
-        rel_fix.remove(relationToKeep);
-        commands.add(new DeleteCommand(rel_fix));
+        relFix.remove(relationToKeep);
+        commands.add(new DeleteCommand(relFix));
         return new SequenceCommand(tr("Delete duplicate relations"), commands);
     }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java	(revision 6240)
@@ -32,6 +32,5 @@
  * Tests if there are duplicate ways
  */
-public class DuplicateWay extends Test
-{
+public class DuplicateWay extends Test {
 
     /**
@@ -40,9 +39,10 @@
       */
     private static class WayPair {
-        public List<LatLon> coor;
-        public Map<String, String> keys;
-        public WayPair(List<LatLon> _coor, Map<String, String> _keys) {
-            coor=_coor;
-            keys=_keys;
+        private final List<LatLon> coor;
+        private final Map<String, String> keys;
+        
+        public WayPair(List<LatLon> coor, Map<String, String> keys) {
+            this.coor = coor;
+            this.keys = keys;
         }
 
@@ -66,7 +66,7 @@
       */
     private static class WayPairNoTags {
-        public List<LatLon> coor;
-        public WayPairNoTags(List<LatLon> _coor) {
-            coor=_coor;
+        private final List<LatLon> coor;
+        public WayPairNoTags(List<LatLon> coor) {
+            this.coor = coor;
         }
         @Override
@@ -242,9 +242,7 @@
         // or one "at random" if no such exists. Rest of the ways will be deleted
         for (Way w: ways) {
-            if (!w.isNew()) {
-                if (idToKeep == 0 || w.getId() < idToKeep) {
-                    idToKeep = w.getId();
-                    wayToKeep = w;
-                }
+            if (!w.isNew() && (idToKeep == 0 || w.getId() < idToKeep)) {
+                idToKeep = w.getId();
+                wayToKeep = w;
             }
         }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java	(revision 6240)
@@ -53,36 +53,34 @@
     @Override
     public void visit(Way w) {
-        if (w.isUsable()) {
-            if (w.hasKey("highway") && w.hasKey("junction") && w.get("junction").equals("roundabout")) {
-                Map<String, List<Way>> map = new HashMap<String, List<Way>>();
-                // Count all highways (per type) connected to this roundabout
-                // As roundabouts are closed ways, take care of not processing the first/last node twice
-                for (Node n : new HashSet<Node>(w.getNodes())) {
-                    for (Way h : Utils.filteredCollection(n.getReferrers(), Way.class)) {
-                        if (h != w && h.hasKey("highway")) {
-                            List<Way> list = map.get(h.get("highway"));
-                            if (list == null) {
-                                map.put(h.get("highway"), list = new ArrayList<Way>());
-                            }
-                            list.add(h);
+        if (w.isUsable() && w.hasKey("highway") && w.hasKey("junction") && w.get("junction").equals("roundabout")) {
+            Map<String, List<Way>> map = new HashMap<String, List<Way>>();
+            // Count all highways (per type) connected to this roundabout
+            // As roundabouts are closed ways, take care of not processing the first/last node twice
+            for (Node n : new HashSet<Node>(w.getNodes())) {
+                for (Way h : Utils.filteredCollection(n.getReferrers(), Way.class)) {
+                    if (h != w && h.hasKey("highway")) {
+                        List<Way> list = map.get(h.get("highway"));
+                        if (list == null) {
+                            map.put(h.get("highway"), list = new ArrayList<Way>());
                         }
+                        list.add(h);
                     }
                 }
-                // The roundabout should carry the highway tag of its two biggest highways
-                for (String s : CLASSIFIED_HIGHWAYS) {
-                    List<Way> list = map.get(s);
-                    if (list != null && list.size() >= 2) {
-                        // Except when a single road is connected, but with two oneway segments
-                        Boolean oneway1 = OsmUtils.getOsmBoolean(list.get(0).get("oneway"));
-                        Boolean oneway2 = OsmUtils.getOsmBoolean(list.get(1).get("oneway"));
-                        if (list.size() > 2 || oneway1 == null || oneway2 == null || !oneway1 || !oneway2) {
-                            // Error when the highway tags do not match
-                            if (!w.get("highway").equals(s)) {
-                                errors.add(new TestError(this, Severity.WARNING, 
-                                        tr("Incorrect roundabout (highway: {0} instead of {1})", w.get("highway"), s), 
-                                        WRONG_ROUNDABOUT_HIGHWAY, w));
-                            }
-                            break;
+            }
+            // The roundabout should carry the highway tag of its two biggest highways
+            for (String s : CLASSIFIED_HIGHWAYS) {
+                List<Way> list = map.get(s);
+                if (list != null && list.size() >= 2) {
+                    // Except when a single road is connected, but with two oneway segments
+                    Boolean oneway1 = OsmUtils.getOsmBoolean(list.get(0).get("oneway"));
+                    Boolean oneway2 = OsmUtils.getOsmBoolean(list.get(1).get("oneway"));
+                    if (list.size() > 2 || oneway1 == null || oneway2 == null || !oneway1 || !oneway2) {
+                        // Error when the highway tags do not match
+                        if (!w.get("highway").equals(s)) {
+                            errors.add(new TestError(this, Severity.WARNING, 
+                                    tr("Incorrect roundabout (highway: {0} instead of {1})", w.get("highway"), s), 
+                                    WRONG_ROUNDABOUT_HIGHWAY, w));
                         }
+                        break;
                     }
                 }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 6240)
@@ -29,4 +29,8 @@
 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
 
+/**
+ * Checks if multipolygons are valid
+ * @since 3669
+ */
 public class MultipolygonTest extends Test {
 
@@ -47,6 +51,7 @@
     private final List<List<Node>> nonClosedWays = new ArrayList<List<Node>>();
 
-    private final double SCALE = 1.0; // arbitrary scale - we could test every possible scale, but this should suffice
-
+    /**
+     * Constructs a new {@code MultipolygonTest}.
+     */
     public MultipolygonTest() {
         super(tr("Multipolygon"),
@@ -55,5 +60,5 @@
 
     @Override
-    public void initialize() throws Exception {
+    public void initialize() {
         styles = MapPaintStyles.getStyles();
     }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/NameMismatch.java	(revision 6240)
@@ -33,4 +33,7 @@
     protected static final int NAME_TRANSLATION_MISSING = 1502;
 
+    /**
+     * Constructs a new {@code NameMismatch} test.
+     */
     public NameMismatch() {
         super(tr("Missing name:* translation"),
@@ -59,7 +62,7 @@
         for (Entry<String, String> entry : p.getKeys().entrySet()) {
             if (entry.getKey().startsWith("name:")) {
-                String name_s = entry.getValue();
-                if (name_s != null) {
-                    names.add(name_s);
+                String n = entry.getValue();
+                if (n != null) {
+                    names.add(n);
                 }
             }
@@ -74,6 +77,6 @@
                     tr("A name is missing, even though name:* exists."),
                     NAME_MISSING, p));
-        return;
-    }
+            return;
+        }
 
         if (names.contains(name)) return;
@@ -82,6 +85,6 @@
         Check if this is the case. */
 
-        String[] split_names = name.split(" - ");
-        if (split_names.length == 1) {
+        String[] splitNames = name.split(" - ");
+        if (splitNames.length == 1) {
             /* The name is not composed of multiple parts. Complain. */
             missingTranslation(p);
@@ -90,5 +93,5 @@
 
         /* Check that each part corresponds to a translated name:*. */
-        for (String n : split_names) {
+        for (String n : splitNames) {
             if (!names.contains(n)) {
                 missingTranslation(p);
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java	(revision 6240)
@@ -31,5 +31,5 @@
 
     /** Bag of all way segments */
-    MultiMap<Pair<Node,Node>, WaySegment> nodePairs;
+    private MultiMap<Pair<Node,Node>, WaySegment> nodePairs;
 
     protected static final int OVERLAPPING_HIGHWAY = 101;
@@ -56,5 +56,5 @@
     @Override
     public void endTest() {
-        Map<List<Way>, Set<WaySegment>> ways_seen = new HashMap<List<Way>, Set<WaySegment>>(500);
+        Map<List<Way>, Set<WaySegment>> seenWays = new HashMap<List<Way>, Set<WaySegment>>(500);
 
         for (Set<WaySegment> duplicated : nodePairs.values()) {
@@ -63,5 +63,5 @@
             if (ways > 1) {
                 List<OsmPrimitive> prims = new ArrayList<OsmPrimitive>();
-                List<Way> current_ways = new ArrayList<Way>();
+                List<Way> currentWays = new ArrayList<Way>();
                 Collection<WaySegment> highlight;
                 int highway = 0;
@@ -89,5 +89,5 @@
 
                     prims.add(ws.way);
-                    current_ways.add(ws.way);
+                    currentWays.add(ws.way);
                 }
                 /* These ways not seen before
@@ -95,5 +95,5 @@
                  * highways or railways mark a separate error
                  */
-                if ((highlight = ways_seen.get(current_ways)) == null) {
+                if ((highlight = seenWays.get(currentWays)) == null) {
                     String errortype;
                     int type;
@@ -128,5 +128,5 @@
                             type < OVERLAPPING_HIGHWAY_AREA ? Severity.WARNING : Severity.OTHER,
                                     errortype, type, prims, duplicated));
-                    ways_seen.put(current_ways, duplicated);
+                    seenWays.put(currentWays, duplicated);
                 } else { /* way seen, mark highlight layer only */
                     for (WaySegment ws : duplicated) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java	(revision 6240)
@@ -39,10 +39,13 @@
     public static final Collection<String> POWER_ALLOWED_TAGS = Arrays.asList("switch", "transformer", "busbar", "generator");
     
-    protected final Map<Way, String> towerPoleTagMap = new HashMap<Way, String>();
+    private final Map<Way, String> towerPoleTagMap = new HashMap<Way, String>();
     
-    protected final List<PowerLineError> potentialErrors = new ArrayList<PowerLineError>();
+    private final List<PowerLineError> potentialErrors = new ArrayList<PowerLineError>();
 
-    protected final List<OsmPrimitive> powerStations = new ArrayList<OsmPrimitive>();
+    private final List<OsmPrimitive> powerStations = new ArrayList<OsmPrimitive>();
 
+    /**
+     * Constructs a new {@code PowerLines} test.
+     */
     public PowerLines() {
         super(tr("Power lines"), tr("Checks for nodes in power lines that do not have a power=tower/pole tag."));
@@ -182,5 +185,5 @@
     
     protected class PowerLineError extends TestError {
-        public final Way line;
+        private final Way line;
         public PowerLineError(Node n, Way line) {
             super(PowerLines.this, Severity.WARNING, 
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java	(revision 6240)
@@ -59,5 +59,5 @@
     }
 
-    static Collection<TaggingPreset> relationpresets = new LinkedList<TaggingPreset>();
+    private static Collection<TaggingPreset> relationpresets = new LinkedList<TaggingPreset>();
 
     /**
@@ -79,11 +79,11 @@
     }
 
-    public static class RoleInfo {
-        int total = 0;
-        Collection<Node> nodes = new LinkedList<Node>();
-        Collection<Way> ways = new LinkedList<Way>();
-        Collection<Way> closedways = new LinkedList<Way>();
-        Collection<Way> openways = new LinkedList<Way>();
-        Collection<Relation> relations = new LinkedList<Relation>();
+    private static class RoleInfo {
+        private int total = 0;
+        private Collection<Node> nodes = new LinkedList<Node>();
+        private Collection<Way> ways = new LinkedList<Way>();
+        private Collection<Way> closedways = new LinkedList<Way>();
+        private Collection<Way> openways = new LinkedList<Way>();
+        private Collection<Relation> relations = new LinkedList<Relation>();
     }
 
@@ -145,4 +145,5 @@
             } else {
                 LinkedList<String> done = new LinkedList<String>();
+                String errorMessage = tr("Role verification problem");
                 for (Role r : allroles) {
                     done.add(r.key);
@@ -157,14 +158,14 @@
                         if (count == 0) {
                             String s = marktr("Role {0} missing");
-                            errors.add(new TestError(this, Severity.WARNING, tr("Role verification problem"),
+                            errors.add(new TestError(this, Severity.WARNING, errorMessage,
                                     tr(s, keyname), MessageFormat.format(s, keyname), ROLE_MISSING, n));
                         }
                         else if (vc > count) {
                             String s = marktr("Number of {0} roles too low ({1})");
-                            errors.add(new TestError(this, Severity.WARNING, tr("Role verification problem"),
+                            errors.add(new TestError(this, Severity.WARNING, errorMessage,
                                     tr(s, keyname, count), MessageFormat.format(s, keyname, count), LOW_COUNT, n));
                         } else {
                             String s = marktr("Number of {0} roles too high ({1})");
-                            errors.add(new TestError(this, Severity.WARNING, tr("Role verification problem"),
+                            errors.add(new TestError(this, Severity.WARNING, errorMessage,
                                     tr(s, keyname, count), MessageFormat.format(s, keyname, count), HIGH_COUNT, n));
                         }
@@ -196,5 +197,5 @@
                             LinkedList<OsmPrimitive> highlight = new LinkedList<OsmPrimitive>(wrongTypes);
                             highlight.addFirst(n);
-                            errors.add(new TestError(this, Severity.WARNING, tr("Role verification problem"),
+                            errors.add(new TestError(this, Severity.WARNING, errorMessage,
                                     tr(s, keyname), MessageFormat.format(s, keyname), WRONG_TYPE,
                                     highlight, wrongTypes));
@@ -206,9 +207,9 @@
                         if (key.length() > 0) {
                             String s = marktr("Role {0} unknown");
-                            errors.add(new TestError(this, Severity.WARNING, tr("Role verification problem"),
+                            errors.add(new TestError(this, Severity.WARNING, errorMessage,
                                     tr(s, key), MessageFormat.format(s, key), ROLE_UNKNOWN, n));
                         } else {
                             String s = marktr("Empty role found");
-                            errors.add(new TestError(this, Severity.WARNING, tr("Role verification problem"),
+                            errors.add(new TestError(this, Severity.WARNING, errorMessage,
                                     tr(s), s, ROLE_EMPTY, n));
                         }
@@ -219,7 +220,4 @@
     }
 
-    /* (non-Javadoc)
-     * @see org.openstreetmap.josm.data.validation.Test#fixError(org.openstreetmap.josm.data.validation.TestError)
-     */
     @Override
     public Command fixError(TestError testError) {
@@ -230,7 +228,4 @@
     }
 
-    /* (non-Javadoc)
-     * @see org.openstreetmap.josm.data.validation.Test#isFixable(org.openstreetmap.josm.data.validation.TestError)
-     */
     @Override
     public boolean isFixable(TestError testError) {
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java	(revision 6240)
@@ -31,7 +31,7 @@
 
     /** All ways, grouped by cells */
-    Map<Point2D,List<Way>> cellWays;
+    private Map<Point2D,List<Way>> cellWays;
     /** The already detected errors */
-    MultiMap<Way, Way> errorWays;
+    private MultiMap<Way, Way> errorWays;
 
     /**
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java	(revision 6240)
@@ -15,5 +15,4 @@
 import org.openstreetmap.josm.data.validation.Test;
 import org.openstreetmap.josm.data.validation.TestError;
-import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 
 /**
@@ -29,14 +28,4 @@
     public UnclosedWays() {
         super(tr("Unclosed Ways"), tr("This tests if ways which should be circular are closed."));
-    }
-
-    @Override
-    public void startTest(ProgressMonitor monitor) {
-        super.startTest(monitor);
-    }
-
-    @Override
-    public void endTest() {
-        super.endTest();
     }
 
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(revision 6240)
@@ -42,16 +42,14 @@
     protected static final String PREFIX = ValidatorPreference.PREFIX + "." + UnconnectedWays.class.getSimpleName();
 
-    Set<MyWaySegment> ways;
-    QuadBuckets<Node> endnodes; // nodes at end of way
-    QuadBuckets<Node> endnodes_highway; // nodes at end of way
-    QuadBuckets<Node> middlenodes; // nodes in middle of way
-    Set<Node> othernodes; // nodes appearing at least twice
-    //NodeSearchCache nodecache;
-    QuadBuckets<Node> nodecache;
-    Area ds_area;
-    DataSet ds;
-
-    double mindist;
-    double minmiddledist;
+    private Set<MyWaySegment> ways;
+    private QuadBuckets<Node> endnodes; // nodes at end of way
+    private QuadBuckets<Node> endnodes_highway; // nodes at end of way
+    private QuadBuckets<Node> middlenodes; // nodes in middle of way
+    private Set<Node> othernodes; // nodes appearing at least twice
+    private Area dsArea;
+    private DataSet ds;
+
+    private double mindist;
+    private double minmiddledist;
 
     /**
@@ -74,5 +72,5 @@
         minmiddledist = Main.pref.getDouble(PREFIX + ".way_way_distance", 0.0);
         this.ds = Main.main.getCurrentDataSet();
-        this.ds_area = ds.getDataSourceArea();
+        this.dsArea = ds.getDataSourceArea();
     }
 
@@ -81,6 +79,5 @@
         Map<Node, Way> map = new HashMap<Node, Way>();
         for (int iter = 0; iter < 1; iter++) {
-            Collection<MyWaySegment> tmp_ways = ways;
-            for (MyWaySegment s : tmp_ways) {
+            for (MyWaySegment s : ways) {
                 Collection<Node> nearbyNodes = s.nearbyNodes(mindist);
                 for (Node en : nearbyNodes) {
@@ -145,6 +142,4 @@
                 }
             }
-            //System.out.println("p3 elapsed: " + (System.currentTimeMillis()-last));
-            //last = System.currentTimeMillis();
             for (Map.Entry<Node, Way> error : map.entrySet()) {
                 errors.add(new TestError(this, Severity.OTHER,
@@ -165,6 +160,4 @@
                 }
             }
-            //System.out.println("p4 elapsed: " + (System.currentTimeMillis()-last));
-            //last = System.currentTimeMillis();
             for (Map.Entry<Node, Way> error : map.entrySet()) {
                 errors.add(new TestError(this, Severity.OTHER,
@@ -178,6 +171,4 @@
         endnodes = null;
         super.endTest();
-        //System.out.println("p99 elapsed: " + (System.currentTimeMillis()-last));
-        //last = System.currentTimeMillis();
     }
 
@@ -256,6 +247,4 @@
             // result is no good
             if (dist > nearbyNodeCacheDist) {
-                //if (nearbyNodeCacheDist != -1)
-                //    System.out.println("destroyed MyWaySegment nearby node cache:" + dist + " > " +  nearbyNodeCacheDist);
                 nearbyNodeCache = null;
             }
@@ -264,5 +253,4 @@
                 // one now being asked for...
                 if (nearbyNodeCacheDist > dist) {
-                    //System.out.println("had to trim MyWaySegment nearby node cache.");
                     // Used the cached result and trim out
                     // the nodes that are not in the smaller
@@ -293,5 +281,5 @@
 
             for (Node n : found_nodes) {
-                if (!nearby(n, dist) || !n.getCoor().isIn(ds_area)) {
+                if (!nearby(n, dist) || !n.getCoor().isIn(dsArea)) {
                     continue;
                 }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedNode.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedNode.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedNode.java	(revision 6240)
@@ -14,5 +14,4 @@
 import org.openstreetmap.josm.data.validation.Test;
 import org.openstreetmap.josm.data.validation.TestError;
-import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 
 /**
@@ -40,9 +39,4 @@
 
     @Override
-    public void startTest(ProgressMonitor monitor) {
-        super.startTest(monitor);
-    }
-
-    @Override
     public void visit(Collection<OsmPrimitive> selection) {
         for (OsmPrimitive p : selection) {
@@ -55,8 +49,9 @@
     @Override
     public void visit(Node n) {
-        if(n.isUsable() && !n.isTagged() && n.getReferrers().isEmpty()) {
+        if (n.isUsable() && !n.isTagged() && n.getReferrers().isEmpty()) {
+            String errorMessage = tr("Unconnected nodes without physical tags");
             if (!n.hasKeys()) {
                 String msg = marktr("No tags");
-                errors.add(new TestError(this, Severity.WARNING, tr("Unconnected nodes without physical tags"), tr(msg), msg, UNTAGGED_NODE_BLANK, n));
+                errors.add(new TestError(this, Severity.WARNING, errorMessage, tr(msg), msg, UNTAGGED_NODE_BLANK, n));
                 return;
             }
@@ -66,6 +61,5 @@
                     /* translation note: don't translate quoted words */
                     String msg = marktr("Has tag containing ''fixme'' or ''FIXME''");
-                    errors.add(new TestError(this, Severity.WARNING, tr("Unconnected nodes without physical tags"),
-                            tr(msg), msg, UNTAGGED_NODE_FIXME, n));
+                    errors.add(new TestError(this, Severity.WARNING, errorMessage, tr(msg), msg, UNTAGGED_NODE_FIXME, n));
                     return;
                 }
@@ -91,12 +85,10 @@
                 }
                 if (msg != null) {
-                    errors.add(new TestError(this, Severity.WARNING, tr("Unconnected nodes without physical tags"),
-                            tr(msg), msg, code, n));
+                    errors.add(new TestError(this, Severity.WARNING, errorMessage, tr(msg), msg, code, n));
                     return;
                 }
             }
             // Does not happen, but just to be sure. Maybe definition of uninteresting tags changes in future.
-            errors.add(new TestError(this, Severity.WARNING, tr("Unconnected nodes without physical tags"),
-                    tr("Other"), "Other", UNTAGGED_NODE_OTHER, n));
+            errors.add(new TestError(this, Severity.WARNING, errorMessage, tr("Other"), "Other", UNTAGGED_NODE_OTHER, n));
         }
     }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/UntaggedWay.java	(revision 6240)
@@ -79,24 +79,22 @@
         if (!tags.isEmpty()) {
             String highway = tags.get("highway");
-            if (highway != null && NAMED_WAYS.contains(highway)) {
-                if (!tags.containsKey("name") && !tags.containsKey("ref")) {
-                    boolean isRoundabout = false;
-                    boolean hasName = false;
-                    for (String key : w.keySet()) {
-                        hasName = key.startsWith("name:") || key.endsWith("_name") || key.endsWith("_ref");
-                        if (hasName) {
-                            break;
-                        }
-                        if (key.equals("junction")) {
-                            isRoundabout = w.get("junction").equals("roundabout");
-                            break;
-                        }
+            if (highway != null && NAMED_WAYS.contains(highway) && !tags.containsKey("name") && !tags.containsKey("ref")) {
+                boolean isRoundabout = false;
+                boolean hasName = false;
+                for (String key : w.keySet()) {
+                    hasName = key.startsWith("name:") || key.endsWith("_name") || key.endsWith("_ref");
+                    if (hasName) {
+                        break;
                     }
+                    if (key.equals("junction")) {
+                        isRoundabout = w.get("junction").equals("roundabout");
+                        break;
+                    }
+                }
 
-                    if (!hasName && !isRoundabout) {
-                        errors.add(new TestError(this, Severity.WARNING, tr("Unnamed ways"), UNNAMED_WAY, w));
-                    } else if (isRoundabout) {
-                        errors.add(new TestError(this, Severity.WARNING, tr("Unnamed junction"), UNNAMED_JUNCTION, w));
-                    }
+                if (!hasName && !isRoundabout) {
+                    errors.add(new TestError(this, Severity.WARNING, tr("Unnamed ways"), UNNAMED_WAY, w));
+                } else if (isRoundabout) {
+                    errors.add(new TestError(this, Severity.WARNING, tr("Unnamed junction"), UNNAMED_JUNCTION, w));
                 }
             }
@@ -127,5 +125,5 @@
                     if (r.isMultipolygon() || WHITELIST.contains(m.getRole())) {
                         OsmPrimitive member = m.getMember();
-                        if (member != null && member instanceof Way && member.isUsable() && !member.isTagged()) {
+                        if (member instanceof Way && member.isUsable() && !member.isTagged()) {
                             waysUsedInRelations.add((Way)member);
                         }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/WronglyOrderedWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/WronglyOrderedWays.java	(revision 6239)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/WronglyOrderedWays.java	(revision 6240)
@@ -20,5 +20,4 @@
 
     protected static final int WRONGLY_ORDERED_COAST = 1001;
-    //protected static int WRONGLY_ORDERED_WATER = 1002;
     protected static final int WRONGLY_ORDERED_LAND  = 1003;
 
@@ -42,6 +41,4 @@
         else if ("coastline".equals(natural) && Geometry.isClockwise(w)) {
             reportError(w, tr("Reversed coastline: land not on left side"), WRONGLY_ORDERED_COAST);
-            /*} else if ("water".equals(natural) && !Geometry.isClockwise(w)) {
-            reportError(w, tr("Reversed water: land not on left side"), WRONGLY_ORDERED_WATER);*/
         } else if ("land".equals(natural) && Geometry.isClockwise(w)) {
             reportError(w, tr("Reversed land: land not on left side"), WRONGLY_ORDERED_LAND);
