Index: /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationCandidate.java
===================================================================
--- /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationCandidate.java	(revision 27970)
+++ /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationCandidate.java	(revision 27971)
@@ -6,4 +6,5 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
+import static org.openstreetmap.josm.tools.I18n.tr;
 
 /**
@@ -13,39 +14,39 @@
 public class ConflationCandidate {
 
-    OsmPrimitive sourcePrimitive;
-    OsmDataLayer sourceLayer;
-    OsmPrimitive targetPrimitive;
-    OsmDataLayer targetLayer;
+    OsmPrimitive referenceObject;
+    OsmDataLayer referenceLayer;
+    OsmPrimitive subjectObject;
+    OsmDataLayer subjectLayer;
     double cost;
     double distance;
 
-    public ConflationCandidate(OsmPrimitive source, OsmDataLayer sourceLayer,
-            OsmPrimitive target, OsmDataLayer targetLayer, double cost) {
-        if (source == null || target == null) {
-            throw new IllegalArgumentException("Invalid source or target");
+    public ConflationCandidate(OsmPrimitive referenceObject, OsmDataLayer referenceLayer,
+            OsmPrimitive subjectObject, OsmDataLayer subjectLayer, double cost) {
+        if (referenceObject == null || subjectObject == null) {
+            throw new IllegalArgumentException(tr("Invalid reference or subject"));
         }
-        this.sourcePrimitive = source;
-        this.sourceLayer = sourceLayer;
-        this.targetPrimitive = target;
-        this.targetLayer = targetLayer;
+        this.referenceObject = referenceObject;
+        this.referenceLayer = referenceLayer;
+        this.subjectObject = subjectObject;
+        this.subjectLayer = subjectLayer;
         this.cost = cost;
         // TODO: use distance calculated in cost function, and make sure it's in meters?
-        this.distance = ConflationUtils.getCenter(source).distance(ConflationUtils.getCenter(target));
+        this.distance = ConflationUtils.getCenter(referenceObject).distance(ConflationUtils.getCenter(subjectObject));
     }
 
-    public OsmPrimitive getSourcePrimitive() {
-        return sourcePrimitive;
+    public OsmPrimitive getReferenceObject() {
+        return referenceObject;
     }
     
-    public OsmDataLayer getSourceLayer() {
-        return sourceLayer;
+    public OsmDataLayer getReferenceLayer() {
+        return referenceLayer;
     }
     
-    public OsmDataLayer getTargetLayer() {
-        return targetLayer;
+    public OsmDataLayer getSubjectLayer() {
+        return subjectLayer;
     }
 
-    public OsmPrimitive getTargetPrimitive() {
-        return targetPrimitive;
+    public OsmPrimitive getSubjectObject() {
+        return subjectObject;
     }
 
Index: /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationCandidateList.java
===================================================================
--- /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationCandidateList.java	(revision 27970)
+++ /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationCandidateList.java	(revision 27971)
@@ -5,5 +5,4 @@
 package org.openstreetmap.josm.plugins.conflation;
 
-import java.util.Collection;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -25,22 +24,22 @@
 
     public boolean hasCandidate(ConflationCandidate c) {
-        return hasCandidateForSource(c.getSourcePrimitive());
+        return hasCandidateForReference(c.getReferenceObject());
     }
 
-    public boolean hasCandidate(OsmPrimitive src, OsmPrimitive tgt) {
-        return hasCandidateForSource(src) || hasCandidateForTarget(tgt);
+    public boolean hasCandidate(OsmPrimitive referenceObject, OsmPrimitive subjectObject) {
+        return hasCandidateForReference(referenceObject) || hasCandidateForSubject(subjectObject);
     }
 
-    public boolean hasCandidateForSource(OsmPrimitive src) {
-        return getCandidateBySource(src) != null;
+    public boolean hasCandidateForReference(OsmPrimitive referenceObject) {
+        return getCandidateByReference(referenceObject) != null;
     }
 
-    public boolean hasCandidateForTarget(OsmPrimitive tgt) {
-        return getCandidateByTarget(tgt) != null;
+    public boolean hasCandidateForSubject(OsmPrimitive subjectObject) {
+        return getCandidateBySubject(subjectObject) != null;
     }
 
-    public ConflationCandidate getCandidateBySource(OsmPrimitive src) {
+    public ConflationCandidate getCandidateByReference(OsmPrimitive referenceObject) {
         for (ConflationCandidate c : candidates) {
-            if (c.getSourcePrimitive() == src) {
+            if (c.getReferenceObject() == referenceObject) {
                 return c;
             }
@@ -49,7 +48,7 @@
     }
 
-    public ConflationCandidate getCandidateByTarget(OsmPrimitive tgt) {
+    public ConflationCandidate getCandidateBySubject(OsmPrimitive subjectObject) {
         for (ConflationCandidate c : candidates) {
-            if (c.getTargetPrimitive() == tgt) {
+            if (c.getSubjectObject() == subjectObject) {
                 return c;
             }
Index: /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationLayer.java
===================================================================
--- /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationLayer.java	(revision 27970)
+++ /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationLayer.java	(revision 27971)
@@ -60,11 +60,11 @@
                 g2.setColor(Color.cyan);
             }
-            OsmPrimitive src = candidate.getSourcePrimitive();
-            OsmPrimitive tgt = candidate.getTargetPrimitive();
-            if (src != null && tgt != null) {
+            OsmPrimitive reference = candidate.getReferenceObject();
+            OsmPrimitive subject = candidate.getSubjectObject();
+            if (reference != null && subject != null) {
                 GeneralPath path = new GeneralPath();
                 // we have a pair, so draw line between them, FIXME: not good to use getCenter() from here, move to utils?
-                Point p1 = mv.getPoint(ConflationUtils.getCenter(src));
-                Point p2 = mv.getPoint(ConflationUtils.getCenter(tgt));
+                Point p1 = mv.getPoint(ConflationUtils.getCenter(reference));
+                Point p2 = mv.getPoint(ConflationUtils.getCenter(subject));
                 path.moveTo(p1.x, p1.y);
                 path.lineTo(p2.x, p2.y);
@@ -118,10 +118,10 @@
         for (Iterator<ConflationCandidate> it = this.candidates.iterator(); it.hasNext();) {
             ConflationCandidate candidate = it.next();
-            OsmPrimitive src = candidate.getSourcePrimitive();
-            OsmPrimitive tgt = candidate.getTargetPrimitive();
-            if (src != null && src instanceof Node)
-                v.visit((Node)src);
-            if (tgt != null && tgt instanceof Node)
-                v.visit((Node)tgt);
+            OsmPrimitive reference = candidate.getReferenceObject();
+            OsmPrimitive subject = candidate.getSubjectObject();
+            if (reference != null && reference instanceof Node)
+                v.visit((Node)reference);
+            if (subject != null && subject instanceof Node)
+                v.visit((Node)subject);
         }
     }
Index: /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationPlugin.java
===================================================================
--- /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationPlugin.java	(revision 27970)
+++ /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationPlugin.java	(revision 27971)
@@ -26,6 +26,7 @@
         if (oldFrame == null && newFrame != null) {
             if (dialog == null) {
-                Shortcut shortcut = Shortcut.registerShortcut("Conflation", tr("Toggle: {0}", tr("Open Conflation")),
-                        KeyEvent.VK_0, Shortcut.ALT_SHIFT);
+//                Shortcut shortcut = null; Shortcut.registerShortcut("Conflation", tr("Toggle: {0}", tr("Open Conflation")),
+//                        KeyEvent.VK_0, Shortcut.ALT_SHIFT);
+                Shortcut shortcut = null;
                 String name = "Conflation";
                 String tooltip = "Activates the conflation plugin";
Index: plications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationResultsDialog.java
===================================================================
--- /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationResultsDialog.java	(revision 27970)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-package org.openstreetmap.josm.plugins.conflation;
-
-import javax.swing.JDialog;
-
-/**
- *
- * @author Josh Doe <josh@joshdoe.com>
- */
-public class ConflationResultsDialog extends JDialog {
-
-    public ConflationResultsDialog() {
-    }
-
-
-}
Index: plications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationResultsPanel.form
===================================================================
--- /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationResultsPanel.form	(revision 27970)
+++ 	(revision )
@@ -1,28 +1,0 @@
-<?xml version="1.1" encoding="UTF-8" ?>
-
-<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
-  <AuxValues>
-    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
-    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
-    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
-    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
-    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
-  </AuxValues>
-
-  <Layout>
-    <DimensionLayout dim="0">
-      <Group type="103" groupAlignment="0" attributes="0">
-          <EmptySpace min="0" pref="726" max="32767" attributes="0"/>
-      </Group>
-    </DimensionLayout>
-    <DimensionLayout dim="1">
-      <Group type="103" groupAlignment="0" attributes="0">
-          <EmptySpace min="0" pref="552" max="32767" attributes="0"/>
-      </Group>
-    </DimensionLayout>
-  </Layout>
-</Form>
Index: plications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationResultsPanel.java
===================================================================
--- /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationResultsPanel.java	(revision 27970)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-/*
- * ConflationResultsPanel.java
- *
- * Created on Apr 28, 2011, 3:30:59 PM
- */
-
-package org.openstreetmap.josm.plugins.conflation;
-
-/**
- *
- * @author Josh
- */
-public class ConflationResultsPanel extends javax.swing.JPanel {
-
-    /** Creates new form ConflationResultsPanel */
-    public ConflationResultsPanel() {
-        initComponents();
-    }
-
-    /** This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
-     */
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents() {
-
-        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
-        this.setLayout(layout);
-        layout.setHorizontalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 726, Short.MAX_VALUE)
-        );
-        layout.setVerticalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 552, Short.MAX_VALUE)
-        );
-    }// </editor-fold>//GEN-END:initComponents
-
-
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    // End of variables declaration//GEN-END:variables
-
-}
Index: /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationToggleDialog.java
===================================================================
--- /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationToggleDialog.java	(revision 27970)
+++ /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationToggleDialog.java	(revision 27971)
@@ -1,6 +1,2 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
 package org.openstreetmap.josm.plugins.conflation;
 
@@ -132,17 +128,17 @@
             if (!lsm.isSelectionEmpty() && firstIndex == lastIndex && firstIndex < candidates.size()) {
                 ConflationCandidate c = candidates.get(firstIndex);
-                OsmPrimitive src = c.getSourcePrimitive();
-                OsmPrimitive tgt = c.getTargetPrimitive();
+                OsmPrimitive reference = c.getReferenceObject();
+                OsmPrimitive subject = c.getSubjectObject();
 
                 conflationLayer.setSelectedCandidate(c);
 
-                src.getDataSet().clearSelection();
-                tgt.getDataSet().clearSelection();
-                src.getDataSet().addSelected(src);
-                tgt.getDataSet().addSelected(tgt);
+                reference.getDataSet().clearSelection();
+                subject.getDataSet().clearSelection();
+                reference.getDataSet().addSelected(reference);
+                subject.getDataSet().addSelected(subject);
 
                 // zoom/center on pair
                 BoundingXYVisitor box = new BoundingXYVisitor();
-                box.computeBoundingBox(Arrays.asList(src, tgt));
+                box.computeBoundingBox(Arrays.asList(reference, subject));
                 if (box.getBounds() == null) {
                     return;
@@ -212,5 +208,5 @@
             ReplaceGeometryAction rg = new ReplaceGeometryAction();
             ConflationCandidate c = conflationLayer.getSelectedCandidate();
-            if (rg.replace(c.getSourcePrimitive(), c.getTargetPrimitive())) {
+            if (rg.replace(c.getReferenceObject(), c.getSubjectObject())) {
                 candidates.remove(c);
             }
@@ -222,23 +218,22 @@
         private JPanel costsPanel;
         private JCheckBox distanceCheckBox;
-        private JButton freezeSourceButton;
-        private JButton freezeTargetButton;
+        private JButton freezeReferenceButton;
+        private JButton freezeSubjectButton;
         private JPanel jPanel3;
         private JPanel jPanel5;
-        private JButton restoreSourceButton;
-        private JButton restoreTargetButton;
-        private JLabel sourceLayerLabel;
-        private JPanel sourcePanel;
-        private JLabel sourceSelectionLabel;
-        private JLabel targetLayerLabel;
-        private JPanel targetPanel;
-        private JLabel targetSelectionLabel;
-        ArrayList<OsmPrimitive> tgtSelection = null;
-        ArrayList<OsmPrimitive> srcSelection = null;
-        OsmDataLayer srcLayer;
-        DataSet tgtDataSet;
-        OsmDataLayer tgtLayer;
-        DataSet srcDataSet;
-        private boolean canceled = false;
+        private JButton restoreReferenceButton;
+        private JButton restoreSubjectButton;
+        private JLabel referenceLayerLabel;
+        private JPanel referencePanel;
+        private JLabel referenceSelectionLabel;
+        private JLabel subjectLayerLabel;
+        private JPanel subjectPanel;
+        private JLabel subjectSelectionLabel;
+        ArrayList<OsmPrimitive> subjectSelection = null;
+        ArrayList<OsmPrimitive> referenceSelection = null;
+        OsmDataLayer referenceLayer;
+        DataSet subjectDataSet;
+        OsmDataLayer subjectLayer;
+        DataSet referenceDataSet;
 
         public ConflationOptionsDialog() {
@@ -251,16 +246,16 @@
 
         private void initComponents() {
-            sourcePanel = new JPanel();
-            sourceLayerLabel = new JLabel();
-            sourceSelectionLabel = new JLabel();
+            referencePanel = new JPanel();
+            referenceLayerLabel = new JLabel();
+            referenceSelectionLabel = new JLabel();
             jPanel3 = new JPanel();
-            restoreSourceButton = new JButton(new RestoreSourceAction());
-            freezeSourceButton = new JButton(new FreezeSourceAction());
-            targetPanel = new JPanel();
-            targetLayerLabel = new JLabel();
-            targetSelectionLabel = new JLabel();
+            restoreReferenceButton = new JButton(new RestoreReferenceAction());
+            freezeReferenceButton = new JButton(new FreezeReferenceAction());
+            subjectPanel = new JPanel();
+            subjectLayerLabel = new JLabel();
+            subjectSelectionLabel = new JLabel();
             jPanel5 = new JPanel();
-            restoreTargetButton = new JButton(new RestoreTargetAction());
-            freezeTargetButton = new JButton(new FreezeTargetAction());
+            restoreSubjectButton = new JButton(new RestoreSubjectAction());
+            freezeSubjectButton = new JButton(new FreezeSubjectAction());
             costsPanel = new JPanel();
             distanceCheckBox = new JCheckBox();
@@ -269,50 +264,50 @@
             pnl.setLayout(new BoxLayout(pnl, BoxLayout.PAGE_AXIS));
 
-            sourcePanel.setBorder(BorderFactory.createTitledBorder("Source"));
-            sourcePanel.setLayout(new BoxLayout(sourcePanel, BoxLayout.PAGE_AXIS));
-
-            sourceLayerLabel.setText("layer");
-            sourcePanel.add(sourceLayerLabel);
-
-            sourceSelectionLabel.setText("Rel.:0 / Ways:0 / Nodes: 0");
-            sourcePanel.add(sourceSelectionLabel);
+            referencePanel.setBorder(BorderFactory.createTitledBorder(tr("Reference")));
+            referencePanel.setLayout(new BoxLayout(referencePanel, BoxLayout.PAGE_AXIS));
+
+            referenceLayerLabel.setText("(none)");
+            referencePanel.add(referenceLayerLabel);
+
+            referenceSelectionLabel.setText("Rel.:0 / Ways:0 / Nodes: 0");
+            referencePanel.add(referenceSelectionLabel);
 
             jPanel3.setLayout(new BoxLayout(jPanel3, BoxLayout.LINE_AXIS));
 
-            restoreSourceButton.setText("Restore");
-            jPanel3.add(restoreSourceButton);
-
-            jPanel3.add(freezeSourceButton);
-
-            sourcePanel.add(jPanel3);
-
-            pnl.add(sourcePanel);
-
-            targetPanel.setBorder(BorderFactory.createTitledBorder("Target"));
-            targetPanel.setLayout(new BoxLayout(targetPanel, BoxLayout.PAGE_AXIS));
-
-            targetLayerLabel.setText("layer");
-            targetPanel.add(targetLayerLabel);
-
-            targetSelectionLabel.setText("Rel.:0 / Ways:0 / Nodes: 0");
-            targetPanel.add(targetSelectionLabel);
+            restoreReferenceButton.setText(tr("Restore"));
+            jPanel3.add(restoreReferenceButton);
+
+            jPanel3.add(freezeReferenceButton);
+
+            referencePanel.add(jPanel3);
+
+            pnl.add(referencePanel);
+
+            subjectPanel.setBorder(BorderFactory.createTitledBorder(tr("Subject")));
+            subjectPanel.setLayout(new BoxLayout(subjectPanel, BoxLayout.PAGE_AXIS));
+
+            subjectLayerLabel.setText("(none)");
+            subjectPanel.add(subjectLayerLabel);
+
+            subjectSelectionLabel.setText("Rel.:0 / Ways:0 / Nodes: 0");
+            subjectPanel.add(subjectSelectionLabel);
 
             jPanel5.setLayout(new BoxLayout(jPanel5, BoxLayout.LINE_AXIS));
 
-            restoreTargetButton.setText("Restore");
-            jPanel5.add(restoreTargetButton);
-
-            freezeTargetButton.setText("Freeze");
-            jPanel5.add(freezeTargetButton);
-
-            targetPanel.add(jPanel5);
-
-            pnl.add(targetPanel);
-
-            costsPanel.setBorder(BorderFactory.createTitledBorder("Costs"));
+            restoreSubjectButton.setText(tr("Restore"));
+            jPanel5.add(restoreSubjectButton);
+
+            freezeSubjectButton.setText(tr("Freeze"));
+            jPanel5.add(freezeSubjectButton);
+
+            subjectPanel.add(jPanel5);
+
+            pnl.add(subjectPanel);
+
+            costsPanel.setBorder(BorderFactory.createTitledBorder(tr("Costs")));
             costsPanel.setLayout(new BoxLayout(costsPanel, BoxLayout.LINE_AXIS));
 
             distanceCheckBox.setSelected(true);
-            distanceCheckBox.setText("Distance");
+            distanceCheckBox.setText(tr("Distance"));
             distanceCheckBox.setEnabled(false);
             costsPanel.add(distanceCheckBox);
@@ -328,13 +323,13 @@
             super.buttonAction(buttonIndex, evt);
             if (buttonIndex == 0) {
-                criteriaTabConflateButtonActionPerformed();
-            }
-        }
-
-        private void criteriaTabConflateButtonActionPerformed() {
+                performConflation();
+            }
+        }
+
+        private void performConflation() {
 
             // some initialization
-            int n = tgtSelection.size();
-            int m = srcSelection.size();
+            int n = subjectSelection.size();
+            int m = referenceSelection.size();
             int maxLen = Math.max(n, m);
             double cost[][] = new double[maxLen][maxLen];
@@ -343,5 +338,5 @@
             for (int i = 0; i < n; i++) {
                 for (int j = 0; j < m; j++) {
-                    cost[i][j] = ConflationUtils.calcCost(tgtSelection.get(i), srcSelection.get(j));
+                    cost[i][j] = ConflationUtils.calcCost(subjectSelection.get(i), referenceSelection.get(j));
                 }
             }
@@ -349,24 +344,24 @@
             // perform assignment using Hungarian algorithm
             int[][] assignment = HungarianAlgorithm.hgAlgorithm(cost, "min");
-            OsmPrimitive tgt, src;
+            OsmPrimitive subObject, refObject;
             candidates.clear();
             for (int i = 0; i < maxLen; i++) {
-                int tgtIdx = assignment[i][0];
-                int srcIdx = assignment[i][1];
-                if (tgtIdx < n) {
-                    tgt = tgtSelection.get(tgtIdx);
+                int subIdx = assignment[i][0];
+                int refIdx = assignment[i][1];
+                if (subIdx < n) {
+                    subObject = subjectSelection.get(subIdx);
                 } else {
-                    tgt = null;
-                }
-                if (srcIdx < m) {
-                    src = srcSelection.get(srcIdx);
+                    subObject = null;
+                }
+                if (refIdx < m) {
+                    refObject = referenceSelection.get(refIdx);
                 } else {
-                    src = null;
-                }
-
-                if (tgt != null && src != null) {
+                    refObject = null;
+                }
+
+                if (subObject != null && refObject != null) {
                     // TODO: do something!
-                    if (!(candidates.hasCandidate(src, tgt) || candidates.hasCandidate(tgt, src))) {
-                        candidates.add(new ConflationCandidate(src, srcLayer, tgt, tgtLayer, cost[tgtIdx][srcIdx]));
+                    if (!(candidates.hasCandidate(refObject, subObject) || candidates.hasCandidate(subObject, refObject))) {
+                        candidates.add(new ConflationCandidate(refObject, referenceLayer, subObject, subjectLayer, cost[subIdx][refIdx]));
                     }
                 }
@@ -375,5 +370,5 @@
             // add conflation layer
             try {
-                conflationLayer = new ConflationLayer(tgtLayer.data, candidates);
+                conflationLayer = new ConflationLayer(subjectLayer.data, candidates);
                 Main.main.addLayer(conflationLayer);
             } catch (Exception ex) {
@@ -390,57 +385,57 @@
         }
 
-        class RestoreTargetAction extends JosmAction {
-
-            public RestoreTargetAction() {
-                super(tr("Restore"), null, tr("Restore target selection"), null, false);
+        class RestoreSubjectAction extends JosmAction {
+
+            public RestoreSubjectAction() {
+                super(tr("Restore"), null, tr("Restore subject selection"), null, false);
             }
 
             @Override
             public void actionPerformed(ActionEvent e) {
-                if (tgtLayer != null && tgtDataSet != null && tgtSelection != null && !tgtSelection.isEmpty()) {
-                    Main.map.mapView.setActiveLayer(tgtLayer);
-                    tgtLayer.setVisible(true);
-                    tgtDataSet.setSelected(tgtSelection);
-                }
-            }
-        }
-
-        class RestoreSourceAction extends JosmAction {
-
-            public RestoreSourceAction() {
-                super(tr("Restore"), null, tr("Restore source selection"), null, false);
+                if (subjectLayer != null && subjectDataSet != null && subjectSelection != null && !subjectSelection.isEmpty()) {
+                    Main.map.mapView.setActiveLayer(subjectLayer);
+                    subjectLayer.setVisible(true);
+                    subjectDataSet.setSelected(subjectSelection);
+                }
+            }
+        }
+
+        class RestoreReferenceAction extends JosmAction {
+
+            public RestoreReferenceAction() {
+                super(tr("Restore"), null, tr("Restore reference selection"), null, false);
             }
 
             @Override
             public void actionPerformed(ActionEvent e) {
-                if (srcLayer != null && srcDataSet != null && srcSelection != null && !srcSelection.isEmpty()) {
-                    Main.map.mapView.setActiveLayer(srcLayer);
-                    srcLayer.setVisible(true);
-                    srcDataSet.setSelected(srcSelection);
-                }
-            }
-        }
-
-        class FreezeTargetAction extends JosmAction {
-
-            public FreezeTargetAction() {
-                super(tr("Freeze"), null, tr("Freeze target selection"), null, false);
+                if (referenceLayer != null && referenceDataSet != null && referenceSelection != null && !referenceSelection.isEmpty()) {
+                    Main.map.mapView.setActiveLayer(referenceLayer);
+                    referenceLayer.setVisible(true);
+                    referenceDataSet.setSelected(referenceSelection);
+                }
+            }
+        }
+
+        class FreezeSubjectAction extends JosmAction {
+
+            public FreezeSubjectAction() {
+                super(tr("Freeze"), null, tr("Freeze subject selection"), null, false);
             }
 
             @Override
             public void actionPerformed(ActionEvent e) {
-                if (tgtDataSet != null && tgtDataSet == Main.main.getCurrentDataSet()) {
-//                targetDataSet.removeDataSetListener(this); FIXME:
-                }
-                tgtDataSet = Main.main.getCurrentDataSet();
-//            targetDataSet.addDataSetListener(tableModel); FIXME:
-                tgtLayer = Main.main.getEditLayer();
-                if (tgtDataSet == null || tgtLayer == null) {
+                if (subjectDataSet != null && subjectDataSet == Main.main.getCurrentDataSet()) {
+//                subjectDataSet.removeDataSetListener(this); FIXME:
+                }
+                subjectDataSet = Main.main.getCurrentDataSet();
+//            subjectDataSet.addDataSetListener(tableModel); FIXME:
+                subjectLayer = Main.main.getEditLayer();
+                if (subjectDataSet == null || subjectLayer == null) {
                     JOptionPane.showMessageDialog(Main.parent, tr("No valid OSM data layer present."),
                             tr("Error freezing selection"), JOptionPane.ERROR_MESSAGE);
                     return;
                 }
-                tgtSelection = new ArrayList<OsmPrimitive>(tgtDataSet.getSelected());
-                if (tgtSelection.isEmpty()) {
+                subjectSelection = new ArrayList<OsmPrimitive>(subjectDataSet.getSelected());
+                if (subjectSelection.isEmpty()) {
                     JOptionPane.showMessageDialog(Main.parent, tr("Nothing is selected, please try again."),
                             tr("Empty selection"), JOptionPane.ERROR_MESSAGE);
@@ -451,5 +446,5 @@
                 int numWays = 0;
                 int numRelations = 0;
-                for (OsmPrimitive p : tgtSelection) {
+                for (OsmPrimitive p : subjectSelection) {
                     switch (p.getType()) {
                         case NODE:
@@ -466,30 +461,30 @@
 
                 // FIXME: translate correctly
-                targetLayerLabel.setText(tgtLayer.getName());
-                targetSelectionLabel.setText(String.format("Rel.: %d / Ways: %d / Nodes: %d", numRelations, numWays, numNodes));
-            }
-        }
-
-        class FreezeSourceAction extends JosmAction {
-
-            public FreezeSourceAction() {
-                super(tr("Freeze"), null, tr("Freeze target selection"), null, false);
+                subjectLayerLabel.setText(subjectLayer.getName());
+                subjectSelectionLabel.setText(String.format("Rel.: %d / Ways: %d / Nodes: %d", numRelations, numWays, numNodes));
+            }
+        }
+
+        class FreezeReferenceAction extends JosmAction {
+
+            public FreezeReferenceAction() {
+                super(tr("Freeze"), null, tr("Freeze subject selection"), null, false);
             }
 
             @Override
             public void actionPerformed(ActionEvent e) {
-                if (srcDataSet != null && srcDataSet == Main.main.getCurrentDataSet()) {
-//                sourceDataSet.removeDataSetListener(this); FIXME:
-                }
-                srcDataSet = Main.main.getCurrentDataSet();
-//            sourceDataSet.addDataSetListener(this); FIXME:
-                srcLayer = Main.main.getEditLayer();
-                if (srcDataSet == null || srcLayer == null) {
+                if (referenceDataSet != null && referenceDataSet == Main.main.getCurrentDataSet()) {
+//                referenceDataSet.removeDataSetListener(this); FIXME:
+                }
+                referenceDataSet = Main.main.getCurrentDataSet();
+//            referenceDataSet.addDataSetListener(this); FIXME:
+                referenceLayer = Main.main.getEditLayer();
+                if (referenceDataSet == null || referenceLayer == null) {
                     JOptionPane.showMessageDialog(Main.parent, tr("No valid OSM data layer present."),
                             tr("Error freezing selection"), JOptionPane.ERROR_MESSAGE);
                     return;
                 }
-                srcSelection = new ArrayList<OsmPrimitive>(srcDataSet.getSelected());
-                if (srcSelection.isEmpty()) {
+                referenceSelection = new ArrayList<OsmPrimitive>(referenceDataSet.getSelected());
+                if (referenceSelection.isEmpty()) {
                     JOptionPane.showMessageDialog(Main.parent, tr("Nothing is selected, please try again."),
                             tr("Empty selection"), JOptionPane.ERROR_MESSAGE);
@@ -500,5 +495,5 @@
                 int numWays = 0;
                 int numRelations = 0;
-                for (OsmPrimitive p : srcSelection) {
+                for (OsmPrimitive p : referenceSelection) {
                     switch (p.getType()) {
                         case NODE:
@@ -515,6 +510,6 @@
 
                 // FIXME: translate correctly
-                sourceLayerLabel.setText(srcLayer.getName());
-                sourceSelectionLabel.setText(String.format("Rel.: %d / Ways: %d / Nodes: %d", numRelations, numWays, numNodes));
+                referenceLayerLabel.setText(referenceLayer.getName());
+                referenceSelectionLabel.setText(String.format("Rel.: %d / Ways: %d / Nodes: %d", numRelations, numWays, numNodes));
             }
         }
@@ -530,5 +525,5 @@
         for (OsmPrimitive p : prims) {
             for (ConflationCandidate c : candidates) {
-                if (c.getSourcePrimitive().equals(p) || c.getTargetPrimitive().equals(p)) {
+                if (c.getReferenceObject().equals(p) || c.getSubjectObject().equals(p)) {
                     candidates.remove(c);
                     break;
Index: /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationUtils.java
===================================================================
--- /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationUtils.java	(revision 27970)
+++ /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/ConflationUtils.java	(revision 27971)
@@ -1,6 +1,2 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
 package org.openstreetmap.josm.plugins.conflation;
 
@@ -10,8 +6,4 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 
-/**
- *
- * @author Josh
- */
 public final class ConflationUtils {
     private final static double MAX_COST = Double.MAX_VALUE;
@@ -27,14 +19,14 @@
      * now, later we can also use dissimilarity between tags.
      *
-     * @param   source      the reference <code>OsmPrimitive</code>.
-     * @param   target   the non-reference <code>OsmPrimitive</code>.
+     * @param   referenceObject      the reference <code>OsmPrimitive</code>.
+     * @param   subjectObject   the non-reference <code>OsmPrimitive</code>.
      */
-    public static double calcCost(OsmPrimitive source, OsmPrimitive target) {
-        if (source==target) {
+    public static double calcCost(OsmPrimitive referenceObject, OsmPrimitive subjectObject) {
+        if (referenceObject==subjectObject) {
             return MAX_COST;
         }
         
         try {
-            return getCenter(source).distance(getCenter(target));
+            return getCenter(referenceObject).distance(getCenter(subjectObject));
         } catch (Exception e) {
             return MAX_COST;
Index: /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/MatchTableModel.java
===================================================================
--- /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/MatchTableModel.java	(revision 27970)
+++ /applications/editors/josm/plugins/conflation/src/org/openstreetmap/josm/plugins/conflation/MatchTableModel.java	(revision 27971)
@@ -1,6 +1,2 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
 package org.openstreetmap.josm.plugins.conflation;
 
@@ -10,4 +6,5 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.TagCollection;
+import static org.openstreetmap.josm.tools.I18n.tr;
 
 /**
@@ -17,5 +14,5 @@
 
     private ConflationCandidateList candidates = null;
-    private final static String[] columnNames = {"Mine", "Theirs", "Distance (m)", "Cost", "Tags"};
+    private final static String[] columnNames = {tr("Reference"), tr("Subject"), "Distance (m)", "Cost", "Tags"};
 
     @Override
@@ -42,7 +39,7 @@
         ConflationCandidate c = candidates.get(row);
         if (col == 0) {
-            return c.getSourcePrimitive();
+            return c.getReferenceObject();
         } else if (col == 1) {
-            return c.getTargetPrimitive();
+            return c.getSubjectObject();
         } else if (col == 2) {
             return c.getDistance();
@@ -52,6 +49,6 @@
         if (col == 4) {
             HashSet<OsmPrimitive> set = new HashSet<OsmPrimitive>();
-            set.add(c.getSourcePrimitive());
-            set.add(c.getTargetPrimitive());
+            set.add(c.getReferenceObject());
+            set.add(c.getSubjectObject());
             TagCollection tags = TagCollection.unionOfAllPrimitives(set);
             Set<String> keys = tags.getKeysWithMultipleValues();
Index: /applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/ReplaceGeometryAction.java
===================================================================
--- /applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/ReplaceGeometryAction.java	(revision 27970)
+++ /applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/ReplaceGeometryAction.java	(revision 27971)
@@ -80,9 +80,9 @@
      * Replace or upgrade a node to a way or multipolygon
      *
-     * @param node
-     * @param target
+     * @param subjectNode node to be replaced
+     * @param referenceObject object with greater spatial quality
      */
-    public boolean replaceNode(Node node, OsmPrimitive target) {
-        if (!OsmPrimitive.getFilteredList(node.getReferrers(), Way.class).isEmpty()) {
+    public boolean replaceNode(Node subjectNode, OsmPrimitive referenceObject) {
+        if (!OsmPrimitive.getFilteredList(subjectNode.getReferrers(), Way.class).isEmpty()) {
             JOptionPane.showMessageDialog(Main.parent, tr("Node belongs to way(s), cannot replace."),
                     TITLE, JOptionPane.INFORMATION_MESSAGE);
@@ -90,5 +90,5 @@
         }
 
-        if (target instanceof Relation && !((Relation) target).isMultipolygon()) {
+        if (referenceObject instanceof Relation && !((Relation) referenceObject).isMultipolygon()) {
             JOptionPane.showMessageDialog(Main.parent, tr("Relation is not a multipolygon, cannot be used as a replacement."),
                     TITLE, JOptionPane.INFORMATION_MESSAGE);
@@ -98,11 +98,11 @@
         Node nodeToReplace = null;
         // see if we need to replace a node in the replacement way to preserve connection in history
-        if (!node.isNew()) {
+        if (!subjectNode.isNew()) {
             // Prepare a list of nodes that are not important
             Collection<Node> nodePool = new HashSet<Node>();
-            if (target instanceof Way) {
-                nodePool.addAll(getUnimportantNodes((Way) target));
-            } else if (target instanceof Relation) {
-                for (RelationMember member : ((Relation) target).getMembers()) {
+            if (referenceObject instanceof Way) {
+                nodePool.addAll(getUnimportantNodes((Way) referenceObject));
+            } else if (referenceObject instanceof Relation) {
+                for (RelationMember member : ((Relation) referenceObject).getMembers()) {
                     if ((member.getRole().equals("outer") || member.getRole().equals("inner"))
                             && member.isWay()) {
@@ -115,12 +115,12 @@
                 assert false;
             }
-            nodeToReplace = findNearestNode(node, nodePool);
+            nodeToReplace = findNearestNode(subjectNode, nodePool);
         }
 
         List<Command> commands = new ArrayList<Command>();
-        AbstractMap<String, String> nodeTags = (AbstractMap<String, String>) node.getKeys();
+        AbstractMap<String, String> nodeTags = (AbstractMap<String, String>) subjectNode.getKeys();
 
         // merge tags
-        Collection<Command> tagResolutionCommands = getTagConflictResolutionCommands(node, target);
+        Collection<Command> tagResolutionCommands = getTagConflictResolutionCommands(subjectNode, referenceObject);
         if (tagResolutionCommands == null) {
             // user canceled tag merge dialog
@@ -135,11 +135,11 @@
             List<Node> wayNodes = parentWay.getNodes();
             int idx = wayNodes.indexOf(nodeToReplace);
-            wayNodes.set(idx, node);
+            wayNodes.set(idx, subjectNode);
             if (idx == 0 && parentWay.isClosed()) {
                 // node is at start/end of way
-                wayNodes.set(wayNodes.size() - 1, node);
+                wayNodes.set(wayNodes.size() - 1, subjectNode);
             }
             commands.add(new ChangeNodesCommand(parentWay, wayNodes));
-            commands.add(new MoveCommand(node, nodeToReplace.getCoor()));
+            commands.add(new MoveCommand(subjectNode, nodeToReplace.getCoor()));
             commands.add(new DeleteCommand(nodeToReplace));
 
@@ -147,5 +147,5 @@
             if (!nodeTags.isEmpty()) {
                 for (String key : nodeTags.keySet()) {
-                    commands.add(new ChangePropertyCommand(node, key, null));
+                    commands.add(new ChangePropertyCommand(subjectNode, key, null));
                 }
 
@@ -153,11 +153,11 @@
         } else {
             // no node to replace, so just delete the original node
-            commands.add(new DeleteCommand(node));
-        }
-
-        getCurrentDataSet().setSelected(target);
+            commands.add(new DeleteCommand(subjectNode));
+        }
+
+        getCurrentDataSet().setSelected(referenceObject);
 
         Main.main.undoRedo.add(new SequenceCommand(
-                tr("Replace geometry for node {0}", node.getDisplayName(DefaultNameFormatter.getInstance())),
+                tr("Replace geometry for node {0}", subjectNode.getDisplayName(DefaultNameFormatter.getInstance())),
                 commands));
         return true;
@@ -184,8 +184,8 @@
             }
         }
-        Way geometry = selection.get(idxNew);
-        Way way = selection.get(1 - idxNew);
-        
-        if( !overrideNewCheck && (way.isNew() || !geometry.isNew()) ) {
+        Way referenceWay = selection.get(idxNew);
+        Way subjectWay = selection.get(1 - idxNew);
+        
+        if( !overrideNewCheck && (subjectWay.isNew() || !referenceWay.isNew()) ) {
             JOptionPane.showMessageDialog(Main.parent,
                     tr("Please select one way that exists in the database and one new way with correct geometry."),
@@ -193,7 +193,11 @@
             return false;
         }
+        return replaceWayWithWay(subjectWay, referenceWay);
+    }
+    
+    public static boolean replaceWayWithWay(Way subjectWay, Way referenceWay) {
 
         Area a = getCurrentDataSet().getDataSourceArea();
-        if (!isInArea(way, a) || !isInArea(geometry, a)) {
+        if (!isInArea(subjectWay, a) || !isInArea(referenceWay, a)) {
             JOptionPane.showMessageDialog(Main.parent,
                     tr("The ways must be entirely within the downloaded area."),
@@ -202,5 +206,5 @@
         }
         
-        if (hasImportantNode(geometry, way)) {
+        if (hasImportantNode(referenceWay, subjectWay)) {
             JOptionPane.showMessageDialog(Main.parent,
                     tr("The way to be replaced cannot have any nodes with properties or relation memberships unless they belong to both ways."),
@@ -212,5 +216,5 @@
                 
         // merge tags
-        Collection<Command> tagResolutionCommands = getTagConflictResolutionCommands(geometry, way);
+        Collection<Command> tagResolutionCommands = getTagConflictResolutionCommands(referenceWay, subjectWay);
         if (tagResolutionCommands == null) {
             // user canceled tag merge dialog
@@ -220,12 +224,12 @@
         
         // Prepare a list of nodes that are not used anywhere except in the way
-        Collection<Node> nodePool = getUnimportantNodes(way);
+        Collection<Node> nodePool = getUnimportantNodes(subjectWay);
 
         // And the same for geometry, list nodes that can be freely deleted
         Set<Node> geometryPool = new HashSet<Node>();
-        for( Node node : geometry.getNodes() ) {
+        for( Node node : referenceWay.getNodes() ) {
             List<OsmPrimitive> referrers = node.getReferrers();
             if( node.isNew() && !node.isDeleted() && referrers.size() == 1
-                    && referrers.get(0).equals(geometry) && !way.containsNode(node)
+                    && referrers.get(0).equals(referenceWay) && !subjectWay.containsNode(node)
                     && !hasInterestingKey(node))
                 geometryPool.add(node);
@@ -248,5 +252,5 @@
 
         // And prepare a list of nodes with all the replacements
-        List<Node> geometryNodes = geometry.getNodes();
+        List<Node> geometryNodes = referenceWay.getNodes();
         for( int i = 0; i < geometryNodes.size(); i++ )
             if( nodeAssoc.containsKey(geometryNodes.get(i)) )
@@ -254,5 +258,5 @@
 
         // Now do the replacement
-        commands.add(new ChangeNodesCommand(way, geometryNodes));
+        commands.add(new ChangeNodesCommand(subjectWay, geometryNodes));
 
         // Move old nodes to new positions
@@ -261,8 +265,8 @@
 
         // Remove geometry way from selection
-        getCurrentDataSet().clearSelection(geometry);
+        getCurrentDataSet().clearSelection(referenceWay);
 
         // And delete old geometry way
-        commands.add(new DeleteCommand(geometry));
+        commands.add(new DeleteCommand(referenceWay));
 
         // Delete nodes that are not used anymore
@@ -272,5 +276,5 @@
         // Two items in undo stack: change original way and delete geometry way
         Main.main.undoRedo.add(new SequenceCommand(
-                tr("Replace geometry for way {0}", way.getDisplayName(DefaultNameFormatter.getInstance())),
+                tr("Replace geometry for way {0}", subjectWay.getDisplayName(DefaultNameFormatter.getInstance())),
                 commands));
         return true;
@@ -283,5 +287,5 @@
      * @return 
      */
-    protected Collection<Node> getUnimportantNodes(Way way) {
+    protected static Collection<Node> getUnimportantNodes(Way way) {
         Set<Node> nodePool = new HashSet<Node>();
         for (Node n : way.getNodes()) {
@@ -302,5 +306,5 @@
      * @return 
      */
-    protected boolean hasImportantNode(Way geometry, Way way) {
+    protected static boolean hasImportantNode(Way geometry, Way way) {
         for (Node n : way.getNodes()) {
             // if original and replacement way share a node, it's safe to replace
@@ -321,5 +325,5 @@
     }
     
-    protected boolean hasInterestingKey(OsmPrimitive object) {
+    protected static boolean hasInterestingKey(OsmPrimitive object) {
         for (String key : object.getKeys().keySet()) {
             if (!OsmPrimitive.isUninterestingKey(key)) {
@@ -355,9 +359,9 @@
      * needed.
      *
-     * @param source
-     * @param target
+     * @param source object tags are merged from
+     * @param target object tags are merged to
      * @return
      */
-    public List<Command> getTagConflictResolutionCommands(OsmPrimitive source, OsmPrimitive target) {
+    protected static List<Command> getTagConflictResolutionCommands(OsmPrimitive source, OsmPrimitive target) {
         Collection<OsmPrimitive> primitives = Arrays.asList(source, target);
         
@@ -394,5 +398,5 @@
      * @return null if there is no such node.
      */
-    private Node findNearestNode( Node node, Collection<Node> nodes ) {
+    protected static Node findNearestNode( Node node, Collection<Node> nodes ) {
         if( nodes.contains(node) )
             return node;
