Index: applications/editors/josm/plugins/duplicateway/src/org/openstreetmap/josm/plugins/duplicateway/JVector.java
===================================================================
--- applications/editors/josm/plugins/duplicateway/src/org/openstreetmap/josm/plugins/duplicateway/JVector.java	(revision 19329)
+++ applications/editors/josm/plugins/duplicateway/src/org/openstreetmap/josm/plugins/duplicateway/JVector.java	(revision 23190)
@@ -15,5 +15,5 @@
  * A class encapsulating a line Segment treating it as a Vector (
  * direction and length). Includes Utility routines to perform various
- * transformations and Trigonometric operations 
+ * transformations and Trigonometric operations
  *
  * @author Brent Easton
@@ -21,13 +21,13 @@
  */
 public class JVector extends Line2D.Double {
-  
+
   public static final double EARTH_CIRCUMFERENCE = 40041455;
   protected static final double PI_ON_2 = Math.PI / 2.0;
   protected Point2D.Double slopeIntercept = null;
   protected Point2D.Double rtheta = null;
-  
+
   /**
    * Create new JVector joining two points
-   * 
+   *
    * @param x1
    * @param y1
@@ -38,8 +38,8 @@
     super(x1, y1, x2, y2);
   }
-  
+
   /**
    * Create new JVector from another JVector
-   * 
+   *
    * @param v JVector to copy
    */
@@ -51,8 +51,8 @@
     y2 = v.y2;
   }
-  
+
   /**
    * Create a new JVector based on a JOSM Segment object
-   * 
+   *
    * @param s
    */
@@ -60,5 +60,5 @@
     super(s.from.eastNorth.east(), s.from.eastNorth.north(), s.to.eastNorth.east(), s.to.eastNorth.north());
   }
-  
+
   /**
    * Calculate slope/intersect from cartesian co-ords
@@ -70,5 +70,5 @@
     slopeIntercept = new Point2D.Double(slope, intersect);
   }
-  
+
   /**
    * Return the slope of the JVector
@@ -81,5 +81,5 @@
     return slopeIntercept.x;
   }
-  
+
   /**
    * Return the Y intercept of the JVector
@@ -92,5 +92,5 @@
     return slopeIntercept.y;
   }
-  
+
   /**
    * Calculate the polar coordinates for this line as a ray with
@@ -104,5 +104,5 @@
     rtheta = new Point2D.Double(r, theta);
   }
-  
+
   /**
    * Return the length of the line segment
@@ -115,5 +115,5 @@
     return rtheta.x;
   }
-  
+
   /**
    * Return the angle of the line segment
@@ -126,5 +126,5 @@
     return rtheta.y;
   }
-  
+
   /**
    * Convert Polar co-ords to cartesian
@@ -137,8 +137,8 @@
     slopeIntercept = null;
   }
-  
+
   /**
    * Set the line segment using Polar co-ordinates
-   * 
+   *
    * @param r line length
    * @param theta angle
@@ -148,5 +148,5 @@
     polarToCartesian();
   }
-  
+
   /**
    * Set the length of the line segment
@@ -157,5 +157,5 @@
     polarToCartesian();
   }
-  
+
   /**
    * Reverse the direction of the segment
@@ -171,5 +171,5 @@
     rtheta = null;
   }
-  
+
   /**
    * Rotate the line segment about the origin
@@ -183,5 +183,5 @@
     polarToCartesian();
   }
-  
+
   /**
    * Rotate 90 degrees clockwise
@@ -191,5 +191,5 @@
     rotate(-PI_ON_2);
   }
-  
+
   /**
    * Rotate 90 degrees counterclockwise
@@ -199,5 +199,5 @@
     rotate(PI_ON_2);
   }
-  
+
   /**
    * Normalize theta to be in the range -PI < theta < PI
@@ -216,7 +216,7 @@
     return theta;
   }
- 
-  /**
-   * Rotate the line segment 90 degrees and set the length.  
+
+  /**
+   * Rotate the line segment 90 degrees and set the length.
    * @param offset length
    */
@@ -226,24 +226,24 @@
   }
 
-  /* 
-   * Return the distance of the given point from this line. Offset is 
+  /*
+   * Return the distance of the given point from this line. Offset is
    * -ve if the point is to the left of the line, or +ve if to the right
    */
-  
-  
-  /**
-   * Return the distance of the given point from this line. Offset is 
+
+
+  /**
+   * Return the distance of the given point from this line. Offset is
    * -ve if the point is to the left of the line, or +ve if to the right
-   * @param target 
+   * @param target
    */
   protected double calculateOffset(EastNorth target) {
-    
+
     // Calculate the perpendicular interceptor to this point
     EastNorth intersectPoint = perpIntersect(target);
     JVector intersectRay = new JVector(intersectPoint.east(), intersectPoint.north(), target.east(), target.north());
-    
+
     // Offset is equal to the length of the interceptor
     double offset = intersectRay.getLength();
-    
+
     // Check the angle between this line and the interceptor to calculate left/right
     double theta = normalize(getTheta() - intersectRay.getTheta());
@@ -251,8 +251,8 @@
       offset = -offset;
     }
-    
+
     return offset;
   }
-  
+
 
   /**
@@ -282,8 +282,8 @@
    * @return
    */
-  public static double perpDistance(Segment s, EastNorth en) {  
+  public static double perpDistance(Segment s, EastNorth en) {
    return Line2D.ptSegDist(s.from.eastNorth.east(), s.from.eastNorth.north(), s.to.eastNorth.east(), s.to.eastNorth.north(), en.east(), en.north());
   }
-  
+
   /**
    * Calculate the bisector between this and another Vector. A positive offset means
@@ -297,5 +297,5 @@
     double newTheta = Math.PI + ls.getTheta() - getTheta();
     newSeg.setPolar(Math.abs(offset), newSeg.getTheta() - newTheta/2.0);
-    
+
     double angle = normalize(getTheta() - newSeg.getTheta());
     if ((angle < 0 && offset > 0) || (angle > 0 && offset < 0)) {
@@ -304,5 +304,5 @@
     return newSeg;
   }
-  
+
   /**
    * Return the Perpendicular Intersector from a point to this line
@@ -313,5 +313,5 @@
     return perpIntersect(n.eastNorth);
   }
-  
+
   /**
    * Calculate the point on our line closest to the supplied point
@@ -320,5 +320,5 @@
    */
   public EastNorth perpIntersect(EastNorth en) {
-    
+
     /*
      * Calculate the coefficients for the two lines
@@ -326,7 +326,7 @@
      *  2. The perpendicular line through the new point: y = cx + d
      */
-    double perpSlope = -1 / getSlope();    
+    double perpSlope = -1 / getSlope();
     double perpIntercept = en.north() - (en.east() * perpSlope);
-    
+
     /*
      * Solve the simultaneous equation to calculate the intersection
@@ -334,9 +334,9 @@
      *  ax - cx = d - b
      *  x (a-c) = d - b
-     *  x = (d - b) / (a - c) 
+     *  x = (d - b) / (a - c)
      */
     double intersectE = (perpIntercept - getIntercept()) / (getSlope() - perpSlope);
     double intersectN = intersectE * getSlope() + getIntercept();
-    
+
     return new EastNorth(intersectE, intersectN);
   }
