Index: trunk/build.xml
===================================================================
--- trunk/build.xml	(revision 10221)
+++ trunk/build.xml	(revision 10222)
@@ -676,4 +676,5 @@
                 excludeFilter="tools/findbugs/josm-filter.xml"
                 effort="max"
+        	    reportLevel="low"
                 >
             <sourcePath path="${base.dir}/src" />
Index: trunk/scripts/SyncEditorImageryIndex.groovy
===================================================================
--- trunk/scripts/SyncEditorImageryIndex.groovy	(revision 10221)
+++ trunk/scripts/SyncEditorImageryIndex.groovy	(revision 10222)
@@ -24,4 +24,6 @@
 import org.openstreetmap.josm.data.imagery.ImageryInfo
 import org.openstreetmap.josm.io.imagery.ImageryReader
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings
 
 class SyncEditorImageryIndex {
@@ -177,4 +179,5 @@
     }
 
+    @SuppressFBWarnings(value = "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD")
     void myprintln(String s) {
         if(skipEntries.containsKey(s)) {
Index: trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java	(revision 10221)
+++ trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java	(revision 10222)
@@ -18,4 +18,5 @@
 import java.text.MessageFormat;
 import java.util.ArrayList;
+import java.util.Locale;
 import java.util.logging.Logger;
 
@@ -151,5 +152,5 @@
 
         String p = System.getProperties().getProperty("useCachedDataset");
-        if (p != null && Boolean.parseBoolean(p.trim().toLowerCase())) {
+        if (p != null && Boolean.parseBoolean(p.trim().toLowerCase(Locale.ENGLISH))) {
             logger.info(MessageFormat.format("property ''{0}'' set, using cached dataset", "useCachedDataset"));
             return;
Index: trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java	(revision 10221)
+++ trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java	(revision 10222)
@@ -18,4 +18,5 @@
 import java.text.MessageFormat;
 import java.util.HashSet;
+import java.util.Locale;
 import java.util.Set;
 import java.util.logging.Logger;
@@ -169,5 +170,5 @@
 
         String p = System.getProperty("useCachedDataset");
-        if (p != null && Boolean.parseBoolean(p.trim().toLowerCase())) {
+        if (p != null && Boolean.parseBoolean(p.trim().toLowerCase(Locale.ENGLISH))) {
             logger.info(MessageFormat.format("property ''{0}'' set, using cached dataset", "useCachedDataset"));
             return;
@@ -516,21 +517,16 @@
         DataSet referers = reader.parseOsm(NullProgressMonitor.INSTANCE);
 
-        Set<Long> referringRelationsIds = new HashSet<>();
         r = lookupRelation(referers, 6);
         assertNotNull(r);
         assertFalse(r.isIncomplete());
-        referringRelationsIds.add(r.getId());
         r = lookupRelation(referers, 7);
         assertNotNull(r);
         assertFalse(r.isIncomplete());
-        referringRelationsIds.add(r.getId());
         r = lookupRelation(referers, 8);
         assertNotNull(r);
         assertFalse(r.isIncomplete());
-        referringRelationsIds.add(r.getId());
         r = lookupRelation(referers, 9);
         assertNotNull(r);
         assertFalse(r.isIncomplete());
-        referringRelationsIds.add(r.getId());
 
         // all relations are fully loaded
Index: trunk/test/functional/org/openstreetmap/josm/io/UploadStrategySelectionPanelTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/io/UploadStrategySelectionPanelTest.java	(revision 10221)
+++ trunk/test/functional/org/openstreetmap/josm/io/UploadStrategySelectionPanelTest.java	(revision 10222)
@@ -20,5 +20,5 @@
 public class UploadStrategySelectionPanelTest extends JFrame {
 
-    private UploadStrategySelectionPanel uploadStrategySelectionPanel;
+    protected UploadStrategySelectionPanel uploadStrategySelectionPanel;
 
     protected void build()  {
@@ -37,5 +37,6 @@
         tf.addActionListener(
                 new ActionListener() {
-                    public void actionPerformed(ActionEvent arg0) {
+                    @Override
+                    public void actionPerformed(ActionEvent ae) {
                         int n = 0;
                         try {
Index: trunk/test/performance/org/openstreetmap/josm/data/osm/KeyValuePerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/data/osm/KeyValuePerformanceTest.java	(revision 10221)
+++ trunk/test/performance/org/openstreetmap/josm/data/osm/KeyValuePerformanceTest.java	(revision 10222)
@@ -20,4 +20,6 @@
 import org.openstreetmap.josm.PerformanceTestUtils.PerformanceTestTimer;
 import org.openstreetmap.josm.data.osm.OsmDataGenerator.KeyValueDataGenerator;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -38,4 +40,5 @@
      */
     @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public Timeout globalTimeout = Timeout.seconds(15*60);
 
@@ -52,5 +55,6 @@
      */
     @Test
-    public void meassureStringEqualsIntern() {
+    @SuppressFBWarnings(value = "DM_STRING_CTOR", justification = "test Strings that are interned and those that are not")
+    public void measureStringEqualsIntern() {
         String str1Interned = "string1";
         String str1InternedB = "string1";
@@ -196,4 +200,5 @@
      */
     @Test
+    @SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT")
     public void testKeyValueGetKeysGet() {
         for (double tagNodeRatio : TAG_NODE_RATIOS) {
Index: trunk/test/performance/org/openstreetmap/josm/data/osm/RoundingPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/data/osm/RoundingPerformanceTest.java	(revision 10221)
+++ trunk/test/performance/org/openstreetmap/josm/data/osm/RoundingPerformanceTest.java	(revision 10222)
@@ -7,4 +7,6 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.coor.LatLonTest;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -22,4 +24,5 @@
      */
     @Test
+    @SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT")
     public void test() {
         final int n = 1000000;
Index: trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRendererPerformanceTestParent.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRendererPerformanceTestParent.java	(revision 10221)
+++ trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRendererPerformanceTestParent.java	(revision 10222)
@@ -24,4 +24,6 @@
 import org.openstreetmap.josm.io.OsmReader;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
 /**
  * Abstract superclass of {@code StyledMapRendererPerformanceTest} and {@code WireframeMapRendererPerformanceTest}.
@@ -32,6 +34,9 @@
     private static final int IMG_HEIGHT = 1050;
 
+    @SuppressFBWarnings(value = "MS_PKGPROTECT")
     protected static Graphics2D g;
+    @SuppressFBWarnings(value = "MS_PKGPROTECT")
     protected static BufferedImage img;
+    @SuppressFBWarnings(value = "MS_PKGPROTECT")
     protected static NavigatableComponent nc;
     private static DataSet dsRestriction;
@@ -43,4 +48,5 @@
      */
     @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public Timeout globalTimeout = Timeout.seconds(15*60);
 
@@ -121,8 +127,11 @@
     }
 
-    /** run this manually to verify that the rendering is set up properly */
+    /**
+     * run this manually to verify that the rendering is set up properly
+     * @throws IOException if any I/O error occurs
+     */
+    @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD")
     private void dumpRenderedImage() throws IOException {
-        File outputfile = new File("test-neubrandenburg.png");
-        ImageIO.write(img, "png", outputfile);
+        ImageIO.write(img, "png", new File("test-neubrandenburg.png"));
     }
 }
Index: trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRendererPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRendererPerformanceTest.java	(revision 10221)
+++ trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRendererPerformanceTest.java	(revision 10222)
@@ -9,4 +9,6 @@
 import org.junit.BeforeClass;
 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -27,8 +29,11 @@
     }
 
-    /** run this manually to verify that the rendering is set up properly */
+    /**
+     * run this manually to verify that the rendering is set up properly
+     * @throws IOException if any I/O error occurs
+     */
+    @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD")
     private void dumpRenderedImage() throws IOException {
-        File outputfile = new File("test-neubrandenburg.png");
-        ImageIO.write(img, "png", outputfile);
+        ImageIO.write(img, "png", new File("test-neubrandenburg.png"));
     }
 }
Index: trunk/test/performance/org/openstreetmap/josm/gui/mappaint/MapRendererPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/gui/mappaint/MapRendererPerformanceTest.java	(revision 10221)
+++ trunk/test/performance/org/openstreetmap/josm/gui/mappaint/MapRendererPerformanceTest.java	(revision 10222)
@@ -12,4 +12,5 @@
 import java.util.EnumMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
@@ -41,4 +42,6 @@
 import org.openstreetmap.josm.io.OsmReader;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
 public class MapRendererPerformanceTest {
 
@@ -65,5 +68,5 @@
         ICON, SYMBOL, NODE_TEXT, LINE, LINE_TEXT, AREA;
         public String label() {
-            return name().toLowerCase();
+            return name().toLowerCase(Locale.ENGLISH);
         }
     }
@@ -75,4 +78,5 @@
      */
     @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public Timeout globalTimeout = Timeout.seconds(15*60);
 
@@ -171,4 +175,5 @@
         private final List<Long> totalTimes = new ArrayList<>();
 
+        @SuppressFBWarnings(value = "DM_GC")
         public void run() throws IOException {
             boolean checkScale = false;
@@ -314,5 +319,5 @@
 
     public static void dumpTimes(StyledMapRenderer.BenchmarkData bd) {
-        System.out.print(String.format("gen. %3d, sort %3d, draw %3d\n", bd.generateTime, bd.sortTime, bd.drawTime));
+        System.out.print(String.format("gen. %3d, sort %3d, draw %3d%n", bd.generateTime, bd.sortTime, bd.drawTime));
     }
 
Index: trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java	(revision 10221)
+++ trunk/test/performance/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSourceFilterTest.java	(revision 10222)
@@ -13,4 +13,6 @@
 import org.openstreetmap.josm.gui.mappaint.MultiCascade;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
 /**
  * Tests how fast {@link MapCSSStyleSource} finds the right style candidates for one object.
@@ -21,5 +23,5 @@
     private static final int TEST_RULE_COUNT = 10000;
 
-    private class CssGenerator {
+    private static class CssGenerator {
         StringBuilder sb = new StringBuilder();
         private KeyValueDataGenerator generator;
@@ -83,4 +85,5 @@
      */
     @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public Timeout globalTimeout = Timeout.seconds(15*60);
 
Index: trunk/test/performance/org/openstreetmap/josm/io/OsmReaderPerformanceTest.java
===================================================================
--- trunk/test/performance/org/openstreetmap/josm/io/OsmReaderPerformanceTest.java	(revision 10221)
+++ trunk/test/performance/org/openstreetmap/josm/io/OsmReaderPerformanceTest.java	(revision 10222)
@@ -20,4 +20,6 @@
 import org.openstreetmap.josm.data.osm.DataSet;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
 /**
  * This test tests how fast we are at reading an OSM file.
@@ -35,4 +37,5 @@
      */
     @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public Timeout globalTimeout = Timeout.seconds(15*60);
 
Index: trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 10222)
@@ -8,4 +8,5 @@
 import java.nio.file.Paths;
 import java.text.MessageFormat;
+import java.util.Locale;
 
 import org.openstreetmap.josm.data.projection.Projections;
@@ -106,5 +107,5 @@
         // make sure we don't upload to or test against production
         //
-        String url = OsmApi.getOsmApi().getBaseUrl().toLowerCase().trim();
+        String url = OsmApi.getOsmApi().getBaseUrl().toLowerCase(Locale.ENGLISH).trim();
         if (url.startsWith("http://www.openstreetmap.org") || url.startsWith("http://api.openstreetmap.org")
             || url.startsWith("https://www.openstreetmap.org") || url.startsWith("https://api.openstreetmap.org")) {
Index: trunk/test/unit/org/openstreetmap/josm/MainTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/MainTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/MainTest.java	(revision 10222)
@@ -16,4 +16,6 @@
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.tools.WindowGeometry;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -57,4 +59,5 @@
      */
     @Test
+    @SuppressFBWarnings(value = "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD")
     public void testLogs() {
 
Index: trunk/test/unit/org/openstreetmap/josm/TestUtils.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 10222)
@@ -47,4 +47,6 @@
 import org.openstreetmap.josm.io.Compression;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
 /**
  * Various utils, useful for unit tests.
@@ -105,4 +107,5 @@
      * @param array The array sorted for test purpose
      */
+    @SuppressFBWarnings(value = "RV_NEGATING_RESULT_OF_COMPARETO")
     public static <T> void checkComparableContract(Comparator<T> comparator, T[] array) {
         System.out.println("Validating Comparable contract on array of "+array.length+" elements");
Index: trunk/test/unit/org/openstreetmap/josm/actions/CreateCircleActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/CreateCircleActionTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/actions/CreateCircleActionTest.java	(revision 10222)
@@ -9,4 +9,6 @@
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -56,10 +58,16 @@
     public void addSelected(OsmPrimitive p, DataSet ds) {
         try {
-            Method method = ds.getClass()
+            final Method method = ds.getClass()
                 .getDeclaredMethod("addSelected",
                                    new Class<?>[] {Collection.class, boolean.class});
-            method.setAccessible(true);
+            AccessController.doPrivileged(new PrivilegedAction<Object>() {
+                @Override
+                public Object run() {
+                    method.setAccessible(true);
+                    return null;
+                }
+            });
             method.invoke(ds, Collections.singleton(p), false);
-        } catch (Exception e) {
+        } catch (ReflectiveOperationException e) {
             e.printStackTrace();
             fail("Can't add OsmPrimitive to dataset: " + e.getMessage());
@@ -162,6 +170,6 @@
             rlCache.setAccessible(true);
             ConstantTrafficHand trafficHand = new ConstantTrafficHand(true);
-            rlCache.set(null, new GeoPropertyIndex<Boolean>(trafficHand, 24));
-        } catch (Exception e) {
+            rlCache.set(null, new GeoPropertyIndex<>(trafficHand, 24));
+        } catch (ReflectiveOperationException e) {
             e.printStackTrace();
             fail("Impossible to mock left/right hand database: " + e.getMessage());
Index: trunk/test/unit/org/openstreetmap/josm/actions/UnJoinNodeWayActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/UnJoinNodeWayActionTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/actions/UnJoinNodeWayActionTest.java	(revision 10222)
@@ -24,5 +24,5 @@
      * Prepare the class for the test. The notification system must be disabled.
      */
-    public class UnJoinNodeWayActionTestClass extends UnJoinNodeWayAction {
+    public static class UnJoinNodeWayActionTestClass extends UnJoinNodeWayAction {
 
         /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandlerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandlerTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandlerTest.java	(revision 10222)
@@ -47,5 +47,5 @@
             @Override
             public String[] getPatterns() {
-                return null;
+                return new String[0];
             }
 
Index: trunk/test/unit/org/openstreetmap/josm/actions/mapmode/MapViewMock.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/mapmode/MapViewMock.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/actions/mapmode/MapViewMock.java	(revision 10222)
@@ -13,6 +13,6 @@
 
 class MapViewMock extends MapView {
-    private final OsmDataLayer layer;
-    private final DataSet currentDataSet;
+    private final transient OsmDataLayer layer;
+    private final transient DataSet currentDataSet;
 
     MapViewMock(DataSet dataSet, OsmDataLayer layer) {
Index: trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java	(revision 10222)
@@ -10,4 +10,6 @@
 import java.awt.event.MouseEvent;
 import java.lang.reflect.Field;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.Arrays;
 import java.util.Collection;
@@ -25,4 +27,6 @@
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
 /**
  * Unit tests for class {@link SelectAction}.
@@ -33,5 +37,5 @@
      * Override some configuration variables without change in preferences.xml
      */
-    class PreferencesMock extends Preferences {
+    static class PreferencesMock extends Preferences {
         @Override
         public synchronized int getInteger(String key, int def) {
@@ -50,8 +54,14 @@
             super(mapFrame);
             try {
-                Field mv = SelectAction.class.getDeclaredField("mv");
-                mv.setAccessible(true);
+                final Field mv = SelectAction.class.getDeclaredField("mv");
+                AccessController.doPrivileged(new PrivilegedAction<Object>() {
+                    @Override
+                    public Object run() {
+                        mv.setAccessible(true);
+                        return null;
+                    }
+                });
                 mv.set(this, new MapViewMock(dataSet, layer));
-            } catch (Exception e) {
+            } catch (ReflectiveOperationException e) {
                 e.printStackTrace();
                 fail("Can't setup testing environnement");
@@ -82,4 +92,5 @@
      */
     @Test
+    @SuppressFBWarnings(value = "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD")
     public void test10748() {
         DataSet dataSet = new DataSet();
@@ -137,9 +148,9 @@
             // As result of test, we must find a 2 nodes way, from EN(0, 0) to EN(100, 0)
             assertTrue("Nodes are not merged", nodesMerged);
-            assertSame(String.format("Expect exactly one way, found %d\n", dataSet.getWays().size()),
+            assertSame(String.format("Expect exactly one way, found %d%n", dataSet.getWays().size()),
                        dataSet.getWays().size(), 1);
             Way rw = dataSet.getWays().iterator().next();
             assertFalse("Way shouldn't be deleted\n", rw.isDeleted());
-            assertSame(String.format("Way shouldn't have 2 nodes, %d found\n", w.getNodesCount()),
+            assertSame(String.format("Way shouldn't have 2 nodes, %d found%n", w.getNodesCount()),
                        rw.getNodesCount(), 2);
             Node r1 = rw.firstNode();
@@ -150,7 +161,7 @@
                 r2 = tmp;
             }
-            assertSame(String.format("East should be 0, found %f\n", r1.getEastNorth().east()),
+            assertSame(String.format("East should be 0, found %f%n", r1.getEastNorth().east()),
                        Double.compare(r1.getEastNorth().east(), 0), 0);
-            assertSame(String.format("East should be 100, found %f\n", r2.getEastNorth().east()),
+            assertSame(String.format("East should be 100, found %f%n", r2.getEastNorth().east()),
                        Double.compare(r2.getEastNorth().east(), 100), 0);
         } finally {
Index: trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java	(revision 10222)
@@ -13,4 +13,6 @@
 import org.junit.Test;
 import org.openstreetmap.josm.JOSMFixture;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -59,5 +61,5 @@
             this.attributes = attributes;
             this.ready = true;
-            this.notify();
+            this.notifyAll();
         }
     }
@@ -71,6 +73,11 @@
     }
 
+    /**
+     * Test status codes
+     * @throws InterruptedException in case of thread interruption
+     * @throws IOException in case of I/O error
+     */
     @Test
-    public void testStatusCodes() throws Exception {
+    public void testStatusCodes() throws IOException, InterruptedException  {
         doTestStatusCode(200);
         // can't test for 3xx, as httpstat.us redirects finally to 200 page
@@ -85,6 +92,12 @@
     }
 
+    /**
+     * Test unknown host
+     * @throws InterruptedException in case of thread interruption
+     * @throws IOException in case of I/O error
+     */
     @Test
-    public void testUnknownHost() throws Exception {
+    @SuppressFBWarnings(value = "WA_NOT_IN_LOOP")
+    public void testUnknownHost() throws IOException, InterruptedException {
         TestCachedTileLoaderJob job = new TestCachedTileLoaderJob("http://unkownhost.unkownhost/unkown");
         Listener listener = new Listener();
@@ -98,5 +111,6 @@
     }
 
-    private void doTestStatusCode(int responseCode) throws Exception {
+    @SuppressFBWarnings(value = "WA_NOT_IN_LOOP")
+    private void doTestStatusCode(int responseCode) throws IOException, InterruptedException {
         TestCachedTileLoaderJob job = getStatusLoaderJob(responseCode);
         Listener listener = new Listener();
Index: trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java	(revision 10222)
@@ -7,4 +7,6 @@
 import org.junit.Test;
 import org.openstreetmap.josm.JOSMFixture;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -26,4 +28,5 @@
      * Lat/Lon sample values for unit tests
      */
+    @SuppressFBWarnings(value = "MS_PKGPROTECT")
     public static final double[] SAMPLE_VALUES = new double[]{
             -180.0, -179.9, -179.6, -179.5, -179.4, -179.1, -179.0, -100.0, -99.9, -10.0, -9.9, -1.0, -0.1,
Index: trunk/test/unit/org/openstreetmap/josm/data/oauth/OAuthParametersTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/oauth/OAuthParametersTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/data/oauth/OAuthParametersTest.java	(revision 10222)
@@ -12,4 +12,5 @@
 import org.openstreetmap.josm.io.OsmApi;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import nl.jqno.equalsverifier.EqualsVerifier;
 
@@ -31,4 +32,5 @@
      */
     @Test
+    @SuppressFBWarnings(value = "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD")
     public void testCreateDefault() {
         OAuthParameters def = OAuthParameters.createDefault();
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/ChangesetCacheTest.groovy
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/ChangesetCacheTest.groovy	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/ChangesetCacheTest.groovy	(revision 10222)
@@ -9,5 +9,5 @@
 
     @Test
-    public void test_Constructor() {
+    public void testConstructor() {
         ChangesetCache cache = ChangesetCache.getInstance()
         assert cache != null
@@ -15,5 +15,5 @@
 
     @Test
-    public void test_addAndRemoveListeners() {
+    public void testAddAndRemoveListeners() {
         ChangesetCache cache = ChangesetCache.getInstance()
         cache.clear()
@@ -38,5 +38,5 @@
 
     @Test
-    public void update_get_remove_cycle() {
+    public void updateGetRemoveCycle() {
         ChangesetCache cache = ChangesetCache.getInstance()
         cache.clear()
@@ -97,5 +97,5 @@
 
     @Test
-    public void fireingEvents_AddAChangeset() {
+    public void fireingEventsAddAChangeset() {
         ChangesetCache cache = ChangesetCache.getInstance()
         cache.clear()
@@ -118,5 +118,5 @@
 
     @Test
-    public void fireingEvents_UpdateChangeset() {
+    public void fireingEventsUpdateChangeset() {
         ChangesetCache cache = ChangesetCache.getInstance()
         cache.clear()
@@ -141,5 +141,5 @@
 
     @Test
-    public void fireingEvents_RemoveChangeset() {
+    public void fireingEventsRemoveChangeset() {
         ChangesetCache cache = ChangesetCache.getInstance()
         cache.clear()
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java	(revision 10222)
@@ -161,4 +161,5 @@
                 break;
             }
+            default: throw new AssertionError();
             }
 
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/MultipolygonBuilderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/MultipolygonBuilderTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/MultipolygonBuilderTest.java	(revision 10222)
@@ -14,4 +14,6 @@
 import org.openstreetmap.josm.io.OsmReader;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
 /**
  * Unit tests of the {@code MultipolygonBuilder} class.
@@ -23,4 +25,5 @@
      */
     @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public Timeout globalTimeout = Timeout.seconds(15);
 
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java	(revision 10222)
@@ -10,4 +10,6 @@
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.data.coor.LatLon;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -72,4 +74,5 @@
      */
     @Test
+    @SuppressFBWarnings(value = "DM_STRING_CTOR", justification = "test that equals is used and not ==")
     public void remove() {
         Node n = new Node();
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/RelationTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/RelationTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/RelationTest.java	(revision 10222)
@@ -34,5 +34,5 @@
 
     @Test
-    public void testBBox() {
+    public void testBbox() {
         DataSet ds = new DataSet();
 
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 10222)
@@ -222,12 +222,11 @@
             Process process = pb.start();
             OutputStream stdin = process.getOutputStream();
-            final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stdin, StandardCharsets.UTF_8));
             InputStream stdout = process.getInputStream();
-            final BufferedReader reader = new BufferedReader(new InputStreamReader(stdout, StandardCharsets.UTF_8));
-            String input = String.format("%.9f %.9f\n", ll.lon(), ll.lat());
-            writer.write(input);
-            writer.close();
-            output = reader.readLine();
-            reader.close();
+            try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stdin, StandardCharsets.UTF_8))) {
+                writer.write(String.format("%.9f %.9f%n", ll.lon(), ll.lat()));
+            }
+            try (BufferedReader reader = new BufferedReader(new InputStreamReader(stdout, StandardCharsets.UTF_8))) {
+                output = reader.readLine();
+            }
         } catch (IOException e) {
             System.err.println("Error: Running external command failed: " + e + "\nCommand was: "+Utils.join(" ", args));
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTestIT.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTestIT.java	(revision 10222)
@@ -48,4 +48,6 @@
 import org.junit.Test;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
 /**
  * Integration tests for the DomainValidator.
@@ -82,76 +84,75 @@
         download(htmlFile, "http://www.iana.org/domains/root/db", timestamp);
 
-        BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(txtFile), StandardCharsets.UTF_8));
-        String line;
-        final String header;
-        line = br.readLine(); // header
-        if (line != null && line.startsWith("# Version ")) {
-            header = line.substring(2);
-        } else {
-            br.close();
-            throw new IOException("File does not have expected Version header");
-        }
-        final boolean generateUnicodeTlds = false; // Change this to generate Unicode TLDs as well
-
-        // Parse html page to get entries
-        Map<String, String[]> htmlInfo = getHtmlInfo(htmlFile);
-        Map<String, String> missingTLD = new TreeMap<>(); // stores entry and comments as String[]
-        Map<String, String> missingCC = new TreeMap<>();
-        while ((line = br.readLine()) != null) {
-            if (!line.startsWith("#")) {
-                final String unicodeTld; // only different from asciiTld if that was punycode
-                final String asciiTld = line.toLowerCase(Locale.ENGLISH);
-                if (line.startsWith("XN--")) {
-                    unicodeTld = IDN.toUnicode(line);
-                } else {
-                    unicodeTld = asciiTld;
-                }
-                if (!dv.isValidTld(asciiTld)) {
-                    String[] info = htmlInfo.get(asciiTld);
-                    if (info != null) {
-                        String type = info[0];
-                        String comment = info[1];
-                        if ("country-code".equals(type)) { // Which list to use?
-                            missingCC.put(asciiTld, unicodeTld + " " + comment);
-                            if (generateUnicodeTlds) {
-                                missingCC.put(unicodeTld, asciiTld + " " + comment);
+        try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(txtFile), StandardCharsets.UTF_8))) {
+            String line;
+            final String header;
+            line = br.readLine(); // header
+            if (line != null && line.startsWith("# Version ")) {
+                header = line.substring(2);
+            } else {
+                throw new IOException("File does not have expected Version header");
+            }
+            final boolean generateUnicodeTlds = false; // Change this to generate Unicode TLDs as well
+
+            // Parse html page to get entries
+            Map<String, String[]> htmlInfo = getHtmlInfo(htmlFile);
+            Map<String, String> missingTLD = new TreeMap<>(); // stores entry and comments as String[]
+            Map<String, String> missingCC = new TreeMap<>();
+            while ((line = br.readLine()) != null) {
+                if (!line.startsWith("#")) {
+                    final String unicodeTld; // only different from asciiTld if that was punycode
+                    final String asciiTld = line.toLowerCase(Locale.ENGLISH);
+                    if (line.startsWith("XN--")) {
+                        unicodeTld = IDN.toUnicode(line);
+                    } else {
+                        unicodeTld = asciiTld;
+                    }
+                    if (!dv.isValidTld(asciiTld)) {
+                        String[] info = htmlInfo.get(asciiTld);
+                        if (info != null) {
+                            String type = info[0];
+                            String comment = info[1];
+                            if ("country-code".equals(type)) { // Which list to use?
+                                missingCC.put(asciiTld, unicodeTld + " " + comment);
+                                if (generateUnicodeTlds) {
+                                    missingCC.put(unicodeTld, asciiTld + " " + comment);
+                                }
+                            } else {
+                                missingTLD.put(asciiTld, unicodeTld + " " + comment);
+                                if (generateUnicodeTlds) {
+                                    missingTLD.put(unicodeTld, asciiTld + " " + comment);
+                                }
                             }
                         } else {
-                            missingTLD.put(asciiTld, unicodeTld + " " + comment);
-                            if (generateUnicodeTlds) {
-                                missingTLD.put(unicodeTld, asciiTld + " " + comment);
-                            }
-                        }
+                            System.err.println("Expected to find HTML info for "+ asciiTld);
+                        }
+                    }
+                    ianaTlds.add(asciiTld);
+                    // Don't merge these conditions; generateUnicodeTlds is final so needs to be separate to avoid a warning
+                    if (generateUnicodeTlds) {
+                        if (!unicodeTld.equals(asciiTld)) {
+                            ianaTlds.add(unicodeTld);
+                        }
+                    }
+                }
+            }
+            // List html entries not in TLD text list
+            for (String key : (new TreeMap<>(htmlInfo)).keySet()) {
+                if (!ianaTlds.contains(key)) {
+                    if (isNotInRootZone(key)) {
+                        System.out.println("INFO: HTML entry not yet in root zone: "+key);
                     } else {
-                        System.err.println("Expected to find HTML info for "+ asciiTld);
-                    }
-                }
-                ianaTlds.add(asciiTld);
-                // Don't merge these conditions; generateUnicodeTlds is final so needs to be separate to avoid a warning
-                if (generateUnicodeTlds) {
-                    if (!unicodeTld.equals(asciiTld)) {
-                        ianaTlds.add(unicodeTld);
-                    }
-                }
-            }
-        }
-        br.close();
-        // List html entries not in TLD text list
-        for (String key : (new TreeMap<>(htmlInfo)).keySet()) {
-            if (!ianaTlds.contains(key)) {
-                if (isNotInRootZone(key)) {
-                    System.out.println("INFO: HTML entry not yet in root zone: "+key);
-                } else {
-                    System.err.println("WARN: Expected to find text entry for html: "+key);
-                }
-            }
-        }
-        if (!missingTLD.isEmpty()) {
-            printMap(header, missingTLD, "TLD");
-            fail("missing TLD");
-        }
-        if (!missingCC.isEmpty()) {
-            printMap(header, missingCC, "CC");
-            fail("missing CC");
+                        System.err.println("WARN: Expected to find text entry for html: "+key);
+                    }
+                }
+            }
+            if (!missingTLD.isEmpty()) {
+                printMap(header, missingTLD, "TLD");
+                fail("missing TLD");
+            }
+            if (!missingCC.isEmpty()) {
+                printMap(header, missingCC, "CC");
+                fail("missing CC");
+            }
         }
         // Check if internal tables contain any additional entries
@@ -175,4 +176,5 @@
     }
 
+    @SuppressFBWarnings(value = "PERFORMANCE")
     private static Map<String, String[]> getHtmlInfo(final File f) throws IOException {
         final Map<String, String[]> info = new HashMap<>();
@@ -186,47 +188,47 @@
         final Pattern comment = Pattern.compile("\\s+<td>([^<]+)</td>");
 
-        final BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(f), StandardCharsets.UTF_8));
-        String line;
-        while ((line = br.readLine()) != null) {
-            Matcher m = domain.matcher(line);
-            if (m.lookingAt()) {
-                String dom = m.group(1);
-                String typ = "??";
-                String com = "??";
-                line = br.readLine();
-                while (line != null && line.matches("^\\s*$")) { // extra blank lines introduced
+        try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(f), StandardCharsets.UTF_8))) {
+            String line;
+            while ((line = br.readLine()) != null) {
+                Matcher m = domain.matcher(line);
+                if (m.lookingAt()) {
+                    String dom = m.group(1);
+                    String typ = "??";
+                    String com = "??";
                     line = br.readLine();
-                }
-                Matcher t = type.matcher(line);
-                if (t.lookingAt()) {
-                    typ = t.group(1);
-                    line = br.readLine();
-                    if (line != null && line.matches("\\s+<!--.*")) {
-                        while (line != null && !line.matches(".*-->.*")) {
+                    while (line != null && line.matches("^\\s*$")) { // extra blank lines introduced
+                        line = br.readLine();
+                    }
+                    Matcher t = type.matcher(line);
+                    if (t.lookingAt()) {
+                        typ = t.group(1);
+                        line = br.readLine();
+                        if (line != null && line.matches("\\s+<!--.*")) {
+                            while (line != null && !line.matches(".*-->.*")) {
+                                line = br.readLine();
+                            }
                             line = br.readLine();
                         }
-                        line = br.readLine();
-                    }
-                    // Should have comment; is it wrapped?
-                    while (line != null && !line.matches(".*</td>.*")) {
-                        line += " " +br.readLine();
-                    }
-                    Matcher n = comment.matcher(line);
-                    if (n.lookingAt()) {
-                        com = n.group(1);
-                    }
-                    // Don't save unused entries
-                    if (com.contains("Not assigned") || com.contains("Retired") || typ.equals("test")) {
-//                        System.out.println("Ignored: " + typ + " " + dom + " " +com);
+                        // Should have comment; is it wrapped?
+                        while (line != null && !line.matches(".*</td>.*")) {
+                            line += " " +br.readLine();
+                        }
+                        Matcher n = comment.matcher(line);
+                        if (n.lookingAt()) {
+                            com = n.group(1);
+                        }
+                        // Don't save unused entries
+                        if (com.contains("Not assigned") || com.contains("Retired") || typ.equals("test")) {
+    //                        System.out.println("Ignored: " + typ + " " + dom + " " +com);
+                        } else {
+                            info.put(dom.toLowerCase(Locale.ENGLISH), new String[]{typ, com});
+    //                        System.out.println("Storing: " + typ + " " + dom + " " +com);
+                        }
                     } else {
-                        info.put(dom.toLowerCase(Locale.ENGLISH), new String[]{typ, com});
-//                        System.out.println("Storing: " + typ + " " + dom + " " +com);
-                    }
-                } else {
-                    System.err.println("Unexpected type: " + line);
-                }
-            }
-        }
-        br.close();
+                        System.err.println("Unexpected type: " + line);
+                    }
+                }
+            }
+        }
         return info;
     }
@@ -262,13 +264,11 @@
             System.out.println("Downloading " + tldurl);
             byte[] buff = new byte[1024];
-            InputStream is = hc.getInputStream();
-
-            FileOutputStream fos = new FileOutputStream(f);
-            int len;
-            while ((len = is.read(buff)) != -1) {
-                fos.write(buff, 0, len);
-            }
-            fos.close();
-            is.close();
+            try (InputStream is = hc.getInputStream();
+                 FileOutputStream fos = new FileOutputStream(f)) {
+                int len;
+                while ((len = is.read(buff)) != -1) {
+                    fos.write(buff, 0, len);
+                }
+            }
             System.out.println("Done");
         }
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/routines/EmailValidatorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/routines/EmailValidatorTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/routines/EmailValidatorTest.java	(revision 10222)
@@ -37,10 +37,10 @@
      * rules from the xml file.
      */
-    protected static String FORM_KEY = "emailForm";
+    protected static final String FORM_KEY = "emailForm";
 
     /**
      * The key used to retrieve the validator action.
      */
-    protected static String ACTION = "email";
+    protected static final String ACTION = "email";
 
     private EmailValidator validator;
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/routines/UrlValidatorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/routines/UrlValidatorTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/routines/UrlValidatorTest.java	(revision 10222)
@@ -31,6 +31,6 @@
 public class UrlValidatorTest {
 
-   private final boolean printStatus = false;
-   private final boolean printIndex = false; //print index that indicates current scheme,host,port,path, query test were using.
+   private static final boolean printStatus = false;
+   private static final boolean printIndex = false; //print index that indicates current scheme,host,port,path, query test were using.
 
    /**
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MultipolygonTestTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MultipolygonTestTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MultipolygonTestTest.java	(revision 10222)
@@ -65,8 +65,4 @@
         MULTIPOLYGON_TEST.startTest(null);
 
-        List<Node> nodes = new ArrayList<>();
-        nodes.add(new Node(new LatLon(0, 1)));
-        nodes.add(new Node(new LatLon(0, 2)));
-
         // Erroneous tag
         Way w = createUnclosedWay("amenity=parking");
Index: trunk/test/unit/org/openstreetmap/josm/gui/DefaultNameFormatterTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/DefaultNameFormatterTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/gui/DefaultNameFormatterTest.java	(revision 10222)
@@ -26,4 +26,6 @@
 import org.xml.sax.SAXException;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
 /**
  * Unit tests of {@link DefaultNameFormatter} class.
@@ -46,4 +48,5 @@
      */
     @Test
+    @SuppressFBWarnings(value = "ITA_INEFFICIENT_TO_ARRAY")
     public void testTicket9632() throws IllegalDataException, IOException, SAXException {
         String source = "http://josm.openstreetmap.de/josmfile?page=Presets/BicycleJunction&amp;preset";
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackActionTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackActionTest.java	(revision 10222)
@@ -43,5 +43,5 @@
      */
     @Test
-    public void testTmsLayer() throws Exception {
+    public void testTMSLayer() throws Exception {
         // Create new TMS layer and clear cache
         TMSLayer layer = new TMSLayer(new ImageryInfo("OSM TMS", "https://a.tile.openstreetmap.org/{zoom}/{x}/{y}.png", "tms", null, null));
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTestIT.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTestIT.java	(revision 10222)
@@ -27,4 +27,6 @@
 import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
 /**
  * Integration tests of {@link MapPaintPreference} class.
@@ -36,4 +38,5 @@
      */
     @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public Timeout globalTimeout = Timeout.seconds(10*60);
 
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTestIT.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTestIT.java	(revision 10222)
@@ -22,4 +22,6 @@
 import org.xml.sax.SAXException;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
 /**
  * Integration tests of {@link TaggingPresetPreference} class.
@@ -31,4 +33,5 @@
      */
     @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public Timeout globalTimeout = Timeout.seconds(10*60);
 
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java	(revision 10222)
@@ -62,5 +62,5 @@
             @Override
             public String apply(TaggingPresetItem x) {
-                return ((Key) x).key;
+                return x instanceof Key ? ((Key) x).key : null;
             }
         });
Index: trunk/test/unit/org/openstreetmap/josm/io/ChangesetQueryUrlParserTest.groovy
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/ChangesetQueryUrlParserTest.groovy	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/io/ChangesetQueryUrlParserTest.groovy	(revision 10222)
@@ -12,10 +12,10 @@
 
     @Test
-    public void test_constructor() {
-        ChangesetQueryUrlParser parser = new ChangesetQueryUrlParser();
-    }
-
-    @Test
-    public void test_parse_basic() {
+    public void testConstructor() {
+        ChangesetQueryUrlParser parser = new ChangesetQueryUrlParser();
+    }
+
+    @Test
+    public void testParseBasic() {
         ChangesetQueryUrlParser parser = new ChangesetQueryUrlParser();
 
@@ -33,5 +33,5 @@
 
     @Test
-    public void test_uid() {
+    public void testUid() {
         ChangesetQueryUrlParser parser = new ChangesetQueryUrlParser();
         def ChangesetQuery q
@@ -55,5 +55,5 @@
 
     @Test
-    public void test_display_name() {
+    public void testDisplayName() {
         ChangesetQueryUrlParser parser = new ChangesetQueryUrlParser();
         def ChangesetQuery q
@@ -65,7 +65,6 @@
     }
 
-
-    @Test
-    public void test_open() {
+    @Test
+    public void testOpen() {
         ChangesetQueryUrlParser parser = new ChangesetQueryUrlParser();
         def ChangesetQuery q
@@ -88,5 +87,5 @@
 
     @Test
-    public void test_closed() {
+    public void testClosed() {
         ChangesetQueryUrlParser parser = new ChangesetQueryUrlParser();
         def ChangesetQuery q
@@ -108,7 +107,6 @@
     }
 
-
-    @Test
-    public void test_uid_and_display_name() {
+    @Test
+    public void testUidAndDisplayName() {
         ChangesetQueryUrlParser parser = new ChangesetQueryUrlParser();
         def ChangesetQuery q
@@ -121,5 +119,5 @@
 
     @Test
-    public void test_time() {
+    public void testTime() {
         ChangesetQueryUrlParser parser = new ChangesetQueryUrlParser();
         def ChangesetQuery q
@@ -151,5 +149,5 @@
 
     @Test
-    public void test_bbox() {
+    public void testBbox() {
         ChangesetQueryUrlParser parser = new ChangesetQueryUrlParser();
         def ChangesetQuery q
@@ -185,5 +183,5 @@
 
     @Test
-    public void test_changeset_ids() {
+    public void testChangesetIds() {
         ChangesetQueryUrlParser parser = new ChangesetQueryUrlParser();
         def ChangesetQuery q
Index: trunk/test/unit/org/openstreetmap/josm/io/DiffResultProcessorTest.groovy
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/DiffResultProcessorTest.groovy	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/io/DiffResultProcessorTest.groovy	(revision 10222)
@@ -22,7 +22,7 @@
         // these calls should not fail
         //
-        def DiffResultProcessor processor  = new DiffResultProcessor(null)
-        processor  = new DiffResultProcessor([])
-        processor  = new DiffResultProcessor([n])
+        new DiffResultProcessor(null)
+        new DiffResultProcessor([])
+        new DiffResultProcessor([n])
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java	(revision 10222)
@@ -70,5 +70,5 @@
                 @Override
                 public X509Certificate[] getAcceptedIssuers() {
-                    return null;
+                    return new X509Certificate[0];
                 }
 
Index: trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java	(revision 10222)
@@ -20,4 +20,6 @@
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
 /**
  * Integration tests of {@link PluginHandler} class.
@@ -29,4 +31,5 @@
      */
     @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     public Timeout globalTimeout = Timeout.seconds(10*60);
 
Index: trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java	(revision 10222)
@@ -86,6 +86,5 @@
     @Test
     public void testReadDirection() {
-        Double direction = ExifReader.readDirection(directionSampleFile);
-        assertEquals(new Double(46.5), direction);
+        assertEquals(Double.valueOf(46.5), ExifReader.readDirection(directionSampleFile));
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java	(revision 10221)
+++ trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java	(revision 10222)
@@ -14,4 +14,6 @@
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.tools.UncheckedParseException;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -192,4 +194,5 @@
      */
     @Test
+    @SuppressFBWarnings(value = "ISC_INSTANTIATE_STATIC_CLASS")
     public void testCoverage() {
         assertNotNull(new DateUtils());
