Index: trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java	(revision 8467)
+++ trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java	(revision 8468)
@@ -36,9 +36,9 @@
 
     /** (preference key =&gt; return value) mappings valid for the current operation (no, those two maps cannot be combined) */
-    protected static final Map<String, Integer> sessionChoices = new HashMap<>();
+    private static final Map<String, Integer> sessionChoices = new HashMap<>();
     /** (preference key =&gt; return value) mappings valid for the current session */
-    protected static final Map<String, Integer> immediateChoices = new HashMap<>();
+    private static final Map<String, Integer> immediateChoices = new HashMap<>();
     /** a set indication that (preference key) is or may be stored for the currently active bulk operation */
-    protected static final Set<String> immediateActive = new HashSet<>();
+    private static final Set<String> immediateActive = new HashSet<>();
 
     /**
@@ -243,6 +243,5 @@
 
     /**
-     * This is a message panel used in dialogs which can be enabled/disabled with a preference
-     * setting.
+     * This is a message panel used in dialogs which can be enabled/disabled with a preference setting.
      * In addition to the normal message any {@link JOptionPane} would display it includes
      * a checkbox for enabling/disabling this particular dialog.
@@ -250,5 +249,4 @@
      */
     static class MessagePanel extends JPanel {
-        private final ButtonGroup group = new ButtonGroup();
         private final JRadioButton cbShowPermanentDialog = new JRadioButton(NotShowAgain.PERMANENT.getLabel());
         private final JRadioButton cbShowSessionDialog = new JRadioButton(NotShowAgain.SESSION.getLabel());
@@ -258,9 +256,11 @@
         /**
          * Constructs a new panel.
-         * @param message the the message (null to add no message, Component instances are added directly, otherwise a JLabel with the string representation is added)
+         * @param message the the message (null to add no message, Component instances are added directly,
+         *                otherwise a JLabel with the string representation is added)
          * @param displayImmediateOption whether to provide "Do not show again (this session)"
          */
         public MessagePanel(Object message, boolean displayImmediateOption) {
             cbStandard.setSelected(true);
+            ButtonGroup group = new ButtonGroup();
             group.add(cbShowPermanentDialog);
             group.add(cbShowSessionDialog);
Index: trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 8467)
+++ trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 8468)
@@ -443,5 +443,4 @@
         public static final String TILE_BOUNDS_PROP = TileAddressInputPanel.class.getName() + ".tileBounds";
 
-        private JosmTextField tfTileAddress;
         private transient TileAddressValidator valTileAddress;
 
@@ -467,5 +466,6 @@
             gc.weightx = 1.0;
             gc.gridx = 1;
-            pnl.add(tfTileAddress = new JosmTextField(), gc);
+            JosmTextField tfTileAddress = new JosmTextField();
+            pnl.add(tfTileAddress, gc);
             valTileAddress = new TileAddressValidator(tfTileAddress);
             SelectAllOnFocusGainedDecorator.decorate(tfTileAddress);
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(revision 8467)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(revision 8468)
@@ -510,8 +510,6 @@
     private static final class StatisticsInfoTable extends JPanel {
 
-        private JTable infoTable;
-
-        protected void build(StatisticsTableModel model) {
-            infoTable = new JTable(model, new StatisticsTableColumnModel());
+        private StatisticsInfoTable(StatisticsTableModel model) {
+            JTable infoTable = new JTable(model, new StatisticsTableColumnModel());
             infoTable.setShowHorizontalLines(true);
             infoTable.setShowVerticalLines(false);
@@ -521,8 +519,4 @@
         }
 
-        private StatisticsInfoTable(StatisticsTableModel model) {
-            build(model);
-        }
-
         @Override
         public Insets getInsets() {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 8467)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 8468)
@@ -767,4 +767,7 @@
         }
 
+        /**
+         * Constructs a new {@code SearchPopupMenu}.
+         */
         public SearchPopupMenu() {
             for (SearchSetting ss: org.openstreetmap.josm.actions.search.SearchAction.getSearchHistory()) {
@@ -780,9 +783,7 @@
      */
     protected static class SelectionMenuItem extends JMenuItem implements ActionListener {
-        private final transient DefaultNameFormatter df = DefaultNameFormatter.getInstance();
         protected transient Collection<? extends OsmPrimitive> sel;
 
         public SelectionMenuItem(Collection<? extends OsmPrimitive> sel) {
-            super();
             this.sel = sel;
             int ways = 0;
@@ -816,4 +817,5 @@
                 this.sel=new ArrayList<>(); // empty selection
             }
+            DefaultNameFormatter df = DefaultNameFormatter.getInstance();
             if (ways + nodes + relations == 1) {
                 text.append(": ");
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 8467)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 8468)
@@ -605,11 +605,14 @@
 
         public class DialogPopupMenu extends JPopupMenu {
-            private final ButtonGroup buttonHidingGroup = new ButtonGroup();
-            private final JMenu buttonHidingMenu = new JMenu(tr("Side buttons"));
-
+
+            /**
+             * Constructs a new {@code DialogPopupMenu}.
+             */
             public DialogPopupMenu() {
                 alwaysShown.setSelected(buttonHiding == ButtonHidingType.ALWAYS_SHOWN);
                 dynamic.setSelected(buttonHiding == ButtonHidingType.DYNAMIC);
                 alwaysHidden.setSelected(buttonHiding == ButtonHidingType.ALWAYS_HIDDEN);
+                ButtonGroup buttonHidingGroup = new ButtonGroup();
+                JMenu buttonHidingMenu = new JMenu(tr("Side buttons"));
                 for (JRadioButtonMenuItem rb : new JRadioButtonMenuItem[]{alwaysShown, dynamic, alwaysHidden}) {
                     buttonHidingGroup.add(rb);
Index: trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 8467)
+++ trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 8468)
@@ -14,5 +14,4 @@
 
 import javax.swing.DefaultListModel;
-import javax.swing.ImageIcon;
 import javax.swing.JLabel;
 import javax.swing.JList;
@@ -195,10 +194,10 @@
     static class BookmarkCellRenderer extends JLabel implements ListCellRenderer<BookmarkList.Bookmark> {
 
-        private ImageIcon icon;
-
+        /**
+         * Constructs a new {@code BookmarkCellRenderer}.
+         */
         public BookmarkCellRenderer() {
             setOpaque(true);
-            icon = ImageProvider.get("dialogs", "bookmark");
-            setIcon(icon);
+            setIcon(ImageProvider.get("dialogs", "bookmark"));
         }
 
@@ -217,8 +216,8 @@
             StringBuilder sb = new StringBuilder(128);
             sb.append("<html>min[latitude,longitude]=<strong>[")
-              .append(area.getMinLat()).append(',').append(area.getMinLon()).append("]</strong>")
-              .append("<br>max[latitude,longitude]=<strong>[")
-              .append(area.getMaxLat()).append(',').append(area.getMaxLon()).append("]</strong>")
-              .append("</html>");
+              .append(area.getMinLat()).append(',').append(area.getMinLon()).append("]</strong>"+
+                      "<br>max[latitude,longitude]=<strong>[")
+              .append(area.getMaxLat()).append(',').append(area.getMaxLon()).append("]</strong>"+
+                      "</html>");
             return sb.toString();
         }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 8467)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java	(revision 8468)
@@ -22,5 +22,5 @@
     public static final Cascade EMPTY_CASCADE = new Cascade();
 
-    protected Map<String, Object> prop = new HashMap<>();
+    private Map<String, Object> prop = new HashMap<>();
 
     private static final Pattern HEX_COLOR_PATTERN = Pattern.compile("#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})");
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 8467)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 8468)
@@ -454,5 +454,5 @@
     }
 
-    protected static final CopyOnWriteArrayList<MapPaintSylesUpdateListener> listeners
+    private static final CopyOnWriteArrayList<MapPaintSylesUpdateListener> listeners
             = new CopyOnWriteArrayList<>();
 
Index: trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java	(revision 8467)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java	(revision 8468)
@@ -318,4 +318,8 @@
 
     class CancelAction extends AbstractAction {
+
+        /**
+         * Constructs a new {@code CancelAction}.
+         */
         public CancelAction() {
             putValue(NAME, tr("Cancel"));
@@ -336,6 +340,8 @@
 
     class AcceptAccessTokenAction extends AbstractAction implements PropertyChangeListener {
-        private transient OAuthToken token;
-
+
+        /**
+         * Constructs a new {@code AcceptAccessTokenAction}.
+         */
         public AcceptAccessTokenAction() {
             putValue(NAME, tr("Accept Access Token"));
@@ -359,6 +365,5 @@
             if (!evt.getPropertyName().equals(AbstractAuthorizationUI.ACCESS_TOKEN_PROP))
                 return;
-            token = (OAuthToken)evt.getNewValue();
-            updateEnabledState(token);
+            updateEnabledState((OAuthToken)evt.getNewValue());
         }
     }
@@ -366,5 +371,5 @@
     class WindowEventHandler extends WindowAdapter {
         @Override
-        public void windowClosing(WindowEvent arg0) {
+        public void windowClosing(WindowEvent e) {
             new CancelAction().cancel();
         }
Index: trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java	(revision 8467)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUI.java	(revision 8468)
@@ -113,5 +113,4 @@
      */
     private class RetrieveRequestTokenPanel extends JPanel {
-        private JCheckBox cbShowAdvancedParameters;
 
         /**
@@ -130,5 +129,6 @@
             gc.weightx = 0.0;
             gc.insets = new Insets(0,0,0,3);
-            pnl.add(cbShowAdvancedParameters = new JCheckBox(), gc);
+            JCheckBox cbShowAdvancedParameters = new JCheckBox();
+            pnl.add(cbShowAdvancedParameters, gc);
             cbShowAdvancedParameters.setSelected(false);
             cbShowAdvancedParameters.addItemListener(
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 8467)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java	(revision 8468)
@@ -67,4 +67,9 @@
     }
 
+    private List<PrefEntry> allData;
+    private List<PrefEntry> displayData = new ArrayList<>();
+    private JosmTextField txtFilter;
+    private PreferencesTable table;
+
     private AdvancedPreference() {
         super(/* ICON(preferences/) */ "advanced", tr("Advanced Preferences"), tr("Setting Preference entries directly. Use with caution!"));
@@ -75,9 +80,4 @@
         return true;
     }
-
-    protected List<PrefEntry> allData;
-    protected List<PrefEntry> displayData = new ArrayList<>();
-    protected JosmTextField txtFilter;
-    protected PreferencesTable table;
 
     @Override
Index: trunk/src/org/openstreetmap/josm/tools/TextTagParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 8467)
+++ trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 8468)
@@ -30,8 +30,8 @@
 
     // properties need JOSM restart to apply, modified rarely enough
-    protected static final int MAX_KEY_LENGTH = Main.pref.getInteger("tags.paste.max-key-length", 50);
-    protected static final int MAX_KEY_COUNT = Main.pref.getInteger("tags.paste.max-key-count", 30);
-    protected static final String KEY_PATTERN = Main.pref.get("tags.paste.tag-pattern", "[0-9a-zA-Z:_]*");
-    protected static final int MAX_VALUE_LENGTH = 255;
+    private static final int MAX_KEY_LENGTH = Main.pref.getInteger("tags.paste.max-key-length", 50);
+    private static final int MAX_KEY_COUNT = Main.pref.getInteger("tags.paste.max-key-count", 30);
+    private static final String KEY_PATTERN = Main.pref.get("tags.paste.tag-pattern", "[0-9a-zA-Z:_]*");
+    private static final int MAX_VALUE_LENGTH = 255;
 
     private TextTagParser() {
