Index: /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 10113)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 10114)
@@ -113,6 +113,6 @@
     protected final transient List<SourceProvider> sourceProviders;
 
-    protected JTable tblIconPaths;
-    protected IconPathTableModel iconPathsModel;
+    private JTable tblIconPaths;
+    private IconPathTableModel iconPathsModel;
 
     protected boolean sourcesInitiallyLoaded;
@@ -412,4 +412,21 @@
      */
     public abstract boolean finish();
+
+    protected boolean doFinish(SourcePrefHelper prefHelper, String iconPref) {
+        boolean changed = prefHelper.put(activeSourcesModel.getSources());
+
+        if (tblIconPaths != null) {
+            List<String> iconPaths = iconPathsModel.getIconPaths();
+
+            if (!iconPaths.isEmpty()) {
+                if (Main.pref.putCollection(iconPref, iconPaths)) {
+                    changed = true;
+                }
+            } else if (Main.pref.putCollection(iconPref, null)) {
+                changed = true;
+            }
+        }
+        return changed;
+    }
 
     /**
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 10113)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPaintPreference.java	(revision 10114)
@@ -86,5 +86,5 @@
     static class MapPaintSourceEditor extends SourceEditor {
 
-        private static final String iconpref = "mappaint.icon.sources";
+        private static final String ICONPREF = "mappaint.icon.sources";
 
         MapPaintSourceEditor() {
@@ -99,20 +99,5 @@
         @Override
         public boolean finish() {
-            List<SourceEntry> activeStyles = activeSourcesModel.getSources();
-
-            boolean changed = MapPaintPrefHelper.INSTANCE.put(activeStyles);
-
-            if (tblIconPaths != null) {
-                List<String> iconPaths = iconPathsModel.getIconPaths();
-
-                if (!iconPaths.isEmpty()) {
-                    if (Main.pref.putCollection(iconpref, iconPaths)) {
-                        changed = true;
-                    }
-                } else if (Main.pref.putCollection(iconpref, null)) {
-                    changed = true;
-                }
-            }
-            return changed;
+            return doFinish(MapPaintPrefHelper.INSTANCE, ICONPREF);
         }
 
@@ -124,5 +109,5 @@
         @Override
         public Collection<String> getInitialIconPathsList() {
-            return Main.pref.getCollection(iconpref, null);
+            return Main.pref.getCollection(ICONPREF, null);
         }
 
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 10113)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 10114)
@@ -28,5 +28,4 @@
 import org.openstreetmap.josm.gui.preferences.SourceEditor;
 import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry;
-import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetReader;
 import org.openstreetmap.josm.gui.preferences.SourceEntry;
 import org.openstreetmap.josm.gui.preferences.SourceProvider;
@@ -34,4 +33,5 @@
 import org.openstreetmap.josm.gui.preferences.SubPreferenceSetting;
 import org.openstreetmap.josm.gui.preferences.TabPreferenceSetting;
+import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetReader;
 import org.openstreetmap.josm.tools.GBC;
 import org.xml.sax.SAXException;
@@ -183,5 +183,5 @@
     static class TaggingPresetSourceEditor extends SourceEditor {
 
-        private static final String iconpref = "taggingpreset.icon.sources";
+        private static final String ICONPREF = "taggingpreset.icon.sources";
 
         TaggingPresetSourceEditor() {
@@ -196,20 +196,5 @@
         @Override
         public boolean finish() {
-            List<SourceEntry> activeStyles = activeSourcesModel.getSources();
-
-            boolean changed = PresetPrefHelper.INSTANCE.put(activeStyles);
-
-            if (tblIconPaths != null) {
-                List<String> iconPaths = iconPathsModel.getIconPaths();
-
-                if (!iconPaths.isEmpty()) {
-                    if (Main.pref.putCollection(iconpref, iconPaths)) {
-                        changed = true;
-                    }
-                } else if (Main.pref.putCollection(iconpref, null)) {
-                    changed = true;
-                }
-            }
-            return changed;
+            return doFinish(PresetPrefHelper.INSTANCE, ICONPREF);
         }
 
@@ -221,5 +206,5 @@
         @Override
         public Collection<String> getInitialIconPathsList() {
-            return Main.pref.getCollection(iconpref, null);
+            return Main.pref.getCollection(ICONPREF, null);
         }
 
