Index: /applications/editors/josm/plugins/junctionchecking/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/.settings/org.eclipse.jdt.ui.prefs	(revision 30725)
+++ /applications/editors/josm/plugins/junctionchecking/.settings/org.eclipse.jdt.ui.prefs	(revision 30725)
@@ -0,0 +1,60 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_cleanup.use_type_arguments=false
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/ChannelDiGraphLayer.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/ChannelDiGraphLayer.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/ChannelDiGraphLayer.java	(revision 30725)
@@ -36,179 +36,179 @@
 public class ChannelDiGraphLayer extends Layer implements LayerChangeListener, PropertyChangeListener{
 
-	private ChannelDiGraph digraph;
-	private static final int POINTSIZE = 5;//original 3
-	private static final float LINEWIDTH = 4; //original 2
-	private final ColorSchemeXMLReader cXMLReader;
-	private static final Shape ARROW_HEAD;
-
-	static {
-		Polygon head = new Polygon();
-		head.addPoint(  0,  0);
-		head.addPoint(-15, +4);
-		head.addPoint(-15, -4);
-		ARROW_HEAD = head;
-	}
-
-	//die Farben für die zu zeichnenden Elemente
-	private Color twoWayChannelColor;
-	private Color oneWayChannelColor;
-	private Color toNodeColor;
-	private Color fromNodeColor;
-	private Color nsccChannelColor;
-	private Color selectedChannelColor;
-	private Color partOfJunctionColor;
-
-	public ChannelDiGraphLayer(ColorSchemeXMLReader cXMLReader){
-		super("ChannelDiGraphLayer");
-		MapView.addLayerChangeListener(this);
-		this.cXMLReader = cXMLReader;
-		initColors();
-	}
-
-	public void initColors() {
-		twoWayChannelColor = cXMLReader.getColor("TwoWayChannel");
-		oneWayChannelColor = cXMLReader.getColor("OneWayChannel");
-		toNodeColor = cXMLReader.getColor("ToNode");
-		fromNodeColor = cXMLReader.getColor("FromNode");
-		nsccChannelColor = cXMLReader.getColor("NotConnectedChannel");
-		selectedChannelColor = cXMLReader.getColor("selectedChannel");
-		partOfJunctionColor = cXMLReader.getColor("partOfJunction");
-	}
-
-	@Override
-	public Icon getIcon() {
-		return ImageProvider.get("dialogs", "junctionchecker");
-	}
-
-	@Override
-	public Object getInfoComponent() {
-		return null;
-	}
-
-	@Override
-	public Action[] getMenuEntries() {
-		Action[] action = new Action[0];
-		return action;
-	}
-
-	@Override
-	public String getToolTipText() {
-		return tr ("Channel-Digraph created from the active OSM-Layer");
-	}
-
-	@Override
-	public boolean isMergable(Layer other) {
-		return false;
-	}
-
-	@Override
-	public void mergeFrom(Layer from) {
-	}
-
-	@Override
-	public void paint(Graphics2D g, MapView mv, Bounds box) {
-		if (digraph != null) {
-			for (int i = 0; i < digraph.getChannels().size(); i++) {
-				paintChannel(digraph.getChannelAtPosition(i), g, mv);
-			}
-		}
-	}
-
-	private void paintChannel(final Channel channel, final Graphics2D g, final MapView mv) {
-		Point fromPoint = getCoord(channel.getFromNode(), mv);
-		g.setColor(fromNodeColor);
-		g.fillOval(fromPoint.x - POINTSIZE, fromPoint.y - POINTSIZE, 2 * POINTSIZE, 2 * POINTSIZE);
-		Point toPoint = getCoord(channel.getToNode(), mv);
-		g.setColor(toNodeColor);
-		g.fillOval(toPoint.x - POINTSIZE, toPoint.y - POINTSIZE, 2 * POINTSIZE, 2 * POINTSIZE);
-		Color c;
-		if (channel.isPartOfJunction()) {
-			c = partOfJunctionColor;
-		}
-		else if (channel.isSelected() == true) {
-			c = selectedChannelColor;
-		}
-		else if (channel.isStrongConnected() == false) {
-			c= nsccChannelColor;
-		}
-		else if (channel.getBackChannelID() != -100) {
-			c = twoWayChannelColor;
-		}
-		else {
-			c = oneWayChannelColor;
-		}
-		g.setColor(c);
-		g.setStroke(new BasicStroke(LINEWIDTH));
-		g.draw(new Line2D.Float(fromPoint.x, fromPoint.y, toPoint.x, toPoint.y));
-		double angle = angleFromXAxis(fromPoint, toPoint);
-		Shape head = ARROW_HEAD;
-		head = AffineTransform.getRotateInstance(angle).createTransformedShape(head);
-		head = AffineTransform.getTranslateInstance(toPoint.x, toPoint.y).createTransformedShape(head);
-		g.fill(head);
-
-	}
-
-	private Point getCoord(OSMNode node, MapView mv) {
-		return mv.getPoint(Main.getProjection().latlon2eastNorth(new LatLon(node.getLatitude(), node.getLongitude())));
-	}
-
-	/**
-	 * calculates the angle between the x axis and a vector given by two points
-	 * @param p1  first point for vector; != null
-	 * @param p2  second point for vector; != null
-	 * @return  angle in radians, in range [-Pi .. +Pi]
-	 */
-	private double angleFromXAxis(Point p1, Point p2) {
-		assert p1 != null && p2 != null;
-
-		final float vecX = p2.x - p1.x;
-		final float vecY = p2.y - p1.y;
-
-		final float vecLength = (float)Math.sqrt(vecX*vecX + vecY*vecY);
-
-		final float dotProductVecAxis = vecX;
-
-		float angle = (float)Math.acos(dotProductVecAxis / vecLength);
-
-		if (p2.y < p1.y) {
-			angle = -angle;
-		}
-
-		assert -Math.PI*0.5 < angle && angle <= Math.PI*0.5;
-
-		return angle;
-	}
-
-
-	@Override
-	public void visitBoundingBox(BoundingXYVisitor v) {
-	}
-
-	public void setDiGraph(ChannelDiGraph digraph) {
-		this.digraph = digraph;
-	}
-
-	public void activeLayerChange(Layer oldLayer, Layer newLayer) {
-
-	}
-
-	public void layerAdded(Layer newLayer) {
-	}
-
-	public void layerRemoved(Layer oldLayer) {
-		if (oldLayer == this) {
-			MapView.removeLayerChangeListener(this);
-		}
-	}
-
-	public ChannelDiGraph getDigraph() {
-		return digraph;
-	}
-
-	public void setDigraph(ChannelDiGraph digraph) {
-		this.digraph = digraph;
-	}
-
-	public void propertyChange(PropertyChangeEvent evt) {
-	}
+    private ChannelDiGraph digraph;
+    private static final int POINTSIZE = 5;//original 3
+    private static final float LINEWIDTH = 4; //original 2
+    private final ColorSchemeXMLReader cXMLReader;
+    private static final Shape ARROW_HEAD;
+
+    static {
+        Polygon head = new Polygon();
+        head.addPoint(  0,  0);
+        head.addPoint(-15, +4);
+        head.addPoint(-15, -4);
+        ARROW_HEAD = head;
+    }
+
+    //die Farben für die zu zeichnenden Elemente
+    private Color twoWayChannelColor;
+    private Color oneWayChannelColor;
+    private Color toNodeColor;
+    private Color fromNodeColor;
+    private Color nsccChannelColor;
+    private Color selectedChannelColor;
+    private Color partOfJunctionColor;
+
+    public ChannelDiGraphLayer(ColorSchemeXMLReader cXMLReader){
+        super("ChannelDiGraphLayer");
+        MapView.addLayerChangeListener(this);
+        this.cXMLReader = cXMLReader;
+        initColors();
+    }
+
+    public void initColors() {
+        twoWayChannelColor = cXMLReader.getColor("TwoWayChannel");
+        oneWayChannelColor = cXMLReader.getColor("OneWayChannel");
+        toNodeColor = cXMLReader.getColor("ToNode");
+        fromNodeColor = cXMLReader.getColor("FromNode");
+        nsccChannelColor = cXMLReader.getColor("NotConnectedChannel");
+        selectedChannelColor = cXMLReader.getColor("selectedChannel");
+        partOfJunctionColor = cXMLReader.getColor("partOfJunction");
+    }
+
+    @Override
+    public Icon getIcon() {
+        return ImageProvider.get("dialogs", "junctionchecker");
+    }
+
+    @Override
+    public Object getInfoComponent() {
+        return null;
+    }
+
+    @Override
+    public Action[] getMenuEntries() {
+        Action[] action = new Action[0];
+        return action;
+    }
+
+    @Override
+    public String getToolTipText() {
+        return tr ("Channel-Digraph created from the active OSM-Layer");
+    }
+
+    @Override
+    public boolean isMergable(Layer other) {
+        return false;
+    }
+
+    @Override
+    public void mergeFrom(Layer from) {
+    }
+
+    @Override
+    public void paint(Graphics2D g, MapView mv, Bounds box) {
+        if (digraph != null) {
+            for (int i = 0; i < digraph.getChannels().size(); i++) {
+                paintChannel(digraph.getChannelAtPosition(i), g, mv);
+            }
+        }
+    }
+
+    private void paintChannel(final Channel channel, final Graphics2D g, final MapView mv) {
+        Point fromPoint = getCoord(channel.getFromNode(), mv);
+        g.setColor(fromNodeColor);
+        g.fillOval(fromPoint.x - POINTSIZE, fromPoint.y - POINTSIZE, 2 * POINTSIZE, 2 * POINTSIZE);
+        Point toPoint = getCoord(channel.getToNode(), mv);
+        g.setColor(toNodeColor);
+        g.fillOval(toPoint.x - POINTSIZE, toPoint.y - POINTSIZE, 2 * POINTSIZE, 2 * POINTSIZE);
+        Color c;
+        if (channel.isPartOfJunction()) {
+            c = partOfJunctionColor;
+        }
+        else if (channel.isSelected() == true) {
+            c = selectedChannelColor;
+        }
+        else if (channel.isStrongConnected() == false) {
+            c= nsccChannelColor;
+        }
+        else if (channel.getBackChannelID() != -100) {
+            c = twoWayChannelColor;
+        }
+        else {
+            c = oneWayChannelColor;
+        }
+        g.setColor(c);
+        g.setStroke(new BasicStroke(LINEWIDTH));
+        g.draw(new Line2D.Float(fromPoint.x, fromPoint.y, toPoint.x, toPoint.y));
+        double angle = angleFromXAxis(fromPoint, toPoint);
+        Shape head = ARROW_HEAD;
+        head = AffineTransform.getRotateInstance(angle).createTransformedShape(head);
+        head = AffineTransform.getTranslateInstance(toPoint.x, toPoint.y).createTransformedShape(head);
+        g.fill(head);
+
+    }
+
+    private Point getCoord(OSMNode node, MapView mv) {
+        return mv.getPoint(Main.getProjection().latlon2eastNorth(new LatLon(node.getLatitude(), node.getLongitude())));
+    }
+
+    /**
+     * calculates the angle between the x axis and a vector given by two points
+     * @param p1  first point for vector; != null
+     * @param p2  second point for vector; != null
+     * @return  angle in radians, in range [-Pi .. +Pi]
+     */
+    private double angleFromXAxis(Point p1, Point p2) {
+        assert p1 != null && p2 != null;
+
+        final float vecX = p2.x - p1.x;
+        final float vecY = p2.y - p1.y;
+
+        final float vecLength = (float)Math.sqrt(vecX*vecX + vecY*vecY);
+
+        final float dotProductVecAxis = vecX;
+
+        float angle = (float)Math.acos(dotProductVecAxis / vecLength);
+
+        if (p2.y < p1.y) {
+            angle = -angle;
+        }
+
+        assert -Math.PI*0.5 < angle && angle <= Math.PI*0.5;
+
+        return angle;
+    }
+
+
+    @Override
+    public void visitBoundingBox(BoundingXYVisitor v) {
+    }
+
+    public void setDiGraph(ChannelDiGraph digraph) {
+        this.digraph = digraph;
+    }
+
+    public void activeLayerChange(Layer oldLayer, Layer newLayer) {
+
+    }
+
+    public void layerAdded(Layer newLayer) {
+    }
+
+    public void layerRemoved(Layer oldLayer) {
+        if (oldLayer == this) {
+            MapView.removeLayerChangeListener(this);
+        }
+    }
+
+    public ChannelDiGraph getDigraph() {
+        return digraph;
+    }
+
+    public void setDigraph(ChannelDiGraph digraph) {
+        this.digraph = digraph;
+    }
+
+    public void propertyChange(PropertyChangeEvent evt) {
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/DigraphCreationTask.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/DigraphCreationTask.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/DigraphCreationTask.java	(revision 30725)
@@ -32,120 +32,120 @@
 public class DigraphCreationTask extends PleaseWaitRunnable {
 
-	private final JunctionCheckerPlugin plugin;
-	private final boolean sealGraph;
-	private boolean canceled;
-	private final boolean calculateSCC;
+    private final JunctionCheckerPlugin plugin;
+    private final boolean sealGraph;
+    private boolean canceled;
+    private final boolean calculateSCC;
 
-	private static final String WAYFILTERFILE = "/resources/xml/waysfilter.xml";
+    private static final String WAYFILTERFILE = "/resources/xml/waysfilter.xml";
 
-	public DigraphCreationTask(JunctionCheckerPlugin plugin, boolean sealGraph, boolean calculateSCC) {
-		super(tr ("Create Channel Digraph"), false);
-		this.plugin = plugin;
-		this.sealGraph = sealGraph;
-		this.calculateSCC = calculateSCC;
-	}
+    public DigraphCreationTask(JunctionCheckerPlugin plugin, boolean sealGraph, boolean calculateSCC) {
+        super(tr ("Create Channel Digraph"), false);
+        this.plugin = plugin;
+        this.sealGraph = sealGraph;
+        this.calculateSCC = calculateSCC;
+    }
 
-	@Override
-	protected void cancel() {
-		canceled = true;
-		progressMonitor.cancel();
-	}
+    @Override
+    protected void cancel() {
+        canceled = true;
+        progressMonitor.cancel();
+    }
 
-	@Override
-	protected void finish() {
-		if (canceled) {
-			Main.main.removeLayer(plugin.getChannelDigraphLayer());
-			return;
-		}
-	}
+    @Override
+    protected void finish() {
+        if (canceled) {
+            Main.main.removeLayer(plugin.getChannelDigraphLayer());
+            return;
+        }
+    }
 
-	@Override
-	protected void realRun() throws SAXException, IOException,
-	OsmTransferException {
-		//Prüfen, ob der ausgewählte Layer ein OSMDataLayer ist
-		if (Main.map == null
-				|| !Main.map.isVisible() || !(Main.map.mapView.getActiveLayer() instanceof OsmDataLayer)) {
-			JOptionPane.showMessageDialog(Main.parent, tr("this layer is no osm data layer"));
-			return;
-		}
-		Main.main.removeLayer(plugin.getChannelDigraphLayer());
-		int tickscounter = 4;
-		if (sealGraph) {
-			tickscounter++;
-		}
-		if (calculateSCC) {
-			tickscounter++;
-		}
-		getProgressMonitor().setTicksCount(tickscounter);
-		tickscounter = 1;
-		getProgressMonitor().subTask(tr ("Converting OSM graph into Channel Digraph"));
-		getProgressMonitor().setTicks(tickscounter++);
+    @Override
+    protected void realRun() throws SAXException, IOException,
+    OsmTransferException {
+        //Prüfen, ob der ausgewählte Layer ein OSMDataLayer ist
+        if (Main.map == null
+                || !Main.map.isVisible() || !(Main.map.mapView.getActiveLayer() instanceof OsmDataLayer)) {
+            JOptionPane.showMessageDialog(Main.parent, tr("this layer is no osm data layer"));
+            return;
+        }
+        Main.main.removeLayer(plugin.getChannelDigraphLayer());
+        int tickscounter = 4;
+        if (sealGraph) {
+            tickscounter++;
+        }
+        if (calculateSCC) {
+            tickscounter++;
+        }
+        getProgressMonitor().setTicksCount(tickscounter);
+        tickscounter = 1;
+        getProgressMonitor().subTask(tr ("Converting OSM graph into Channel Digraph"));
+        getProgressMonitor().setTicks(tickscounter++);
 
-		OSMGraph graph = new OSMGraph();
-		//Der vom Benutzer in JOSM ausgewählte, zur Zeit aktive Layer wird der PLugin-OSM-Layer
-		plugin.setOsmlayer((OsmDataLayer)Main.map.mapView.getActiveLayer());
-		Iterator<Node> it = Main.main.getCurrentDataSet().getNodes().iterator();
-		while (it.hasNext()) {
-			graph.addNode(it.next());
-		}
+        OSMGraph graph = new OSMGraph();
+        //Der vom Benutzer in JOSM ausgewählte, zur Zeit aktive Layer wird der PLugin-OSM-Layer
+        plugin.setOsmlayer((OsmDataLayer)Main.map.mapView.getActiveLayer());
+        Iterator<Node> it = Main.main.getCurrentDataSet().getNodes().iterator();
+        while (it.hasNext()) {
+            graph.addNode(it.next());
+        }
 
-		Iterator<Way> itway = Main.main.getCurrentDataSet().getWays()
-		.iterator();
-		while (itway.hasNext()) {
-			graph.addWay(itway.next());
-		}
-		Iterator<Relation> itrel = Main.main.getCurrentDataSet().getRelations()
-		.iterator();
-		while (itrel.hasNext()) {
-			graph.addRelation(itrel.next());
-		}
-		Iterator<DataSource> itdata = Main.main.getCurrentDataSet().dataSources.iterator();
-		while (itdata.hasNext()) {
-			Bounds b = itdata.next().bounds;
-			graph.setBbbottom(b.getMin().getY());
-			graph.setBbleft(b.getMin().getX());
-			graph.setBbright(b.getMax().getX());
-			graph.setBbtop(b.getMax().getY());
-		}
-		getProgressMonitor().subTask(tr("filtering ways"));
-		getProgressMonitor().setTicks(tickscounter++);
-		// Filter mit gewünschten Ways laden
-		XMLFilterReader reader = new XMLFilterReader(
-				WAYFILTERFILE);
-		reader.parseXML();
-		// gewünschte Ways filtern
-		ExecuteFilter ef = new ExecuteFilter(reader.getFilters(), graph);
-		ef.filter();
-		getProgressMonitor().subTask(tr ("creating Channel-Digraph"));
-		getProgressMonitor().setTicks(tickscounter++);
-		// ChannelDiGraphen erzeugen
-		ChannelDigraphBuilder cdgb = new ChannelDigraphBuilder(ef.getOutgoinggraph());
-		cdgb.buildChannelDigraph();
-		StrongConnectednessCalculator scc = new StrongConnectednessCalculator(cdgb.getDigraph());
-		// DiGraph "versiegeln"
-		if (sealGraph) {
-			getProgressMonitor().subTask(tr ("sealing Digraph"));
-			getProgressMonitor().setTicks(tickscounter++);
-			DiGraphSealer sealer = new DiGraphSealer(cdgb.getDigraph(), cdgb
-					.getNewid());
-			sealer.sealingGraph();
-		}
-		//Digraph starke Zusammenhangskomponenten berechnen
-		if (calculateSCC) {
-			getProgressMonitor().subTask(tr ("calculating Strong Connectedness"));
-			getProgressMonitor().setTicks(tickscounter++);
-			scc.calculateSCC();
-		}
-		getProgressMonitor().subTask(tr ("creating DigraphLayer"));
-		getProgressMonitor().setTicks(tickscounter++);
-		plugin.setChannelDigraph(cdgb.getDigraph());
-		plugin.getOsmlayer().setBackgroundLayer(true);
-		plugin.getChannelDigraphLayer().setDigraph(cdgb.getDigraph());
-		plugin.setChannelDigraph(cdgb.getDigraph());
-		plugin.getJcMapMode().setDigraph(cdgb.getDigraph());
-		plugin.setNormalMapMode(Main.map.mapMode);
-		Main.map.selectMapMode(plugin.getJcMapMode());
-		Main.main.addLayer(plugin.getChannelDigraphLayer());
-		Main.map.mapView.setActiveLayer(plugin.getChannelDigraphLayer());
-	}
+        Iterator<Way> itway = Main.main.getCurrentDataSet().getWays()
+        .iterator();
+        while (itway.hasNext()) {
+            graph.addWay(itway.next());
+        }
+        Iterator<Relation> itrel = Main.main.getCurrentDataSet().getRelations()
+        .iterator();
+        while (itrel.hasNext()) {
+            graph.addRelation(itrel.next());
+        }
+        Iterator<DataSource> itdata = Main.main.getCurrentDataSet().dataSources.iterator();
+        while (itdata.hasNext()) {
+            Bounds b = itdata.next().bounds;
+            graph.setBbbottom(b.getMin().getY());
+            graph.setBbleft(b.getMin().getX());
+            graph.setBbright(b.getMax().getX());
+            graph.setBbtop(b.getMax().getY());
+        }
+        getProgressMonitor().subTask(tr("filtering ways"));
+        getProgressMonitor().setTicks(tickscounter++);
+        // Filter mit gewünschten Ways laden
+        XMLFilterReader reader = new XMLFilterReader(
+                WAYFILTERFILE);
+        reader.parseXML();
+        // gewünschte Ways filtern
+        ExecuteFilter ef = new ExecuteFilter(reader.getFilters(), graph);
+        ef.filter();
+        getProgressMonitor().subTask(tr ("creating Channel-Digraph"));
+        getProgressMonitor().setTicks(tickscounter++);
+        // ChannelDiGraphen erzeugen
+        ChannelDigraphBuilder cdgb = new ChannelDigraphBuilder(ef.getOutgoinggraph());
+        cdgb.buildChannelDigraph();
+        StrongConnectednessCalculator scc = new StrongConnectednessCalculator(cdgb.getDigraph());
+        // DiGraph "versiegeln"
+        if (sealGraph) {
+            getProgressMonitor().subTask(tr ("sealing Digraph"));
+            getProgressMonitor().setTicks(tickscounter++);
+            DiGraphSealer sealer = new DiGraphSealer(cdgb.getDigraph(), cdgb
+                    .getNewid());
+            sealer.sealingGraph();
+        }
+        //Digraph starke Zusammenhangskomponenten berechnen
+        if (calculateSCC) {
+            getProgressMonitor().subTask(tr ("calculating Strong Connectedness"));
+            getProgressMonitor().setTicks(tickscounter++);
+            scc.calculateSCC();
+        }
+        getProgressMonitor().subTask(tr ("creating DigraphLayer"));
+        getProgressMonitor().setTicks(tickscounter++);
+        plugin.setChannelDigraph(cdgb.getDigraph());
+        plugin.getOsmlayer().setBackgroundLayer(true);
+        plugin.getChannelDigraphLayer().setDigraph(cdgb.getDigraph());
+        plugin.setChannelDigraph(cdgb.getDigraph());
+        plugin.getJcMapMode().setDigraph(cdgb.getDigraph());
+        plugin.setNormalMapMode(Main.map.mapMode);
+        Main.map.selectMapMode(plugin.getJcMapMode());
+        Main.main.addLayer(plugin.getChannelDigraphLayer());
+        Main.map.mapView.setActiveLayer(plugin.getChannelDigraphLayer());
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckDialog.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckDialog.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckDialog.java	(revision 30725)
@@ -33,124 +33,124 @@
 public class JunctionCheckDialog extends ToggleDialog implements SelectionChangedListener{
 
-	private final JunctionCheckerPlugin plugin;
-	/** Serializable ID */
-	private static final long serialVersionUID = 2952292777351992696L;
-	private final SideButton checkJunctionButton;
-	private final SideButton createDigraphButton;
-	private final SideButton searchJunctionButton;
-	private final JCheckBox digraphsealcb;
-	private final JCheckBox produceRelation;
-	private final JCheckBox sccCB;
-	private final JSpinner nways;
-	private final SpinnerNumberModel smodel;
-	private final JLabel nwayslabel;
+    private final JunctionCheckerPlugin plugin;
+    /** Serializable ID */
+    private static final long serialVersionUID = 2952292777351992696L;
+    private final SideButton checkJunctionButton;
+    private final SideButton createDigraphButton;
+    private final SideButton searchJunctionButton;
+    private final JCheckBox digraphsealcb;
+    private final JCheckBox produceRelation;
+    private final JCheckBox sccCB;
+    private final JSpinner nways;
+    private final SpinnerNumberModel smodel;
+    private final JLabel nwayslabel;
 
-	public JunctionCheckDialog(JunctionCheckerPlugin junctionCheckerGuiPlugin) {
-		super(tr("JunctionChecking"), "junctionchecker", tr("Open the junctionchecking window."),
-				Shortcut.registerShortcut("subwindow:junctionchecker", tr("Toggle: {0}", tr("junctions")),
-						KeyEvent.VK_J, Shortcut.ALT_SHIFT), 150);
-		plugin = junctionCheckerGuiPlugin;
-		//das Digraph Create Panel
-		JPanel digraphPanel = new JPanel(new GridLayout(1, 2));
-		digraphPanel.setBorder(new TitledBorder(tr("Channel-Digraph creation")));
-		digraphsealcb = new JCheckBox(tr("seal Channel Digraph"));
-		digraphsealcb.setSelected(false);
-		//digraphPanel.add(digraphsealcb);
+    public JunctionCheckDialog(JunctionCheckerPlugin junctionCheckerGuiPlugin) {
+        super(tr("JunctionChecking"), "junctionchecker", tr("Open the junctionchecking window."),
+                Shortcut.registerShortcut("subwindow:junctionchecker", tr("Toggle: {0}", tr("junctions")),
+                        KeyEvent.VK_J, Shortcut.ALT_SHIFT), 150);
+        plugin = junctionCheckerGuiPlugin;
+        //das Digraph Create Panel
+        JPanel digraphPanel = new JPanel(new GridLayout(1, 2));
+        digraphPanel.setBorder(new TitledBorder(tr("Channel-Digraph creation")));
+        digraphsealcb = new JCheckBox(tr("seal Channel Digraph"));
+        digraphsealcb.setSelected(false);
+        //digraphPanel.add(digraphsealcb);
 
-		sccCB = new JCheckBox(tr("calculate strong connected channels"));
-		sccCB.setSelected(true);
-		digraphPanel.add(sccCB);
+        sccCB = new JCheckBox(tr("calculate strong connected channels"));
+        sccCB.setSelected(true);
+        digraphPanel.add(sccCB);
 
-		//das Panel zum Junctionchecken
-		JPanel jcPanel = new JPanel(new GridLayout(4, 1));
-		jcPanel.setBorder(new TitledBorder(tr("Junctionchecking/junctions searching")));
+        //das Panel zum Junctionchecken
+        JPanel jcPanel = new JPanel(new GridLayout(4, 1));
+        jcPanel.setBorder(new TitledBorder(tr("Junctionchecking/junctions searching")));
 
-		//Elemente für Grad-Auswahl der Kreuzung
-		JPanel spinnerpanel = new JPanel(new GridLayout(1,2));
-		smodel = new SpinnerNumberModel(3, 1, 20, 1);
-		nways = new JSpinner(smodel);
-		nwayslabel = new JLabel(tr("order of junction (n):"));
-		nwayslabel.setEnabled(false);
-		spinnerpanel.add(nwayslabel);
-		spinnerpanel.add(nways);
+        //Elemente für Grad-Auswahl der Kreuzung
+        JPanel spinnerpanel = new JPanel(new GridLayout(1,2));
+        smodel = new SpinnerNumberModel(3, 1, 20, 1);
+        nways = new JSpinner(smodel);
+        nwayslabel = new JLabel(tr("order of junction (n):"));
+        nwayslabel.setEnabled(false);
+        spinnerpanel.add(nwayslabel);
+        spinnerpanel.add(nways);
 
-		//Elemente zur OSM-Relationen-Erzeugung
-		produceRelation = new JCheckBox(tr("produce OSM-Relations: junction"));
-		produceRelation.setToolTipText(tr("if enabled the plugin produces osm-relations from the junction subgraphs"));
-		produceRelation.setSelected(true);
-		produceRelation.setEnabled(false);
-		jcPanel.add(produceRelation);
-		jcPanel.add(spinnerpanel);
+        //Elemente zur OSM-Relationen-Erzeugung
+        produceRelation = new JCheckBox(tr("produce OSM-Relations: junction"));
+        produceRelation.setToolTipText(tr("if enabled the plugin produces osm-relations from the junction subgraphs"));
+        produceRelation.setSelected(true);
+        produceRelation.setEnabled(false);
+        jcPanel.add(produceRelation);
+        jcPanel.add(spinnerpanel);
 
-		JPanel centerPanel = new JPanel();
-		centerPanel.setLayout(new BoxLayout(centerPanel, BoxLayout.Y_AXIS));
-		centerPanel.add(digraphPanel);
-		centerPanel.add(jcPanel);
+        JPanel centerPanel = new JPanel();
+        centerPanel.setLayout(new BoxLayout(centerPanel, BoxLayout.Y_AXIS));
+        centerPanel.add(digraphPanel);
+        centerPanel.add(jcPanel);
 
-		// ButtonPanel
-		createDigraphButton = new SideButton(new AbstractAction() {
-			{
-				putValue(NAME, marktr("Create"));
-				putValue(SHORT_DESCRIPTION, tr("create the channel digraph"));
-				putValue(SMALL_ICON, ImageProvider.get("dialogs", "digraphcreation"));
-			}
-			@Override
-			public void actionPerformed(ActionEvent e) {
-					DigraphCreationTask dct = new DigraphCreationTask(plugin, digraphsealcb.isSelected(), sccCB.isSelected());
-					Main.worker.submit(dct);
-					setActivateJunctionCheckOrSearch(true);
-			}
-		});
-		checkJunctionButton = new SideButton(new AbstractAction() {
-			{
-				putValue(NAME, marktr("Check "));
-				putValue(SHORT_DESCRIPTION, tr("check the subust for junction properties"));
-				putValue(SMALL_ICON, ImageProvider.get("dialogs", "junctioncheck"));
-			}
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				PrepareJunctionCheckorSearch pjc = new PrepareJunctionCheckorSearch(plugin, smodel.getNumber().intValue(), produceRelation.isSelected());
-				pjc.prepareJunctionCheck();
-			}
-		});
-		checkJunctionButton.setEnabled(false);
-		searchJunctionButton = new SideButton(new AbstractAction() {
-			{
-				putValue(NAME, marktr("Search "));
-				putValue(SHORT_DESCRIPTION, tr("search for junctions in the channel subset"));
-				putValue(SMALL_ICON, ImageProvider.get("dialogs", "junctionsearch"));
-			}
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				PrepareJunctionCheckorSearch pjc = new PrepareJunctionCheckorSearch(plugin, smodel.getNumber().intValue(), produceRelation.isSelected());
-				pjc.prepareJunctionSearch();
-			}
-		});
-		searchJunctionButton.setEnabled(false);
+        // ButtonPanel
+        createDigraphButton = new SideButton(new AbstractAction() {
+            {
+                putValue(NAME, marktr("Create"));
+                putValue(SHORT_DESCRIPTION, tr("create the channel digraph"));
+                putValue(SMALL_ICON, ImageProvider.get("dialogs", "digraphcreation"));
+            }
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                    DigraphCreationTask dct = new DigraphCreationTask(plugin, digraphsealcb.isSelected(), sccCB.isSelected());
+                    Main.worker.submit(dct);
+                    setActivateJunctionCheckOrSearch(true);
+            }
+        });
+        checkJunctionButton = new SideButton(new AbstractAction() {
+            {
+                putValue(NAME, marktr("Check "));
+                putValue(SHORT_DESCRIPTION, tr("check the subust for junction properties"));
+                putValue(SMALL_ICON, ImageProvider.get("dialogs", "junctioncheck"));
+            }
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                PrepareJunctionCheckorSearch pjc = new PrepareJunctionCheckorSearch(plugin, smodel.getNumber().intValue(), produceRelation.isSelected());
+                pjc.prepareJunctionCheck();
+            }
+        });
+        checkJunctionButton.setEnabled(false);
+        searchJunctionButton = new SideButton(new AbstractAction() {
+            {
+                putValue(NAME, marktr("Search "));
+                putValue(SHORT_DESCRIPTION, tr("search for junctions in the channel subset"));
+                putValue(SMALL_ICON, ImageProvider.get("dialogs", "junctionsearch"));
+            }
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                PrepareJunctionCheckorSearch pjc = new PrepareJunctionCheckorSearch(plugin, smodel.getNumber().intValue(), produceRelation.isSelected());
+                pjc.prepareJunctionSearch();
+            }
+        });
+        searchJunctionButton.setEnabled(false);
 
-		createLayout(centerPanel, false, Arrays.asList(new SideButton[] {
-			createDigraphButton, checkJunctionButton, searchJunctionButton
-		}));
-	}
+        createLayout(centerPanel, false, Arrays.asList(new SideButton[] {
+            createDigraphButton, checkJunctionButton, searchJunctionButton
+        }));
+    }
 
 
-	/**
-	 * (de)aktiviert Buttons zum JunctionCheck oder Suche
-	 * @param activate
-	 */
-	public void setActivateJunctionCheckOrSearch(boolean activate) {
-		checkJunctionButton.setEnabled(activate);
-		nways.setEnabled(activate);
-		nwayslabel.setEnabled(activate);
-		produceRelation.setEnabled(activate);
-		searchJunctionButton.setEnabled(activate);
-	}
+    /**
+     * (de)aktiviert Buttons zum JunctionCheck oder Suche
+     * @param activate
+     */
+    public void setActivateJunctionCheckOrSearch(boolean activate) {
+        checkJunctionButton.setEnabled(activate);
+        nways.setEnabled(activate);
+        nwayslabel.setEnabled(activate);
+        produceRelation.setEnabled(activate);
+        searchJunctionButton.setEnabled(activate);
+    }
 
-	/**
-	 * (de)aktiviert Buttons zur Channel Digraph Erstellung
-	 * @param activate
-	 */
-	public void setActivateCreateDigraph(final boolean activate) {
-		GuiHelper.runInEDTAndWait(new Runnable() {
+    /**
+     * (de)aktiviert Buttons zur Channel Digraph Erstellung
+     * @param activate
+     */
+    public void setActivateCreateDigraph(final boolean activate) {
+        GuiHelper.runInEDTAndWait(new Runnable() {
             @Override
             public void run() {
@@ -160,9 +160,9 @@
             }
         });
-	}
+    }
 
-	@Override
-	public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
+    @Override
+    public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
 
-	}
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckTask.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckTask.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckTask.java	(revision 30725)
@@ -23,73 +23,73 @@
 public class JunctionCheckTask extends PleaseWaitRunnable{
 
-	private final JunctionChecker jc;
-	private final JunctionCheckerPlugin plugin;
-	private final int n; //Grad der Kreuzung
-	private final HashSet<Channel> subset; //Teilmge der zu prüfenden Channel
-	private final boolean producerelation;
-	private boolean canceled;
+    private final JunctionChecker jc;
+    private final JunctionCheckerPlugin plugin;
+    private final int n; //Grad der Kreuzung
+    private final HashSet<Channel> subset; //Teilmge der zu prüfenden Channel
+    private final boolean producerelation;
+    private boolean canceled;
 
-	public JunctionCheckTask(JunctionCheckerPlugin plugin, int n, HashSet<Channel> subset, boolean produceRelation) {
-		super("JunctionCheck", false);
-		this.plugin = plugin;
-		this.n = n;
-		this.subset = subset;
-		this.producerelation = produceRelation;
-		jc = new JunctionChecker(plugin.getChannelDigraph() , n);
-	}
+    public JunctionCheckTask(JunctionCheckerPlugin plugin, int n, HashSet<Channel> subset, boolean produceRelation) {
+        super("JunctionCheck", false);
+        this.plugin = plugin;
+        this.n = n;
+        this.subset = subset;
+        this.producerelation = produceRelation;
+        jc = new JunctionChecker(plugin.getChannelDigraph() , n);
+    }
 
-	@Override
-	protected void cancel() {
-		canceled = true;
-		progressMonitor.cancel();
-	}
+    @Override
+    protected void cancel() {
+        canceled = true;
+        progressMonitor.cancel();
+    }
 
-	@Override
-	protected void finish() {
-		if (canceled) {
-			return;
-		}
-		progressMonitor.finishTask();
-		if (jc.isSmallerJunction() ) {
-			showjunction();
-			JOptionPane.showMessageDialog(Main.parent, tr ("The marked channels contains a junctioncandidate (white). To test this candidat mark these channel and press the \"Check\" button again."));
-		}
-		else if (jc.getCheck()) {
-			showjunction();
-			JOptionPane.showMessageDialog(Main.parent, tr ("The marked channels are a {0}-ways junction", n));
-			plugin.getChannelDigraph().ereaseJunctioncandidate();
-			for (int i = 0; i < jc.getSubJunction().size(); i++) {
-				plugin.getChannelDigraph().addJunctioncandidateChannel(jc.getSubJunction().get(i));
-			}
-			if (producerelation) {
-				this.plugin.getRelationProducer().produceRelation(subset, n);
-			}
-		}
-		else if (!jc.getCheck()) {
-			JOptionPane.showMessageDialog(Main.parent, tr ("The marked channels are not a junction:") + jc.getJCheckResult());
+    @Override
+    protected void finish() {
+        if (canceled) {
+            return;
+        }
+        progressMonitor.finishTask();
+        if (jc.isSmallerJunction() ) {
+            showjunction();
+            JOptionPane.showMessageDialog(Main.parent, tr ("The marked channels contains a junctioncandidate (white). To test this candidat mark these channel and press the \"Check\" button again."));
+        }
+        else if (jc.getCheck()) {
+            showjunction();
+            JOptionPane.showMessageDialog(Main.parent, tr ("The marked channels are a {0}-ways junction", n));
+            plugin.getChannelDigraph().ereaseJunctioncandidate();
+            for (int i = 0; i < jc.getSubJunction().size(); i++) {
+                plugin.getChannelDigraph().addJunctioncandidateChannel(jc.getSubJunction().get(i));
+            }
+            if (producerelation) {
+                this.plugin.getRelationProducer().produceRelation(subset, n);
+            }
+        }
+        else if (!jc.getCheck()) {
+            JOptionPane.showMessageDialog(Main.parent, tr ("The marked channels are not a junction:") + jc.getJCheckResult());
 
-		}
+        }
 
-	}
+    }
 
-	@Override
-	protected void realRun() throws SAXException, IOException,
-	OsmTransferException {
-		jc.checkjunctions(new ArrayList<Channel>(subset), getProgressMonitor());
-	}
+    @Override
+    protected void realRun() throws SAXException, IOException,
+    OsmTransferException {
+        jc.checkjunctions(new ArrayList<Channel>(subset), getProgressMonitor());
+    }
 
-	public JunctionChecker getJunctionChecker() {
-		return jc;
-	}
+    public JunctionChecker getJunctionChecker() {
+        return jc;
+    }
 
-	/**
-	 * zeigt den gefundenen Kreuzungskandidatena an
-	 */
-	private void showjunction() {
-		plugin.getChannelDigraph().ereaseJunctioncandidate();
-		for (int i = 0; i < jc.getSubJunction().size(); i++) {
-			plugin.getChannelDigraph().addJunctioncandidateChannel(jc.getSubJunction().get(i));
-		}
-		Main.map.mapView.setActiveLayer(plugin.getChannelDigraphLayer());
-	}
+    /**
+     * zeigt den gefundenen Kreuzungskandidatena an
+     */
+    private void showjunction() {
+        plugin.getChannelDigraph().ereaseJunctioncandidate();
+        for (int i = 0; i < jc.getSubJunction().size(); i++) {
+            plugin.getChannelDigraph().addJunctioncandidateChannel(jc.getSubJunction().get(i));
+        }
+        Main.map.mapView.setActiveLayer(plugin.getChannelDigraphLayer());
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckerMapMode.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckerMapMode.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionCheckerMapMode.java	(revision 30725)
@@ -24,150 +24,150 @@
 public class JunctionCheckerMapMode extends MapMode implements LayerChangeListener{
 
-	MapFrame frame;
-	Point pointPressed;
-	ChannelDiGraphLayer layer;
-	Rectangle oldRect;
-	ChannelDiGraph digraph;
+    MapFrame frame;
+    Point pointPressed;
+    ChannelDiGraphLayer layer;
+    Rectangle oldRect;
+    ChannelDiGraph digraph;
 
-	private static final long serialVersionUID = 3442408951505263850L;
+    private static final long serialVersionUID = 3442408951505263850L;
 
-	public JunctionCheckerMapMode(MapFrame mapFrame, String name, String desc) {
-		super(name, "junctionchecker.png", desc, mapFrame, Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
-	}
+    public JunctionCheckerMapMode(MapFrame mapFrame, String name, String desc) {
+        super(name, "junctionchecker.png", desc, mapFrame, Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
+    }
 
-	@Override public void enterMode() {
-		super.enterMode();
-		Main.map.mapView.addMouseListener(this);
-		Main.map.mapView.addMouseMotionListener(this);
-		MapView.addLayerChangeListener(this);
-	}
+    @Override public void enterMode() {
+        super.enterMode();
+        Main.map.mapView.addMouseListener(this);
+        Main.map.mapView.addMouseMotionListener(this);
+        MapView.addLayerChangeListener(this);
+    }
 
-	@Override public void exitMode() {
-		super.exitMode();
-		Main.map.mapView.removeMouseListener(this);
-		Main.map.mapView.removeMouseMotionListener(this);
-	}
+    @Override public void exitMode() {
+        super.exitMode();
+        Main.map.mapView.removeMouseListener(this);
+        Main.map.mapView.removeMouseMotionListener(this);
+    }
 
 
-	public void activeLayerChange(Layer oldLayer, Layer newLayer) {
-		if (newLayer instanceof ChannelDiGraphLayer) {
-			layer = (ChannelDiGraphLayer) newLayer;
-		}
-	}
+    public void activeLayerChange(Layer oldLayer, Layer newLayer) {
+        if (newLayer instanceof ChannelDiGraphLayer) {
+            layer = (ChannelDiGraphLayer) newLayer;
+        }
+    }
 
-	public void layerAdded(Layer newLayer) {
-	}
+    public void layerAdded(Layer newLayer) {
+    }
 
-	public void layerRemoved(Layer oldLayer) {
-	}
+    public void layerRemoved(Layer oldLayer) {
+    }
 
 
-	public void setFrame(MapFrame newFrame) {
-		frame = newFrame;
-	}
+    public void setFrame(MapFrame newFrame) {
+        frame = newFrame;
+    }
 
-	@Override public void mousePressed(MouseEvent e) {
-		pointPressed = new Point(e.getPoint());
-	}
+    @Override public void mousePressed(MouseEvent e) {
+        pointPressed = new Point(e.getPoint());
+    }
 
 
-	@Override public void mouseDragged(MouseEvent e) {
-		if ( (e.getModifiersEx() & InputEvent.BUTTON1_DOWN_MASK) ==  InputEvent.BUTTON1_DOWN_MASK) {
-			//if button1 is hold, draw the rectangle.
-			paintRect(pointPressed, e.getPoint());
-		}
-	}
+    @Override public void mouseDragged(MouseEvent e) {
+        if ( (e.getModifiersEx() & InputEvent.BUTTON1_DOWN_MASK) ==  InputEvent.BUTTON1_DOWN_MASK) {
+            //if button1 is hold, draw the rectangle.
+            paintRect(pointPressed, e.getPoint());
+        }
+    }
 
-	@Override public void mouseReleased(MouseEvent e) {
-		if (e.getButton() != MouseEvent.BUTTON1) {
-			return;
-		}
-		requestFocusInMapView();
-		digraph.ereaseJunctioncandidate();//um zu verhindern, dass gefundene Kreuzungen/Kandidaten weiterhin weiß gezeichnet werden
-		Point pointReleased = e.getPoint();
+    @Override public void mouseReleased(MouseEvent e) {
+        if (e.getButton() != MouseEvent.BUTTON1) {
+            return;
+        }
+        requestFocusInMapView();
+        digraph.ereaseJunctioncandidate();//um zu verhindern, dass gefundene Kreuzungen/Kandidaten weiterhin weiß gezeichnet werden
+        Point pointReleased = e.getPoint();
 
-		Rectangle r = createRect(pointReleased, pointPressed);
-		//boolean ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0;
-		boolean shift = (e.getModifiers() & ActionEvent.SHIFT_MASK) != 0;
-		//boolean alt = (e.getModifiers() & ActionEvent.ALT_MASK) != 0;
-		if (shift == false) {
-			digraph.ereaseSelectedChannels();
-		}
-		//go through nodes and mark the ones in the selection rect as deleted
-		if (layer != null && digraph != null) {
-			LatLon lefttop = Main.map.mapView.getLatLon(r.x + r.width, r.y + r.height);
-			LatLon rightbottom = Main.map.mapView.getLatLon(r.x, r.y);
-			digraph.detectSelectedChannels(rightbottom.lon(), rightbottom.lat(), lefttop.lon(), lefttop.lat());
-		}
-		oldRect = null;
-		Main.map.mapView.repaint();
+        Rectangle r = createRect(pointReleased, pointPressed);
+        //boolean ctrl = (e.getModifiers() & ActionEvent.CTRL_MASK) != 0;
+        boolean shift = (e.getModifiers() & ActionEvent.SHIFT_MASK) != 0;
+        //boolean alt = (e.getModifiers() & ActionEvent.ALT_MASK) != 0;
+        if (shift == false) {
+            digraph.ereaseSelectedChannels();
+        }
+        //go through nodes and mark the ones in the selection rect as deleted
+        if (layer != null && digraph != null) {
+            LatLon lefttop = Main.map.mapView.getLatLon(r.x + r.width, r.y + r.height);
+            LatLon rightbottom = Main.map.mapView.getLatLon(r.x, r.y);
+            digraph.detectSelectedChannels(rightbottom.lon(), rightbottom.lat(), lefttop.lon(), lefttop.lat());
+        }
+        oldRect = null;
+        Main.map.mapView.repaint();
 
-	}
+    }
 
-	/**
-	 * create rectangle out of two given corners
-	 */
-	public Rectangle createRect(Point p1, Point p2) {
-		int x,y,w,h;
-		if (p1.x == p2.x && p1.y == p2.y) {
-			//if p1 and p2 same points draw a small rectangle around them
-			x = p1.x -1;
-			y = p1.y -1;
-			w = 3;
-			h = 3;
-		} else {
-			if (p1.x < p2.x){
-				x = p1.x;
-				w = p2.x-p1.x;
-			} else {
-				x = p2.x;
-				w = p1.x-p2.x;
-			}
-			if (p1.y < p2.y) {
-				y = p1.y;
-				h = p2.y-p1.y;
-			} else {
-				y = p2.y;
-				h = p1.y-p2.y;
-			}
-		}
-		return new Rectangle(x,y,w,h);
-	}
+    /**
+     * create rectangle out of two given corners
+     */
+    public Rectangle createRect(Point p1, Point p2) {
+        int x,y,w,h;
+        if (p1.x == p2.x && p1.y == p2.y) {
+            //if p1 and p2 same points draw a small rectangle around them
+            x = p1.x -1;
+            y = p1.y -1;
+            w = 3;
+            h = 3;
+        } else {
+            if (p1.x < p2.x){
+                x = p1.x;
+                w = p2.x-p1.x;
+            } else {
+                x = p2.x;
+                w = p1.x-p2.x;
+            }
+            if (p1.y < p2.y) {
+                y = p1.y;
+                h = p2.y-p1.y;
+            } else {
+                y = p2.y;
+                h = p1.y-p2.y;
+            }
+        }
+        return new Rectangle(x,y,w,h);
+    }
 
-	/**
-	 * Draw a selection rectangle on screen.
-	 */
-	private void paintRect(Point p1, Point p2) {
-		if (frame != null) {
-			Graphics g = frame.getGraphics();
-	
-			Rectangle r = oldRect;
-			if (r != null) {
-				//overwrite old rct
-				g.setXORMode(Color.BLACK);
-				g.setColor(Color.WHITE);
-				g.drawRect(r.x,r.y,r.width,r.height);
-			}
-	
-			g.setXORMode(Color.BLACK);
-			g.setColor(Color.WHITE);
-			r = createRect(p1,p2);
-			g.drawRect(r.x,r.y,r.width,r.height);
-			oldRect = r;
-		}
-	}
+    /**
+     * Draw a selection rectangle on screen.
+     */
+    private void paintRect(Point p1, Point p2) {
+        if (frame != null) {
+            Graphics g = frame.getGraphics();
+    
+            Rectangle r = oldRect;
+            if (r != null) {
+                //overwrite old rct
+                g.setXORMode(Color.BLACK);
+                g.setColor(Color.WHITE);
+                g.drawRect(r.x,r.y,r.width,r.height);
+            }
+    
+            g.setXORMode(Color.BLACK);
+            g.setColor(Color.WHITE);
+            r = createRect(p1,p2);
+            g.drawRect(r.x,r.y,r.width,r.height);
+            oldRect = r;
+        }
+    }
 
-	public ChannelDiGraph getDigraph() {
-		return digraph;
-	}
+    public ChannelDiGraph getDigraph() {
+        return digraph;
+    }
 
-	public void setDigraph(ChannelDiGraph digraph) {
-		this.digraph = digraph;
-	}
+    public void setDigraph(ChannelDiGraph digraph) {
+        this.digraph = digraph;
+    }
 
-	@Override
-	public void destroy() {
-		super.destroy();
-		MapView.removeLayerChangeListener(this);
-	}
+    @Override
+    public void destroy() {
+        super.destroy();
+        MapView.removeLayerChangeListener(this);
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionSearchTask.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionSearchTask.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/JunctionSearchTask.java	(revision 30725)
@@ -22,48 +22,48 @@
 public class JunctionSearchTask extends PleaseWaitRunnable{
 
-	private final JunctionChecker jc;
-	private final JunctionCheckerPlugin plugin;
-	private final int n;
-	private final HashSet<Channel> subset;
-	private final boolean produceRelation;
-	private boolean canceled;
+    private final JunctionChecker jc;
+    private final JunctionCheckerPlugin plugin;
+    private final int n;
+    private final HashSet<Channel> subset;
+    private final boolean produceRelation;
+    private boolean canceled;
 
-	public JunctionSearchTask(JunctionCheckerPlugin plugin, int n,
-			HashSet<Channel> subset,
-			boolean produceRelation) {
-		super("JunctionSearch",false);
-		this.plugin = plugin;
-		this.n = n;
-		this.subset = subset;
-		this.produceRelation = produceRelation;
-		jc = new JunctionChecker(plugin.getChannelDigraph(), n);
-	}
+    public JunctionSearchTask(JunctionCheckerPlugin plugin, int n,
+            HashSet<Channel> subset,
+            boolean produceRelation) {
+        super("JunctionSearch",false);
+        this.plugin = plugin;
+        this.n = n;
+        this.subset = subset;
+        this.produceRelation = produceRelation;
+        jc = new JunctionChecker(plugin.getChannelDigraph(), n);
+    }
 
-	@Override
-	protected void cancel() {
-		this.canceled = true;
-		progressMonitor.cancel();
-	}
+    @Override
+    protected void cancel() {
+        this.canceled = true;
+        progressMonitor.cancel();
+    }
 
-	@Override
-	protected void finish() {
-		progressMonitor.finishTask();
-		if (canceled) {
-			return;
-		}
-		ArrayList<HashSet<Channel>> junctions = jc.getJunctions();
-		JOptionPane.showMessageDialog(Main.parent, tr("Number of {0}-ways junctions found: {1}", n, junctions.size()));
-		if (produceRelation) {
-			for (int i = 0; i < junctions.size(); i++) {
-				plugin.getRelationProducer().produceRelation(junctions.get(i) , n);
-			}
-		}
-	}
+    @Override
+    protected void finish() {
+        progressMonitor.finishTask();
+        if (canceled) {
+            return;
+        }
+        ArrayList<HashSet<Channel>> junctions = jc.getJunctions();
+        JOptionPane.showMessageDialog(Main.parent, tr("Number of {0}-ways junctions found: {1}", n, junctions.size()));
+        if (produceRelation) {
+            for (int i = 0; i < junctions.size(); i++) {
+                plugin.getRelationProducer().produceRelation(junctions.get(i) , n);
+            }
+        }
+    }
 
-	@Override
-	protected void realRun() throws SAXException, IOException,
-	OsmTransferException {
-		jc.junctionSearch(new ArrayList<Channel>(subset), getProgressMonitor());
-	}
+    @Override
+    protected void realRun() throws SAXException, IOException,
+    OsmTransferException {
+        jc.junctionSearch(new ArrayList<Channel>(subset), getProgressMonitor());
+    }
 
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/PrepareJunctionCheckorSearch.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/PrepareJunctionCheckorSearch.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/PrepareJunctionCheckorSearch.java	(revision 30725)
@@ -14,39 +14,39 @@
 public class PrepareJunctionCheckorSearch {
 
-	private final JunctionCheckerPlugin plugin;
-	private final int n;
-	private HashSet<Channel> subset;
-	private JunctionCheckTask jct;
-	private final boolean produceRelation;
+    private final JunctionCheckerPlugin plugin;
+    private final int n;
+    private HashSet<Channel> subset;
+    private JunctionCheckTask jct;
+    private final boolean produceRelation;
 
-	public PrepareJunctionCheckorSearch(JunctionCheckerPlugin plugin, int n, boolean producerelation) {
-		this.plugin = plugin;
-		this.n = n;
-		this.subset = new HashSet<Channel>();
-		this.produceRelation = producerelation;
-	}
+    public PrepareJunctionCheckorSearch(JunctionCheckerPlugin plugin, int n, boolean producerelation) {
+        this.plugin = plugin;
+        this.n = n;
+        this.subset = new HashSet<Channel>();
+        this.produceRelation = producerelation;
+    }
 
 
-	protected void prepareJunctionCheck() {
-		if (prepareSubset()) {
-			jct = new JunctionCheckTask(plugin, n, subset, produceRelation);
-			Main.worker.submit(jct);
-		}
-	}
+    protected void prepareJunctionCheck() {
+        if (prepareSubset()) {
+            jct = new JunctionCheckTask(plugin, n, subset, produceRelation);
+            Main.worker.submit(jct);
+        }
+    }
 
-	protected void prepareJunctionSearch() {
-		if (prepareSubset()) {
-			JunctionSearchTask jst = new JunctionSearchTask(plugin, n, subset, produceRelation);
-			Main.worker.submit(jst);
-		}
-	}
+    protected void prepareJunctionSearch() {
+        if (prepareSubset()) {
+            JunctionSearchTask jst = new JunctionSearchTask(plugin, n, subset, produceRelation);
+            Main.worker.submit(jst);
+        }
+    }
 
-	private boolean prepareSubset(){
-		if (plugin.getChannelDigraph().getSelectedChannels().size() < 6) {
-			JOptionPane.showMessageDialog(Main.parent, "Less then 6 channels are selected");
-			return false;
-		}
-		subset = plugin.getChannelDigraph().getSelectedChannels();
-		return true;
-	}
+    private boolean prepareSubset(){
+        if (plugin.getChannelDigraph().getSelectedChannels().size() < 6) {
+            JOptionPane.showMessageDialog(Main.parent, "Less then 6 channels are selected");
+            return false;
+        }
+        subset = plugin.getChannelDigraph().getSelectedChannels();
+        return true;
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/commandlineinterface/CLI.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/commandlineinterface/CLI.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/commandlineinterface/CLI.java	(revision 30725)
@@ -18,179 +18,179 @@
 public class CLI {
 
-	/**
-	 * Die Klasse ist zum Erstellen statistischer Tests, oder zur Erzeugung einer Channel-Digraph-XML-Datei
-	 * @param args
-	 */
-	public static void main(String[] args) {
+    /**
+     * Die Klasse ist zum Erstellen statistischer Tests, oder zur Erzeugung einer Channel-Digraph-XML-Datei
+     * @param args
+     */
+    public static void main(String[] args) {
 
-		String inputosm = "";
-		String outputosm = "";
-		int maxchannelsearch = 0;
-		int ticks = 0;
-		int n = 0;
-		int runs = 0;
+        String inputosm = "";
+        String outputosm = "";
+        int maxchannelsearch = 0;
+        int ticks = 0;
+        int n = 0;
+        int runs = 0;
 
-		final String WAYFILTERFILE = "/resources/xml/waysfilter.xml";
+        final String WAYFILTERFILE = "/resources/xml/waysfilter.xml";
 
-		if (args.length != 6) {
-			System.out.println("Parameter:\n inputosm (osmxml) \n outputchannelosm (outputosmxml) \n maxchannelsearch (wieviele channel sollen max. überprüft werdne) \n ticks (schrittweite) \n n (n-wege-kreuzung) \n durchläufe (wieviele durchläufe pro suchdurchgang)");
-			return;
-		} else {
-			inputosm = args[0];
-			outputosm = args[1];
-			maxchannelsearch = Integer.parseInt(args[2]);
-			ticks = Integer.parseInt(args[3]);
-			n = Integer.parseInt(args[4]);
-			runs = Integer.parseInt(args[5]);
-		}
+        if (args.length != 6) {
+            System.out.println("Parameter:\n inputosm (osmxml) \n outputchannelosm (outputosmxml) \n maxchannelsearch (wieviele channel sollen max. überprüft werdne) \n ticks (schrittweite) \n n (n-wege-kreuzung) \n durchläufe (wieviele durchläufe pro suchdurchgang)");
+            return;
+        } else {
+            inputosm = args[0];
+            outputosm = args[1];
+            maxchannelsearch = Integer.parseInt(args[2]);
+            ticks = Integer.parseInt(args[3]);
+            n = Integer.parseInt(args[4]);
+            runs = Integer.parseInt(args[5]);
+        }
 
-		// XML datei einlesen
-		File file = new File(inputosm);
-		OSMXMLReader xmlreader = new OSMXMLReader(file);
-		xmlreader.parseXML();
+        // XML datei einlesen
+        File file = new File(inputosm);
+        OSMXMLReader xmlreader = new OSMXMLReader(file);
+        xmlreader.parseXML();
 
-		// Filter mit gewünschten Ways laden
-		XMLFilterReader reader = new XMLFilterReader(
-				WAYFILTERFILE);
-		reader.parseXML();
+        // Filter mit gewünschten Ways laden
+        XMLFilterReader reader = new XMLFilterReader(
+                WAYFILTERFILE);
+        reader.parseXML();
 
-		// gewünschte Ways filtern
-		ExecuteFilter ef = new ExecuteFilter(reader.getFilters(), xmlreader
-				.getOSMGraph());
-		ef.filter();
+        // gewünschte Ways filtern
+        ExecuteFilter ef = new ExecuteFilter(reader.getFilters(), xmlreader
+                .getOSMGraph());
+        ef.filter();
 
-		// ChannelDiGraphen erzeugen
-		ChannelDigraphBuilder cdgb = new ChannelDigraphBuilder(ef.getOutgoinggraph());
-		cdgb.buildChannelDigraph();
+        // ChannelDiGraphen erzeugen
+        ChannelDigraphBuilder cdgb = new ChannelDigraphBuilder(ef.getOutgoinggraph());
+        cdgb.buildChannelDigraph();
 
-		// DiGraph "versiegeln"
-		//DiGraphSealer sealer = new DiGraphSealer(cdgb.getDigraph(), cdgb
-		//		.getNewid());
-		//sealer.sealingGraph();
+        // DiGraph "versiegeln"
+        //DiGraphSealer sealer = new DiGraphSealer(cdgb.getDigraph(), cdgb
+        //        .getNewid());
+        //sealer.sealingGraph();
 
-		StrongConnectednessCalculator scc = new StrongConnectednessCalculator(cdgb.getDigraph());
-		scc.calculateSCC();
-		//System.out.println(scc.showNotstronglyConnectednessParts());
+        StrongConnectednessCalculator scc = new StrongConnectednessCalculator(cdgb.getDigraph());
+        scc.calculateSCC();
+        //System.out.println(scc.showNotstronglyConnectednessParts());
 
-		if (maxchannelsearch == 0) {
-			OSMXMLWriter oxw = new OSMXMLWriter(outputosm, cdgb.getDigraph());
-			try {
-				oxw.writeXML();
-			} catch (FileNotFoundException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			} catch (XMLStreamException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
-			;
+        if (maxchannelsearch == 0) {
+            OSMXMLWriter oxw = new OSMXMLWriter(outputosm, cdgb.getDigraph());
+            try {
+                oxw.writeXML();
+            } catch (FileNotFoundException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            } catch (XMLStreamException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+            ;
 
-			System.out.println("OSMXML erzeugt, breche an dieser Stelle ab");
-			return;
-		}
+            System.out.println("OSMXML erzeugt, breche an dieser Stelle ab");
+            return;
+        }
 
-		JunctionChecker jc = new JunctionChecker(cdgb.getDigraph(), n);
-		ArrayList<Channel> subset = new ArrayList<Channel>();
+        JunctionChecker jc = new JunctionChecker(cdgb.getDigraph(), n);
+        ArrayList<Channel> subset = new ArrayList<Channel>();
 
-		Channel seed = new Channel();
-		Channel vorChannel;
-		Channel tempChannel;
-		boolean isIn = false;
-		int jcf;
-		long measuredIterateThroughTime = 0;
-		long measuredGenerateSubColumnTime = 0;
-		long measuredTime = 0;
-		long start;
+        Channel seed = new Channel();
+        Channel vorChannel;
+        Channel tempChannel;
+        boolean isIn = false;
+        int jcf;
+        long measuredIterateThroughTime = 0;
+        long measuredGenerateSubColumnTime = 0;
+        long measuredTime = 0;
+        long start;
 
-		//Unzusammenhängenden Teilgraph erzeugen
-		/*
-		for (int i = 6; i < maxchannelsearch; i = i + ticks) {
-			//diff = 0;
-			start = System.currentTimeMillis();
-			jcf = 0;
-			//System.out.println("maxchannel: " + i);
-			for (int j = 0; j < runs; j++) {
-				//System.out.println("run: " +j);
-				subset.clear();
-				for (int j2 = 0; j2 <= i; j2++) {
-					subset.add(cdgb.getDigraph()
-							.getChannelAtPosition(
-									(int) ((cdgb.getDigraph().getChannels()
-											.size()) * Math.random())));
-				}
-				//System.out.println("jc gestartet");
-				start = System.currentTimeMillis();
-				jc.junctionSearch(subset);
-				measuredTime += (System.currentTimeMillis() - start);
-				//System.out.println("jc beendet");
-				//diff = diff + (System.currentTimeMillis() - start);
-				measuredIterateThroughTime += jc.getMeasuredIterateTime();
-				measuredGenerateSubColumnTime += jc.getMeasuredGenerateTime();
-			}
-			System.out.println("Channels: " + (i) + " Time(Iterate): " + (measuredIterateThroughTime/runs) + " Time(Generate): " + (measuredGenerateSubColumnTime/runs) +" Time(overall): "+ (measuredTime/runs) + " junctionsfound: " + jcf);
-		}*/
+        //Unzusammenhängenden Teilgraph erzeugen
+        /*
+        for (int i = 6; i < maxchannelsearch; i = i + ticks) {
+            //diff = 0;
+            start = System.currentTimeMillis();
+            jcf = 0;
+            //System.out.println("maxchannel: " + i);
+            for (int j = 0; j < runs; j++) {
+                //System.out.println("run: " +j);
+                subset.clear();
+                for (int j2 = 0; j2 <= i; j2++) {
+                    subset.add(cdgb.getDigraph()
+                            .getChannelAtPosition(
+                                    (int) ((cdgb.getDigraph().getChannels()
+                                            .size()) * Math.random())));
+                }
+                //System.out.println("jc gestartet");
+                start = System.currentTimeMillis();
+                jc.junctionSearch(subset);
+                measuredTime += (System.currentTimeMillis() - start);
+                //System.out.println("jc beendet");
+                //diff = diff + (System.currentTimeMillis() - start);
+                measuredIterateThroughTime += jc.getMeasuredIterateTime();
+                measuredGenerateSubColumnTime += jc.getMeasuredGenerateTime();
+            }
+            System.out.println("Channels: " + (i) + " Time(Iterate): " + (measuredIterateThroughTime/runs) + " Time(Generate): " + (measuredGenerateSubColumnTime/runs) +" Time(overall): "+ (measuredTime/runs) + " junctionsfound: " + jcf);
+        }*/
 
-		//Zusammenhängenden Teilgraph erzeugen
+        //Zusammenhängenden Teilgraph erzeugen
 
-		for (int i = 5; i < maxchannelsearch; i = i + ticks) {
-			measuredIterateThroughTime = 0;
-			measuredGenerateSubColumnTime = 0;
-			measuredTime =0;
-			jcf = 0;
-			//System.out.println("maxchannel: " + i);
-			for (int j = 0; j < runs; j++) {
-				//System.out.println("run: " +j);
-				subset.clear();
-				do {
-					seed = cdgb.getDigraph()
-					.getChannelAtPosition(
-							(int) ((cdgb.getDigraph().getChannels()
-									.size()) * Math.random()));
-				}
-				while(!seed.isStrongConnected());
-				subset.add(seed);
-				//System.out.println("Seed: " + seed.getNewid());
-				vorChannel = seed;
-				for (int k = 0; k < i - 1; k++) {
-					isIn = false;
-					do {
-						tempChannel = getNeighbourChannel(vorChannel);
-						if (!subset.contains(tempChannel)) {
-							subset.add(tempChannel);
-							//System.out.println("zugefügt: " + tempChannel.getNewid());
-							seed = tempChannel;
-							isIn = true;
-						}
-						else {
-							vorChannel = tempChannel;
-							isIn = false;
-						}
-					}while (isIn == false);
-				}
-				start = System.currentTimeMillis();
-				jc.junctionSearch(subset);
-				measuredTime += (System.currentTimeMillis() - start);
-				//System.out.println("jc beendet");
-				measuredIterateThroughTime += jc.getMeasuredIterateTime();
-				measuredGenerateSubColumnTime += jc.getMeasuredGenerateTime();
-				jcf = jcf + jc.getJunctions().size();
-			}
-			System.out.println("Channels: " + (i) + " Time(Iterate): " + (measuredIterateThroughTime/runs) + " Time(Generate): " + (measuredGenerateSubColumnTime/runs) +" Time(overall): "+ (measuredTime/runs) + " junctionsfound: " + jcf);
-		}
-	}
+        for (int i = 5; i < maxchannelsearch; i = i + ticks) {
+            measuredIterateThroughTime = 0;
+            measuredGenerateSubColumnTime = 0;
+            measuredTime =0;
+            jcf = 0;
+            //System.out.println("maxchannel: " + i);
+            for (int j = 0; j < runs; j++) {
+                //System.out.println("run: " +j);
+                subset.clear();
+                do {
+                    seed = cdgb.getDigraph()
+                    .getChannelAtPosition(
+                            (int) ((cdgb.getDigraph().getChannels()
+                                    .size()) * Math.random()));
+                }
+                while(!seed.isStrongConnected());
+                subset.add(seed);
+                //System.out.println("Seed: " + seed.getNewid());
+                vorChannel = seed;
+                for (int k = 0; k < i - 1; k++) {
+                    isIn = false;
+                    do {
+                        tempChannel = getNeighbourChannel(vorChannel);
+                        if (!subset.contains(tempChannel)) {
+                            subset.add(tempChannel);
+                            //System.out.println("zugefügt: " + tempChannel.getNewid());
+                            seed = tempChannel;
+                            isIn = true;
+                        }
+                        else {
+                            vorChannel = tempChannel;
+                            isIn = false;
+                        }
+                    }while (isIn == false);
+                }
+                start = System.currentTimeMillis();
+                jc.junctionSearch(subset);
+                measuredTime += (System.currentTimeMillis() - start);
+                //System.out.println("jc beendet");
+                measuredIterateThroughTime += jc.getMeasuredIterateTime();
+                measuredGenerateSubColumnTime += jc.getMeasuredGenerateTime();
+                jcf = jcf + jc.getJunctions().size();
+            }
+            System.out.println("Channels: " + (i) + " Time(Iterate): " + (measuredIterateThroughTime/runs) + " Time(Generate): " + (measuredGenerateSubColumnTime/runs) +" Time(overall): "+ (measuredTime/runs) + " junctionsfound: " + jcf);
+        }
+    }
 
-	private static Channel getNeighbourChannel(Channel seedChannel) {
-		if (Math.random() < 0.5) {
-			if (seedChannel.getPredChannels().size() >=1 ) {
-				return seedChannel.getPredChannels().get((int) (seedChannel.getPredChannels().size() * Math.random()));
-			}
-			else return seedChannel;
-		}
-		else {
-			if (seedChannel.getLeadsTo().size() >=1 ) {
-				return seedChannel.getLeadsTo().get((int) (seedChannel.getLeadsTo().size() * Math.random())).getToChannel();
-			}
-			else return seedChannel;
-		}
-	}
+    private static Channel getNeighbourChannel(Channel seedChannel) {
+        if (Math.random() < 0.5) {
+            if (seedChannel.getPredChannels().size() >=1 ) {
+                return seedChannel.getPredChannels().get((int) (seedChannel.getPredChannels().size() * Math.random()));
+            }
+            else return seedChannel;
+        }
+        else {
+            if (seedChannel.getLeadsTo().size() >=1 ) {
+                return seedChannel.getLeadsTo().get((int) (seedChannel.getLeadsTo().size() * Math.random())).getToChannel();
+            }
+            else return seedChannel;
+        }
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/BacktrackingColors.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/BacktrackingColors.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/BacktrackingColors.java	(revision 30725)
@@ -5,8 +5,8 @@
  */
 public class BacktrackingColors {
-	
-	public static final int WHITE = -1;
-	public static final int GREY = 0;
-	public static final int BLACK = 1;
+    
+    public static final int WHITE = -1;
+    public static final int GREY = 0;
+    public static final int BLACK = 1;
 
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/DiGraphSealer.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/DiGraphSealer.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/DiGraphSealer.java	(revision 30725)
@@ -15,144 +15,144 @@
 
 
-	// vorsichtshalber auf einen hohen negativen Wert gesetzt. besser
-	// automatisch setzen!
-	// TODO: NewID automatisch setzen
-	private int newID = 1000000;
-	private ChannelDiGraph digraph;
+    // vorsichtshalber auf einen hohen negativen Wert gesetzt. besser
+    // automatisch setzen!
+    // TODO: NewID automatisch setzen
+    private int newID = 1000000;
+    private ChannelDiGraph digraph;
 
-	public DiGraphSealer(ChannelDiGraph digraph) {
-		this.digraph = digraph;
-	}
+    public DiGraphSealer(ChannelDiGraph digraph) {
+        this.digraph = digraph;
+    }
 
-	public DiGraphSealer(ChannelDiGraph digraph, int newID) {
-		this.digraph = digraph;
-		this.newID = newID;
-	}
+    public DiGraphSealer(ChannelDiGraph digraph, int newID) {
+        this.digraph = digraph;
+        this.newID = newID;
+    }
 
-	/**
-	 * versiegelt den vorher gesetzten DiGraphen
-	 */
-	public void sealingGraph() {
-		Vector<Integer> outgoingChannelIDs = new Vector<Integer>();
-		Vector<Integer> incomingChannelIDs = new Vector<Integer>();
+    /**
+     * versiegelt den vorher gesetzten DiGraphen
+     */
+    public void sealingGraph() {
+        Vector<Integer> outgoingChannelIDs = new Vector<Integer>();
+        Vector<Integer> incomingChannelIDs = new Vector<Integer>();
 
-		for (int i = 0; i < digraph.numberOfChannels(); i++) {
-			if (digraph.isInBBox(digraph.getChannelAtPosition(i).getFromNode()) == false) {
-				incomingChannelIDs.add(i);
-			}
-			if (digraph.isInBBox(digraph.getChannelAtPosition(i).getToNode()) == false) {
-				outgoingChannelIDs.add(i);
-			}
-		}
-		Channel tempChannel;
-		LeadsTo tempLeadsTo;
-		for (int i = 0; i < outgoingChannelIDs.size(); i++) {
-			if (digraph.getChannelAtPosition(outgoingChannelIDs.get(i))
-					.getLeadsTo().size() == 0) {
+        for (int i = 0; i < digraph.numberOfChannels(); i++) {
+            if (digraph.isInBBox(digraph.getChannelAtPosition(i).getFromNode()) == false) {
+                incomingChannelIDs.add(i);
+            }
+            if (digraph.isInBBox(digraph.getChannelAtPosition(i).getToNode()) == false) {
+                outgoingChannelIDs.add(i);
+            }
+        }
+        Channel tempChannel;
+        LeadsTo tempLeadsTo;
+        for (int i = 0; i < outgoingChannelIDs.size(); i++) {
+            if (digraph.getChannelAtPosition(outgoingChannelIDs.get(i))
+                    .getLeadsTo().size() == 0) {
 
-				tempChannel = new Channel(digraph.getChannelAtPosition(
-						outgoingChannelIDs.get(i)).getToNode(), digraph
-						.getChannelAtPosition(incomingChannelIDs.get(0))
-						.getFromNode());
-				//dem Channel auch den neuen Channel als Nachfolger übergeben!!!
-				//sonst gibts Probleme beim JunctionCheck
-				tempLeadsTo = new LeadsTo(digraph
-						.getChannelAtPosition(outgoingChannelIDs.get(i)),
-						tempChannel);
-				digraph.getChannelAtPosition(outgoingChannelIDs.get(i))
-						.addLeadsTo(tempLeadsTo);
-				digraph.addLeadsTo(tempLeadsTo);
-				tempLeadsTo = new LeadsTo(tempChannel, digraph
-						.getChannelAtPosition(incomingChannelIDs.get(0)));
-				tempChannel.addLeadsTo(tempLeadsTo);
-				digraph.addLeadsTo(tempLeadsTo);
-				tempChannel.addWay(digraph.getChannelAtPosition(
-						outgoingChannelIDs.get(i)).getWay());
-				tempChannel.setNewid(newID);
-				newID++;
-				digraph.addChannel(tempChannel);
-			}
-		}
+                tempChannel = new Channel(digraph.getChannelAtPosition(
+                        outgoingChannelIDs.get(i)).getToNode(), digraph
+                        .getChannelAtPosition(incomingChannelIDs.get(0))
+                        .getFromNode());
+                //dem Channel auch den neuen Channel als Nachfolger übergeben!!!
+                //sonst gibts Probleme beim JunctionCheck
+                tempLeadsTo = new LeadsTo(digraph
+                        .getChannelAtPosition(outgoingChannelIDs.get(i)),
+                        tempChannel);
+                digraph.getChannelAtPosition(outgoingChannelIDs.get(i))
+                        .addLeadsTo(tempLeadsTo);
+                digraph.addLeadsTo(tempLeadsTo);
+                tempLeadsTo = new LeadsTo(tempChannel, digraph
+                        .getChannelAtPosition(incomingChannelIDs.get(0)));
+                tempChannel.addLeadsTo(tempLeadsTo);
+                digraph.addLeadsTo(tempLeadsTo);
+                tempChannel.addWay(digraph.getChannelAtPosition(
+                        outgoingChannelIDs.get(i)).getWay());
+                tempChannel.setNewid(newID);
+                newID++;
+                digraph.addChannel(tempChannel);
+            }
+        }
 
-		for (int i = 0; i < incomingChannelIDs.size(); i++) {
-			if (digraph.getChannelAtPosition(incomingChannelIDs.get(i))
-					.getPredChannels().size() == 0) {
-				tempChannel = new Channel(digraph.getChannelAtPosition(
-						outgoingChannelIDs.get(0)).getToNode(), digraph
-						.getChannelAtPosition(incomingChannelIDs.get(i))
-						.getFromNode());
-				//dem Channel auch den neuen Channel als Nachfolger überegeben
-				// sonst gibt es Probleme beim JuncitonCheck
-				digraph
-				.getChannelAtPosition(incomingChannelIDs.get(i)).addPredChannel(tempChannel);
-				tempLeadsTo = new LeadsTo(tempChannel, digraph
-						.getChannelAtPosition(incomingChannelIDs.get(i)));
-				tempChannel.addLeadsTo(tempLeadsTo);
-				digraph.addLeadsTo(tempLeadsTo);
-				tempLeadsTo = new LeadsTo(digraph
-						.getChannelAtPosition(outgoingChannelIDs.get(0)),
-						tempChannel);
-				digraph.getChannelAtPosition(outgoingChannelIDs.get(0))
-						.addLeadsTo(tempLeadsTo);
-				digraph.addLeadsTo(tempLeadsTo);
-				tempChannel.addWay(digraph.getChannelAtPosition(
-						incomingChannelIDs.get(i)).getWay());
-				tempChannel.setNewid(newID);
-				newID++;
-				digraph.addChannel(tempChannel);
-			}
-		}
-		this.deleteDuplicateChannels();
-	}
-	
-	/*
-	private void showLeadsTo() {
-		for (int i = 0; i < digraph.getChannels().size(); i++) {
-			log.debug("Untersuche CHannel: " + digraph.getChannelAtPosition(i).getNewid());
-			for (int j = 0; j < digraph.getChannelAtPosition(i).getLeadsTo().size(); j++) {
-				log.debug("LeadsTo: " + digraph.getChannelAtPosition(i).getLeadsTo().get(j).toString());
-			}
-		}
-	}*/
+        for (int i = 0; i < incomingChannelIDs.size(); i++) {
+            if (digraph.getChannelAtPosition(incomingChannelIDs.get(i))
+                    .getPredChannels().size() == 0) {
+                tempChannel = new Channel(digraph.getChannelAtPosition(
+                        outgoingChannelIDs.get(0)).getToNode(), digraph
+                        .getChannelAtPosition(incomingChannelIDs.get(i))
+                        .getFromNode());
+                //dem Channel auch den neuen Channel als Nachfolger überegeben
+                // sonst gibt es Probleme beim JuncitonCheck
+                digraph
+                .getChannelAtPosition(incomingChannelIDs.get(i)).addPredChannel(tempChannel);
+                tempLeadsTo = new LeadsTo(tempChannel, digraph
+                        .getChannelAtPosition(incomingChannelIDs.get(i)));
+                tempChannel.addLeadsTo(tempLeadsTo);
+                digraph.addLeadsTo(tempLeadsTo);
+                tempLeadsTo = new LeadsTo(digraph
+                        .getChannelAtPosition(outgoingChannelIDs.get(0)),
+                        tempChannel);
+                digraph.getChannelAtPosition(outgoingChannelIDs.get(0))
+                        .addLeadsTo(tempLeadsTo);
+                digraph.addLeadsTo(tempLeadsTo);
+                tempChannel.addWay(digraph.getChannelAtPosition(
+                        incomingChannelIDs.get(i)).getWay());
+                tempChannel.setNewid(newID);
+                newID++;
+                digraph.addChannel(tempChannel);
+            }
+        }
+        this.deleteDuplicateChannels();
+    }
+    
+    /*
+    private void showLeadsTo() {
+        for (int i = 0; i < digraph.getChannels().size(); i++) {
+            log.debug("Untersuche CHannel: " + digraph.getChannelAtPosition(i).getNewid());
+            for (int j = 0; j < digraph.getChannelAtPosition(i).getLeadsTo().size(); j++) {
+                log.debug("LeadsTo: " + digraph.getChannelAtPosition(i).getLeadsTo().get(j).toString());
+            }
+        }
+    }*/
 
-	/**
-	 * dirt'n'quick methode zum löschen doppelter channels TODO:
-	 * versiegeln-methode überarbeiten
-	 *TODO: benutze ich die überhaupt noch?
-	 */
-	private void deleteDuplicateChannels() {
+    /**
+     * dirt'n'quick methode zum löschen doppelter channels TODO:
+     * versiegeln-methode überarbeiten
+     *TODO: benutze ich die überhaupt noch?
+     */
+    private void deleteDuplicateChannels() {
 
-		for (int i = 0; i < digraph.getChannels().size(); i++) {
-			for (int j = i + 1; j < digraph.getChannels().size(); j++) {
-				if (digraph.getChannelAtPosition(i).getFromNode() == digraph
-						.getChannelAtPosition(j).getFromNode()
-						&& digraph.getChannelAtPosition(i).getToNode() == digraph
-								.getChannelAtPosition(j).getToNode()) {
-					digraph.removeChannel(digraph.getChannelAtPosition(j));
-				}
-			}
-		}
-	}
+        for (int i = 0; i < digraph.getChannels().size(); i++) {
+            for (int j = i + 1; j < digraph.getChannels().size(); j++) {
+                if (digraph.getChannelAtPosition(i).getFromNode() == digraph
+                        .getChannelAtPosition(j).getFromNode()
+                        && digraph.getChannelAtPosition(i).getToNode() == digraph
+                                .getChannelAtPosition(j).getToNode()) {
+                    digraph.removeChannel(digraph.getChannelAtPosition(j));
+                }
+            }
+        }
+    }
 
-	/*
-	 * setzt Wert für IDs für neu angelegte Ways
-	 */
-	/**
-	 * @param newID
-	 */
-	public void setNewID(int newID) {
-		this.newID = newID;
-	}
+    /*
+     * setzt Wert für IDs für neu angelegte Ways
+     */
+    /**
+     * @param newID
+     */
+    public void setNewID(int newID) {
+        this.newID = newID;
+    }
 
-	/**
-	 * @return
-	 * @uml.property  name="newID"
-	 */
-	public int getNewID() {
-		return newID;
-	}
+    /**
+     * @return
+     * @uml.property  name="newID"
+     */
+    public int getNewID() {
+        return newID;
+    }
 
-	public ChannelDiGraph getDiGraph() {
-		return digraph;
-	}
+    public ChannelDiGraph getDiGraph() {
+        return digraph;
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/StrongConnectednessCalculator.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/StrongConnectednessCalculator.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/connectedness/StrongConnectednessCalculator.java	(revision 30725)
@@ -7,129 +7,129 @@
 public class StrongConnectednessCalculator {
 
-	private int index = 0;
-	private final ArrayList<Channel> stack = new ArrayList<Channel>();
-	private final ArrayList<ArrayList<Channel>> SCC = new ArrayList<ArrayList<Channel>>();
-	private final int numberOfNodes;
-	private int calculatedNodes = 0;
-	private ArrayList<Channel> nsccchannels = new ArrayList<Channel>();
-	private final ChannelDiGraph digraph;
-	int biggestPart = 0;
+    private int index = 0;
+    private final ArrayList<Channel> stack = new ArrayList<Channel>();
+    private final ArrayList<ArrayList<Channel>> SCC = new ArrayList<ArrayList<Channel>>();
+    private final int numberOfNodes;
+    private int calculatedNodes = 0;
+    private ArrayList<Channel> nsccchannels = new ArrayList<Channel>();
+    private final ChannelDiGraph digraph;
+    int biggestPart = 0;
 
-	public StrongConnectednessCalculator(ChannelDiGraph digraph) {
-		this.digraph = digraph;
-		numberOfNodes = digraph.numberOfChannels();
-	}
+    public StrongConnectednessCalculator(ChannelDiGraph digraph) {
+        this.digraph = digraph;
+        numberOfNodes = digraph.numberOfChannels();
+    }
 
-	private int findUncalculatedNodes() {
-		for (int i = 0; i < numberOfNodes; i++) {
-			if (digraph.getChannelAtPosition(i).getLowlink() == -1) {
-				return i;
-			}
-		}
-		return 0;
-	}
+    private int findUncalculatedNodes() {
+        for (int i = 0; i < numberOfNodes; i++) {
+            if (digraph.getChannelAtPosition(i).getLowlink() == -1) {
+                return i;
+            }
+        }
+        return 0;
+    }
 
-	/**
-	 * berechnet die starken Zusammenhangskomponenten
-	 */
-	public void calculateSCC() {
-		while (calculatedNodes != numberOfNodes) {
-			//log.trace("calculatedNodes: " + calculatedNodes + ", gesamtnodes: " + numberOfNodes);
-			tarjan(digraph.getChannelAtPosition(findUncalculatedNodes()));
-		}
-		//log.trace("Berechnung der starken Zusammenhangskomponenten beendet: \n " +numberOfNodes + " Nodes sind wie folgt aufgeteilt: ");
-		for (int i = 0; i < SCC.size(); i++) {
-			//log.trace("Komponente: " + i + " besteht aus " + SCC.get(i).size()+ " Knoten");
-			/**
-			 * for (int j = 1; j < list.getNumberOfNodes(); j++) { if
-			 * (list.getAdjacencyListnodes()[j].getIndex()== -1) {
-			 * System.out.println("====");
-			 * System.out.println(list.getAdjacencyListnodes
-			 * ()[j].getNode().toString()); } }
-			 **/
-		}
-		findBiggestPiece();
-		saveNotSCCChannel();
-	}
+    /**
+     * berechnet die starken Zusammenhangskomponenten
+     */
+    public void calculateSCC() {
+        while (calculatedNodes != numberOfNodes) {
+            //log.trace("calculatedNodes: " + calculatedNodes + ", gesamtnodes: " + numberOfNodes);
+            tarjan(digraph.getChannelAtPosition(findUncalculatedNodes()));
+        }
+        //log.trace("Berechnung der starken Zusammenhangskomponenten beendet: \n " +numberOfNodes + " Nodes sind wie folgt aufgeteilt: ");
+        for (int i = 0; i < SCC.size(); i++) {
+            //log.trace("Komponente: " + i + " besteht aus " + SCC.get(i).size()+ " Knoten");
+            /**
+             * for (int j = 1; j < list.getNumberOfNodes(); j++) { if
+             * (list.getAdjacencyListnodes()[j].getIndex()== -1) {
+             * System.out.println("====");
+             * System.out.println(list.getAdjacencyListnodes
+             * ()[j].getNode().toString()); } }
+             **/
+        }
+        findBiggestPiece();
+        saveNotSCCChannel();
+    }
 
-	/**
-	 * speichert alle Channel, die nicht stark zusammenhängend sind, in einer ArrayList
-	 **/
-	private void saveNotSCCChannel() {
-		nsccchannels = new ArrayList<Channel>();
-		for (int i = 0; i < SCC.size(); i++) {
-			if (i != biggestPart) {
-				nsccchannels.addAll(SCC.get(i));
-			}
-		}
-		//alle Channels auf nicht zusammenhängend setzen
-		for (int i = 0; i < nsccchannels.size(); i++) {
-			nsccchannels.get(i).setStrongConnected(false);
-		}
-	}
+    /**
+     * speichert alle Channel, die nicht stark zusammenhängend sind, in einer ArrayList
+     **/
+    private void saveNotSCCChannel() {
+        nsccchannels = new ArrayList<Channel>();
+        for (int i = 0; i < SCC.size(); i++) {
+            if (i != biggestPart) {
+                nsccchannels.addAll(SCC.get(i));
+            }
+        }
+        //alle Channels auf nicht zusammenhängend setzen
+        for (int i = 0; i < nsccchannels.size(); i++) {
+            nsccchannels.get(i).setStrongConnected(false);
+        }
+    }
 
-	private void findBiggestPiece() {
-		int number = 0;
-		for (int i = 0; i < SCC.size(); i++) {
-			if (SCC.get(i).size() > number) {
-				biggestPart = i;
-				number = SCC.get(i).size();
-			}
-		}
-	}
+    private void findBiggestPiece() {
+        int number = 0;
+        for (int i = 0; i < SCC.size(); i++) {
+            if (SCC.get(i).size() > number) {
+                biggestPart = i;
+                number = SCC.get(i).size();
+            }
+        }
+    }
 
-	public String showNotstronglyConnectednessParts() {
-		String s = new String();
-		for (int i = 0; i < SCC.size(); i++) {
-			if (i != biggestPart) {
-				s += "GraphKomponente: " + i + "\n";
-				for (int j = 0; j < SCC.get(i).size(); j++) {
-					s += "Channel: " + SCC.get(i).get(j).getNewid();
-				}
-				s += "\n";
-			}
-		}
-		return s;
-	}
+    public String showNotstronglyConnectednessParts() {
+        String s = new String();
+        for (int i = 0; i < SCC.size(); i++) {
+            if (i != biggestPart) {
+                s += "GraphKomponente: " + i + "\n";
+                for (int j = 0; j < SCC.get(i).size(); j++) {
+                    s += "Channel: " + SCC.get(i).get(j).getNewid();
+                }
+                s += "\n";
+            }
+        }
+        return s;
+    }
 
-	/**
-	 * gibt eine Arraylist mit all den Channels zurück, welche nicht
-	 * im größten zusammenhägendem Teil des Channel-Digraphen sind
-	 * @return
-	 */
-	public ArrayList<Channel> getNotConnectedChannels() {
-		return nsccchannels;
-	}
+    /**
+     * gibt eine Arraylist mit all den Channels zurück, welche nicht
+     * im größten zusammenhägendem Teil des Channel-Digraphen sind
+     * @return
+     */
+    public ArrayList<Channel> getNotConnectedChannels() {
+        return nsccchannels;
+    }
 
-	private void tarjan(Channel v) {
-		//log.trace("tarjan für channel aufgerufen mit id: " + v.getNewid());
-		v.setIndex(index);
-		v.setLowlink(index);
-		index++;
-		stack.add(0, v);
-		//log.trace("channel "+v.getNewid() + " hat nachbarn: " + v.getLeadsTo().size());
-		for (int i = 0; i < v.getLeadsTo().size(); i++) {
-			//log.trace("schleifendurchlauf: " + i);
-			Channel n = v.getLeadsTo().get(i).getToChannel();
-			if (n.getIndex() == -1) {
-				//log.trace("n hat index =-1");
-				tarjan(n);
-				v.setLowlink(Math.min(v.getLowlink(), n.getLowlink()));
-			}
-			else if (stack.contains(n)) {
-				//log.trace("setze lowlink von n auf: " + v.getLowlink());
-				v.setLowlink(Math.min(v.getLowlink(), n.getLowlink()));
-			}
-		}
-		if (v.getLowlink() == v.getIndex()) {
-			Channel n;
-			ArrayList<Channel> component = new ArrayList<Channel>();
-			do {
-				n = stack.remove(0);
-				component.add(n);
-			} while (n != v);
-			SCC.add(component);
-			calculatedNodes += component.size();
-		}
-	}
+    private void tarjan(Channel v) {
+        //log.trace("tarjan für channel aufgerufen mit id: " + v.getNewid());
+        v.setIndex(index);
+        v.setLowlink(index);
+        index++;
+        stack.add(0, v);
+        //log.trace("channel "+v.getNewid() + " hat nachbarn: " + v.getLeadsTo().size());
+        for (int i = 0; i < v.getLeadsTo().size(); i++) {
+            //log.trace("schleifendurchlauf: " + i);
+            Channel n = v.getLeadsTo().get(i).getToChannel();
+            if (n.getIndex() == -1) {
+                //log.trace("n hat index =-1");
+                tarjan(n);
+                v.setLowlink(Math.min(v.getLowlink(), n.getLowlink()));
+            }
+            else if (stack.contains(n)) {
+                //log.trace("setze lowlink von n auf: " + v.getLowlink());
+                v.setLowlink(Math.min(v.getLowlink(), n.getLowlink()));
+            }
+        }
+        if (v.getLowlink() == v.getIndex()) {
+            Channel n;
+            ArrayList<Channel> component = new ArrayList<Channel>();
+            do {
+                n = stack.remove(0);
+                component.add(n);
+            } while (n != v);
+            SCC.add(component);
+            calculatedNodes += component.size();
+        }
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/ChannelDigraphBuilder.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/ChannelDigraphBuilder.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/ChannelDigraphBuilder.java	(revision 30725)
@@ -13,141 +13,141 @@
 public class ChannelDigraphBuilder {
 
-	private final ChannelDiGraph digraph;
-	private final OSMGraph osmgraph;
-	private final OSMWay[] osmways;
-	private Channel newChannel = new Channel();
-	private final NodesConnectionProducer ncp;
-	// Variable wird für die IDs der neu erstellten Ways benötigt, die
-	// Hinrichtung bekommt den des ursprungs-Way, die Rückrichtung
-	// eine fiktive negative (OSM-XML-Standard für neue, noch nicht in der DB
-	// gespeicherte Entities)
-	private int newid = 1;
-	private TurnRestrictionChecker trchecker;
-	Channel backChannel;
+    private final ChannelDiGraph digraph;
+    private final OSMGraph osmgraph;
+    private final OSMWay[] osmways;
+    private Channel newChannel = new Channel();
+    private final NodesConnectionProducer ncp;
+    // Variable wird für die IDs der neu erstellten Ways benötigt, die
+    // Hinrichtung bekommt den des ursprungs-Way, die Rückrichtung
+    // eine fiktive negative (OSM-XML-Standard für neue, noch nicht in der DB
+    // gespeicherte Entities)
+    private int newid = 1;
+    private TurnRestrictionChecker trchecker;
+    Channel backChannel;
 
-	public ChannelDigraphBuilder(OSMGraph osmgraph) {
-		//Nodesbeziehungen erstellen
-		ncp = new NodesConnectionProducer(osmgraph);
-		ncp.produceNodesConnections();
-		digraph = new ChannelDiGraph();
-		this.osmways = osmgraph.getWays();
-		digraph.setBbbottom(osmgraph.getBbbottom());
-		digraph.setBbleft(osmgraph.getBbleft());
-		digraph.setBbright(osmgraph.getBbright());
-		digraph.setBbtop(osmgraph.getBbtop());
-		this.osmgraph = osmgraph;
-	}
+    public ChannelDigraphBuilder(OSMGraph osmgraph) {
+        //Nodesbeziehungen erstellen
+        ncp = new NodesConnectionProducer(osmgraph);
+        ncp.produceNodesConnections();
+        digraph = new ChannelDiGraph();
+        this.osmways = osmgraph.getWays();
+        digraph.setBbbottom(osmgraph.getBbbottom());
+        digraph.setBbleft(osmgraph.getBbleft());
+        digraph.setBbright(osmgraph.getBbright());
+        digraph.setBbtop(osmgraph.getBbtop());
+        this.osmgraph = osmgraph;
+    }
 
-	private void setNewWayID(Channel channel) {
-		channel.setNewid(newid);
-		newid++;
-	}
+    private void setNewWayID(Channel channel) {
+        channel.setNewid(newid);
+        newid++;
+    }
 
-	/**
-	 * Hilfemethode zur Erstellung eines Channels
-	 * @param fromNode fromNode des zu erstellenden Channels
-	 * @param toNode toNode  des zu erstellnenden Channels
-	 * @param way ein zu dem Channel gehörender Way
-	 * @return
-	 */
-	private Channel createChannel(OSMNode fromNode, OSMNode toNode, OSMWay way) {
-		newChannel = new Channel();
-		newChannel.setFromNode(fromNode);
-		newChannel.setToNode(toNode);
-		setNewWayID(newChannel);
-		digraph.addChannel(newChannel);
-		fromNode.addOutgoingChannel(newChannel);
-		newChannel.addWay(way);
-		return newChannel;
-	}
+    /**
+     * Hilfemethode zur Erstellung eines Channels
+     * @param fromNode fromNode des zu erstellenden Channels
+     * @param toNode toNode  des zu erstellnenden Channels
+     * @param way ein zu dem Channel gehörender Way
+     * @return
+     */
+    private Channel createChannel(OSMNode fromNode, OSMNode toNode, OSMWay way) {
+        newChannel = new Channel();
+        newChannel.setFromNode(fromNode);
+        newChannel.setToNode(toNode);
+        setNewWayID(newChannel);
+        digraph.addChannel(newChannel);
+        fromNode.addOutgoingChannel(newChannel);
+        newChannel.addWay(way);
+        return newChannel;
+    }
 
-	private void createBackChannel(OSMNode fromNode, OSMNode toNode, OSMWay way, Channel channel) {
-		backChannel = new Channel();
-		backChannel = createChannel(fromNode, toNode, way);
-		backChannel.setBackChannelID(channel.getNewid());
-		channel.setBackChannelID(backChannel.getNewid());
-	}
+    private void createBackChannel(OSMNode fromNode, OSMNode toNode, OSMWay way, Channel channel) {
+        backChannel = new Channel();
+        backChannel = createChannel(fromNode, toNode, way);
+        backChannel.setBackChannelID(channel.getNewid());
+        channel.setBackChannelID(backChannel.getNewid());
+    }
 
-	/**
-	 * erzeugt den Digraphen
-	 */
-	private void buildChannels(OSMWay way, boolean oneway) {
-		Channel tempChannel = new Channel();
+    /**
+     * erzeugt den Digraphen
+     */
+    private void buildChannels(OSMWay way, boolean oneway) {
+        Channel tempChannel = new Channel();
 
-		OSMNode lastUsedNode = way.getFromNode();
-		OSMNode[] nodes = way.getNodes();
-		/*
-		 * log.debug("Way mit ID " + way.getId() + " , startnode: " +
-		 * way.getFromNode().getId() + " , EndNode: " + way.getToNode().getId()
-		 * + " wird bearbeitet.");
-		 */
-		// alle Knoten eines ways durchgehen
-		for (int i = 1; i < nodes.length; i++) {
-			// nur wenn der aktuelle Knoten mehr als einen Vorgänger/Nachfolger
-			// hat, wird in die if-Abfrage gesprungen und ein neuer Channel mit
-			//mit dem aktuell betrachtetem Node als Endnode erzeugt
-			if (nodes[i].getPredNodeList().size() > 1 || nodes[i].getSuccNodeList().size() > 1) {
-				tempChannel = createChannel(lastUsedNode, nodes[i], way);
-				// bei Nichteinbahnstraße wird Channel in die andere Richtung
-				// erzeugt
-				if (oneway == false) {
-					createBackChannel(nodes[i], lastUsedNode, way, tempChannel);
-				}
-				lastUsedNode = nodes[i];
-			}
-			// wenn der betrachtete Knoten keine Nachfolger hat, ist ein
-			// Straßenende erreicht. Auch in diesem Fall muß ein Channel erzeugt werden
-			else if (nodes[i].getSuccNodeList().size() == 0) {
-				tempChannel = createChannel(lastUsedNode, nodes[i], way);
-				// Rückrichtung wird nur erzeugt, wenn der OSM-Way keine Einbahnstraße ist
-				if (oneway == false) {
-					createBackChannel(nodes[i], lastUsedNode, way, tempChannel);
-				}
-			}
-			// eine Straße besteht aus 2 Ways, obwohl eigentlich eine reicht
-			// tritt z.b. bei einer brücke auf, brücke wird neuer channel
-			//TODO: kann an dieser stelle das erzeugen von pseudo-channels verhindert werden?
-			//      Idee: speichern eines flags, um diese erzeugten Channels zu markieren. aus diesen informationen
-			//            später den CHannel löschen!!!
-			else if (i == nodes.length - 1
-					&& nodes[i].getSuccNodeList().size() == 1) {
-				// damit ist ein Channel gefunden, und wird mit Werten gefüllt
-				tempChannel = createChannel(lastUsedNode, nodes[i], way);
-				// bei Nichteinbahnstraße wird Channel in die andere Richtung
-				// erzeugt
-				if (oneway == false) {
-					createBackChannel(nodes[i], lastUsedNode, way, tempChannel);
-				}
-				lastUsedNode = nodes[i];
+        OSMNode lastUsedNode = way.getFromNode();
+        OSMNode[] nodes = way.getNodes();
+        /*
+         * log.debug("Way mit ID " + way.getId() + " , startnode: " +
+         * way.getFromNode().getId() + " , EndNode: " + way.getToNode().getId()
+         * + " wird bearbeitet.");
+         */
+        // alle Knoten eines ways durchgehen
+        for (int i = 1; i < nodes.length; i++) {
+            // nur wenn der aktuelle Knoten mehr als einen Vorgänger/Nachfolger
+            // hat, wird in die if-Abfrage gesprungen und ein neuer Channel mit
+            //mit dem aktuell betrachtetem Node als Endnode erzeugt
+            if (nodes[i].getPredNodeList().size() > 1 || nodes[i].getSuccNodeList().size() > 1) {
+                tempChannel = createChannel(lastUsedNode, nodes[i], way);
+                // bei Nichteinbahnstraße wird Channel in die andere Richtung
+                // erzeugt
+                if (oneway == false) {
+                    createBackChannel(nodes[i], lastUsedNode, way, tempChannel);
+                }
+                lastUsedNode = nodes[i];
+            }
+            // wenn der betrachtete Knoten keine Nachfolger hat, ist ein
+            // Straßenende erreicht. Auch in diesem Fall muß ein Channel erzeugt werden
+            else if (nodes[i].getSuccNodeList().size() == 0) {
+                tempChannel = createChannel(lastUsedNode, nodes[i], way);
+                // Rückrichtung wird nur erzeugt, wenn der OSM-Way keine Einbahnstraße ist
+                if (oneway == false) {
+                    createBackChannel(nodes[i], lastUsedNode, way, tempChannel);
+                }
+            }
+            // eine Straße besteht aus 2 Ways, obwohl eigentlich eine reicht
+            // tritt z.b. bei einer brücke auf, brücke wird neuer channel
+            //TODO: kann an dieser stelle das erzeugen von pseudo-channels verhindert werden?
+            //      Idee: speichern eines flags, um diese erzeugten Channels zu markieren. aus diesen informationen
+            //            später den CHannel löschen!!!
+            else if (i == nodes.length - 1
+                    && nodes[i].getSuccNodeList().size() == 1) {
+                // damit ist ein Channel gefunden, und wird mit Werten gefüllt
+                tempChannel = createChannel(lastUsedNode, nodes[i], way);
+                // bei Nichteinbahnstraße wird Channel in die andere Richtung
+                // erzeugt
+                if (oneway == false) {
+                    createBackChannel(nodes[i], lastUsedNode, way, tempChannel);
+                }
+                lastUsedNode = nodes[i];
 
-			}
+            }
 
-		}
-	}
+        }
+    }
 
-	/**
-	 * baut den ChannelDigraph
-	 */
-	public void buildChannelDigraph() {
-		// alle Wege eines OSMGraphen durchgehen
-		for (int i = 0; i < osmways.length; i++) {
-			buildChannels(osmways[i], osmways[i].isOneWay());
-		}
-		trchecker = new TurnRestrictionChecker(osmgraph, digraph);
-		trchecker.createLeadsTo();
-		PseudoChannelRemover pcr = new PseudoChannelRemover(digraph); //überflüssige Channels entfernen
-		pcr.removePseudoChannels();
-	}
+    /**
+     * baut den ChannelDigraph
+     */
+    public void buildChannelDigraph() {
+        // alle Wege eines OSMGraphen durchgehen
+        for (int i = 0; i < osmways.length; i++) {
+            buildChannels(osmways[i], osmways[i].isOneWay());
+        }
+        trchecker = new TurnRestrictionChecker(osmgraph, digraph);
+        trchecker.createLeadsTo();
+        PseudoChannelRemover pcr = new PseudoChannelRemover(digraph); //überflüssige Channels entfernen
+        pcr.removePseudoChannels();
+    }
 
-	public ChannelDiGraph getDigraph() {
-		return digraph;
-	}
+    public ChannelDiGraph getDigraph() {
+        return digraph;
+    }
 
-	public void setNewid(int newid) {
-		this.newid = newid;
-	}
+    public void setNewid(int newid) {
+        this.newid = newid;
+    }
 
-	public int getNewid() {
-		return newid;
-	}
+    public int getNewid() {
+        return newid;
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/NodesConnectionProducer.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/NodesConnectionProducer.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/NodesConnectionProducer.java	(revision 30725)
@@ -11,23 +11,23 @@
  */
 public class NodesConnectionProducer {
-	
-	private OSMGraph osmgraph;
-	private OSMWay[] osmways;
+    
+    private OSMGraph osmgraph;
+    private OSMWay[] osmways;
 
-	public NodesConnectionProducer(OSMGraph osmgraph) {
-		this.osmgraph = osmgraph;
-		osmways = this.osmgraph.getWays();
-	}
-	
-	public void produceNodesConnections() {
-		OSMNode[] waynodes;
-		for (int i = 0; i < osmways.length; i++) {
-			waynodes = osmways[i].getNodes();
-			for (int j = 0; j < waynodes.length - 1; j++) {
-				waynodes[j].addSuccNode(waynodes[j+1]);
-				waynodes[j+1].addPredNode(waynodes[j]);
-			}
-		}
-	}
+    public NodesConnectionProducer(OSMGraph osmgraph) {
+        this.osmgraph = osmgraph;
+        osmways = this.osmgraph.getWays();
+    }
+    
+    public void produceNodesConnections() {
+        OSMNode[] waynodes;
+        for (int i = 0; i < osmways.length; i++) {
+            waynodes = osmways[i].getNodes();
+            for (int j = 0; j < waynodes.length - 1; j++) {
+                waynodes[j].addSuccNode(waynodes[j+1]);
+                waynodes[j+1].addPredNode(waynodes[j]);
+            }
+        }
+    }
 
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/PseudoChannelRemover.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/PseudoChannelRemover.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/PseudoChannelRemover.java	(revision 30725)
@@ -12,66 +12,66 @@
 public class PseudoChannelRemover {
 
-	private final ChannelDiGraph digraph;
-	//private final ArrayList<Channel> pseudochannels = new ArrayList<Channel>();
-	private Channel succChannel;
-	private Channel tempToChannel;
-	private LeadsTo tempLeadsTo;
+    private final ChannelDiGraph digraph;
+    //private final ArrayList<Channel> pseudochannels = new ArrayList<Channel>();
+    private Channel succChannel;
+    private Channel tempToChannel;
+    private LeadsTo tempLeadsTo;
 
-	public PseudoChannelRemover(ChannelDiGraph digraph) {
-		this.digraph = digraph;
-	}
+    public PseudoChannelRemover(ChannelDiGraph digraph) {
+        this.digraph = digraph;
+    }
 
-	private void mergeChannel(Channel tempchannel) {
-		succChannel = tempchannel.getLeadsTo().get(0).getToChannel();
-		tempchannel.setToNode(succChannel.getToNode());
-		//log.trace("---Folgender Channel ist überflüssig: " + succChannel.getNewid() + "---");
-		//log.trace("... und wird durch diesen ersetzt: " + tempchannel.getNewid());
-		//VorgängerChannel der nachfolgenden Channels des zu löschenden, überflüssigen Channels neu setzen
-		for (int i = 0; i < succChannel.getLeadsTo().size(); i++) {
-			for (int j = 0; j < succChannel.getLeadsTo().get(i).getToChannel().getPredChannels().size(); j++) {
-				if (succChannel.getLeadsTo().get(i).getToChannel().getPredChannels().get(j).getNewid() == succChannel.getNewid()) {
-					succChannel.getLeadsTo().get(i).getToChannel().getPredChannels().remove(j);
-					succChannel.getLeadsTo().get(i).getToChannel().addPredChannel(tempchannel);
-				}
-			}
-		}
+    private void mergeChannel(Channel tempchannel) {
+        succChannel = tempchannel.getLeadsTo().get(0).getToChannel();
+        tempchannel.setToNode(succChannel.getToNode());
+        //log.trace("---Folgender Channel ist überflüssig: " + succChannel.getNewid() + "---");
+        //log.trace("... und wird durch diesen ersetzt: " + tempchannel.getNewid());
+        //VorgängerChannel der nachfolgenden Channels des zu löschenden, überflüssigen Channels neu setzen
+        for (int i = 0; i < succChannel.getLeadsTo().size(); i++) {
+            for (int j = 0; j < succChannel.getLeadsTo().get(i).getToChannel().getPredChannels().size(); j++) {
+                if (succChannel.getLeadsTo().get(i).getToChannel().getPredChannels().get(j).getNewid() == succChannel.getNewid()) {
+                    succChannel.getLeadsTo().get(i).getToChannel().getPredChannels().remove(j);
+                    succChannel.getLeadsTo().get(i).getToChannel().addPredChannel(tempchannel);
+                }
+            }
+        }
 
-		//LeadsTo des zu ersetzenden Channels für den neuen Channel neu erzeugen
-		tempchannel.removeLeadsTo();
-		for (int i = 0; i < succChannel.getLeadsTo().size(); i++) {
-			tempToChannel = succChannel.getLeadsTo().get(i).getToChannel();
-			//log.trace("tempToChannel: " + tempToChannel.toString());
-			tempLeadsTo = new LeadsTo(tempchannel, tempToChannel);
-			//log.trace(i + ". Durchlauf: Füge ledasTo hinzu: " + tempLeadsTo.toString());
-			digraph.addLeadsTo(tempLeadsTo);
-		}
+        //LeadsTo des zu ersetzenden Channels für den neuen Channel neu erzeugen
+        tempchannel.removeLeadsTo();
+        for (int i = 0; i < succChannel.getLeadsTo().size(); i++) {
+            tempToChannel = succChannel.getLeadsTo().get(i).getToChannel();
+            //log.trace("tempToChannel: " + tempToChannel.toString());
+            tempLeadsTo = new LeadsTo(tempchannel, tempToChannel);
+            //log.trace(i + ". Durchlauf: Füge ledasTo hinzu: " + tempLeadsTo.toString());
+            digraph.addLeadsTo(tempLeadsTo);
+        }
 
-		//TODO: quick'n'dirty
-		ArrayList< LeadsTo> tls = succChannel.getLeadsTo();
-		for (int i = 0; i < tls.size(); i++) {
-			digraph.removeLeadsTo(tls.get(i));
-		}
-		digraph.removeChannel(succChannel);
-		//pseudochannels.add(tempchannel.getSuccChannels().get(0));
-	}
+        //TODO: quick'n'dirty
+        ArrayList< LeadsTo> tls = succChannel.getLeadsTo();
+        for (int i = 0; i < tls.size(); i++) {
+            digraph.removeLeadsTo(tls.get(i));
+        }
+        digraph.removeChannel(succChannel);
+        //pseudochannels.add(tempchannel.getSuccChannels().get(0));
+    }
 
-	public void removePseudoChannels() {
-		Channel tempChannel;
-		for (int i = 0; i < digraph.getChannels().size(); i++) {
-			tempChannel = digraph.getChannelAtPosition(i);
-			while (digraph.isInBBox(tempChannel.getToNode())
-					&& (tempChannel.getLeadsTo().size() == 1)
-					&& (tempChannel.getLeadsTo().get(0).getToChannel().getPredChannels().size() <= 1)
-					&& (tempChannel.getBackChannelID() != tempChannel.getLeadsTo().get(0).getToChannel().getNewid())) {
-				// dies if-abfrage verhindert eine endlosschleife, wenn der
-				// channel ein kreisverkehr istjava
-				if (tempChannel.getLeadsTo().get(0).getToChannel().equals(tempChannel)) {
-					break;
-				} else {
-					mergeChannel(tempChannel);
-				}
-			}
+    public void removePseudoChannels() {
+        Channel tempChannel;
+        for (int i = 0; i < digraph.getChannels().size(); i++) {
+            tempChannel = digraph.getChannelAtPosition(i);
+            while (digraph.isInBBox(tempChannel.getToNode())
+                    && (tempChannel.getLeadsTo().size() == 1)
+                    && (tempChannel.getLeadsTo().get(0).getToChannel().getPredChannels().size() <= 1)
+                    && (tempChannel.getBackChannelID() != tempChannel.getLeadsTo().get(0).getToChannel().getNewid())) {
+                // dies if-abfrage verhindert eine endlosschleife, wenn der
+                // channel ein kreisverkehr istjava
+                if (tempChannel.getLeadsTo().get(0).getToChannel().equals(tempChannel)) {
+                    break;
+                } else {
+                    mergeChannel(tempChannel);
+                }
+            }
 
-		}
-	}
+        }
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/TurnRestrictionChecker.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/TurnRestrictionChecker.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/converting/TurnRestrictionChecker.java	(revision 30725)
@@ -18,99 +18,99 @@
 public class TurnRestrictionChecker {
 
-	private final ArrayList<OSMRelation> turnrestrictionsrelations = new ArrayList<OSMRelation>();
-	private final ChannelDiGraph channelDigraph;
-	private int relationpointer;
-	private LeadsTo tempLeadsTo;
+    private final ArrayList<OSMRelation> turnrestrictionsrelations = new ArrayList<OSMRelation>();
+    private final ChannelDiGraph channelDigraph;
+    private int relationpointer;
+    private LeadsTo tempLeadsTo;
 
-	public TurnRestrictionChecker(OSMGraph graph, ChannelDiGraph channelDigraph) {
-		// von den Relationen des Graphen nur die Abbiegevorschriften kopieren
-		for (int i = 0; i < graph.getRelations().length; i++) {
-			if (graph.getRelations()[i].hasKey("type")) {
-				if (graph.getRelations()[i].getValue("type").equals(
-				"restriction")) {
-					turnrestrictionsrelations.add(graph.getRelations()[i]);
-				}
-			}
-		}
-		this.channelDigraph = channelDigraph;
-	}
+    public TurnRestrictionChecker(OSMGraph graph, ChannelDiGraph channelDigraph) {
+        // von den Relationen des Graphen nur die Abbiegevorschriften kopieren
+        for (int i = 0; i < graph.getRelations().length; i++) {
+            if (graph.getRelations()[i].hasKey("type")) {
+                if (graph.getRelations()[i].getValue("type").equals(
+                "restriction")) {
+                    turnrestrictionsrelations.add(graph.getRelations()[i]);
+                }
+            }
+        }
+        this.channelDigraph = channelDigraph;
+    }
 
-	private boolean checkForRelations(Channel channel) {
-		for (int k = 0; k < turnrestrictionsrelations.size(); k++) {
-			//log.trace("betrachte relation in liste an position:" + k);
-			for (int i = 0; i < channel.getWays().size(); i++) {
-				if (turnrestrictionsrelations.get(k).getMember("from").getId() == channel
-						.getWays().get(i).getId()
-						&& turnrestrictionsrelations.get(k).getMember("via")
-						.getId() == channel.getToNode().getId()) {
-					relationpointer = k;
-					return true;
-				}
-			}
-		}
-		return false;
-	}
+    private boolean checkForRelations(Channel channel) {
+        for (int k = 0; k < turnrestrictionsrelations.size(); k++) {
+            //log.trace("betrachte relation in liste an position:" + k);
+            for (int i = 0; i < channel.getWays().size(); i++) {
+                if (turnrestrictionsrelations.get(k).getMember("from").getId() == channel
+                        .getWays().get(i).getId()
+                        && turnrestrictionsrelations.get(k).getMember("via")
+                        .getId() == channel.getToNode().getId()) {
+                    relationpointer = k;
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
 
-	private void produceLeadsToFromRelation(Channel fromChannel,
-			Channel toChannel) {
-		if (toChannel.getWays().contains(
-				turnrestrictionsrelations.get(relationpointer).getMember("to"))) {
-			if (turnrestrictionsrelations.get(relationpointer).getValue(
-			"restriction").startsWith("only")) {
+    private void produceLeadsToFromRelation(Channel fromChannel,
+            Channel toChannel) {
+        if (toChannel.getWays().contains(
+                turnrestrictionsrelations.get(relationpointer).getMember("to"))) {
+            if (turnrestrictionsrelations.get(relationpointer).getValue(
+            "restriction").startsWith("only")) {
 
-				tempLeadsTo = new LeadsTo(fromChannel, toChannel);
-				channelDigraph.addLeadsTo(tempLeadsTo);
-				toChannel.addPredChannel(fromChannel);
-			}
-			/*
-			 * der no_* Fall: wie oben, nur das hier nichts geschieht
-			 */
-			else if (turnrestrictionsrelations.get(relationpointer).getValue(
-			"restriction").startsWith("no")) {
-				for (int i = 0; i < fromChannel.getToNode()
-				.getOutgoingChannels().size(); i++) {
-					if (fromChannel.getToNode().getOutgoingChannels().get(i) != toChannel) {
-						tempLeadsTo = new LeadsTo(fromChannel, fromChannel
-								.getToNode().getOutgoingChannels().get(i));
-						channelDigraph.addLeadsTo(tempLeadsTo);
-						fromChannel.getToNode().getOutgoingChannels().get(i)
-						.addPredChannel(fromChannel);
-					}
-				}
-			}
-		}
+                tempLeadsTo = new LeadsTo(fromChannel, toChannel);
+                channelDigraph.addLeadsTo(tempLeadsTo);
+                toChannel.addPredChannel(fromChannel);
+            }
+            /*
+             * der no_* Fall: wie oben, nur das hier nichts geschieht
+             */
+            else if (turnrestrictionsrelations.get(relationpointer).getValue(
+            "restriction").startsWith("no")) {
+                for (int i = 0; i < fromChannel.getToNode()
+                .getOutgoingChannels().size(); i++) {
+                    if (fromChannel.getToNode().getOutgoingChannels().get(i) != toChannel) {
+                        tempLeadsTo = new LeadsTo(fromChannel, fromChannel
+                                .getToNode().getOutgoingChannels().get(i));
+                        channelDigraph.addLeadsTo(tempLeadsTo);
+                        fromChannel.getToNode().getOutgoingChannels().get(i)
+                        .addPredChannel(fromChannel);
+                    }
+                }
+            }
+        }
 
-	}
+    }
 
-	/**
-	 * startet die LeadsTo Erstellung
-	 */
-	public void createLeadsTo() {
-		Channel tempChannel;
-		for (int i = 0; i < channelDigraph.getChannels().size(); i++) {
-			tempChannel = channelDigraph.getChannelAtPosition(i);
-			boolean isInRelation = checkForRelations(tempChannel);
-			for (int j = 0; j < tempChannel.getToNode().getOutgoingChannels()
-			.size(); j++) {
-				if (isInRelation) {
-					produceLeadsToFromRelation(tempChannel, tempChannel
-							.getToNode().getOutgoingChannels().get(j));
-					// es wird nur dann ein leadsTo erzeugt, wenn der vom
-					// Endknoten des Channels
-					// ausgehende Channel NICHT der Channel in Rückrichtung ist
-					// Ausnahme: es gibt nur diesen einen Channel (Wegende eines
-					// Ways, der an keine weitere
-					// Straße trifft
-				} else if (tempChannel.getBackChannelID() != tempChannel
-						.getToNode().getOutgoingChannels().get(j).getNewid()
-						|| tempChannel.getToNode().getOutgoingChannels().size() == 1) {
-					tempLeadsTo = new LeadsTo(tempChannel, tempChannel
-							.getToNode().getOutgoingChannels().get(j));
-					channelDigraph.addLeadsTo(tempLeadsTo);
-					tempChannel.getToNode().getOutgoingChannels().get(j)
-					.addPredChannel(tempChannel);
-				}
-			}
-		}
-	}
+    /**
+     * startet die LeadsTo Erstellung
+     */
+    public void createLeadsTo() {
+        Channel tempChannel;
+        for (int i = 0; i < channelDigraph.getChannels().size(); i++) {
+            tempChannel = channelDigraph.getChannelAtPosition(i);
+            boolean isInRelation = checkForRelations(tempChannel);
+            for (int j = 0; j < tempChannel.getToNode().getOutgoingChannels()
+            .size(); j++) {
+                if (isInRelation) {
+                    produceLeadsToFromRelation(tempChannel, tempChannel
+                            .getToNode().getOutgoingChannels().get(j));
+                    // es wird nur dann ein leadsTo erzeugt, wenn der vom
+                    // Endknoten des Channels
+                    // ausgehende Channel NICHT der Channel in Rückrichtung ist
+                    // Ausnahme: es gibt nur diesen einen Channel (Wegende eines
+                    // Ways, der an keine weitere
+                    // Straße trifft
+                } else if (tempChannel.getBackChannelID() != tempChannel
+                        .getToNode().getOutgoingChannels().get(j).getNewid()
+                        || tempChannel.getToNode().getOutgoingChannels().size() == 1) {
+                    tempLeadsTo = new LeadsTo(tempChannel, tempChannel
+                            .getToNode().getOutgoingChannels().get(j));
+                    channelDigraph.addLeadsTo(tempLeadsTo);
+                    tempChannel.getToNode().getOutgoingChannels().get(j)
+                    .addPredChannel(tempChannel);
+                }
+            }
+        }
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/BasicChannel.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/BasicChannel.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/BasicChannel.java	(revision 30725)
@@ -9,197 +9,197 @@
 public class BasicChannel {
 
-	private OSMNode toNode;
-	private OSMNode fromNode;
-	private ArrayList<LeadsTo> leadsTo = new ArrayList<LeadsTo>();
-	private final ArrayList<OSMWay> ways = new ArrayList<OSMWay>();
-	private int newid;
-	//gibt es nur, wenn ein Channelobjekt aus einer Nichteinbahnstraße erzeugt wurde (backchannelID ist dann die ID des anderen Channels)
-	private int backChannelID = -100;
-	private final ArrayList<Channel> predChannels = new ArrayList<Channel>();
-
-	//werden für den Tarjan-Algorithmus gebraucht
-	private int lowlink = -1;
-	private int index = -1;
-
-	/**
-	 * fügt einen Vorgängerchannel hinzu
-	 * @param channel der voherige Channel
-	 */
-	public void addPredChannel(Channel channel) {
-		predChannels.add(channel);
-	}
-
-	/**
-	 * setzt den ToNode
-	 * @param toNode
-	 */
-	public void setToNode(OSMNode toNode) {
-		this.toNode = toNode;
-	}
-
-	/**
-	 * gbit den ToNode zurück
-	 */
-	public OSMNode getToNode() {
-		return toNode;
-	}
-
-	/**
-	 * setzt den FromNode
-	 */
-	public void setFromNode(OSMNode fromNode) {
-		this.fromNode = fromNode;
-	}
-
-	/**
-	 * gibt den FromNode zurück
-	 */
-	public OSMNode getFromNode() {
-		return fromNode;
-	}
-
-	/**
-	 * fügt eine LeadsTo-Beziehung hinzu
-	 * @param leadsTo
-	 */
-	public void addLeadsTo(LeadsTo leadsTo) {
-		this.leadsTo.add(leadsTo);
-	}
-
-	/**
-	 * setzt alle leadsTo-Beziehungen (löscht alle voherigen)
-	 */
-	public void setLeadsTo(ArrayList<LeadsTo> leadsTo) {
-		this.leadsTo = leadsTo;
-	}
-
-	/**
-	 * löscht alle LeadsTo des Channels
-	 */
-	public void removeLeadsTo() {
-		this.leadsTo.clear();
-	}
-
-	/**
-	 * gibt alle leadsTo zurück
-	 * @return
-	 */
-	public ArrayList<LeadsTo> getLeadsTo() {
-		return leadsTo;
-	}
-
-	/**
-	 * fügt einen Way hinzu, aus dem der Channel enstanden ist
-	 * es gibt immer mind. einen Way, es können aber auch mehr sein
-	 * @param way
-	 */
-	public void addWay(OSMWay way) {
-		this.ways.add(way);
-	}
-
-	/**
-	 * gibt alle Ways zurück
-	 * @return
-	 */
-	public ArrayList<OSMWay> getWays() {
-		return ways;
-	}
-
-	/**
-	 * gibt nur den ersten Way der ArrayList zurück! wird bei der
-	 * XML-datei-Erzeugung benutzt, um den Way, der aus dem Channel entsteht,
-	 * mit Werten zu füllen dabei gehen Informationen verloren, da ein Channel
-	 * aus mehr als einem Way bestehen kann
-	 * 
-	 * @return
-	 */
-	public OSMWay getWay() {
-		return ways.get(0);
-	}
-
-	/**
-	 * setzt die ID des Channels. es kann nicht die ID des Ways übernommen werden, da aus einem Way oftmals mehrere Channels entstehen (z.B. bei jeder Nichteinbahnstraße mind. 2)
-	 */
-	public void setNewid(int newid) {
-		this.newid = newid;
-	}
-
-	/**
-	 * gbit die NewID zurück
-	 */
-	public int getNewid() {
-		return newid;
-	}
-
-	/**
-	 * gibt alle VorgängerChannels zurück
-	 * @return
-	 */
-	public ArrayList<Channel> getPredChannels() {
-		return predChannels;
-	}
-
-	/**
-	 * ToString Methode
-	 */
-	@Override
-	public String toString() {
-		String lt ="";
-		for (int i = 0; i < leadsTo.size(); i++) {
-			lt += leadsTo.get(i).getToChannel().getNewid() + ", ";
-		}
-		String predch = "";
-		for (int i = 0; i < predChannels.size(); i++) {
-			predch += predChannels.get(i).getNewid() + ", ";
-		}
-		return "[ChannelID: "+ newid + ":AnzahlPredCH: " + predChannels.size() + ":PredCh: " + predch +  ":AnzahlSuccCH: " + leadsTo.size() +":LeadsTo: " + lt+ ":backCHID: " + backChannelID + "]";
-	}
-
-	public void setBackChannelID(int backChannelID) {
-		this.backChannelID = backChannelID;
-	}
-
-	public int getBackChannelID() {
-		return backChannelID;
-	}
-
-	/**
-	 * wandelt den Channel in einen OSMWay um
-	 * dabie werden die Werte des 1. Way, der im Channel ist, übernommen, wenn ein
-	 * 1. Channel existiert
-	 */
-	public OSMWay ToOSMWay() {
-		OSMWay way = new OSMWay();
-		way.addNode(this.fromNode);
-		way.addNode(this.toNode);
-		way.setId((long)this.newid);
-		if (this.getWay() != null) {
-			way.setHashmap(this.getWay().getHashmap());
-		}
-		return way;
-	}
-
-	public void ereasePredChannel(Channel rchannel) {
-		predChannels.remove(rchannel);
-	}
-
-	public int getLowlink() {
-		return lowlink;
-	}
-
-	public void setLowlink(int lowlink) {
-		this.lowlink = lowlink;
-	}
-
-	public int getIndex() {
-		return index;
-	}
-
-	public void setIndex(int index) {
-		this.index = index;
-	}
-
-	public void removeLeadsTo(LeadsTo leadsTo) {
-		this.leadsTo.remove(leadsTo);
-	}
+    private OSMNode toNode;
+    private OSMNode fromNode;
+    private ArrayList<LeadsTo> leadsTo = new ArrayList<LeadsTo>();
+    private final ArrayList<OSMWay> ways = new ArrayList<OSMWay>();
+    private int newid;
+    //gibt es nur, wenn ein Channelobjekt aus einer Nichteinbahnstraße erzeugt wurde (backchannelID ist dann die ID des anderen Channels)
+    private int backChannelID = -100;
+    private final ArrayList<Channel> predChannels = new ArrayList<Channel>();
+
+    //werden für den Tarjan-Algorithmus gebraucht
+    private int lowlink = -1;
+    private int index = -1;
+
+    /**
+     * fügt einen Vorgängerchannel hinzu
+     * @param channel der voherige Channel
+     */
+    public void addPredChannel(Channel channel) {
+        predChannels.add(channel);
+    }
+
+    /**
+     * setzt den ToNode
+     * @param toNode
+     */
+    public void setToNode(OSMNode toNode) {
+        this.toNode = toNode;
+    }
+
+    /**
+     * gbit den ToNode zurück
+     */
+    public OSMNode getToNode() {
+        return toNode;
+    }
+
+    /**
+     * setzt den FromNode
+     */
+    public void setFromNode(OSMNode fromNode) {
+        this.fromNode = fromNode;
+    }
+
+    /**
+     * gibt den FromNode zurück
+     */
+    public OSMNode getFromNode() {
+        return fromNode;
+    }
+
+    /**
+     * fügt eine LeadsTo-Beziehung hinzu
+     * @param leadsTo
+     */
+    public void addLeadsTo(LeadsTo leadsTo) {
+        this.leadsTo.add(leadsTo);
+    }
+
+    /**
+     * setzt alle leadsTo-Beziehungen (löscht alle voherigen)
+     */
+    public void setLeadsTo(ArrayList<LeadsTo> leadsTo) {
+        this.leadsTo = leadsTo;
+    }
+
+    /**
+     * löscht alle LeadsTo des Channels
+     */
+    public void removeLeadsTo() {
+        this.leadsTo.clear();
+    }
+
+    /**
+     * gibt alle leadsTo zurück
+     * @return
+     */
+    public ArrayList<LeadsTo> getLeadsTo() {
+        return leadsTo;
+    }
+
+    /**
+     * fügt einen Way hinzu, aus dem der Channel enstanden ist
+     * es gibt immer mind. einen Way, es können aber auch mehr sein
+     * @param way
+     */
+    public void addWay(OSMWay way) {
+        this.ways.add(way);
+    }
+
+    /**
+     * gibt alle Ways zurück
+     * @return
+     */
+    public ArrayList<OSMWay> getWays() {
+        return ways;
+    }
+
+    /**
+     * gibt nur den ersten Way der ArrayList zurück! wird bei der
+     * XML-datei-Erzeugung benutzt, um den Way, der aus dem Channel entsteht,
+     * mit Werten zu füllen dabei gehen Informationen verloren, da ein Channel
+     * aus mehr als einem Way bestehen kann
+     * 
+     * @return
+     */
+    public OSMWay getWay() {
+        return ways.get(0);
+    }
+
+    /**
+     * setzt die ID des Channels. es kann nicht die ID des Ways übernommen werden, da aus einem Way oftmals mehrere Channels entstehen (z.B. bei jeder Nichteinbahnstraße mind. 2)
+     */
+    public void setNewid(int newid) {
+        this.newid = newid;
+    }
+
+    /**
+     * gbit die NewID zurück
+     */
+    public int getNewid() {
+        return newid;
+    }
+
+    /**
+     * gibt alle VorgängerChannels zurück
+     * @return
+     */
+    public ArrayList<Channel> getPredChannels() {
+        return predChannels;
+    }
+
+    /**
+     * ToString Methode
+     */
+    @Override
+    public String toString() {
+        String lt ="";
+        for (int i = 0; i < leadsTo.size(); i++) {
+            lt += leadsTo.get(i).getToChannel().getNewid() + ", ";
+        }
+        String predch = "";
+        for (int i = 0; i < predChannels.size(); i++) {
+            predch += predChannels.get(i).getNewid() + ", ";
+        }
+        return "[ChannelID: "+ newid + ":AnzahlPredCH: " + predChannels.size() + ":PredCh: " + predch +  ":AnzahlSuccCH: " + leadsTo.size() +":LeadsTo: " + lt+ ":backCHID: " + backChannelID + "]";
+    }
+
+    public void setBackChannelID(int backChannelID) {
+        this.backChannelID = backChannelID;
+    }
+
+    public int getBackChannelID() {
+        return backChannelID;
+    }
+
+    /**
+     * wandelt den Channel in einen OSMWay um
+     * dabie werden die Werte des 1. Way, der im Channel ist, übernommen, wenn ein
+     * 1. Channel existiert
+     */
+    public OSMWay ToOSMWay() {
+        OSMWay way = new OSMWay();
+        way.addNode(this.fromNode);
+        way.addNode(this.toNode);
+        way.setId((long)this.newid);
+        if (this.getWay() != null) {
+            way.setHashmap(this.getWay().getHashmap());
+        }
+        return way;
+    }
+
+    public void ereasePredChannel(Channel rchannel) {
+        predChannels.remove(rchannel);
+    }
+
+    public int getLowlink() {
+        return lowlink;
+    }
+
+    public void setLowlink(int lowlink) {
+        this.lowlink = lowlink;
+    }
+
+    public int getIndex() {
+        return index;
+    }
+
+    public void setIndex(int index) {
+        this.index = index;
+    }
+
+    public void removeLeadsTo(LeadsTo leadsTo) {
+        this.leadsTo.remove(leadsTo);
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/Channel.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/Channel.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/Channel.java	(revision 30725)
@@ -12,229 +12,229 @@
 public class Channel extends BasicChannel{
 
-	//für den Junctioncheck
-	private int indegree;
-	private int outdegree;
-	private boolean subgraph;
-	private int visited = BacktrackingColors.WHITE;
-	private final ArrayList<Channel> reachableNodes = new ArrayList<Channel>();
-	private int ennr;
-	private boolean isStrongConnected = true;
-	private boolean isSelected = false; //wird für den eigenen Layer benötigt, um markierte Channels zu erhalten
-	private boolean isPartOfJunction = false; //wird für den eigenen Layer benötigt, um Teile einer Kreuzung farbig repräsentieren zu können
-	
-	private final HashMap<Channel , ArrayList<Channel>> paths2 = new HashMap<Channel , ArrayList<Channel>>();
-
-
-	public Channel(OSMNode fromNode, OSMNode toNode) {
-		super();
-		this.setFromNode(fromNode);
-		this.setToNode(toNode);
-		this.subgraph = false;
-		this.indegree = 0;
-		this.outdegree = 0;
-	}
-
-	public Channel(){
-		super();
-		//this.insidenodes = new ArrayList<OSMNode>();
-		this.subgraph = false;
-		this.indegree = 0;
-		this.outdegree = 0;
-	}
-
-	/**
-	 * gibt die Anzahl der auf diesen Channel verweisenden leadsTo zurück
-	 * @return
-	 */
-	public int getIndegree() {
-		return indegree;
-	}
-
-	/**
-	 * gibt die Anzahl der aus diesem Channel gehenden leadsTo zurück
-	 * @return
-	 */
-	public int getOutdegree() {
-		return outdegree;
-	}
-
-	public void setIndegree(int i) {
-		this.indegree = i;
-	}
-
-	public void setOutdegree(int i){
-		this.outdegree = i;
-	}
-
-	/**
-	 * ist dieser Channel Teil der zu untersuchenden Kreuzung?
-	 */
-	public boolean isSubgraph() {
-		return subgraph;
-	}
-
-	public void setSubgraph(boolean subgraph) {
-		this.subgraph = subgraph;
-	}
-
-	/**
-	 * setzt die Farbe des Channels für den TRDFS white = unbesucht grey = besucht, aber noch nicht beendet black = besucht nund abgeschlossen
-	 */
-	public int getVisited() {
-		return visited;
-	}
-
-	public void setVisited(int visited) {
-		this.visited = visited;
-	}
-
-	/**
-	 * gibt die von diesem Channel zu erreichenden anderen CHannels zurück
-	 * @return
-	 */
-	public ArrayList<Channel> getReachableNodes() {
-		return reachableNodes;
-	}
-
-	/**
-	 * setzt die zu erreichenden Channels alle anderen werden gelöscht
-	 * @param  reachableNodes
-	 */
-	public int getEnnr() {
-		return ennr;
-	}
-
-	/**
-	 * setzt die Anzahl der EingangsChannel
-	 * @param  ennr
-	 */
-	public void setEnnr(int ennr) {
-		this.ennr = ennr;
-	}
-
-	/**
-	 * erhöht den Wert der Anzhal der EingangsledasTo um 1
-	 */
-	public void countupIndegree() {
-		indegree++;
-	}
-
-	/**
-	 * erhöht den Wert der Anzahl der AusgangsleadsTo um 1
-	 */
-	public void countupOutdegree() {
-		outdegree++;
-	}
-
-	/**
-	 * fügt einen erreichbaren Channel hinzu
-	 * @param node
-	 */
-	public void addReachableNode(Channel node) {
-		if (!reachableNodes.contains(node)) {
-			reachableNodes.add(node);
-			paths2.put(node, new ArrayList<Channel>());
-		}
-	}
-
-	/**
-	 * gibt den an der Position i gespeicherten erreichbaren Channel zurück
-	 * @param i
-	 * @return
-	 */
-	public Channel getReachableNodeAt(int i) {
-		return reachableNodes.get(i);
-	}
-
-	/**
-	 * löscht alle erreichbaren Channels
-	 */
-	public void ereaseReachableNodes() {
-		reachableNodes.clear();
-	}
-
-	/**
-	 * setzt Wert der erreichbaren Eingangschannel auf 0
-	 */
-	public void setEnnrZero() {
-		ennr = 0;
-	}
-
-	/**
-	 * erhöht den Wert der Eingänge um 1
-	 */
-	public void increaseEnnr() {
-		ennr++;
-	}
-
-
-	/**
-	 * fügt einen Pfad den Pfaden zu
-	 * @param path
-	 */
-	public void appendPath(Channel node, ArrayList<Channel> path) {
-		for (int i = 0; i < path.size(); i++) {
-			if (!paths2.get(node).contains(path.get(i))) {
-				paths2.get(node).add(path.get(i));
-			}
-		}
-	}
-
-	public void appendChannelToPath(Channel node, Channel channel) {
-		if (!paths2.containsKey(node)) {
-			paths2.put(node, new ArrayList<Channel>());
-
-		}
-		if (!paths2.get(node).contains(channel)) {
-			paths2.get(node).add(channel);
-
-		}
-	}
-
-	/**
-	 * gibt alle Pfade zurück
-	 * @return
-	 */
-	public ArrayList<ArrayList<Channel>> getPaths() {
-		ArrayList<ArrayList<Channel>> t = new ArrayList<ArrayList<Channel>>();
-		t.addAll(paths2.values());
-		return t;
-	}
-
-	public ArrayList<Channel> getPathsAt(Channel node) {
-		if (paths2.containsKey(node)) {
-			return paths2.get(node);
-		}
-		else {
-			//log.error("das darf nicht bei Channel: " + this.getNewid() + ", kein Node " + node.getNewid());
-			return null;
-		}
-
-	}
-
-	public boolean isStrongConnected() {
-		return isStrongConnected;
-	}
-
-	public void setStrongConnected(boolean isStrongConnected) {
-		this.isStrongConnected = isStrongConnected;
-	}
-
-	public boolean isSelected() {
-		return isSelected;
-	}
-
-	public void setSelected(boolean isSelected) {
-		this.isSelected = isSelected;
-	}
-
-	public boolean isPartOfJunction() {
-		return isPartOfJunction;
-	}
-
-	public void setPartOfJunction(boolean isPartOfJunction) {
-		this.isPartOfJunction = isPartOfJunction;
-	}
-
-	
+    //für den Junctioncheck
+    private int indegree;
+    private int outdegree;
+    private boolean subgraph;
+    private int visited = BacktrackingColors.WHITE;
+    private final ArrayList<Channel> reachableNodes = new ArrayList<Channel>();
+    private int ennr;
+    private boolean isStrongConnected = true;
+    private boolean isSelected = false; //wird für den eigenen Layer benötigt, um markierte Channels zu erhalten
+    private boolean isPartOfJunction = false; //wird für den eigenen Layer benötigt, um Teile einer Kreuzung farbig repräsentieren zu können
+    
+    private final HashMap<Channel , ArrayList<Channel>> paths2 = new HashMap<Channel , ArrayList<Channel>>();
+
+
+    public Channel(OSMNode fromNode, OSMNode toNode) {
+        super();
+        this.setFromNode(fromNode);
+        this.setToNode(toNode);
+        this.subgraph = false;
+        this.indegree = 0;
+        this.outdegree = 0;
+    }
+
+    public Channel(){
+        super();
+        //this.insidenodes = new ArrayList<OSMNode>();
+        this.subgraph = false;
+        this.indegree = 0;
+        this.outdegree = 0;
+    }
+
+    /**
+     * gibt die Anzahl der auf diesen Channel verweisenden leadsTo zurück
+     * @return
+     */
+    public int getIndegree() {
+        return indegree;
+    }
+
+    /**
+     * gibt die Anzahl der aus diesem Channel gehenden leadsTo zurück
+     * @return
+     */
+    public int getOutdegree() {
+        return outdegree;
+    }
+
+    public void setIndegree(int i) {
+        this.indegree = i;
+    }
+
+    public void setOutdegree(int i){
+        this.outdegree = i;
+    }
+
+    /**
+     * ist dieser Channel Teil der zu untersuchenden Kreuzung?
+     */
+    public boolean isSubgraph() {
+        return subgraph;
+    }
+
+    public void setSubgraph(boolean subgraph) {
+        this.subgraph = subgraph;
+    }
+
+    /**
+     * setzt die Farbe des Channels für den TRDFS white = unbesucht grey = besucht, aber noch nicht beendet black = besucht nund abgeschlossen
+     */
+    public int getVisited() {
+        return visited;
+    }
+
+    public void setVisited(int visited) {
+        this.visited = visited;
+    }
+
+    /**
+     * gibt die von diesem Channel zu erreichenden anderen CHannels zurück
+     * @return
+     */
+    public ArrayList<Channel> getReachableNodes() {
+        return reachableNodes;
+    }
+
+    /**
+     * setzt die zu erreichenden Channels alle anderen werden gelöscht
+     * @param  reachableNodes
+     */
+    public int getEnnr() {
+        return ennr;
+    }
+
+    /**
+     * setzt die Anzahl der EingangsChannel
+     * @param  ennr
+     */
+    public void setEnnr(int ennr) {
+        this.ennr = ennr;
+    }
+
+    /**
+     * erhöht den Wert der Anzhal der EingangsledasTo um 1
+     */
+    public void countupIndegree() {
+        indegree++;
+    }
+
+    /**
+     * erhöht den Wert der Anzahl der AusgangsleadsTo um 1
+     */
+    public void countupOutdegree() {
+        outdegree++;
+    }
+
+    /**
+     * fügt einen erreichbaren Channel hinzu
+     * @param node
+     */
+    public void addReachableNode(Channel node) {
+        if (!reachableNodes.contains(node)) {
+            reachableNodes.add(node);
+            paths2.put(node, new ArrayList<Channel>());
+        }
+    }
+
+    /**
+     * gibt den an der Position i gespeicherten erreichbaren Channel zurück
+     * @param i
+     * @return
+     */
+    public Channel getReachableNodeAt(int i) {
+        return reachableNodes.get(i);
+    }
+
+    /**
+     * löscht alle erreichbaren Channels
+     */
+    public void ereaseReachableNodes() {
+        reachableNodes.clear();
+    }
+
+    /**
+     * setzt Wert der erreichbaren Eingangschannel auf 0
+     */
+    public void setEnnrZero() {
+        ennr = 0;
+    }
+
+    /**
+     * erhöht den Wert der Eingänge um 1
+     */
+    public void increaseEnnr() {
+        ennr++;
+    }
+
+
+    /**
+     * fügt einen Pfad den Pfaden zu
+     * @param path
+     */
+    public void appendPath(Channel node, ArrayList<Channel> path) {
+        for (int i = 0; i < path.size(); i++) {
+            if (!paths2.get(node).contains(path.get(i))) {
+                paths2.get(node).add(path.get(i));
+            }
+        }
+    }
+
+    public void appendChannelToPath(Channel node, Channel channel) {
+        if (!paths2.containsKey(node)) {
+            paths2.put(node, new ArrayList<Channel>());
+
+        }
+        if (!paths2.get(node).contains(channel)) {
+            paths2.get(node).add(channel);
+
+        }
+    }
+
+    /**
+     * gibt alle Pfade zurück
+     * @return
+     */
+    public ArrayList<ArrayList<Channel>> getPaths() {
+        ArrayList<ArrayList<Channel>> t = new ArrayList<ArrayList<Channel>>();
+        t.addAll(paths2.values());
+        return t;
+    }
+
+    public ArrayList<Channel> getPathsAt(Channel node) {
+        if (paths2.containsKey(node)) {
+            return paths2.get(node);
+        }
+        else {
+            //log.error("das darf nicht bei Channel: " + this.getNewid() + ", kein Node " + node.getNewid());
+            return null;
+        }
+
+    }
+
+    public boolean isStrongConnected() {
+        return isStrongConnected;
+    }
+
+    public void setStrongConnected(boolean isStrongConnected) {
+        this.isStrongConnected = isStrongConnected;
+    }
+
+    public boolean isSelected() {
+        return isSelected;
+    }
+
+    public void setSelected(boolean isSelected) {
+        this.isSelected = isSelected;
+    }
+
+    public boolean isPartOfJunction() {
+        return isPartOfJunction;
+    }
+
+    public void setPartOfJunction(boolean isPartOfJunction) {
+        this.isPartOfJunction = isPartOfJunction;
+    }
+
+    
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/ChannelDiGraph.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/ChannelDiGraph.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/ChannelDiGraph.java	(revision 30725)
@@ -11,325 +11,325 @@
 public class ChannelDiGraph extends Graph {
 
-	private ArrayList<Channel> channels = new ArrayList<Channel>();
-	private final ArrayList<LeadsTo> leadsTos = new ArrayList<LeadsTo>();
-	private final HashSet<Channel> selectedChannels = new HashSet<Channel>();
-	private HashSet<Channel> junctioncandidate = new HashSet<Channel>();
-
-	public void setChannels(ArrayList<Channel> channels) {
-		this.channels = channels;
-	}
-
-	/*
-	 * gibt den Channel mit dem übergebendem OSMNode als FromNode zurück
-	 */
-	public Channel getChannelWithFromNode(OSMNode node) {
-		for (int i = 0; i < channels.size(); i++) {
-			if (channels.get(i).getFromNode() == node) {
-				return channels.get(i);
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * gibt alle CHannels des Digraphen zurück
-	 * @return  Channels des Digraphen
-	 */
-	public ArrayList<Channel> getChannels() {
-		return channels;
-	}
-
-	/**
-	 * löscht den übergebenden Channel im Digraphen
-	 * 
-	 * @param channel
-	 */
-	public void removeChannel(Channel channel) {
-		channels.remove(channel);
-	}
-
-	/**
-	 * fügt einen Channel des ChannelDigraphen hinzu
-	 * 
-	 * @param channel
-	 *            hinzuzufügender Channel
-	 */
-	public void addChannel(Channel channel) {
-		this.channels.add(channel);
-	}
-
-	/**
-	 * Anzahl der innerhalb des DiGraphen gespeicherten Channels
-	 * 
-	 * @return Anzahl der Channels
-	 */
-	public int numberOfChannels() {
-		return channels.size();
-	}
-
-	/**
-	 * gibt Channel i an der Position i in der ArrayList zurück
-	 * 
-	 * @param i
-	 *            Position innerhalb der ArrayList
-	 * @return gewünschter Channel
-	 */
-	public Channel getChannelAtPosition(int i) {
-		return channels.get(i);
-	}
-
-	/**
-	 * gibt den Channel mit der gesuchten ID zurück
-	 * @param id ID des Channels
-	 * @return der gesuchte Channel, wenn nicht vorhanden null
-	 */
-	public Channel getChannelWithID(int id) {
-		for (int i = 0; i < channels.size(); i++) {
-			if (channels.get(i).getNewid() == id) {
-				return channels.get(i);
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * gibt alle From und To OSMNodes eines Graphen zurück (nicht die
-	 * ZWischenknoten)
-	 * 
-	 * @return alle From und To Nodes aller Channels des Digraphen
-	 */
-	public OSMNode[] getAllOSMNodes() {
-		HashMap<Long, OSMNode> nodes = new HashMap<Long, OSMNode>();
-		for (int i = 0; i < channels.size(); i++) {
-			if (!nodes.containsKey(channels.get(i).getFromNode().getId())) {
-				nodes.put(channels.get(i).getFromNode().getId(), channels
-						.get(i).getFromNode());
-			}
-			if (!nodes.containsKey(channels.get(i).getToNode().getId())) {
-				nodes.put(channels.get(i).getToNode().getId(), channels.get(i)
-						.getToNode());
-			}
-		}
-		OSMNode[] nodearray = new OSMNode[nodes.size()];
-		return nodes.values().toArray(nodearray);
-	}
-
-	public ArrayList<LeadsTo> getLeadsTo() {
-		return leadsTos;
-	}
-
-	/*
-	public void setLeadsTo(ArrayList<LeadsTo> leadsTo) {
-		this.leadsTos = leadsTo;
-	}*/
-
-	public void setForwardEdge(Channel fromChannel, Channel toChannel) {
-		for (int i = 0; i < leadsTos.size(); i++) {
-			if (leadsTos.get(i).getFromChannel() == fromChannel) {
-				if (leadsTos.get(i).getToChannel() == toChannel)
-					leadsTos.get(i).setForwardEdge(true);
-			}
-		}
-
-	}
-
-	/**
-	 * fügt eine leadsto-relation dem digraphen und dem entsprechendem Channel hinzu
-	 * @param leadsTo
-	 */
-	public void addLeadsTo(LeadsTo leadsTo) {
-		leadsTos.add(leadsTo);
-		for (int i = 0; i < channels.size(); i++) {
-			if (channels.get(i).getNewid() == leadsTo.getFromChannel().getNewid()) {
-				channels.get(i).addLeadsTo(leadsTo);
-				return;
-			}
-		}
-	}
-
-	public void removeLeadsTo(LeadsTo leadsTo) {
-		leadsTos.remove(leadsTo);
-		for (int i = 0; i < channels.size(); i++) {
-			if (channels.get(i).equals(leadsTo.getFromChannel())) {
-				channels.get(i).removeLeadsTo(leadsTo);
-				return;
-			}
-		}
-	}
-
-	/**
-	 * gibt den Channel zurück, der paßt. Sind Channel doppelt vorhanden, wird
-	 * nur der erste passende zurückgegeben!
-	 * 
-	 * @param fromChannel
-	 * @param toChannel
-	 * @return
-	 */
-	public LeadsTo getLeadsTo(Channel fromChannel, Channel toChannel) {
-		for (int i = 0; i < leadsTos.size(); i++) {
-			if (leadsTos.get(i).getFromChannel().getNewid() == fromChannel.getNewid()) {
-				//log.trace("FromChannel mit ID gefunden: " + fromChannel.getNewid());
-				if (leadsTos.get(i).getToChannel().getNewid() == toChannel.getNewid()) {
-					//log.trace("Leads To gefunden: " + leadsTos.get(i).toString());
-					return leadsTos.get(i);
-				}
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * gibt alle Channels zurück, die von diesen OSM-Knoten abgehen/hingehen
-	 * @param nodes
-	 * @return
-	 */
-	public ArrayList<Channel> getChannelsTouchingOSMNodes (ArrayList<OSMNode> nodes) {
-		ArrayList<Channel> touchingChannel = new ArrayList<Channel>();
-		for (int i = 0; i < nodes.size(); i++) {
-			for (int j = 0; j < channels.size(); j++) {
-				if (channels.get(j).getFromNode().getId() == nodes.get(i).getId()) {
-					if (!touchingChannel.contains(channels.get(j))) {
-						touchingChannel.add(channels.get(j));
-					}
-				}
-				else if (channels.get(j).getToNode().getId() == nodes.get(i).getId()) {
-					if (!touchingChannel.contains(channels.get(j))) {
-						touchingChannel.add(channels.get(j));
-					}
-				}
-			}
-		}
-		return touchingChannel;
-	}
-
-	public ArrayList<Channel> getChannelsTouchingOSMNode(long id) {
-		ArrayList<Channel> returnchannels = new ArrayList<Channel>();
-		for (int i = 0; i < channels.size(); i++) {
-			if (channels.get(i).getFromNode().getId() == id) {
-				returnchannels.add(channels.get(i));
-			}
-			if (channels.get(i).getToNode().getId() == id) {
-				returnchannels.add(channels.get(i));
-			}
-		}
-		return returnchannels;
-	}
-
-	/**
-	 * gibt den oder die Channels twischen diesen OSM-Punkten zurück
-	 * @param idfrom
-	 * @param idto
-	 * @return
-	 */
-	public ArrayList<Channel> getChannelsBetween(int idfrom, int idto) {
-		ArrayList<Channel> channelsresult = new ArrayList<Channel>();
-		for (int i = 0; i < channels.size(); i++) {
-			if (channels.get(i).getFromNode().getId() == idfrom) {
-				if (channels.get(i).getToNode().getId() == idto) {
-					channelsresult.add(channels.get(i));
-				}
-			}
-			else if (channels.get(i).getFromNode().getId() == idto) {
-				if (channels.get(i).getToNode().getId() == idfrom) {
-					channelsresult.add(channels.get(i));
-				}
-			}
-		}
-		return channelsresult;
-	}
-
-	public ArrayList<Channel> getChannelswithWayID(int id) {
-		ArrayList<Channel> channelsresult = new ArrayList<Channel>();
-		for (int i = 0; i < channels.size(); i++) {
-			if (channels.get(i).getWay().getId() == id) {
-				channelsresult.add(channels.get(i));
-			}
-		}
-		return channelsresult;
-	}
-
-	public void detectSelectedChannels(double left, double top, double right, double bottom) {
-		for (int i = 0; i < channels.size(); i++) {
-			//log.trace(channels.get(i).getFromNode().toString());
-			if ( (channels.get(i).getFromNode().getLatitude() <= top) && (channels.get(i).getFromNode().getLatitude() >= bottom)
-					&& (channels.get(i).getFromNode().getLongitude() >= left) && (channels.get(i).getFromNode().getLongitude() <=right)) {
-				channels.get(i).setSelected(true);
-				selectedChannels.add(channels.get(i));
-			}
-			if ( (channels.get(i).getToNode().getLatitude() <= top) && (channels.get(i).getToNode().getLatitude() >= bottom)
-					&& (channels.get(i).getToNode().getLongitude() >= left) && (channels.get(i).getToNode().getLongitude() <=right)) {
-				channels.get(i).setSelected(true);
-				selectedChannels.add(channels.get(i));
-			}
-		}
-	}
-
-	/**
-	 * löscht die markierten Channels aus der Liste der markierten Channels und setzt die
-	 * Eigenschaft isSelected auf false
-	 */
-	public void ereaseSelectedChannels() {
-		for (int i = 0; i < selectedChannels.size(); i++) {
-			Iterator<Channel> it = selectedChannels.iterator();
-			while (it.hasNext()) {
-				it.next().setSelected(false);
-			}
-		}
-		selectedChannels.clear();
-	}
-
-	public HashSet<Channel> getSelectedChannels() {
-		return selectedChannels;
-	}
-
-	public HashSet<Channel> getJunctionCandidate() {
-		return junctioncandidate;
-	}
-
-	public void ereaseJunctioncandidate() {
-		Iterator<Channel> it = junctioncandidate.iterator();
-		while (it.hasNext()) {
-			it.next().setPartOfJunction(false);
-		}
-		junctioncandidate.clear();
-	}
-
-	/**
-	 * setzt die Channels eines Kreuzungskandidaten
-	 * falls in im Hashset vorher Channels gespeichert waren, werden diese vorher gelöscht!
-	 * @param junctionCandidate
-	 */
-	public void setJunctioncandidate(HashSet<Channel> junctionCandidate) {
-		this.junctioncandidate.clear();
-		this.junctioncandidate = junctionCandidate;
-		Iterator<Channel> it = junctionCandidate.iterator();
-		while (it.hasNext()) {
-			it.next().setPartOfJunction(true);
-		}
-	}
-
-	public void addJunctioncandidateChannel(Channel channel) {
-		junctioncandidate.add(channel);
-		channel.setPartOfJunction(true);
-	}
-
-	/*TODO: kann weg oder?
-	public void ereaseChannelsSubgraph() {
-		for (int i = 0; i < channels.size(); i++) {
-			channels.get(i).setSubgraph(false);
-		}
-	}
-
-	public void ereaseChannelsInDegree() {
-		for (int i = 0; i < channels.size(); i++) {
-			channels.get(i).setIndegree(0);
-		}
-	}
-
-	public void ereaseChannelsOutDegree() {
-		for (int i = 0; i < channels.size(); i++) {
-			channels.get(i).setOutdegree(0);
-		}
-	}
-	 */
+    private ArrayList<Channel> channels = new ArrayList<Channel>();
+    private final ArrayList<LeadsTo> leadsTos = new ArrayList<LeadsTo>();
+    private final HashSet<Channel> selectedChannels = new HashSet<Channel>();
+    private HashSet<Channel> junctioncandidate = new HashSet<Channel>();
+
+    public void setChannels(ArrayList<Channel> channels) {
+        this.channels = channels;
+    }
+
+    /*
+     * gibt den Channel mit dem übergebendem OSMNode als FromNode zurück
+     */
+    public Channel getChannelWithFromNode(OSMNode node) {
+        for (int i = 0; i < channels.size(); i++) {
+            if (channels.get(i).getFromNode() == node) {
+                return channels.get(i);
+            }
+        }
+        return null;
+    }
+
+    /**
+     * gibt alle CHannels des Digraphen zurück
+     * @return  Channels des Digraphen
+     */
+    public ArrayList<Channel> getChannels() {
+        return channels;
+    }
+
+    /**
+     * löscht den übergebenden Channel im Digraphen
+     * 
+     * @param channel
+     */
+    public void removeChannel(Channel channel) {
+        channels.remove(channel);
+    }
+
+    /**
+     * fügt einen Channel des ChannelDigraphen hinzu
+     * 
+     * @param channel
+     *            hinzuzufügender Channel
+     */
+    public void addChannel(Channel channel) {
+        this.channels.add(channel);
+    }
+
+    /**
+     * Anzahl der innerhalb des DiGraphen gespeicherten Channels
+     * 
+     * @return Anzahl der Channels
+     */
+    public int numberOfChannels() {
+        return channels.size();
+    }
+
+    /**
+     * gibt Channel i an der Position i in der ArrayList zurück
+     * 
+     * @param i
+     *            Position innerhalb der ArrayList
+     * @return gewünschter Channel
+     */
+    public Channel getChannelAtPosition(int i) {
+        return channels.get(i);
+    }
+
+    /**
+     * gibt den Channel mit der gesuchten ID zurück
+     * @param id ID des Channels
+     * @return der gesuchte Channel, wenn nicht vorhanden null
+     */
+    public Channel getChannelWithID(int id) {
+        for (int i = 0; i < channels.size(); i++) {
+            if (channels.get(i).getNewid() == id) {
+                return channels.get(i);
+            }
+        }
+        return null;
+    }
+
+    /**
+     * gibt alle From und To OSMNodes eines Graphen zurück (nicht die
+     * ZWischenknoten)
+     * 
+     * @return alle From und To Nodes aller Channels des Digraphen
+     */
+    public OSMNode[] getAllOSMNodes() {
+        HashMap<Long, OSMNode> nodes = new HashMap<Long, OSMNode>();
+        for (int i = 0; i < channels.size(); i++) {
+            if (!nodes.containsKey(channels.get(i).getFromNode().getId())) {
+                nodes.put(channels.get(i).getFromNode().getId(), channels
+                        .get(i).getFromNode());
+            }
+            if (!nodes.containsKey(channels.get(i).getToNode().getId())) {
+                nodes.put(channels.get(i).getToNode().getId(), channels.get(i)
+                        .getToNode());
+            }
+        }
+        OSMNode[] nodearray = new OSMNode[nodes.size()];
+        return nodes.values().toArray(nodearray);
+    }
+
+    public ArrayList<LeadsTo> getLeadsTo() {
+        return leadsTos;
+    }
+
+    /*
+    public void setLeadsTo(ArrayList<LeadsTo> leadsTo) {
+        this.leadsTos = leadsTo;
+    }*/
+
+    public void setForwardEdge(Channel fromChannel, Channel toChannel) {
+        for (int i = 0; i < leadsTos.size(); i++) {
+            if (leadsTos.get(i).getFromChannel() == fromChannel) {
+                if (leadsTos.get(i).getToChannel() == toChannel)
+                    leadsTos.get(i).setForwardEdge(true);
+            }
+        }
+
+    }
+
+    /**
+     * fügt eine leadsto-relation dem digraphen und dem entsprechendem Channel hinzu
+     * @param leadsTo
+     */
+    public void addLeadsTo(LeadsTo leadsTo) {
+        leadsTos.add(leadsTo);
+        for (int i = 0; i < channels.size(); i++) {
+            if (channels.get(i).getNewid() == leadsTo.getFromChannel().getNewid()) {
+                channels.get(i).addLeadsTo(leadsTo);
+                return;
+            }
+        }
+    }
+
+    public void removeLeadsTo(LeadsTo leadsTo) {
+        leadsTos.remove(leadsTo);
+        for (int i = 0; i < channels.size(); i++) {
+            if (channels.get(i).equals(leadsTo.getFromChannel())) {
+                channels.get(i).removeLeadsTo(leadsTo);
+                return;
+            }
+        }
+    }
+
+    /**
+     * gibt den Channel zurück, der paßt. Sind Channel doppelt vorhanden, wird
+     * nur der erste passende zurückgegeben!
+     * 
+     * @param fromChannel
+     * @param toChannel
+     * @return
+     */
+    public LeadsTo getLeadsTo(Channel fromChannel, Channel toChannel) {
+        for (int i = 0; i < leadsTos.size(); i++) {
+            if (leadsTos.get(i).getFromChannel().getNewid() == fromChannel.getNewid()) {
+                //log.trace("FromChannel mit ID gefunden: " + fromChannel.getNewid());
+                if (leadsTos.get(i).getToChannel().getNewid() == toChannel.getNewid()) {
+                    //log.trace("Leads To gefunden: " + leadsTos.get(i).toString());
+                    return leadsTos.get(i);
+                }
+            }
+        }
+        return null;
+    }
+
+    /**
+     * gibt alle Channels zurück, die von diesen OSM-Knoten abgehen/hingehen
+     * @param nodes
+     * @return
+     */
+    public ArrayList<Channel> getChannelsTouchingOSMNodes (ArrayList<OSMNode> nodes) {
+        ArrayList<Channel> touchingChannel = new ArrayList<Channel>();
+        for (int i = 0; i < nodes.size(); i++) {
+            for (int j = 0; j < channels.size(); j++) {
+                if (channels.get(j).getFromNode().getId() == nodes.get(i).getId()) {
+                    if (!touchingChannel.contains(channels.get(j))) {
+                        touchingChannel.add(channels.get(j));
+                    }
+                }
+                else if (channels.get(j).getToNode().getId() == nodes.get(i).getId()) {
+                    if (!touchingChannel.contains(channels.get(j))) {
+                        touchingChannel.add(channels.get(j));
+                    }
+                }
+            }
+        }
+        return touchingChannel;
+    }
+
+    public ArrayList<Channel> getChannelsTouchingOSMNode(long id) {
+        ArrayList<Channel> returnchannels = new ArrayList<Channel>();
+        for (int i = 0; i < channels.size(); i++) {
+            if (channels.get(i).getFromNode().getId() == id) {
+                returnchannels.add(channels.get(i));
+            }
+            if (channels.get(i).getToNode().getId() == id) {
+                returnchannels.add(channels.get(i));
+            }
+        }
+        return returnchannels;
+    }
+
+    /**
+     * gibt den oder die Channels twischen diesen OSM-Punkten zurück
+     * @param idfrom
+     * @param idto
+     * @return
+     */
+    public ArrayList<Channel> getChannelsBetween(int idfrom, int idto) {
+        ArrayList<Channel> channelsresult = new ArrayList<Channel>();
+        for (int i = 0; i < channels.size(); i++) {
+            if (channels.get(i).getFromNode().getId() == idfrom) {
+                if (channels.get(i).getToNode().getId() == idto) {
+                    channelsresult.add(channels.get(i));
+                }
+            }
+            else if (channels.get(i).getFromNode().getId() == idto) {
+                if (channels.get(i).getToNode().getId() == idfrom) {
+                    channelsresult.add(channels.get(i));
+                }
+            }
+        }
+        return channelsresult;
+    }
+
+    public ArrayList<Channel> getChannelswithWayID(int id) {
+        ArrayList<Channel> channelsresult = new ArrayList<Channel>();
+        for (int i = 0; i < channels.size(); i++) {
+            if (channels.get(i).getWay().getId() == id) {
+                channelsresult.add(channels.get(i));
+            }
+        }
+        return channelsresult;
+    }
+
+    public void detectSelectedChannels(double left, double top, double right, double bottom) {
+        for (int i = 0; i < channels.size(); i++) {
+            //log.trace(channels.get(i).getFromNode().toString());
+            if ( (channels.get(i).getFromNode().getLatitude() <= top) && (channels.get(i).getFromNode().getLatitude() >= bottom)
+                    && (channels.get(i).getFromNode().getLongitude() >= left) && (channels.get(i).getFromNode().getLongitude() <=right)) {
+                channels.get(i).setSelected(true);
+                selectedChannels.add(channels.get(i));
+            }
+            if ( (channels.get(i).getToNode().getLatitude() <= top) && (channels.get(i).getToNode().getLatitude() >= bottom)
+                    && (channels.get(i).getToNode().getLongitude() >= left) && (channels.get(i).getToNode().getLongitude() <=right)) {
+                channels.get(i).setSelected(true);
+                selectedChannels.add(channels.get(i));
+            }
+        }
+    }
+
+    /**
+     * löscht die markierten Channels aus der Liste der markierten Channels und setzt die
+     * Eigenschaft isSelected auf false
+     */
+    public void ereaseSelectedChannels() {
+        for (int i = 0; i < selectedChannels.size(); i++) {
+            Iterator<Channel> it = selectedChannels.iterator();
+            while (it.hasNext()) {
+                it.next().setSelected(false);
+            }
+        }
+        selectedChannels.clear();
+    }
+
+    public HashSet<Channel> getSelectedChannels() {
+        return selectedChannels;
+    }
+
+    public HashSet<Channel> getJunctionCandidate() {
+        return junctioncandidate;
+    }
+
+    public void ereaseJunctioncandidate() {
+        Iterator<Channel> it = junctioncandidate.iterator();
+        while (it.hasNext()) {
+            it.next().setPartOfJunction(false);
+        }
+        junctioncandidate.clear();
+    }
+
+    /**
+     * setzt die Channels eines Kreuzungskandidaten
+     * falls in im Hashset vorher Channels gespeichert waren, werden diese vorher gelöscht!
+     * @param junctionCandidate
+     */
+    public void setJunctioncandidate(HashSet<Channel> junctionCandidate) {
+        this.junctioncandidate.clear();
+        this.junctioncandidate = junctionCandidate;
+        Iterator<Channel> it = junctionCandidate.iterator();
+        while (it.hasNext()) {
+            it.next().setPartOfJunction(true);
+        }
+    }
+
+    public void addJunctioncandidateChannel(Channel channel) {
+        junctioncandidate.add(channel);
+        channel.setPartOfJunction(true);
+    }
+
+    /*TODO: kann weg oder?
+    public void ereaseChannelsSubgraph() {
+        for (int i = 0; i < channels.size(); i++) {
+            channels.get(i).setSubgraph(false);
+        }
+    }
+
+    public void ereaseChannelsInDegree() {
+        for (int i = 0; i < channels.size(); i++) {
+            channels.get(i).setIndegree(0);
+        }
+    }
+
+    public void ereaseChannelsOutDegree() {
+        for (int i = 0; i < channels.size(); i++) {
+            channels.get(i).setOutdegree(0);
+        }
+    }
+     */
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/Graph.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/Graph.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/Graph.java	(revision 30725)
@@ -5,46 +5,46 @@
  */
 public class Graph {
-	
-	//Boundingbox
-	private double bbleft;
-	private double bbright;
-	private double bbbottom;
-	private double bbtop;
-	
-	
-	public double getBbleft() {
-		return bbleft;
-	}
-	public void setBbleft(double bbleft) {
-		this.bbleft = bbleft;
-	}
-	public double getBbright() {
-		return bbright;
-	}
-	public void setBbright(double bbright) {
-		this.bbright = bbright;
-	}
-	public double getBbbottom() {
-		return bbbottom;
-	}
-	public void setBbbottom(double bbbottom) {
-		this.bbbottom = bbbottom;
-	}
-	public double getBbtop() {
-		return bbtop;
-	}
-	public void setBbtop(double bbtop) {
-		this.bbtop = bbtop;
-	}
-	public boolean isInBBox(OSMNode node) {
-		if ( (node.getLatitude() <= bbtop) && (node.getLatitude() >= bbbottom)
-				&& (node.getLongitude() >= bbleft) && (node.getLongitude() <=bbright)) {
-			return true;
-		}
-		else {
-			return false;
-		}
-	}
-	
-	
+    
+    //Boundingbox
+    private double bbleft;
+    private double bbright;
+    private double bbbottom;
+    private double bbtop;
+    
+    
+    public double getBbleft() {
+        return bbleft;
+    }
+    public void setBbleft(double bbleft) {
+        this.bbleft = bbleft;
+    }
+    public double getBbright() {
+        return bbright;
+    }
+    public void setBbright(double bbright) {
+        this.bbright = bbright;
+    }
+    public double getBbbottom() {
+        return bbbottom;
+    }
+    public void setBbbottom(double bbbottom) {
+        this.bbbottom = bbbottom;
+    }
+    public double getBbtop() {
+        return bbtop;
+    }
+    public void setBbtop(double bbtop) {
+        this.bbtop = bbtop;
+    }
+    public boolean isInBBox(OSMNode node) {
+        if ( (node.getLatitude() <= bbtop) && (node.getLatitude() >= bbbottom)
+                && (node.getLongitude() >= bbleft) && (node.getLongitude() <=bbright)) {
+            return true;
+        }
+        else {
+            return false;
+        }
+    }
+    
+    
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/LeadsTo.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/LeadsTo.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/LeadsTo.java	(revision 30725)
@@ -6,46 +6,46 @@
 public class LeadsTo {
 
-	private Channel fromChannel;
-	private Channel toChannel;
+    private Channel fromChannel;
+    private Channel toChannel;
 
-	//für den JunctionCheck
-	private boolean isForwardEdge;
+    //für den JunctionCheck
+    private boolean isForwardEdge;
 
-	public LeadsTo() {
-	}
+    public LeadsTo() {
+    }
 
-	public LeadsTo(Channel fromcChannel, Channel toChannel) {
-		this.fromChannel = fromcChannel;
-		this.toChannel = toChannel;
-	}
+    public LeadsTo(Channel fromcChannel, Channel toChannel) {
+        this.fromChannel = fromcChannel;
+        this.toChannel = toChannel;
+    }
 
-	public Channel getFromChannel() {
-		return fromChannel;
-	}
+    public Channel getFromChannel() {
+        return fromChannel;
+    }
 
-	public void setFromChannel(Channel fromChannel) {
-		this.fromChannel = fromChannel;
-	}
+    public void setFromChannel(Channel fromChannel) {
+        this.fromChannel = fromChannel;
+    }
 
-	public Channel getToChannel() {
-		return toChannel;
-	}
+    public Channel getToChannel() {
+        return toChannel;
+    }
 
-	public void setToChannel(Channel toChannel) {
-		this.toChannel = toChannel;
-	}
+    public void setToChannel(Channel toChannel) {
+        this.toChannel = toChannel;
+    }
 
-	public boolean isForwardEdge() {
-		return isForwardEdge;
-	}
+    public boolean isForwardEdge() {
+        return isForwardEdge;
+    }
 
-	public void setForwardEdge(boolean isForwardEdge) {
-		this.isForwardEdge = isForwardEdge;
-	}
+    public void setForwardEdge(boolean isForwardEdge) {
+        this.isForwardEdge = isForwardEdge;
+    }
 
-	@Override
-	public String toString() {
-		return "fromChannel:::" + fromChannel.getNewid()  + ", toChannel:::" + toChannel.getNewid() + " über Node " + toChannel.getFromNode().getId();
-	}
+    @Override
+    public String toString() {
+        return "fromChannel:::" + fromChannel.getNewid()  + ", toChannel:::" + toChannel.getNewid() + " über Node " + toChannel.getFromNode().getId();
+    }
 
 
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMEntity.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMEntity.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMEntity.java	(revision 30725)
@@ -8,170 +8,170 @@
  */
 public class OSMEntity {
-	
-	//TODO Idee: alle Wertestandardmäßig auf -1 setzen, so muß
-	//man bei der Umwandlung nicht auf null-Werte prüfen
-	/**
-	 * @uml.property  name="id"
-	 */
-	private long id;
-	/**
-	 * @uml.property  name="visible"
-	 */
-	private boolean visible;
-	/**
-	 * @uml.property  name="timestamp"
-	 */
-	private String timestamp;
-	/**
-	 * @uml.property  name="user"
-	 */
-	private String user;
-	/**
-	 * @uml.property  name="uid"
-	 */
-	private int uid;
-	/**
-	 * @uml.property  name="changeset"
-	 */
-	private int changeset;
-	/**
-	 * @uml.property  name="hashmap"
-	 */
-	private HashMap<String, String> hashmap = new HashMap<String, String>();
-	/**
-	 * @uml.property  name="version"
-	 */
-	private int version;
-	
-	public void setversion(int version) {
-		this.version = version;
-	}
-	
-	/**
-	 * @return
-	 * @uml.property  name="version"
-	 */
-	public int getVersion() {
-		return version;
-	}
-	
-	/**
-	 * @return
-	 * @uml.property  name="id"
-	 */
-	public long getId() {
-		return id;
-	}
-	public void setId(Long id) {
-		this.id = id;
-	}
-	/**
-	 * @return
-	 * @uml.property  name="visible"
-	 */
-	public boolean isVisible() {
-		return visible;
-	}
-	/**
-	 * @param visible
-	 * @uml.property  name="visible"
-	 */
-	public void setVisible(boolean visible) {
-		this.visible = visible;
-	}
-	/**
-	 * @return
-	 * @uml.property  name="timestamp"
-	 */
-	public String getTimestamp() {
-		return timestamp;
-	}
-	/**
-	 * @param timestamp
-	 * @uml.property  name="timestamp"
-	 */
-	public void setTimestamp(String timestamp) {
-		this.timestamp = timestamp;
-	}
-	/**
-	 * @return
-	 * @uml.property  name="user"
-	 */
-	public String getUser() {
-		return user;
-	}
-	/**
-	 * @param user
-	 * @uml.property  name="user"
-	 */
-	public void setUser(String user) {
-		this.user = user;
-	}
-	/**
-	 * @return
-	 * @uml.property  name="uid"
-	 */
-	public int getUid() {
-		return uid;
-	}
-	/**
-	 * @param uid
-	 * @uml.property  name="uid"
-	 */
-	public void setUid(int uid) {
-		this.uid = uid;
-	}
-	/**
-	 * @return
-	 * @uml.property  name="changeset"
-	 */
-	public int getChangeset() {
-		return changeset;
-	}
-	/**
-	 * @param changeset
-	 * @uml.property  name="changeset"
-	 */
-	public void setChangeset(int changeset) {
-		this.changeset = changeset;
-	}
-	/**
-	 * @return
-	 * @uml.property  name="hashmap"
-	 */
-	public HashMap<String, String> getHashmap() {
-		return hashmap;
-	}
-	/**
-	 * @param hashmap
-	 * @uml.property  name="hashmap"
-	 */
-	public void setHashmap(HashMap<String, String> hashmap) {
-		this.hashmap = hashmap;
-	}
-	
-	public void setKeyValue(String key, String value){
-		hashmap.put(key, value);
-	}
-	
-	public String getValue(String key){
-		return hashmap.get(key);
-	}
+    
+    //TODO Idee: alle Wertestandardmäßig auf -1 setzen, so muß
+    //man bei der Umwandlung nicht auf null-Werte prüfen
+    /**
+     * @uml.property  name="id"
+     */
+    private long id;
+    /**
+     * @uml.property  name="visible"
+     */
+    private boolean visible;
+    /**
+     * @uml.property  name="timestamp"
+     */
+    private String timestamp;
+    /**
+     * @uml.property  name="user"
+     */
+    private String user;
+    /**
+     * @uml.property  name="uid"
+     */
+    private int uid;
+    /**
+     * @uml.property  name="changeset"
+     */
+    private int changeset;
+    /**
+     * @uml.property  name="hashmap"
+     */
+    private HashMap<String, String> hashmap = new HashMap<String, String>();
+    /**
+     * @uml.property  name="version"
+     */
+    private int version;
+    
+    public void setversion(int version) {
+        this.version = version;
+    }
+    
+    /**
+     * @return
+     * @uml.property  name="version"
+     */
+    public int getVersion() {
+        return version;
+    }
+    
+    /**
+     * @return
+     * @uml.property  name="id"
+     */
+    public long getId() {
+        return id;
+    }
+    public void setId(Long id) {
+        this.id = id;
+    }
+    /**
+     * @return
+     * @uml.property  name="visible"
+     */
+    public boolean isVisible() {
+        return visible;
+    }
+    /**
+     * @param visible
+     * @uml.property  name="visible"
+     */
+    public void setVisible(boolean visible) {
+        this.visible = visible;
+    }
+    /**
+     * @return
+     * @uml.property  name="timestamp"
+     */
+    public String getTimestamp() {
+        return timestamp;
+    }
+    /**
+     * @param timestamp
+     * @uml.property  name="timestamp"
+     */
+    public void setTimestamp(String timestamp) {
+        this.timestamp = timestamp;
+    }
+    /**
+     * @return
+     * @uml.property  name="user"
+     */
+    public String getUser() {
+        return user;
+    }
+    /**
+     * @param user
+     * @uml.property  name="user"
+     */
+    public void setUser(String user) {
+        this.user = user;
+    }
+    /**
+     * @return
+     * @uml.property  name="uid"
+     */
+    public int getUid() {
+        return uid;
+    }
+    /**
+     * @param uid
+     * @uml.property  name="uid"
+     */
+    public void setUid(int uid) {
+        this.uid = uid;
+    }
+    /**
+     * @return
+     * @uml.property  name="changeset"
+     */
+    public int getChangeset() {
+        return changeset;
+    }
+    /**
+     * @param changeset
+     * @uml.property  name="changeset"
+     */
+    public void setChangeset(int changeset) {
+        this.changeset = changeset;
+    }
+    /**
+     * @return
+     * @uml.property  name="hashmap"
+     */
+    public HashMap<String, String> getHashmap() {
+        return hashmap;
+    }
+    /**
+     * @param hashmap
+     * @uml.property  name="hashmap"
+     */
+    public void setHashmap(HashMap<String, String> hashmap) {
+        this.hashmap = hashmap;
+    }
+    
+    public void setKeyValue(String key, String value){
+        hashmap.put(key, value);
+    }
+    
+    public String getValue(String key){
+        return hashmap.get(key);
+    }
 
-	public boolean hasKey(String key){
-		return hashmap.containsKey(key);
-	}
-	
-	/**
-	 * prüft, ob der übergebene String als Wert existiert
-	 * @param value
-	 * @return
-	 */
-	public boolean hasValue(String value){
-		return hashmap.containsValue(value);
-	}
-	
-	protected String valuestoString() {
-		return ("ID: " + (id) + "\n" + "User: " + user + "\n");
-	}
+    public boolean hasKey(String key){
+        return hashmap.containsKey(key);
+    }
+    
+    /**
+     * prüft, ob der übergebene String als Wert existiert
+     * @param value
+     * @return
+     */
+    public boolean hasValue(String value){
+        return hashmap.containsValue(value);
+    }
+    
+    protected String valuestoString() {
+        return ("ID: " + (id) + "\n" + "User: " + user + "\n");
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMGraph.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMGraph.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMGraph.java	(revision 30725)
@@ -16,115 +16,115 @@
 public class OSMGraph extends Graph{
 
-	private final HashMap<Long, OSMWay> ways = new HashMap<Long, OSMWay>();
-	private HashMap<Long, OSMRelation> relations = new HashMap<Long, OSMRelation>();
-	private final HashMap<Long, OSMNode> nodes = new HashMap<Long, OSMNode>();
+    private final HashMap<Long, OSMWay> ways = new HashMap<Long, OSMWay>();
+    private HashMap<Long, OSMRelation> relations = new HashMap<Long, OSMRelation>();
+    private final HashMap<Long, OSMNode> nodes = new HashMap<Long, OSMNode>();
 
-	public void addNode(OSMNode node) {
-		nodes.put(node.getId(), node);
-	}
+    public void addNode(OSMNode node) {
+        nodes.put(node.getId(), node);
+    }
 
-	/**
-	 * gibt den Knoten mit der gesuchten OSM-ID zurück
-	 * @param id OSM-iD des Knotens!
-	 * @return
-	 */
-	public OSMNode getNode(long id) {
-		return nodes.get(id);
-	}
+    /**
+     * gibt den Knoten mit der gesuchten OSM-ID zurück
+     * @param id OSM-iD des Knotens!
+     * @return
+     */
+    public OSMNode getNode(long id) {
+        return nodes.get(id);
+    }
 
-	public void removeWay(OSMWay way) {
-		ways.remove(way);
-	}
+    public void removeWay(OSMWay way) {
+        ways.remove(way);
+    }
 
-	public OSMNode[] getNodes(){
-		OSMNode[] nodearray= new OSMNode[nodes.size()];
-		return nodes.values().toArray(nodearray);
-	}
+    public OSMNode[] getNodes(){
+        OSMNode[] nodearray= new OSMNode[nodes.size()];
+        return nodes.values().toArray(nodearray);
+    }
 
-	public void addWay(OSMWay way) {
-		ways.put(way.getId(), way);
-	}
+    public void addWay(OSMWay way) {
+        ways.put(way.getId(), way);
+    }
 
-	public OSMWay getWay(long id) {
-		return ways.get(id);
-	}
+    public OSMWay getWay(long id) {
+        return ways.get(id);
+    }
 
-	public OSMRelation getRelation(int id) {
-		return relations.get(id);
-	}
+    public OSMRelation getRelation(int id) {
+        return relations.get(id);
+    }
 
-	public  HashMap<Long, OSMRelation> getRelationsAshashmap() {
-		return relations;
-	}
+    public  HashMap<Long, OSMRelation> getRelationsAshashmap() {
+        return relations;
+    }
 
-	public void setRelations( HashMap<Long, OSMRelation> relations) {
-		this.relations = relations;
-	}
+    public void setRelations( HashMap<Long, OSMRelation> relations) {
+        this.relations = relations;
+    }
 
-	public OSMWay[] getWays() {
-		OSMWay[] wayarray= new OSMWay[ways.size()];
-		return ways.values().toArray(wayarray);
-	}
+    public OSMWay[] getWays() {
+        OSMWay[] wayarray= new OSMWay[ways.size()];
+        return ways.values().toArray(wayarray);
+    }
 
-	public void addRelation(OSMRelation relation) {
-		relations.put(relation.getId(), relation);
-	}
+    public void addRelation(OSMRelation relation) {
+        relations.put(relation.getId(), relation);
+    }
 
-	public OSMRelation[] getRelations(){
-		OSMRelation[] relationarray = new OSMRelation[relations.size()];
-		return relations.values().toArray(relationarray);
-	}
+    public OSMRelation[] getRelations(){
+        OSMRelation[] relationarray = new OSMRelation[relations.size()];
+        return relations.values().toArray(relationarray);
+    }
 
-	public Collection<OSMRelation> getRelationsCollection() {
-		return relations.values();
-	}
+    public Collection<OSMRelation> getRelationsCollection() {
+        return relations.values();
+    }
 
-	public boolean hasNode(Long id) {
-		return nodes.containsKey(id);
-	}
+    public boolean hasNode(Long id) {
+        return nodes.containsKey(id);
+    }
 
-	public ArrayList<Long> getIDsfromWay(int id) {
-		OSMWay w = ways.get(id);
-		ArrayList<Long> ids  = new ArrayList<Long>();
-		ids.add(w.getToNode().getId());
-		ids.add(w.getFromNode().getId());
-		return ids;
-	}
+    public ArrayList<Long> getIDsfromWay(int id) {
+        OSMWay w = ways.get(id);
+        ArrayList<Long> ids  = new ArrayList<Long>();
+        ids.add(w.getToNode().getId());
+        ids.add(w.getFromNode().getId());
+        return ids;
+    }
 
-	public void addNode(Node node) {
-		OSMNode OSMnode = new OSMNode();
-		OSMnode.setId(node.getId());
-		OSMnode.setLatitude(node.getBBox().getTopLeft().lat());
-		OSMnode.setLongitude(node.getBBox().getTopLeft().lon());
-		OSMnode.setHashmap(new HashMap<String, String>(node.getKeys()));
-		nodes.put(OSMnode.getId(), OSMnode);
-	}
+    public void addNode(Node node) {
+        OSMNode OSMnode = new OSMNode();
+        OSMnode.setId(node.getId());
+        OSMnode.setLatitude(node.getBBox().getTopLeft().lat());
+        OSMnode.setLongitude(node.getBBox().getTopLeft().lon());
+        OSMnode.setHashmap(new HashMap<String, String>(node.getKeys()));
+        nodes.put(OSMnode.getId(), OSMnode);
+    }
 
-	public void addWay(Way way) {
-		OSMWay osmway = new OSMWay();
-		osmway.setId(way.getId());
-		Iterator<Node> it = way.getNodes().iterator();
-		while (it.hasNext()) {
-			osmway.addNode(getNode(it.next().getId()));
-		}
-		osmway.setHashmap(new HashMap<String, String>(way.getKeys()));
-		ways.put(osmway.getId(), osmway);
-	}
+    public void addWay(Way way) {
+        OSMWay osmway = new OSMWay();
+        osmway.setId(way.getId());
+        Iterator<Node> it = way.getNodes().iterator();
+        while (it.hasNext()) {
+            osmway.addNode(getNode(it.next().getId()));
+        }
+        osmway.setHashmap(new HashMap<String, String>(way.getKeys()));
+        ways.put(osmway.getId(), osmway);
+    }
 
-	public void addRelation(Relation relation) {
-		OSMRelation osmrelation = new OSMRelation();
-		osmrelation.setId(relation.getId());
-		osmrelation.setHashmap(new HashMap<String, String>(relation.getKeys()));
-		RelationMember rmember;
-		for (int i = 0; i < relation.getMembers().size(); i++) {
-			rmember = relation.getMember(i);
-			if (rmember.getMember() instanceof Node) {
-				osmrelation.addMember(getNode(rmember.getMember().getId()), rmember.getRole());
-			}
-			else if (rmember.getMember() instanceof Way) {
-				osmrelation.addMember(getWay(rmember.getMember().getId()), rmember.getRole());
-			}
-		}
-		relations.put(osmrelation.getId(), osmrelation);
-	}
+    public void addRelation(Relation relation) {
+        OSMRelation osmrelation = new OSMRelation();
+        osmrelation.setId(relation.getId());
+        osmrelation.setHashmap(new HashMap<String, String>(relation.getKeys()));
+        RelationMember rmember;
+        for (int i = 0; i < relation.getMembers().size(); i++) {
+            rmember = relation.getMember(i);
+            if (rmember.getMember() instanceof Node) {
+                osmrelation.addMember(getNode(rmember.getMember().getId()), rmember.getRole());
+            }
+            else if (rmember.getMember() instanceof Way) {
+                osmrelation.addMember(getWay(rmember.getMember().getId()), rmember.getRole());
+            }
+        }
+        relations.put(osmrelation.getId(), osmrelation);
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMNode.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMNode.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMNode.java	(revision 30725)
@@ -8,53 +8,53 @@
  */
 public class OSMNode extends OSMEntity {
-	
-	private double latitude;
-	private double longitude;
-	private ArrayList<Channel> outgoingChannels = new ArrayList<Channel>();
-	private ArrayList<OSMNode> succNodeList = new ArrayList<OSMNode>();
-	private ArrayList<OSMNode> predNodeList = new ArrayList<OSMNode>();
-	
-	public void addOutgoingChannel(Channel channel) {
-		outgoingChannels.add(channel);
-	}
-	
-	public ArrayList<Channel> getOutgoingChannels() {
-		return outgoingChannels;
-	}
-	
-	public double getLatitude() {
-		return latitude;
-	}
-	public void setLatitude(double latitude) {
-		this.latitude = latitude;
-	}
-	public double getLongitude() {
-		return longitude;
-	}
-	public void setLongitude(double longitude) {
-		this.longitude = longitude;
-	}
-	
-	public String toString(){
-		return valuestoString() + "Lat: " + latitude + "\n" + "Lon: " + longitude;
-	}
+    
+    private double latitude;
+    private double longitude;
+    private ArrayList<Channel> outgoingChannels = new ArrayList<Channel>();
+    private ArrayList<OSMNode> succNodeList = new ArrayList<OSMNode>();
+    private ArrayList<OSMNode> predNodeList = new ArrayList<OSMNode>();
+    
+    public void addOutgoingChannel(Channel channel) {
+        outgoingChannels.add(channel);
+    }
+    
+    public ArrayList<Channel> getOutgoingChannels() {
+        return outgoingChannels;
+    }
+    
+    public double getLatitude() {
+        return latitude;
+    }
+    public void setLatitude(double latitude) {
+        this.latitude = latitude;
+    }
+    public double getLongitude() {
+        return longitude;
+    }
+    public void setLongitude(double longitude) {
+        this.longitude = longitude;
+    }
+    
+    public String toString(){
+        return valuestoString() + "Lat: " + latitude + "\n" + "Lon: " + longitude;
+    }
 
-	public ArrayList<OSMNode> getSuccNodeList() {
-		return succNodeList;
-	}
+    public ArrayList<OSMNode> getSuccNodeList() {
+        return succNodeList;
+    }
 
-	public ArrayList<OSMNode> getPredNodeList() {
-		return predNodeList;
-	}
-	
-	public void addSuccNode(OSMNode node) {
-		succNodeList.add(node);
-	}
-	
-	public void addPredNode(OSMNode node) {
-		predNodeList.add(node);
-	}
-	
-	
-	
+    public ArrayList<OSMNode> getPredNodeList() {
+        return predNodeList;
+    }
+    
+    public void addSuccNode(OSMNode node) {
+        succNodeList.add(node);
+    }
+    
+    public void addPredNode(OSMNode node) {
+        predNodeList.add(node);
+    }
+    
+    
+    
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMRelation.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMRelation.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMRelation.java	(revision 30725)
@@ -9,82 +9,82 @@
 public class OSMRelation extends OSMEntity {
 
-	private ArrayList<Member> members = new ArrayList<Member>();
+    private ArrayList<Member> members = new ArrayList<Member>();
 
-	public void setMembers(ArrayList<Member> members) {
-		this.members = members;
-	}
+    public void setMembers(ArrayList<Member> members) {
+        this.members = members;
+    }
 
-	public ArrayList<Member> getMembers() {
-		return members;
-	}
-	
-	/**
-	 * gibt den Member mit der Rolle zurück, wenn vorhanden. Sonst null
-	 * @param role
-	 * @return
-	 */
-	public OSMEntity getMember(String role) {
-		for (int i = 0; i < members.size(); i++) {
-			if (members.get(i).getRole().equals(role)) {
-				return members.get(i).getMember();
-			}
-		}
-		return null;
-	}
-	
-	public void addMember(OSMEntity member, String role) {
-		members.add(new Member(member, role));
-	}
-	
-	public String getRelationType(String key) {
-		return this.getValue(key);
-	}
-	
-	public String toString() {
-		String s = ("Relation-ID: " + this.getId() + " Relation-Type: " + this.getRelationType("type") +"\n");
-		for (int i = 0; i < members.size(); i++) {
-			s += ("Member: " + members.get(i).getRole() + ", ref:" + members.get(i).getId() + ", type:" + members.get(i).getType().getClass().getName() );
-		}
-		return s;
-	}
-	
+    public ArrayList<Member> getMembers() {
+        return members;
+    }
+    
+    /**
+     * gibt den Member mit der Rolle zurück, wenn vorhanden. Sonst null
+     * @param role
+     * @return
+     */
+    public OSMEntity getMember(String role) {
+        for (int i = 0; i < members.size(); i++) {
+            if (members.get(i).getRole().equals(role)) {
+                return members.get(i).getMember();
+            }
+        }
+        return null;
+    }
+    
+    public void addMember(OSMEntity member, String role) {
+        members.add(new Member(member, role));
+    }
+    
+    public String getRelationType(String key) {
+        return this.getValue(key);
+    }
+    
+    public String toString() {
+        String s = ("Relation-ID: " + this.getId() + " Relation-Type: " + this.getRelationType("type") +"\n");
+        for (int i = 0; i < members.size(); i++) {
+            s += ("Member: " + members.get(i).getRole() + ", ref:" + members.get(i).getId() + ", type:" + members.get(i).getType().getClass().getName() );
+        }
+        return s;
+    }
+    
 
-	/**
-	 * Klasse dient zum Verwalten eines Member-Objektes. Muß ein Objekt vom Typ OSMEntitysein.
-	 * @author  joerg
-	 */
-	class Member {
+    /**
+     * Klasse dient zum Verwalten eines Member-Objektes. Muß ein Objekt vom Typ OSMEntitysein.
+     * @author  joerg
+     */
+    class Member {
 
-		private OSMEntity member;
-		private String role;
+        private OSMEntity member;
+        private String role;
 
-		public Member(OSMEntity member, String role) {
-			this.member = member;
-			this.setRole(role);
-		}
-		
-		public Class<? extends OSMEntity> getType() {
-			return member.getClass();
-		}
+        public Member(OSMEntity member, String role) {
+            this.member = member;
+            this.setRole(role);
+        }
+        
+        public Class<? extends OSMEntity> getType() {
+            return member.getClass();
+        }
 
-		public void setMember(OSMEntity member) {
-			this.member = member;
-		}
+        public void setMember(OSMEntity member) {
+            this.member = member;
+        }
 
-		public OSMEntity getMember() {
-			return member;
-		}
+        public OSMEntity getMember() {
+            return member;
+        }
 
-		public Long getId() {
-			return member.getId();
-		}
+        public Long getId() {
+            return member.getId();
+        }
 
-		public void setRole(String role) {
-			this.role = role;
-		}
+        public void setRole(String role) {
+            this.role = role;
+        }
 
-		public String getRole() {
-			return role;
-		}
-	}
+        public String getRole() {
+            return role;
+        }
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMWay.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMWay.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/datastructure/OSMWay.java	(revision 30725)
@@ -8,55 +8,55 @@
 public class OSMWay extends OSMEntity {
 
-	private Vector<OSMNode> nodes = new Vector<OSMNode>();
+    private Vector<OSMNode> nodes = new Vector<OSMNode>();
 
-	public OSMNode[] getNodes() {
-		OSMNode[] nodearray = new OSMNode[nodes.size()];
-		return (OSMNode[]) nodes.toArray(nodearray);
-	}
+    public OSMNode[] getNodes() {
+        OSMNode[] nodearray = new OSMNode[nodes.size()];
+        return (OSMNode[]) nodes.toArray(nodearray);
+    }
 
-	public OSMNode getToNode() {
-		return nodes.lastElement();
-	}
+    public OSMNode getToNode() {
+        return nodes.lastElement();
+    }
 
-	public OSMNode getFromNode() {
-		return nodes.firstElement();
-	}
+    public OSMNode getFromNode() {
+        return nodes.firstElement();
+    }
 
-	public void addNode(OSMNode node) {
-		nodes.add(node);
-	}
+    public void addNode(OSMNode node) {
+        nodes.add(node);
+    }
 
-	public String tosString() {
-		System.out.println(this.getId());
-		return this.valuestoString() + "fromNodeID: "
-				+ this.getFromNode().getId() + "\ntoNodeID: "
-				+ this.getToNode().getId();
-	}
+    public String tosString() {
+        System.out.println(this.getId());
+        return this.valuestoString() + "fromNodeID: "
+                + this.getFromNode().getId() + "\ntoNodeID: "
+                + this.getToNode().getId();
+    }
 
-	/**
-	 * ist der OSMWay eine Einbahnstraße?
-	 * 
-	 * @return true wenn ja, sonst nein
-	 */
-	public boolean isOneWay() {
-		// TODO Tippfehler berücksichtigen
-		// evtl. doch über ein XML-File konfigurieren?
-		if (this.hasKey("oneway")) {
-			String t = this.getValue("oneway");
-			if (t.equals("1") || t.equals("true") || t.equals("yes")) {
-				return true;
-			}
-		}
-		String t = this.getValue("highway");
-		if (t != null) {
-			if (t.equals("motorway") || t.equals("motorway_link")) {
-				return true;
-			}
+    /**
+     * ist der OSMWay eine Einbahnstraße?
+     * 
+     * @return true wenn ja, sonst nein
+     */
+    public boolean isOneWay() {
+        // TODO Tippfehler berücksichtigen
+        // evtl. doch über ein XML-File konfigurieren?
+        if (this.hasKey("oneway")) {
+            String t = this.getValue("oneway");
+            if (t.equals("1") || t.equals("true") || t.equals("yes")) {
+                return true;
+            }
+        }
+        String t = this.getValue("highway");
+        if (t != null) {
+            if (t.equals("motorway") || t.equals("motorway_link")) {
+                return true;
+            }
 
-			else {
-				return false;
-			}
-		} else
-			return false;
-	}
+            else {
+                return false;
+            }
+        } else
+            return false;
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/filter/ExecuteFilter.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/filter/ExecuteFilter.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/filter/ExecuteFilter.java	(revision 30725)
@@ -9,82 +9,82 @@
  */
 public class ExecuteFilter {
-	
-	private Filter[] filter;
-	private XMLFilterReader xmlfilterreader;
-	private OSMGraph incominggraph;
-	private OSMGraph outgoinggraph;
-	
-	public ExecuteFilter(Filter[] filter, OSMGraph incoming){
-		this.filter = filter;
-		this.incominggraph = incoming;
-		outgoinggraph = new OSMGraph();
-		outgoinggraph.setBbbottom(incoming.getBbbottom());
-		outgoinggraph.setBbleft(incoming.getBbleft());
-		outgoinggraph.setBbright(incoming.getBbright());
-		outgoinggraph.setBbtop(incoming.getBbtop());
-		outgoinggraph.setRelations(incoming.getRelationsAshashmap());
-	}
-	
-	public ExecuteFilter() {
-	}
-	
-	public void filter(){
-		OSMWay[] tempWays = incominggraph.getWays();
-		String key;
-		//alle Einträge im Filter durchgehen
-		for (int i = 0; i < filter.length; i++) {
-			//alle Ways durchgehen
-			for (int j = 0; j < tempWays.length; j++) {
-				key = filter[i].getKeyValue();
-				//prüfen, ob Way Key-Wert des Filters enthält
-				if (tempWays[j].hasKey(key)) {
-					//prüfen, ob Way auch einen Value-Wert des Filtereintrags enthält
-					if (filter[i].hasTagValue(tempWays[j].getValue(key))) {
-						//Way outgoinggraph hinzufügen
-						outgoinggraph.addWay(tempWays[j]);
-						for (int j2 = 0; j2 < tempWays[j].getNodes().length; j2++) {
-							//zum way gehörende Nodes einfügen, aber nur, wenn diese
-							//vorher noch nicht im outgoinggraph vorhanden sind
-							if (!outgoinggraph.hasNode(tempWays[j].getNodes()[j2].getId())) {
-								outgoinggraph.addNode(tempWays[j].getNodes()[j2]);
-							}
-							
-						}
-					}
-				}
-			}
-		}
-	}
-	
-	public Filter[] getFilter() {
-		return filter;
-	}
+    
+    private Filter[] filter;
+    private XMLFilterReader xmlfilterreader;
+    private OSMGraph incominggraph;
+    private OSMGraph outgoinggraph;
+    
+    public ExecuteFilter(Filter[] filter, OSMGraph incoming){
+        this.filter = filter;
+        this.incominggraph = incoming;
+        outgoinggraph = new OSMGraph();
+        outgoinggraph.setBbbottom(incoming.getBbbottom());
+        outgoinggraph.setBbleft(incoming.getBbleft());
+        outgoinggraph.setBbright(incoming.getBbright());
+        outgoinggraph.setBbtop(incoming.getBbtop());
+        outgoinggraph.setRelations(incoming.getRelationsAshashmap());
+    }
+    
+    public ExecuteFilter() {
+    }
+    
+    public void filter(){
+        OSMWay[] tempWays = incominggraph.getWays();
+        String key;
+        //alle Einträge im Filter durchgehen
+        for (int i = 0; i < filter.length; i++) {
+            //alle Ways durchgehen
+            for (int j = 0; j < tempWays.length; j++) {
+                key = filter[i].getKeyValue();
+                //prüfen, ob Way Key-Wert des Filters enthält
+                if (tempWays[j].hasKey(key)) {
+                    //prüfen, ob Way auch einen Value-Wert des Filtereintrags enthält
+                    if (filter[i].hasTagValue(tempWays[j].getValue(key))) {
+                        //Way outgoinggraph hinzufügen
+                        outgoinggraph.addWay(tempWays[j]);
+                        for (int j2 = 0; j2 < tempWays[j].getNodes().length; j2++) {
+                            //zum way gehörende Nodes einfügen, aber nur, wenn diese
+                            //vorher noch nicht im outgoinggraph vorhanden sind
+                            if (!outgoinggraph.hasNode(tempWays[j].getNodes()[j2].getId())) {
+                                outgoinggraph.addNode(tempWays[j].getNodes()[j2]);
+                            }
+                            
+                        }
+                    }
+                }
+            }
+        }
+    }
+    
+    public Filter[] getFilter() {
+        return filter;
+    }
 
-	public void setFilter(Filter[] filter) {
-		this.filter = filter;
-	}
+    public void setFilter(Filter[] filter) {
+        this.filter = filter;
+    }
 
-	public XMLFilterReader getXmlfilterreader() {
-		return xmlfilterreader;
-	}
+    public XMLFilterReader getXmlfilterreader() {
+        return xmlfilterreader;
+    }
 
-	public void setXmlfilterreader(XMLFilterReader xmlfilterreader) {
-		this.xmlfilterreader = xmlfilterreader;
-	}
+    public void setXmlfilterreader(XMLFilterReader xmlfilterreader) {
+        this.xmlfilterreader = xmlfilterreader;
+    }
 
-	public OSMGraph getIncominggraph() {
-		return incominggraph;
-	}
+    public OSMGraph getIncominggraph() {
+        return incominggraph;
+    }
 
-	public void setIncominggraph(OSMGraph incominggraph) {
-		this.incominggraph = incominggraph;
-	}
+    public void setIncominggraph(OSMGraph incominggraph) {
+        this.incominggraph = incominggraph;
+    }
 
-	public OSMGraph getOutgoinggraph() {
-		return outgoinggraph;
-	}
+    public OSMGraph getOutgoinggraph() {
+        return outgoinggraph;
+    }
 
-	public void setOutgoinggraph(OSMGraph outgoinggraph) {
-		this.outgoinggraph = outgoinggraph;
-	}
+    public void setOutgoinggraph(OSMGraph outgoinggraph) {
+        this.outgoinggraph = outgoinggraph;
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/filter/Filter.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/filter/Filter.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/filter/Filter.java	(revision 30725)
@@ -8,38 +8,38 @@
  */
 public class Filter {
-	
-	private HashSet<String> tagValues = new HashSet<String>();
-	private String keyValue;
-	
-	public Filter(String keyname, ArrayList<String> values) {
-		this.keyValue = keyname;
-		tagValues.addAll(values);
-	}
-	
-	public boolean hasTagValue(String value) {
-		return tagValues.contains(value);
-	}
-	
-	public Filter() {	
-	}
-	
-	public String[] getTagValues() {
-		return tagValues.toArray(new String[tagValues.size()]);
-	}
+    
+    private HashSet<String> tagValues = new HashSet<String>();
+    private String keyValue;
+    
+    public Filter(String keyname, ArrayList<String> values) {
+        this.keyValue = keyname;
+        tagValues.addAll(values);
+    }
+    
+    public boolean hasTagValue(String value) {
+        return tagValues.contains(value);
+    }
+    
+    public Filter() {    
+    }
+    
+    public String[] getTagValues() {
+        return tagValues.toArray(new String[tagValues.size()]);
+    }
 
-	public void setTagValues(HashSet<String> tagValues) {
-		this.tagValues = tagValues;
-	}
-	
-	public void setTagValue(String value) {
-		tagValues.add(value);
-	}
+    public void setTagValues(HashSet<String> tagValues) {
+        this.tagValues = tagValues;
+    }
+    
+    public void setTagValue(String value) {
+        tagValues.add(value);
+    }
 
-	public String getKeyValue() {
-		return keyValue;
-	}
+    public String getKeyValue() {
+        return keyValue;
+    }
 
-	public void setKeyValue(String keyValue) {
-		this.keyValue = keyValue;
-	}
+    public void setKeyValue(String keyValue) {
+        this.keyValue = keyValue;
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/BackPropagation.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/BackPropagation.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/BackPropagation.java	(revision 30725)
@@ -11,32 +11,32 @@
 public class BackPropagation {
 
-	private final ChannelDiGraph digraph;
+    private final ChannelDiGraph digraph;
 
-	public BackPropagation(ChannelDiGraph digraph) {
-		this.digraph = digraph;
-	}
+    public BackPropagation(ChannelDiGraph digraph) {
+        this.digraph = digraph;
+    }
 
-	/**
-	 * 
-	 * @param y fromNode
-	 * @param z toNode
-	 */
-	public void backPropagation(Channel y, Channel z, Channel zstrich) {
-		for (int i = 0; i < z.getReachableNodes().size(); i++) {
-			y.addReachableNode(z.getReachableNodeAt(i));
-			//z.appendChannelToPath(i, z);
-			y.appendPath(z.getReachableNodeAt(i), z.getPathsAt(z.getReachableNodeAt(i)));
-			y.appendPath(z.getReachableNodeAt(i), y.getPathsAt(z));
-		}
-		for (int i = 0; i < y.getPredChannels().size(); i++) {
-			if (zstrich !=
-				y.getPredChannels().get(i) &&
-				digraph.getLeadsTo(
-						y.getPredChannels().get(i), y).
-						isForwardEdge()
-			) {
-				backPropagation(y.getPredChannels().get(i), y, zstrich);
-			}
-		}
-	}
+    /**
+     * 
+     * @param y fromNode
+     * @param z toNode
+     */
+    public void backPropagation(Channel y, Channel z, Channel zstrich) {
+        for (int i = 0; i < z.getReachableNodes().size(); i++) {
+            y.addReachableNode(z.getReachableNodeAt(i));
+            //z.appendChannelToPath(i, z);
+            y.appendPath(z.getReachableNodeAt(i), z.getPathsAt(z.getReachableNodeAt(i)));
+            y.appendPath(z.getReachableNodeAt(i), y.getPathsAt(z));
+        }
+        for (int i = 0; i < y.getPredChannels().size(); i++) {
+            if (zstrich !=
+                y.getPredChannels().get(i) &&
+                digraph.getLeadsTo(
+                        y.getPredChannels().get(i), y).
+                        isForwardEdge()
+            ) {
+                backPropagation(y.getPredChannels().get(i), y, zstrich);
+            }
+        }
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/Combination.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/Combination.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/Combination.java	(revision 30725)
@@ -2,121 +2,121 @@
 
 public class Combination {
-	
-	private long n = 0;
-	private long k = 0;
-	long[] data = null;
-	
-	public Combination(long n, long k){
-	    if (n < 0 || k < 0)
-			try {
-				throw new Exception("Negative parameter in constructor");
-			} catch (Exception e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}  
-	    this.n = n;
-	    this.k = k;
-	    this.data = new long[(int)k];
-	    for (long i = 0; i < k; ++i)
-	      this.data[(int)i] = i;
-	  }
-	
-	public static long Choose(long n, long k)
-	{
-	  if (n < 0 || k < 0)
-		try {
-			throw new Exception("Invalid negative parameter in Choose()");
-		} catch (Exception e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		} 
-	  if (n < k) return 0;
-	  if (n == k) return 1;
+    
+    private long n = 0;
+    private long k = 0;
+    long[] data = null;
+    
+    public Combination(long n, long k){
+        if (n < 0 || k < 0)
+            try {
+                throw new Exception("Negative parameter in constructor");
+            } catch (Exception e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }  
+        this.n = n;
+        this.k = k;
+        this.data = new long[(int)k];
+        for (long i = 0; i < k; ++i)
+          this.data[(int)i] = i;
+      }
+    
+    public static long Choose(long n, long k)
+    {
+      if (n < 0 || k < 0)
+        try {
+            throw new Exception("Invalid negative parameter in Choose()");
+        } catch (Exception e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } 
+      if (n < k) return 0;
+      if (n == k) return 1;
 
-	  long delta, iMax;
+      long delta, iMax;
 
-	  if (k < n-k) // ex: Choose(100,3)
-	  {
-	    delta = n-k;
-	    iMax = k;
-	  }
-	  else         // ex: Choose(100,97)
-	  {
-	    delta = k;
-	    iMax = n-k;
-	  }
+      if (k < n-k) // ex: Choose(100,3)
+      {
+        delta = n-k;
+        iMax = k;
+      }
+      else         // ex: Choose(100,97)
+      {
+        delta = k;
+        iMax = n-k;
+      }
 
-	  long ans = delta + 1;
+      long ans = delta + 1;
 
-	  for (long i = 2; i <= iMax; ++i)
-	  {
-	    ans = (ans * (delta + i)) / i; 
-	  }
+      for (long i = 2; i <= iMax; ++i)
+      {
+        ans = (ans * (delta + i)) / i; 
+      }
 
-	  return ans;
-	}
-	public long Choose()
-	{
-	 
-	  if (n < k) return 0;
-	  if (n == k) return 1;
+      return ans;
+    }
+    public long Choose()
+    {
+     
+      if (n < k) return 0;
+      if (n == k) return 1;
 
-	  long delta, iMax;
+      long delta, iMax;
 
-	  if (k < n-k) // ex: Choose(100,3)
-	  {
-	    delta = n-k;
-	    iMax = k;
-	  }
-	  else         // ex: Choose(100,97)
-	  {
-	    delta = k;
-	    iMax = n-k;
-	  }
+      if (k < n-k) // ex: Choose(100,3)
+      {
+        delta = n-k;
+        iMax = k;
+      }
+      else         // ex: Choose(100,97)
+      {
+        delta = k;
+        iMax = n-k;
+      }
 
-	  long ans = delta + 1;
+      long ans = delta + 1;
 
-	  for (long i = 2; i <= iMax; ++i)
-	  {
-	    ans = (ans * (delta + i)) / i; 
-	  }
+      for (long i = 2; i <= iMax; ++i)
+      {
+        ans = (ans * (delta + i)) / i; 
+      }
 
-	  return ans;
-	}
+      return ans;
+    }
 
-	
-	public Combination Successor()
-	{
-	  if (this.data.length == 0 ||
-	      this.data[0] == this.n - this.k)
-	    return null;
+    
+    public Combination Successor()
+    {
+      if (this.data.length == 0 ||
+          this.data[0] == this.n - this.k)
+        return null;
 
-	  Combination ans = new Combination(this.n, this.k);
+      Combination ans = new Combination(this.n, this.k);
 
-	  long i;
-	  for (i = 0; i < this.k; ++i){
-	    ans.data[(int)i] = this.data[(int)i];
-	  }
-	  for (i = this.k - 1; i > 0 && ans.data[(int)i] == this.n - this.k + i; --i) {};
-	 
-	  ++ans.data[(int)i];
+      long i;
+      for (i = 0; i < this.k; ++i){
+        ans.data[(int)i] = this.data[(int)i];
+      }
+      for (i = this.k - 1; i > 0 && ans.data[(int)i] == this.n - this.k + i; --i) {};
+     
+      ++ans.data[(int)i];
 
-	  for (long j = i; j < this.k - 1; ++j){
-	    ans.data[(int)j+1] = ans.data[(int)j] + 1;
-	  }  
-	  return ans;
-	}
-	
-	public String ToString()
-	  {
-	    StringBuilder sb = new StringBuilder();
-	    sb.append("{");
-	    for (long i = 0; i < this.k; ++i){
-	      sb.append(this.data[(int)i]);
-	      if (i<this.k-1) sb.append(", ");
-	    }
-	    sb.append("}");
-	    return sb.toString();
-	  }
+      for (long j = i; j < this.k - 1; ++j){
+        ans.data[(int)j+1] = ans.data[(int)j] + 1;
+      }  
+      return ans;
+    }
+    
+    public String ToString()
+      {
+        StringBuilder sb = new StringBuilder();
+        sb.append("{");
+        for (long i = 0; i < this.k; ++i){
+          sb.append(this.data[(int)i]);
+          if (i<this.k-1) sb.append(", ");
+        }
+        sb.append("}");
+        return sb.toString();
+      }
 
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JCheck.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JCheck.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JCheck.java	(revision 30725)
@@ -9,70 +9,70 @@
 public class JCheck {
 
-	private int exnr;
-	private String result = "";
+    private int exnr;
+    private String result = "";
 
-	public boolean jCheck(ArrayList<Channel> entries, ArrayList<Channel> exits,
-			int n) {
-		for (int i = 0; i < exits.size(); i++) {
-			exits.get(i).setEnnrZero();
-		}
-		if (!(entries.size() == exits.size() && exits.size() == n)) {
-			result="Rule 1 broken: " + entries.size() + " entries but "
-					+ exits.size() + " exits and n=" + n;
-			return false;
-		}
-		for (int i = 0; i < entries.size(); i++) {
-			if (!(entries.get(i).getIndegree() + entries.get(i).getOutdegree() >= 2)) {
-				result="rule 4 broken: indegree from entrynode with ID: "
-						+ entries.get(i).getNewid() + ": "
-						+ entries.get(i).getIndegree() + " OutDegree: "
-						+ entries.get(i).getOutdegree();
-				return false;
-			}
-			exnr = 0;
-			for (int j = 0; j < exits.size(); j++) {
-				if (!(exits.get(j).getIndegree() + exits.get(j).getOutdegree() >= 2)) {
-					result="Rule 4 broken, indegree from exitnode with ID: "
-							+ exits.get(j).getNewid() + ": "
-							+ exits.get(j).getIndegree() + " and outdegree: "
-							+ exits.get(j).getOutdegree();
-					//log.debug(exits.get(j).toString());
-					return false;
-				}
-				if (entries.get(i).getReachableNodes().contains(exits.get(j))) {
-					exnr++;
-					exits.get(j).increaseEnnr();
-				}
-				if (exits.get(j).equals(entries.get(i))) {
-					result="Rule 2 broken: node with ID: "
-							+ "entries.get(i).getNode().getId()"
-							+ "is both entry and exit node";
-					return false;
-				}
-			}
+    public boolean jCheck(ArrayList<Channel> entries, ArrayList<Channel> exits,
+            int n) {
+        for (int i = 0; i < exits.size(); i++) {
+            exits.get(i).setEnnrZero();
+        }
+        if (!(entries.size() == exits.size() && exits.size() == n)) {
+            result="Rule 1 broken: " + entries.size() + " entries but "
+                    + exits.size() + " exits and n=" + n;
+            return false;
+        }
+        for (int i = 0; i < entries.size(); i++) {
+            if (!(entries.get(i).getIndegree() + entries.get(i).getOutdegree() >= 2)) {
+                result="rule 4 broken: indegree from entrynode with ID: "
+                        + entries.get(i).getNewid() + ": "
+                        + entries.get(i).getIndegree() + " OutDegree: "
+                        + entries.get(i).getOutdegree();
+                return false;
+            }
+            exnr = 0;
+            for (int j = 0; j < exits.size(); j++) {
+                if (!(exits.get(j).getIndegree() + exits.get(j).getOutdegree() >= 2)) {
+                    result="Rule 4 broken, indegree from exitnode with ID: "
+                            + exits.get(j).getNewid() + ": "
+                            + exits.get(j).getIndegree() + " and outdegree: "
+                            + exits.get(j).getOutdegree();
+                    //log.debug(exits.get(j).toString());
+                    return false;
+                }
+                if (entries.get(i).getReachableNodes().contains(exits.get(j))) {
+                    exnr++;
+                    exits.get(j).increaseEnnr();
+                }
+                if (exits.get(j).equals(entries.get(i))) {
+                    result="Rule 2 broken: node with ID: "
+                            + "entries.get(i).getNode().getId()"
+                            + "is both entry and exit node";
+                    return false;
+                }
+            }
 
-		}
-		if (!(exnr >= n - 1)) {
-			result="Rule 1 broken";
-			return false;
-		}
-		for (int i = 0; i < exits.size(); i++) {
-			if (!(exits.get(i).getEnnr() >= (n - 1))) {
-				result="Rule 1 broken, exit node with ID "
-						+ exits.get(i).getNewid() + "can only reached from "
-						+ exits.get(i).getEnnr() + " entries.";
-				return false;
-			}
-		}
-		result = "Jcheck erfolgreich bestanden";
-		return true;
-	}
-	
-	/**
-	 * gibt das Ergebnis des JChecks in Form als Satz mit Informationen zurück
-	 * @return
-	 */
-	public String getResult() {
-		return result;
-	}
+        }
+        if (!(exnr >= n - 1)) {
+            result="Rule 1 broken";
+            return false;
+        }
+        for (int i = 0; i < exits.size(); i++) {
+            if (!(exits.get(i).getEnnr() >= (n - 1))) {
+                result="Rule 1 broken, exit node with ID "
+                        + exits.get(i).getNewid() + "can only reached from "
+                        + exits.get(i).getEnnr() + " entries.";
+                return false;
+            }
+        }
+        result = "Jcheck erfolgreich bestanden";
+        return true;
+    }
+    
+    /**
+     * gibt das Ergebnis des JChecks in Form als Satz mit Informationen zurück
+     * @return
+     */
+    public String getResult() {
+        return result;
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JMinimality.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JMinimality.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JMinimality.java	(revision 30725)
@@ -9,4 +9,5 @@
 import java.util.Iterator;
 import java.util.List;
+
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 import org.openstreetmap.josm.plugins.JunctionChecker.datastructure.Channel;
@@ -21,257 +22,258 @@
 public class JMinimality {
 
-	private boolean CheckMinimal = true;
-	private final ArrayList<Channel> E;
-	private final int Grid[][];
-	private final ArrayList<Channel> OrEn;
-	private final ArrayList<Channel> OrEx;
-	private final int n;
-	private final List<List<Object>> L = new ArrayList<List<Object>>(); //The list of columns to be sorted
-	private long EEovern = 0;
-	private final HashSet<Channel> subgraph = new HashSet<Channel>();//The candidate subgraph to be tested
-	private ProgressMonitor pm;
-	private final boolean pmenabled;
-	private final ArrayList<HashSet<Channel>> junctions = new ArrayList<HashSet<Channel>>();
-	private final boolean searchFirstJunction;
-	private final ArrayList<Channel> subJunction = new ArrayList<Channel>();
-	private final JPrepare jprepare;
-	private boolean Check = false;
-	private Iterator<int[]> it;
-
-
-	public JMinimality(int[][] Grid, int n,
-			ArrayList<Channel> E,
-			ArrayList<Channel> entries,
-			ArrayList<Channel> exits,
-			ChannelDiGraph channeldigraph,
-			boolean junctionsearch) {
-
-		this.E = E;
-		this.n = n;
-		this.Grid = Grid;
-		this.OrEn = entries;
-		this.OrEx = exits;
-		this.pmenabled = false;
-		this.searchFirstJunction = junctionsearch;
-		this.jprepare = new JPrepare(channeldigraph);
-	}
-
-	public JMinimality(int[][] Grid, int n,
-			ArrayList<Channel> E,
-			ArrayList<Channel> entries,
-			ArrayList<Channel> exits,
-			ChannelDiGraph channeldigraph,
-			ProgressMonitor pm,
-			boolean junctionsearch) {
-
-		this.E = E;
-		this.n = n;
-		this.Grid = Grid;
-		this.OrEn = entries;
-		this.OrEx = exits;
-		this.pm = pm;
-		this.pmenabled = true;
-		this.searchFirstJunction = junctionsearch;
-		this.jprepare = new JPrepare(channeldigraph);
-		//this.jCheck= new JCheck();
-	}
-
-	public void GenerateSubcolumns () {/*Generates all combinations of subcolumns in the grid*/
-		if (pmenabled) {
-			pm.setCustomText(tr ("generate all combinations from entrie/exit candidates"));
-		}
-
-		Combination c = new Combination(Grid.length, n);
-		EEovern = (int) Combination.Choose(Grid.length*Grid.length, n*n);
-		long ans = c.Choose(); //This is the number of subcolumns to be generated
-		int[][] v; // this is a column variable containing n y-index entries plus true false values (0/1)
-		List<Object> C; //The column is packed together with 2 indices into this variable
-		for (int i = 0; i < Grid.length;i++) {
-			int h = 0;	//this is the index denoting the "n out of Grid.length"- combination, indicating a subcolumn of length n
-			do {
-				int missing = 0;
-				C = new ArrayList<Object>(3);
-				v = new int[n][2];
-				C.add(i);//the first position of column variable C is the column index
-				C.add(h);//the second is the entry-subset index
-				for(int t = 0; t < c.data.length; t++){
-					if (Grid[(int)c.data[t]][i] == 0){
-						missing++;
-						v[t][1]= 0; //false
-					}
-					else{
-						v[t][1]= 1;
-					} //true
-					v[t][0]=(int)c.data[t];	//Write a y index of the combination into column
-				}
-				if (missing <=1){//If column has at most one missing entry
-					C.add(v);//insert column as the third position of column variable C
-					L.add(C); //Insert C in list to be ordered
-				}
-				h++; //Iterate through all subcolumns
-				if (h < ans){c = c.Successor();}//generate the next combination
-			}while(h < ans);
-			c = new Combination(Grid.length, n); //For each original column in the grid, generate new subcolumns
-		}
-		Collections.sort(L, new Comparator<List<Object>>() {
+    private boolean CheckMinimal = true;
+    private final ArrayList<Channel> E;
+    private final int Grid[][];
+    private final ArrayList<Channel> OrEn;
+    private final ArrayList<Channel> OrEx;
+    private final int n;
+    private final List<List<Object>> L = new ArrayList<List<Object>>(); //The list of columns to be sorted
+    private long EEovern = 0;
+    private final HashSet<Channel> subgraph = new HashSet<Channel>();//The candidate subgraph to be tested
+    private ProgressMonitor pm;
+    private final boolean pmenabled;
+    private final ArrayList<HashSet<Channel>> junctions = new ArrayList<HashSet<Channel>>();
+    private final boolean searchFirstJunction;
+    private final ArrayList<Channel> subJunction = new ArrayList<Channel>();
+    private final JPrepare jprepare;
+    private boolean Check = false;
+    private Iterator<int[]> it;
+
+
+    public JMinimality(int[][] Grid, int n,
+            ArrayList<Channel> E,
+            ArrayList<Channel> entries,
+            ArrayList<Channel> exits,
+            ChannelDiGraph channeldigraph,
+            boolean junctionsearch) {
+
+        this.E = E;
+        this.n = n;
+        this.Grid = Grid;
+        this.OrEn = entries;
+        this.OrEx = exits;
+        this.pmenabled = false;
+        this.searchFirstJunction = junctionsearch;
+        this.jprepare = new JPrepare(channeldigraph);
+    }
+
+    public JMinimality(int[][] Grid, int n,
+            ArrayList<Channel> E,
+            ArrayList<Channel> entries,
+            ArrayList<Channel> exits,
+            ChannelDiGraph channeldigraph,
+            ProgressMonitor pm,
+            boolean junctionsearch) {
+
+        this.E = E;
+        this.n = n;
+        this.Grid = Grid;
+        this.OrEn = entries;
+        this.OrEx = exits;
+        this.pm = pm;
+        this.pmenabled = true;
+        this.searchFirstJunction = junctionsearch;
+        this.jprepare = new JPrepare(channeldigraph);
+        //this.jCheck= new JCheck();
+    }
+
+    public void GenerateSubcolumns () {/*Generates all combinations of subcolumns in the grid*/
+        if (pmenabled) {
+            pm.setCustomText(tr ("generate all combinations from entrie/exit candidates"));
+        }
+
+        Combination c = new Combination(Grid.length, n);
+        EEovern = (int) Combination.Choose(Grid.length*Grid.length, n*n);
+        long ans = c.Choose(); //This is the number of subcolumns to be generated
+        int[][] v; // this is a column variable containing n y-index entries plus true false values (0/1)
+        List<Object> C; //The column is packed together with 2 indices into this variable
+        for (int i = 0; i < Grid.length;i++) {
+            int h = 0;    //this is the index denoting the "n out of Grid.length"- combination, indicating a subcolumn of length n
+            do {
+                int missing = 0;
+                C = new ArrayList<Object>(3);
+                v = new int[n][2];
+                C.add(i);//the first position of column variable C is the column index
+                C.add(h);//the second is the entry-subset index
+                for(int t = 0; t < c.data.length; t++){
+                    if (Grid[(int)c.data[t]][i] == 0){
+                        missing++;
+                        v[t][1]= 0; //false
+                    }
+                    else{
+                        v[t][1]= 1;
+                    } //true
+                    v[t][0]=(int)c.data[t];    //Write a y index of the combination into column
+                }
+                if (missing <=1){//If column has at most one missing entry
+                    C.add(v);//insert column as the third position of column variable C
+                    L.add(C); //Insert C in list to be ordered
+                }
+                h++; //Iterate through all subcolumns
+                if (h < ans){c = c.Successor();}//generate the next combination
+            }while(h < ans);
+            c = new Combination(Grid.length, n); //For each original column in the grid, generate new subcolumns
+        }
+        Collections.sort(L, new Comparator<List<Object>>() {
+            @Override
 			public int compare(List<Object> o1, List<Object> o2) {
-				return (Integer)o1.get(1) - (Integer)o2.get(1); //sort according to h index in each column
-			}});
-	}
-
-	public boolean IterateThroughKn() {//Iterates through all K_{n-1} subgrids of the Grid and tests them
-		if (L.size()==0) {
-			return true;
-		}
-		if (pmenabled) {
-			pm.setTicksCount(L.size());
-			pm.setCustomText("Iterates through all K_{n-1} subgrids of the Grid and tests them");
-		}
-		Combination c;
-		Iterator<List<Object>> l = L.listIterator();
-		List<Object> C;
-		ArrayList<int[]> CandidateK = new ArrayList<int[]>(n*n); //saves the candidate K_{n-1} in entry-exit pairs
-		long lindex= 0;
-		int h = 0;
-		int m = 0;
-		int[][] v;
-		int x_i;
-		int y_j;
-		int progressmonitorcounter = 1;
-		boolean mchanged = false;
-		boolean hchanged = false;
-		C = l.next();
-		do{ //Loop over list of columns L
-			if (mchanged){
-				C = l.next(); //Iterator in L
-				lindex++; //Index in L
-				if (hchanged) {
-					m=1;
-					hchanged = false;
-				}
-			}
-			if ((Integer)C.get(1)==h && l.hasNext()){ //m counts the set of columns with index h
-				m++;
-				mchanged = true;
-			}
-			else{
-				if (l.hasNext()==false){
-					m++;lindex++;
-				} //At the end of L, counter are set one up
-				c = new Combination(m, n);
-				long ans = c.Choose();
-				int missing = 0;
-				boolean smallerjunction = false;
-				for (int k =0; k<ans;k++){ //Makes sure that subset of m columns contains an n*n subgrid, because ans = m over n would be 0 otherwise
-					for (int y = 0; y < n; y++){//Iterates over all rows of subgrid k
-						missing =0;	//test = "";
-						for (int x = 0; x <c.data.length;x++) { //Iterates over all columns of subgrid k
-							x_i=((Integer)L.get((int)(lindex-m+c.data[x])).get(0));//columnindex in grid
-							v=((int[][])(L.get((int)(lindex-m+c.data[x])).get(2))); //subcolumn of grid
-							y_j= v[y][0]; //rowindex in grid
-							if (v[y][1]==0){
-								missing++;
-							}else{
-								CandidateK.add(new int[]{y_j,x_i});
-							}//save entry/exit tuple
-							if (smallerjunction == false && ((!OrEn.contains(E.get(v[y][0]))) &&(!OrEx.contains(E.get(x_i))))){ // Tests, whether y or x is not an original entry/exit
-								smallerjunction = true; //Then k identifies a different junction than the original one
-							}
-							//test = test+" ("+y_j+", "+x_i+", "+v[y][1]+")";
-						}
-						if (missing > 1){
-							break;
-						}//If a row has more than one missing value, break
-					}
-					if (missing <=1 && smallerjunction == true){//The k-subgrid is a different junction candidate satisfying total reachability
-						CheckMinimal = CheckSmallJunction(CandidateK)==false;// If the candidate is a smaller junction, then minimality is false
-						//log.info("durchlauf: " + durchlauf + " Wert von CheckMinimal: " + CheckMinimal);
-						if (!CheckMinimal) {
-							break;
-						}
-					}
-					CandidateK.clear();
-					if (k+1 < ans){c = c.Successor();} //Produces the m over n combinations
-				}
-				m=1; //Sets m to the first column with next index h+1
-				h++;
-				mchanged = false;
-				hchanged = true;
-			}
-			if (pmenabled) {
-				progressmonitorcounter++;
-				pm.setTicks(progressmonitorcounter);
-			}
-		}
-		while(l.hasNext() && CheckMinimal);
-		return CheckMinimal;
-	}
-
-	/**
-	 * gibt true zurück, wenn Kandidat eine Kreuzung ist, aber nicht, wenn junctionsearch auf true gesetzt ist
-	 * @param CandidateK
-	 * @return
-	 */
-	public boolean CheckSmallJunction(ArrayList<int[]> CandidateK){
-		Check = false;
-		subgraph.clear();//Zu konstruierender Subgraph
-		it = CandidateK.iterator();
-		//Reconstruct small Junction from paths
-		while (it.hasNext()){
-			int[]point = it.next();
-			for (int j = 0; j < E.get(point[0]).getReachableNodes().size(); j++) {
-				if(E.get(point[0]).getReachableNodeAt(j).equals(E.get(point[1]))){
-					subgraph.addAll(E.get(point[0]).getPathsAt(E.get(point[0]).getReachableNodeAt(j)));
-					subgraph.add(E.get(point[0]));
-				}
-			}
-		}
-		jprepare.jPrepare(new ArrayList<Channel>(subgraph));
-		JCheck jCheck = new JCheck();
-		Check = jCheck.jCheck(jprepare.getEntries(), jprepare.getExits(), n);
-		jprepare.resetSubgraph();
-		if (Check) {
-			subJunction.clear();
-			subJunction.addAll(subgraph);
-			//soll mehr als ein Kandidat gesucht werden? Dann Kandidaten speichern und Check wieder auf false stellen, damit die Hauptschleife weitergeht
-			if (!searchFirstJunction) {
-				boolean isin = false;
-				for (int i = 0; i < junctions.size(); i++) {
-					//log.debug("Kreuzung " + i +" hat Channels: " + junctions.get(i).size() + " subgraph: " + subgraph.size());
-					if (junctions.get(i).size() == subgraph.size()) {
-						Iterator<Channel> it = subgraph.iterator();
-						isin = true;
-						while (it.hasNext()) {
-							if (!junctions.get(i).contains(it.next())) {
-								isin = false;
-								//log.info("nicht drin");
-							}
-						}
-					}
-				}
-				if (isin == false) {
-					junctions.add(new HashSet<Channel>(subgraph));
-					//log.info("Kreuzungskandidat der Liste zugefügt" + junctions.size());
-				}
-				Check = false;
-			}
-		}
-		return Check;
-	}
-
-	/**
-	 * enthält alle Channels des zuletzt durchlaufenden Kreuzungskandidaten (muß keine gültige Kreuzung sein)
-	 * @return
-	 */
-	public ArrayList<Channel> getSubJunctionCandidate(){
-		return new ArrayList<Channel>(subgraph);
-	}
-
-	/**
-	 * gibt alle gefundenen Kreuzungskandidaten zurück (ist leer, wenn junctionsearch auf true gesetzt wurde)
-	 * @return
-	 */
-	public ArrayList<HashSet<Channel>> getJunctionCandidates() {
-		return junctions;
-	}
+                return (Integer)o1.get(1) - (Integer)o2.get(1); //sort according to h index in each column
+            }});
+    }
+
+    public boolean IterateThroughKn() {//Iterates through all K_{n-1} subgrids of the Grid and tests them
+        if (L.size()==0) {
+            return true;
+        }
+        if (pmenabled) {
+            pm.setTicksCount(L.size());
+            pm.setCustomText("Iterates through all K_{n-1} subgrids of the Grid and tests them");
+        }
+        Combination c;
+        Iterator<List<Object>> l = L.listIterator();
+        List<Object> C;
+        ArrayList<int[]> CandidateK = new ArrayList<int[]>(n*n); //saves the candidate K_{n-1} in entry-exit pairs
+        long lindex= 0;
+        int h = 0;
+        int m = 0;
+        int[][] v;
+        int x_i;
+        int y_j;
+        int progressmonitorcounter = 1;
+        boolean mchanged = false;
+        boolean hchanged = false;
+        C = l.next();
+        do{ //Loop over list of columns L
+            if (mchanged){
+                C = l.next(); //Iterator in L
+                lindex++; //Index in L
+                if (hchanged) {
+                    m=1;
+                    hchanged = false;
+                }
+            }
+            if ((Integer)C.get(1)==h && l.hasNext()){ //m counts the set of columns with index h
+                m++;
+                mchanged = true;
+            }
+            else{
+                if (l.hasNext()==false){
+                    m++;lindex++;
+                } //At the end of L, counter are set one up
+                c = new Combination(m, n);
+                long ans = c.Choose();
+                int missing = 0;
+                boolean smallerjunction = false;
+                for (int k =0; k<ans;k++){ //Makes sure that subset of m columns contains an n*n subgrid, because ans = m over n would be 0 otherwise
+                    for (int y = 0; y < n; y++){//Iterates over all rows of subgrid k
+                        missing =0;    //test = "";
+                        for (int x = 0; x <c.data.length;x++) { //Iterates over all columns of subgrid k
+                            x_i=((Integer)L.get((int)(lindex-m+c.data[x])).get(0));//columnindex in grid
+                            v=((int[][])(L.get((int)(lindex-m+c.data[x])).get(2))); //subcolumn of grid
+                            y_j= v[y][0]; //rowindex in grid
+                            if (v[y][1]==0){
+                                missing++;
+                            }else{
+                                CandidateK.add(new int[]{y_j,x_i});
+                            }//save entry/exit tuple
+                            if (smallerjunction == false && ((!OrEn.contains(E.get(v[y][0]))) &&(!OrEx.contains(E.get(x_i))))){ // Tests, whether y or x is not an original entry/exit
+                                smallerjunction = true; //Then k identifies a different junction than the original one
+                            }
+                            //test = test+" ("+y_j+", "+x_i+", "+v[y][1]+")";
+                        }
+                        if (missing > 1){
+                            break;
+                        }//If a row has more than one missing value, break
+                    }
+                    if (missing <=1 && smallerjunction == true){//The k-subgrid is a different junction candidate satisfying total reachability
+                        CheckMinimal = CheckSmallJunction(CandidateK)==false;// If the candidate is a smaller junction, then minimality is false
+                        //log.info("durchlauf: " + durchlauf + " Wert von CheckMinimal: " + CheckMinimal);
+                        if (!CheckMinimal) {
+                            break;
+                        }
+                    }
+                    CandidateK.clear();
+                    if (k+1 < ans){c = c.Successor();} //Produces the m over n combinations
+                }
+                m=1; //Sets m to the first column with next index h+1
+                h++;
+                mchanged = false;
+                hchanged = true;
+            }
+            if (pmenabled) {
+                progressmonitorcounter++;
+                pm.setTicks(progressmonitorcounter);
+            }
+        }
+        while(l.hasNext() && CheckMinimal);
+        return CheckMinimal;
+    }
+
+    /**
+     * gibt true zurück, wenn Kandidat eine Kreuzung ist, aber nicht, wenn junctionsearch auf true gesetzt ist
+     * @param CandidateK
+     * @return
+     */
+    public boolean CheckSmallJunction(ArrayList<int[]> CandidateK){
+        Check = false;
+        subgraph.clear();//Zu konstruierender Subgraph
+        it = CandidateK.iterator();
+        //Reconstruct small Junction from paths
+        while (it.hasNext()){
+            int[]point = it.next();
+            for (int j = 0; j < E.get(point[0]).getReachableNodes().size(); j++) {
+                if(E.get(point[0]).getReachableNodeAt(j).equals(E.get(point[1]))){
+                    subgraph.addAll(E.get(point[0]).getPathsAt(E.get(point[0]).getReachableNodeAt(j)));
+                    subgraph.add(E.get(point[0]));
+                }
+            }
+        }
+        jprepare.jPrepare(new ArrayList<Channel>(subgraph));
+        JCheck jCheck = new JCheck();
+        Check = jCheck.jCheck(jprepare.getEntries(), jprepare.getExits(), n);
+        jprepare.resetSubgraph();
+        if (Check) {
+            subJunction.clear();
+            subJunction.addAll(subgraph);
+            //soll mehr als ein Kandidat gesucht werden? Dann Kandidaten speichern und Check wieder auf false stellen, damit die Hauptschleife weitergeht
+            if (!searchFirstJunction) {
+                boolean isin = false;
+                for (int i = 0; i < junctions.size(); i++) {
+                    //log.debug("Kreuzung " + i +" hat Channels: " + junctions.get(i).size() + " subgraph: " + subgraph.size());
+                    if (junctions.get(i).size() == subgraph.size()) {
+                        Iterator<Channel> it = subgraph.iterator();
+                        isin = true;
+                        while (it.hasNext()) {
+                            if (!junctions.get(i).contains(it.next())) {
+                                isin = false;
+                                //log.info("nicht drin");
+                            }
+                        }
+                    }
+                }
+                if (isin == false) {
+                    junctions.add(new HashSet<Channel>(subgraph));
+                    //log.info("Kreuzungskandidat der Liste zugefügt" + junctions.size());
+                }
+                Check = false;
+            }
+        }
+        return Check;
+    }
+
+    /**
+     * enthält alle Channels des zuletzt durchlaufenden Kreuzungskandidaten (muß keine gültige Kreuzung sein)
+     * @return
+     */
+    public ArrayList<Channel> getSubJunctionCandidate(){
+        return new ArrayList<Channel>(subgraph);
+    }
+
+    /**
+     * gibt alle gefundenen Kreuzungskandidaten zurück (ist leer, wenn junctionsearch auf true gesetzt wurde)
+     * @return
+     */
+    public ArrayList<HashSet<Channel>> getJunctionCandidates() {
+        return junctions;
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JPrepare.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JPrepare.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JPrepare.java	(revision 30725)
@@ -11,75 +11,75 @@
 public class JPrepare {
 
-	private final ArrayList<Channel> entries;
-	private final ArrayList<Channel> exits;
-	private ArrayList<Channel> vertices;
-	private final ChannelDiGraph digraph;
+    private final ArrayList<Channel> entries;
+    private final ArrayList<Channel> exits;
+    private ArrayList<Channel> vertices;
+    private final ChannelDiGraph digraph;
 
-	public JPrepare(ChannelDiGraph digraph) {
-		entries = new ArrayList<Channel>();
-		exits = new ArrayList<Channel>();
-		this.digraph = digraph;
-	}
+    public JPrepare(ChannelDiGraph digraph) {
+        entries = new ArrayList<Channel>();
+        exits = new ArrayList<Channel>();
+        this.digraph = digraph;
+    }
 
-	public void jPrepare (ArrayList<Channel> vertices) {
-		this.vertices = vertices;
-		entries.clear();
-		exits.clear();
+    public void jPrepare (ArrayList<Channel> vertices) {
+        this.vertices = vertices;
+        entries.clear();
+        exits.clear();
 
-		/*TODO: kann weg?
-		digraph.ereaseChannelsInDegree();
-		digraph.ereaseChannelsOutDegree();
-		digraph.ereaseChannelsSubgraph();
-		 */
-		for (int i = 0; i < vertices.size(); i++) {
-			vertices.get(i).setSubgraph(true);
-		}
-		for (int i = 0; i < vertices.size(); i++) {
-			for (int j = 0; j < vertices.get(i).getPredChannels().size(); j++) {
-				if (vertices.get(i).getPredChannels().get(j).isSubgraph() == false ) {
-					if (!entries.contains(vertices.get(i))) {
-						entries.add(vertices.get(i));
-					}
-				}
-				else {
-					vertices.get(i).countupIndegree();
-					//log.trace(vertices.get(i).toString());
-				}
-			}
-			for (int j = 0; j < vertices.get(i).getLeadsTo().size(); j++) {
-				if (vertices.get(i).getLeadsTo().get(j).getToChannel().isSubgraph() == false) {
-					if (!exits.contains(vertices.get(i))) {
-						exits.add(vertices.get(i));
-					}
-				}
-				else {
-					vertices.get(i).countupOutdegree();
-				}
-			}
-		}
-	}
+        /*TODO: kann weg?
+        digraph.ereaseChannelsInDegree();
+        digraph.ereaseChannelsOutDegree();
+        digraph.ereaseChannelsSubgraph();
+         */
+        for (int i = 0; i < vertices.size(); i++) {
+            vertices.get(i).setSubgraph(true);
+        }
+        for (int i = 0; i < vertices.size(); i++) {
+            for (int j = 0; j < vertices.get(i).getPredChannels().size(); j++) {
+                if (vertices.get(i).getPredChannels().get(j).isSubgraph() == false ) {
+                    if (!entries.contains(vertices.get(i))) {
+                        entries.add(vertices.get(i));
+                    }
+                }
+                else {
+                    vertices.get(i).countupIndegree();
+                    //log.trace(vertices.get(i).toString());
+                }
+            }
+            for (int j = 0; j < vertices.get(i).getLeadsTo().size(); j++) {
+                if (vertices.get(i).getLeadsTo().get(j).getToChannel().isSubgraph() == false) {
+                    if (!exits.contains(vertices.get(i))) {
+                        exits.add(vertices.get(i));
+                    }
+                }
+                else {
+                    vertices.get(i).countupOutdegree();
+                }
+            }
+        }
+    }
 
-	public void resetSubgraph(){
-		for (int i = 0; i < vertices.size(); i++) {
-			vertices.get(i).setSubgraph(false);
-			vertices.get(i).setIndegree(0);
-			vertices.get(i).setOutdegree(0);
-		}
-	}
+    public void resetSubgraph(){
+        for (int i = 0; i < vertices.size(); i++) {
+            vertices.get(i).setSubgraph(false);
+            vertices.get(i).setIndegree(0);
+            vertices.get(i).setOutdegree(0);
+        }
+    }
 
-	/**
-	 * gibt die Anzahl der gefundenen Eingänge zurück
-	 * @return
-	 */
-	public ArrayList<Channel> getEntries() {
-		return entries;
-	}
+    /**
+     * gibt die Anzahl der gefundenen Eingänge zurück
+     * @return
+     */
+    public ArrayList<Channel> getEntries() {
+        return entries;
+    }
 
-	/**
-	 * gibt die Anzahl der gefundenen Ausgänge zurück
-	 * @return
-	 */
-	public ArrayList<Channel> getExits() {
-		return exits;
-	}
+    /**
+     * gibt die Anzahl der gefundenen Ausgänge zurück
+     * @return
+     */
+    public ArrayList<Channel> getExits() {
+        return exits;
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JProcess.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JProcess.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JProcess.java	(revision 30725)
@@ -14,47 +14,47 @@
 public class JProcess {
 
-	private ArrayList<Channel> vertices;
-	private ChannelDiGraph digraph;
-	private TRDFS trdfs;
-	private BackPropagation backpropagation;
-	private ArrayList<LeadsTo> cycleEdges;
+    private ArrayList<Channel> vertices;
+    private ChannelDiGraph digraph;
+    private TRDFS trdfs;
+    private BackPropagation backpropagation;
+    private ArrayList<LeadsTo> cycleEdges;
 
-	public JProcess(ArrayList<Channel> subgraph, ChannelDiGraph digraph) {
-		this.digraph = digraph;
-		this.vertices = subgraph;
-		this.trdfs = new TRDFS(vertices, digraph);
-		this.backpropagation = new BackPropagation(digraph);
-	}
+    public JProcess(ArrayList<Channel> subgraph, ChannelDiGraph digraph) {
+        this.digraph = digraph;
+        this.vertices = subgraph;
+        this.trdfs = new TRDFS(vertices, digraph);
+        this.backpropagation = new BackPropagation(digraph);
+    }
 
-	/**
-	 * ruft den TR-DFS und danach den Backpropagation-Algorithmus auf jPrepare
-	 * muß vorher durchgelaufen sein (die Eingänge müssen bekannt sein)
-	 * 
-	 * @param entries
-	 */
-	public void jProcess(ArrayList<Channel> entries) {
-		ArrayList<Channel> nodes = digraph.getChannels();
-		// alle Knoten des Subgraphen auf unbesucht stellen und
-		// die evtl. gespeicherten erreichbaren Knoten löschen
-		for (int i = 0; i < nodes.size(); i++) {
-			nodes.get(i).setVisited(BacktrackingColors.WHITE);
-			nodes.get(i).ereaseReachableNodes();
-		}
-		// alle Kanten auf keine ForwardEdge stellen
-		for (int i = 0; i < digraph.getLeadsTo().size(); i++) {
-			digraph.getLeadsTo().get(i).setForwardEdge(false);
-		}
-		trdfs.ereaseCycleEdges();
+    /**
+     * ruft den TR-DFS und danach den Backpropagation-Algorithmus auf jPrepare
+     * muß vorher durchgelaufen sein (die Eingänge müssen bekannt sein)
+     * 
+     * @param entries
+     */
+    public void jProcess(ArrayList<Channel> entries) {
+        ArrayList<Channel> nodes = digraph.getChannels();
+        // alle Knoten des Subgraphen auf unbesucht stellen und
+        // die evtl. gespeicherten erreichbaren Knoten löschen
+        for (int i = 0; i < nodes.size(); i++) {
+            nodes.get(i).setVisited(BacktrackingColors.WHITE);
+            nodes.get(i).ereaseReachableNodes();
+        }
+        // alle Kanten auf keine ForwardEdge stellen
+        for (int i = 0; i < digraph.getLeadsTo().size(); i++) {
+            digraph.getLeadsTo().get(i).setForwardEdge(false);
+        }
+        trdfs.ereaseCycleEdges();
 
-		for (int i = 0; i < entries.size(); i++) {
-			if (entries.get(i).getVisited() == BacktrackingColors.WHITE) {
-				trdfs.trdfs(entries.get(i));
-			}
-		}
-		cycleEdges = trdfs.getCycleEdges();
-		for (int j = 0; j < cycleEdges.size(); j++) {
-			backpropagation.backPropagation(cycleEdges.get(j).getFromChannel(),
-					cycleEdges.get(j).getToChannel(), cycleEdges.get(j).getToChannel());
-		}
-	}
+        for (int i = 0; i < entries.size(); i++) {
+            if (entries.get(i).getVisited() == BacktrackingColors.WHITE) {
+                trdfs.trdfs(entries.get(i));
+            }
+        }
+        cycleEdges = trdfs.getCycleEdges();
+        for (int j = 0; j < cycleEdges.size(); j++) {
+            backpropagation.backPropagation(cycleEdges.get(j).getFromChannel(),
+                    cycleEdges.get(j).getToChannel(), cycleEdges.get(j).getToChannel());
+        }
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JunctionChecker.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JunctionChecker.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/JunctionChecker.java	(revision 30725)
@@ -17,249 +17,249 @@
 public class JunctionChecker {
 
-	private ArrayList<Channel> subgraph;
-	private ArrayList<Channel> entries;
-	private ArrayList<Channel> exits;
-	private ArrayList<Channel> cycleedges;
-	private ArrayList<Channel> subjunction;
-	private int n;
-	private final JPrepare jPrepare;
-	private JProcess jProcess;
-	private final ChannelDiGraph channeldigraph;
-	private final JCheck jCheck;
-	private ArrayList<Channel> E;
-	private int Grid[][];
-	private boolean Check;
-	private boolean smallerJunction;
-	private JMinimality m;
-	// Variable wird beim KreuzungsSuchen benutzt, sonst ist sie leer!
-	private ArrayList<HashSet<Channel>> junctions = new ArrayList<HashSet<Channel>>();
-	//dient zur Zeitmessung
-	private long startIterate = 0;
-	private long stopIterate = 0;
-	private long startGenerate = 0;
-
-	public JunctionChecker(ChannelDiGraph channeldigraph, int n) {
-		this.jPrepare = new JPrepare(channeldigraph);
-		this.channeldigraph = channeldigraph;
-		this.n = n;
-		this.jCheck = new JCheck();
-		this.subjunction = new ArrayList<Channel>();
-		smallerJunction = false;
-	}
-
-	/**
-	 * startet das Überprüfen einer Teilmenge auf die Kreuzungskriterien
-	 * @param subgraph
-	 * @param pm
-	 */
-	public void checkjunctions(ArrayList<Channel> subgraph, ProgressMonitor pm) {
-		jPrepare.jPrepare(subgraph);
-		entries = jPrepare.getEntries();
-		exits = jPrepare.getExits();
-		jProcess = new JProcess(subgraph, channeldigraph);
-		jProcess.jProcess(jPrepare.getEntries());
-		boolean result = jCheck.jCheck(entries, exits, n);
-		//jPrepare.resetSubgraph();
-		if (result == true) {
-			this.collectECandidates(subgraph);
-			this.ConstructGrid();
-			m = new JMinimality(Grid, n, E, entries, exits, channeldigraph, pm,
-					true);
-			m.GenerateSubcolumns();
-			Check = m.IterateThroughKn();
-			if (!Check) {
-				smallerJunction = true;
-			}
-			subjunction = m.getSubJunctionCandidate();
-		} else {
-			Check = false;
-		}
-	}
-
-	/**
-	 * Diese Methode wird aufgerufen, wenn nach Kreuzungen in einer Teilmenge
-	 * gesucht werden soll
-	 *
-	 * @param subgraph
-	 * @param firstjunction soll nur die erste mögliche Kreuzung ausgegeben werden oder alle
-	 */
-	public void junctionSearch(ArrayList<Channel> subgraph, ProgressMonitor pm) {
-		jPrepare.jPrepare(subgraph);
-		entries = jPrepare.getEntries();
-		exits = jPrepare.getExits();
-		jProcess = new JProcess(subgraph, channeldigraph);
-		jProcess.jProcess(jPrepare.getEntries());
-		this.collectECandidates(subgraph);
-		this.ConstructGrid();
-		jPrepare.resetSubgraph();
-		m = new JMinimality(Grid, n, E, new ArrayList<Channel>(), new ArrayList<Channel>(), channeldigraph, pm, false);
-		m.GenerateSubcolumns();
-		Check = m.IterateThroughKn();
-		junctions = checkJunctionCandidates(m.getJunctionCandidates());
-	}
-
-	public void junctionSearch(ArrayList<Channel> subgraph) {
-		jPrepare.jPrepare(subgraph);
-		entries = jPrepare.getEntries();
-		exits = jPrepare.getExits();
-		jProcess = new JProcess(subgraph, channeldigraph);
-		jProcess.jProcess(jPrepare.getEntries());
-		this.collectECandidates(subgraph);
-		this.ConstructGrid();
-		jPrepare.resetSubgraph();
-		m = new JMinimality(Grid, n, E, new ArrayList<Channel>(), new ArrayList<Channel>(), channeldigraph, false);
-		startGenerate = System.currentTimeMillis();
-		m.GenerateSubcolumns();
-		startIterate = System.currentTimeMillis();
-		Check = m.IterateThroughKn();
-		stopIterate = System.currentTimeMillis();
-		junctions = checkJunctionCandidates(m.getJunctionCandidates());
-	}
-
-	/**
-	 * Überprüft die Kreuzunskandidaten, die JMinimality gefunden hat, welche davon eine Kreuzung darstellen (eine Kreuzung
-	 * darf keine weiteren Kreuzungen enthalten)
-	 */
-	private ArrayList<HashSet<Channel>> checkJunctionCandidates(ArrayList<HashSet<Channel>> junctioncandidates){
-		@SuppressWarnings("unchecked")
+    private ArrayList<Channel> subgraph;
+    private ArrayList<Channel> entries;
+    private ArrayList<Channel> exits;
+    private ArrayList<Channel> cycleedges;
+    private ArrayList<Channel> subjunction;
+    private int n;
+    private final JPrepare jPrepare;
+    private JProcess jProcess;
+    private final ChannelDiGraph channeldigraph;
+    private final JCheck jCheck;
+    private ArrayList<Channel> E;
+    private int Grid[][];
+    private boolean Check;
+    private boolean smallerJunction;
+    private JMinimality m;
+    // Variable wird beim KreuzungsSuchen benutzt, sonst ist sie leer!
+    private ArrayList<HashSet<Channel>> junctions = new ArrayList<HashSet<Channel>>();
+    //dient zur Zeitmessung
+    private long startIterate = 0;
+    private long stopIterate = 0;
+    private long startGenerate = 0;
+
+    public JunctionChecker(ChannelDiGraph channeldigraph, int n) {
+        this.jPrepare = new JPrepare(channeldigraph);
+        this.channeldigraph = channeldigraph;
+        this.n = n;
+        this.jCheck = new JCheck();
+        this.subjunction = new ArrayList<Channel>();
+        smallerJunction = false;
+    }
+
+    /**
+     * startet das Überprüfen einer Teilmenge auf die Kreuzungskriterien
+     * @param subgraph
+     * @param pm
+     */
+    public void checkjunctions(ArrayList<Channel> subgraph, ProgressMonitor pm) {
+        jPrepare.jPrepare(subgraph);
+        entries = jPrepare.getEntries();
+        exits = jPrepare.getExits();
+        jProcess = new JProcess(subgraph, channeldigraph);
+        jProcess.jProcess(jPrepare.getEntries());
+        boolean result = jCheck.jCheck(entries, exits, n);
+        //jPrepare.resetSubgraph();
+        if (result == true) {
+            this.collectECandidates(subgraph);
+            this.ConstructGrid();
+            m = new JMinimality(Grid, n, E, entries, exits, channeldigraph, pm,
+                    true);
+            m.GenerateSubcolumns();
+            Check = m.IterateThroughKn();
+            if (!Check) {
+                smallerJunction = true;
+            }
+            subjunction = m.getSubJunctionCandidate();
+        } else {
+            Check = false;
+        }
+    }
+
+    /**
+     * Diese Methode wird aufgerufen, wenn nach Kreuzungen in einer Teilmenge
+     * gesucht werden soll
+     *
+     * @param subgraph
+     * @param firstjunction soll nur die erste mögliche Kreuzung ausgegeben werden oder alle
+     */
+    public void junctionSearch(ArrayList<Channel> subgraph, ProgressMonitor pm) {
+        jPrepare.jPrepare(subgraph);
+        entries = jPrepare.getEntries();
+        exits = jPrepare.getExits();
+        jProcess = new JProcess(subgraph, channeldigraph);
+        jProcess.jProcess(jPrepare.getEntries());
+        this.collectECandidates(subgraph);
+        this.ConstructGrid();
+        jPrepare.resetSubgraph();
+        m = new JMinimality(Grid, n, E, new ArrayList<Channel>(), new ArrayList<Channel>(), channeldigraph, pm, false);
+        m.GenerateSubcolumns();
+        Check = m.IterateThroughKn();
+        junctions = checkJunctionCandidates(m.getJunctionCandidates());
+    }
+
+    public void junctionSearch(ArrayList<Channel> subgraph) {
+        jPrepare.jPrepare(subgraph);
+        entries = jPrepare.getEntries();
+        exits = jPrepare.getExits();
+        jProcess = new JProcess(subgraph, channeldigraph);
+        jProcess.jProcess(jPrepare.getEntries());
+        this.collectECandidates(subgraph);
+        this.ConstructGrid();
+        jPrepare.resetSubgraph();
+        m = new JMinimality(Grid, n, E, new ArrayList<Channel>(), new ArrayList<Channel>(), channeldigraph, false);
+        startGenerate = System.currentTimeMillis();
+        m.GenerateSubcolumns();
+        startIterate = System.currentTimeMillis();
+        Check = m.IterateThroughKn();
+        stopIterate = System.currentTimeMillis();
+        junctions = checkJunctionCandidates(m.getJunctionCandidates());
+    }
+
+    /**
+     * Überprüft die Kreuzunskandidaten, die JMinimality gefunden hat, welche davon eine Kreuzung darstellen (eine Kreuzung
+     * darf keine weiteren Kreuzungen enthalten)
+     */
+    private ArrayList<HashSet<Channel>> checkJunctionCandidates(ArrayList<HashSet<Channel>> junctioncandidates){
+        @SuppressWarnings("unchecked")
         ArrayList<HashSet<Channel>> junctions = (ArrayList<HashSet<Channel>>) junctioncandidates.clone();
-		for (int i = 0; i < junctioncandidates.size(); i++) {
-			for (int j = 0; j < junctioncandidates.size(); j++) {
-				if (junctioncandidates.get(i).containsAll(junctioncandidates.get(j))) {
-					junctions.removeAll(junctioncandidates.get(i));
-				}
-				else {
-				}
-			}
-		}
-		return junctions;
-	}
-
-
-	private void collectECandidates(ArrayList<Channel> subgraph) {
-		E = new ArrayList<Channel>();
-		for (int i = 0; i < subgraph.size(); i++) {
-			if ((subgraph.get(i).getIndegree() + subgraph.get(i).getOutdegree() >= 3)
-					|| entries.contains(subgraph.get(i))
-					|| exits.contains(subgraph.get(i))) {
-				E.add(subgraph.get(i));
-			}
-		}
-	}
-
-	private void ConstructGrid() {
-		Grid = new int[E.size()][E.size()];
-		for (int y = 0; y < E.size(); y++) {
-			for (int x = 0; x < E.size(); x++) {
-				if (x != y && !(entries.contains(E.get(x)))
-						&& !(exits.contains(E.get(y)))
-						&& E.get(y).getReachableNodes().contains(E.get(x))) {
-					Grid[y][x] = 1;
-					//log.trace("Grid-Position auf 1 gesetzT (y/x): " + y + ":"
-					//		+ x + "(Entry/exit):" + E.get(y).getNewid() + ":" +
-					//		E.get(x).getNewid());
-				} else {
-					Grid[y][x] = 0;
-				}
-			}
-		}
-	}
-
-	public long getMeasuredIterateTime() {
-		return (stopIterate - startIterate);
-	}
-
-	public long getMeasuredGenerateTime() {
-		return (startIterate - startGenerate);
-	}
-
-	public ArrayList<Channel> getSubgraph() {
-		return subgraph;
-	}
-
-	public void setSubgraph(ArrayList<Channel> subgraph) {
-		this.subgraph = subgraph;
-	}
-
-	public ArrayList<Channel> getEntries() {
-		return entries;
-	}
-
-	public void setEntries(ArrayList<Channel> entries) {
-		this.entries = entries;
-	}
-
-	public ArrayList<Channel> getExits() {
-		return exits;
-	}
-
-	public void setExits(ArrayList<Channel> exits) {
-		this.exits = exits;
-	}
-
-	public ArrayList<Channel> getCycleedges() {
-		return cycleedges;
-	}
-
-	public void setCycleedges(ArrayList<Channel> cycleedges) {
-		this.cycleedges = cycleedges;
-	}
-
-	public int getN() {
-		return n;
-	}
-
-	public void setN(int n) {
-		this.n = n;
-	}
-
-	/**
-	 * gibt die kleinere, gefundene Kreuzung zurück (wenn es sie gibt)
-	 *
-	 * @return
-	 */
-	public ArrayList<Channel> getSubJunction() {
-		return subjunction;
-	}
-
-	/**
-	 * gibt das Ergebnis des JCheck zurück (bei false keine generelle Aussage
-	 * möglich)
-	 *
-	 * @return false = keine Kreuzung ODER enthält kleinere Kreuzung true =
-	 *         Kreuzung
-	 *
-	 */
-	public boolean getCheck() {
-		return Check;
-	}
-
-	/**
-	 * gibt den Wert des JMinimality zurück (wenn er ausgeführt wurde)
-	 *
-	 * @return true = keine kleinere kreuzung, false = kleinere kreuzung
-	 *         enthalten
-	 */
-	public boolean isSmallerJunction() {
-		return smallerJunction;
-	}
-
-	/**
-	 * das Ergebnis des JCheck als String
-	 *
-	 * @return
-	 */
-	public String getJCheckResult() {
-		return jCheck.getResult();
-	}
-
-	/**
-	 * gitb die bei der Kruezungssuche gefundenen Kreuzungen zurück, sonst
-	 * nichts
-	 *
-	 * @return
-	 */
-	public ArrayList<HashSet<Channel>> getJunctions() {
-		return junctions;
-	}
+        for (int i = 0; i < junctioncandidates.size(); i++) {
+            for (int j = 0; j < junctioncandidates.size(); j++) {
+                if (junctioncandidates.get(i).containsAll(junctioncandidates.get(j))) {
+                    junctions.removeAll(junctioncandidates.get(i));
+                }
+                else {
+                }
+            }
+        }
+        return junctions;
+    }
+
+
+    private void collectECandidates(ArrayList<Channel> subgraph) {
+        E = new ArrayList<Channel>();
+        for (int i = 0; i < subgraph.size(); i++) {
+            if ((subgraph.get(i).getIndegree() + subgraph.get(i).getOutdegree() >= 3)
+                    || entries.contains(subgraph.get(i))
+                    || exits.contains(subgraph.get(i))) {
+                E.add(subgraph.get(i));
+            }
+        }
+    }
+
+    private void ConstructGrid() {
+        Grid = new int[E.size()][E.size()];
+        for (int y = 0; y < E.size(); y++) {
+            for (int x = 0; x < E.size(); x++) {
+                if (x != y && !(entries.contains(E.get(x)))
+                        && !(exits.contains(E.get(y)))
+                        && E.get(y).getReachableNodes().contains(E.get(x))) {
+                    Grid[y][x] = 1;
+                    //log.trace("Grid-Position auf 1 gesetzT (y/x): " + y + ":"
+                    //        + x + "(Entry/exit):" + E.get(y).getNewid() + ":" +
+                    //        E.get(x).getNewid());
+                } else {
+                    Grid[y][x] = 0;
+                }
+            }
+        }
+    }
+
+    public long getMeasuredIterateTime() {
+        return (stopIterate - startIterate);
+    }
+
+    public long getMeasuredGenerateTime() {
+        return (startIterate - startGenerate);
+    }
+
+    public ArrayList<Channel> getSubgraph() {
+        return subgraph;
+    }
+
+    public void setSubgraph(ArrayList<Channel> subgraph) {
+        this.subgraph = subgraph;
+    }
+
+    public ArrayList<Channel> getEntries() {
+        return entries;
+    }
+
+    public void setEntries(ArrayList<Channel> entries) {
+        this.entries = entries;
+    }
+
+    public ArrayList<Channel> getExits() {
+        return exits;
+    }
+
+    public void setExits(ArrayList<Channel> exits) {
+        this.exits = exits;
+    }
+
+    public ArrayList<Channel> getCycleedges() {
+        return cycleedges;
+    }
+
+    public void setCycleedges(ArrayList<Channel> cycleedges) {
+        this.cycleedges = cycleedges;
+    }
+
+    public int getN() {
+        return n;
+    }
+
+    public void setN(int n) {
+        this.n = n;
+    }
+
+    /**
+     * gibt die kleinere, gefundene Kreuzung zurück (wenn es sie gibt)
+     *
+     * @return
+     */
+    public ArrayList<Channel> getSubJunction() {
+        return subjunction;
+    }
+
+    /**
+     * gibt das Ergebnis des JCheck zurück (bei false keine generelle Aussage
+     * möglich)
+     *
+     * @return false = keine Kreuzung ODER enthält kleinere Kreuzung true =
+     *         Kreuzung
+     *
+     */
+    public boolean getCheck() {
+        return Check;
+    }
+
+    /**
+     * gibt den Wert des JMinimality zurück (wenn er ausgeführt wurde)
+     *
+     * @return true = keine kleinere kreuzung, false = kleinere kreuzung
+     *         enthalten
+     */
+    public boolean isSmallerJunction() {
+        return smallerJunction;
+    }
+
+    /**
+     * das Ergebnis des JCheck als String
+     *
+     * @return
+     */
+    public String getJCheckResult() {
+        return jCheck.getResult();
+    }
+
+    /**
+     * gitb die bei der Kruezungssuche gefundenen Kreuzungen zurück, sonst
+     * nichts
+     *
+     * @return
+     */
+    public ArrayList<HashSet<Channel>> getJunctions() {
+        return junctions;
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/TRDFS.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/TRDFS.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/junctionchecking/TRDFS.java	(revision 30725)
@@ -13,63 +13,63 @@
 public class TRDFS {
 
-	private final ArrayList<Channel> vertices;
-	private Channel startNode;
-	private final ArrayList<LeadsTo> cycleEdges;
-	private final ChannelDiGraph digraph;
+    private final ArrayList<Channel> vertices;
+    private Channel startNode;
+    private final ArrayList<LeadsTo> cycleEdges;
+    private final ChannelDiGraph digraph;
 
-	/**
-	 * 
-	 * 
-	 * @param adnodes
-	 */
-	public TRDFS(ArrayList<Channel> adnodes, ChannelDiGraph digraph) {
-		this.vertices = adnodes;
-		this.digraph = digraph;
-		this.cycleEdges = new ArrayList<LeadsTo>();
-	}
+    /**
+     * 
+     * 
+     * @param adnodes
+     */
+    public TRDFS(ArrayList<Channel> adnodes, ChannelDiGraph digraph) {
+        this.vertices = adnodes;
+        this.digraph = digraph;
+        this.cycleEdges = new ArrayList<LeadsTo>();
+    }
 
 
-	public void trdfs(Channel startNode) {
-		Channel succNode;
-		startNode.setVisited(BacktrackingColors.GREY);
-		startNode.addReachableNode(startNode);
-		startNode.appendChannelToPath(startNode, startNode);
-		for (int i = 0; i < startNode.getLeadsTo().size(); i++) {
-			succNode = startNode.getLeadsTo().get(i).getToChannel();
-			if (succNode.isSubgraph()) {
-				if (succNode.getVisited() == BacktrackingColors.WHITE) {
-					digraph.setForwardEdge(startNode, succNode);
-					trdfs(succNode);
-				} else if (succNode.getVisited() == BacktrackingColors.GREY) {
-					cycleEdges.add(digraph.getLeadsTo(startNode,
-							succNode));
-				}
-				for (int j = 0; j < succNode.getReachableNodes().size(); j++) {
+    public void trdfs(Channel startNode) {
+        Channel succNode;
+        startNode.setVisited(BacktrackingColors.GREY);
+        startNode.addReachableNode(startNode);
+        startNode.appendChannelToPath(startNode, startNode);
+        for (int i = 0; i < startNode.getLeadsTo().size(); i++) {
+            succNode = startNode.getLeadsTo().get(i).getToChannel();
+            if (succNode.isSubgraph()) {
+                if (succNode.getVisited() == BacktrackingColors.WHITE) {
+                    digraph.setForwardEdge(startNode, succNode);
+                    trdfs(succNode);
+                } else if (succNode.getVisited() == BacktrackingColors.GREY) {
+                    cycleEdges.add(digraph.getLeadsTo(startNode,
+                            succNode));
+                }
+                for (int j = 0; j < succNode.getReachableNodes().size(); j++) {
 
-					startNode.addReachableNode(succNode.getReachableNodeAt(j));
-					succNode.appendChannelToPath(succNode.getReachableNodeAt(j), succNode.getReachableNodeAt(j));
-					succNode.appendChannelToPath(succNode.getReachableNodeAt(j), succNode);
-					startNode.appendPath(succNode.getReachableNodeAt(j), succNode.getPathsAt(succNode.getReachableNodeAt(j)));
-				}
-			}
+                    startNode.addReachableNode(succNode.getReachableNodeAt(j));
+                    succNode.appendChannelToPath(succNode.getReachableNodeAt(j), succNode.getReachableNodeAt(j));
+                    succNode.appendChannelToPath(succNode.getReachableNodeAt(j), succNode);
+                    startNode.appendPath(succNode.getReachableNodeAt(j), succNode.getPathsAt(succNode.getReachableNodeAt(j)));
+                }
+            }
 
-		}
-		startNode.setVisited(BacktrackingColors.BLACK);
-	}
+        }
+        startNode.setVisited(BacktrackingColors.BLACK);
+    }
 
-	public void ereaseCycleEdges() {
-		cycleEdges.clear();
-	}
+    public void ereaseCycleEdges() {
+        cycleEdges.clear();
+    }
 
-	public int getCycleedgesSize() {
-		return cycleEdges.size();
-	}
+    public int getCycleedgesSize() {
+        return cycleEdges.size();
+    }
 
-	public LeadsTo getCycleEdgeAt(int i) {
-		return cycleEdges.get(i);
-	}
+    public LeadsTo getCycleEdgeAt(int i) {
+        return cycleEdges.get(i);
+    }
 
-	public ArrayList<LeadsTo> getCycleEdges() {
-		return cycleEdges;
-	}
+    public ArrayList<LeadsTo> getCycleEdges() {
+        return cycleEdges;
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/ColorSchemeXMLReader.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/ColorSchemeXMLReader.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/ColorSchemeXMLReader.java	(revision 30725)
@@ -8,48 +8,48 @@
 public class ColorSchemeXMLReader extends XMLReader{
 
-	private HashMap<String, Color> colorScheme;
+    private HashMap<String, Color> colorScheme;
 
-	public ColorSchemeXMLReader(String filename) {
-		super(filename);
-		parseXML();
-	}
+    public ColorSchemeXMLReader(String filename) {
+        super(filename);
+        parseXML();
+    }
 
-	/**
-	 * gibt die zu dieser Objektklasse gespeicherte Farbe zurück
-	 * @param s Objektklasse
-	 * @return die passende Farbe, existiert keine wird grey zurückgegeben
-	 */
-	public Color getColor(String s) {
-		if (colorScheme.containsKey(s)) {
-			return colorScheme.get(s);
-		}
-		else {
-			return Color.GRAY;
-		}
-	}
+    /**
+     * gibt die zu dieser Objektklasse gespeicherte Farbe zurück
+     * @param s Objektklasse
+     * @return die passende Farbe, existiert keine wird grey zurückgegeben
+     */
+    public Color getColor(String s) {
+        if (colorScheme.containsKey(s)) {
+            return colorScheme.get(s);
+        }
+        else {
+            return Color.GRAY;
+        }
+    }
 
-	@Override
-	public void parseXML() {
-		colorScheme = new HashMap<String, Color>();
-		String tempValue;
-		//String tempKeyValue ="";
-		try {
-			while (parser.hasNext()) {
-				switch (parser.getEventType()) {
+    @Override
+    public void parseXML() {
+        colorScheme = new HashMap<String, Color>();
+        String tempValue;
+        //String tempKeyValue ="";
+        try {
+            while (parser.hasNext()) {
+                switch (parser.getEventType()) {
 
-				case XMLStreamConstants.START_ELEMENT:
-					tempValue = parser.getAttributeValue(null, "color");
-					if (tempValue != null) {
-						String[] erg = tempValue.split(",");
-						Color c = new Color(Integer.parseInt(erg[0]), Integer.parseInt(erg[1]), Integer.parseInt(erg[2]));
-						colorScheme.put(parser.getLocalName(),c);
-					}
-					break;
-				}
-				parser.next();
-			}
-		} catch (XMLStreamException e) {
-			System.out.println(e);
-		}
-	}
+                case XMLStreamConstants.START_ELEMENT:
+                    tempValue = parser.getAttributeValue(null, "color");
+                    if (tempValue != null) {
+                        String[] erg = tempValue.split(",");
+                        Color c = new Color(Integer.parseInt(erg[0]), Integer.parseInt(erg[1]), Integer.parseInt(erg[2]));
+                        colorScheme.put(parser.getLocalName(),c);
+                    }
+                    break;
+                }
+                parser.next();
+            }
+        } catch (XMLStreamException e) {
+            System.out.println(e);
+        }
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/OSMXMLReader.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/OSMXMLReader.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/OSMXMLReader.java	(revision 30725)
@@ -16,172 +16,172 @@
 public class OSMXMLReader extends XMLReader {
 
-	private OSMGraph osmgraph = new OSMGraph();
+    private OSMGraph osmgraph = new OSMGraph();
 
-	public OSMXMLReader(String filename) {
-		super(filename);
-	}
+    public OSMXMLReader(String filename) {
+        super(filename);
+    }
 
-	public OSMXMLReader(File file) {
-		super(file);
-	}
+    public OSMXMLReader(File file) {
+        super(file);
+    }
 
-	private void readAttributes(OSMEntity entity) {
-		String temp = parser.getAttributeValue(null, "changeset");
-		if (temp != null) {
-			entity.setChangeset(Integer.parseInt(temp));
-		}
-		entity.setId(Long.parseLong(parser.getAttributeValue(null, "id")));
-		entity.setTimestamp(parser.getAttributeValue(null, "timestamp"));
+    private void readAttributes(OSMEntity entity) {
+        String temp = parser.getAttributeValue(null, "changeset");
+        if (temp != null) {
+            entity.setChangeset(Integer.parseInt(temp));
+        }
+        entity.setId(Long.parseLong(parser.getAttributeValue(null, "id")));
+        entity.setTimestamp(parser.getAttributeValue(null, "timestamp"));
 
-		temp = parser.getAttributeValue(null, "uid");
-		if (temp != null)
-			entity.setUid(Integer.parseInt(temp));
+        temp = parser.getAttributeValue(null, "uid");
+        if (temp != null)
+            entity.setUid(Integer.parseInt(temp));
 
-		temp = parser.getAttributeValue(null, "uid");
-		if (temp != null) {
-			entity.setUid(Integer.parseInt(temp));
-		}
-		entity.setUser(parser.getAttributeValue(null, "user"));
+        temp = parser.getAttributeValue(null, "uid");
+        if (temp != null) {
+            entity.setUid(Integer.parseInt(temp));
+        }
+        entity.setUser(parser.getAttributeValue(null, "user"));
 
-		temp = parser.getAttributeValue(null, "visible");
-		if (temp != null) {
-			if (temp.equals("true") || temp.equals("1")) {
-				entity.setVisible(true);
-			}
-		} else {
-			entity.setVisible(false);
-		}
-		temp = parser.getAttributeValue(null, "version");
-		if (temp != null) {
-			entity.setversion(Integer.parseInt(temp));
-		}
-	}
+        temp = parser.getAttributeValue(null, "visible");
+        if (temp != null) {
+            if (temp.equals("true") || temp.equals("1")) {
+                entity.setVisible(true);
+            }
+        } else {
+            entity.setVisible(false);
+        }
+        temp = parser.getAttributeValue(null, "version");
+        if (temp != null) {
+            entity.setversion(Integer.parseInt(temp));
+        }
+    }
 
-	private void readMember(OSMRelation relation) {
-		if (parser.getAttributeValue(null, "type").equals("node")) {
-			relation.addMember(osmgraph.getNode(Integer.parseInt(parser
-					.getAttributeValue(null, "ref"))), parser
-					.getAttributeValue(null, "role"));
-		}
-		else if (parser.getAttributeValue(null, "type").equals("way")) {
-			relation.addMember(osmgraph.getWay(Long.parseLong(parser
-					.getAttributeValue(null, "ref"))), parser
-					.getAttributeValue(null, "role"));
-		}
-		else if (parser.getAttributeValue(null, "type").equals("relation")) {
-			relation.addMember(osmgraph.getRelation(Integer.parseInt(parser
-					.getAttributeValue(null, "ref"))), parser
-					.getAttributeValue(null, "role"));
-		}
-	}
+    private void readMember(OSMRelation relation) {
+        if (parser.getAttributeValue(null, "type").equals("node")) {
+            relation.addMember(osmgraph.getNode(Integer.parseInt(parser
+                    .getAttributeValue(null, "ref"))), parser
+                    .getAttributeValue(null, "role"));
+        }
+        else if (parser.getAttributeValue(null, "type").equals("way")) {
+            relation.addMember(osmgraph.getWay(Long.parseLong(parser
+                    .getAttributeValue(null, "ref"))), parser
+                    .getAttributeValue(null, "role"));
+        }
+        else if (parser.getAttributeValue(null, "type").equals("relation")) {
+            relation.addMember(osmgraph.getRelation(Integer.parseInt(parser
+                    .getAttributeValue(null, "ref"))), parser
+                    .getAttributeValue(null, "role"));
+        }
+    }
 
-	@Override
-	public void parseXML() {
-		String xmlelement;
-		OSMNode node = new OSMNode();
-		OSMWay way = new OSMWay();
-		OSMRelation relation = new OSMRelation();
-		HashMap<String, String> hashmap = new HashMap<String, String>();
-		try {
-			while (parser.hasNext()) {
-				switch (parser.getEventType()) {
+    @Override
+    public void parseXML() {
+        String xmlelement;
+        OSMNode node = new OSMNode();
+        OSMWay way = new OSMWay();
+        OSMRelation relation = new OSMRelation();
+        HashMap<String, String> hashmap = new HashMap<String, String>();
+        try {
+            while (parser.hasNext()) {
+                switch (parser.getEventType()) {
 
-				case XMLStreamConstants.START_ELEMENT:
-					xmlelement = parser.getLocalName();
+                case XMLStreamConstants.START_ELEMENT:
+                    xmlelement = parser.getLocalName();
 
-					if (xmlelement.equals("node")) {
-						node = new OSMNode();
-						hashmap = new HashMap<String, String>();
-						readAttributes(node);
-						node.setLatitude(Double.parseDouble(parser
-								.getAttributeValue(null, "lat")));
-						node.setLongitude(Double.parseDouble(parser
-								.getAttributeValue(null, "lon")));
-					}
+                    if (xmlelement.equals("node")) {
+                        node = new OSMNode();
+                        hashmap = new HashMap<String, String>();
+                        readAttributes(node);
+                        node.setLatitude(Double.parseDouble(parser
+                                .getAttributeValue(null, "lat")));
+                        node.setLongitude(Double.parseDouble(parser
+                                .getAttributeValue(null, "lon")));
+                    }
 
-					if (xmlelement.equals("way")) {
-						way = new OSMWay();
-						hashmap = new HashMap<String, String>();
-						readAttributes(way);
-					}
+                    if (xmlelement.equals("way")) {
+                        way = new OSMWay();
+                        hashmap = new HashMap<String, String>();
+                        readAttributes(way);
+                    }
 
-					if (xmlelement.equals("relation")) {
-						relation = new OSMRelation();
-						hashmap = new HashMap<String, String>();
-						readAttributes(relation);
-					}
+                    if (xmlelement.equals("relation")) {
+                        relation = new OSMRelation();
+                        hashmap = new HashMap<String, String>();
+                        readAttributes(relation);
+                    }
 
-					if (xmlelement.equals("member")) {
-						readMember(relation);
-					}
+                    if (xmlelement.equals("member")) {
+                        readMember(relation);
+                    }
 
-					if (xmlelement.equals("bounds")) {
-						osmgraph.setBbbottom(Double.parseDouble(parser
-								.getAttributeValue(null, "minlat")));
-						osmgraph.setBbtop(Double.parseDouble(parser
-								.getAttributeValue(null, "maxlat")));
-						osmgraph.setBbleft(Double.parseDouble(parser
-								.getAttributeValue(null, "minlon")));
-						osmgraph.setBbright(Double.parseDouble(parser
-								.getAttributeValue(null, "maxlon")));
-					}
+                    if (xmlelement.equals("bounds")) {
+                        osmgraph.setBbbottom(Double.parseDouble(parser
+                                .getAttributeValue(null, "minlat")));
+                        osmgraph.setBbtop(Double.parseDouble(parser
+                                .getAttributeValue(null, "maxlat")));
+                        osmgraph.setBbleft(Double.parseDouble(parser
+                                .getAttributeValue(null, "minlon")));
+                        osmgraph.setBbright(Double.parseDouble(parser
+                                .getAttributeValue(null, "maxlon")));
+                    }
 
-					if (xmlelement.equals("nd")) {
-						way.addNode(osmgraph.getNode(Integer.parseInt(parser
-								.getAttributeValue(0))));
-					}
+                    if (xmlelement.equals("nd")) {
+                        way.addNode(osmgraph.getNode(Integer.parseInt(parser
+                                .getAttributeValue(0))));
+                    }
 
-					if (xmlelement.equals("tag")) {
-						hashmap.put(parser.getAttributeValue(null, "k"), parser
-								.getAttributeValue(null, "v"));
-					}
+                    if (xmlelement.equals("tag")) {
+                        hashmap.put(parser.getAttributeValue(null, "k"), parser
+                                .getAttributeValue(null, "v"));
+                    }
 
-					if (xmlelement.equals("relation")) {
-						relation = new OSMRelation();
-						hashmap = new HashMap<String, String>();
-						readAttributes(relation);
-					}
+                    if (xmlelement.equals("relation")) {
+                        relation = new OSMRelation();
+                        hashmap = new HashMap<String, String>();
+                        readAttributes(relation);
+                    }
 
-					//TODO: kann wohl wech!
-					/*
-					if (xmlelement.equals("member")) {
-						relation.addMember(parser.getAttributeValue(null,
-								"type"), Integer.parseInt(parser
-								.getAttributeValue(null, "ref")), parser
-								.getAttributeValue(null, "role"));
-					}
-					 */
-					break;
+                    //TODO: kann wohl wech!
+                    /*
+                    if (xmlelement.equals("member")) {
+                        relation.addMember(parser.getAttributeValue(null,
+                                "type"), Integer.parseInt(parser
+                                .getAttributeValue(null, "ref")), parser
+                                .getAttributeValue(null, "role"));
+                    }
+                     */
+                    break;
 
-				case XMLStreamConstants.END_ELEMENT:
-					if (parser.getLocalName() == "node") {
-						node.setHashmap(hashmap);
-						osmgraph.addNode(node);
-					}
+                case XMLStreamConstants.END_ELEMENT:
+                    if (parser.getLocalName() == "node") {
+                        node.setHashmap(hashmap);
+                        osmgraph.addNode(node);
+                    }
 
-					if (parser.getLocalName() == "way") {
-						way.setHashmap(hashmap);
-						osmgraph.addWay(way);
-					}
+                    if (parser.getLocalName() == "way") {
+                        way.setHashmap(hashmap);
+                        osmgraph.addWay(way);
+                    }
 
-					if (parser.getLocalName().equals("relation")) {
-						relation.setHashmap(hashmap);
-						osmgraph.addRelation(relation);
-					}
-					break;
-				}
-				parser.next();
-			}
-		} catch (XMLStreamException e) {
-			e.printStackTrace();
-		}
-	}
+                    if (parser.getLocalName().equals("relation")) {
+                        relation.setHashmap(hashmap);
+                        osmgraph.addRelation(relation);
+                    }
+                    break;
+                }
+                parser.next();
+            }
+        } catch (XMLStreamException e) {
+            e.printStackTrace();
+        }
+    }
 
-	public void setOSMGraph(OSMGraph osmgraph) {
-		this.osmgraph = osmgraph;
-	}
+    public void setOSMGraph(OSMGraph osmgraph) {
+        this.osmgraph = osmgraph;
+    }
 
-	public OSMGraph getOSMGraph() {
-		return osmgraph;
-	}
+    public OSMGraph getOSMGraph() {
+        return osmgraph;
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/XMLFilterReader.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/XMLFilterReader.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/XMLFilterReader.java	(revision 30725)
@@ -11,49 +11,49 @@
 public class XMLFilterReader extends XMLReader{
 
-	Vector<Filter> filters;
-	Filter filter;
+    Vector<Filter> filters;
+    Filter filter;
 
-	public XMLFilterReader(String filename) {
-		super(filename);
-		filters = new Vector<Filter>();
-	}
+    public XMLFilterReader(String filename) {
+        super(filename);
+        filters = new Vector<Filter>();
+    }
 
-	@Override
-	public void parseXML() {
-		String tempValue ="";
-		String tempKeyValue ="";
-		try {
-			while (parser.hasNext()) {
+    @Override
+    public void parseXML() {
+        String tempValue ="";
+        String tempKeyValue ="";
+        try {
+            while (parser.hasNext()) {
 
-				switch (parser.getEventType()) {
-				case XMLStreamConstants.START_ELEMENT:
-					tempValue = parser.getAttributeValue(null, "entity");
-					if (tempValue.equals("k")) {
-						filter = new Filter();
-						filter.setKeyValue(parser.getLocalName());
-						tempKeyValue = parser.getLocalName();
-					}
-					if (tempValue.equalsIgnoreCase("v")) {
-						filter.setTagValue(parser.getLocalName());
-					}
-					break;
+                switch (parser.getEventType()) {
+                case XMLStreamConstants.START_ELEMENT:
+                    tempValue = parser.getAttributeValue(null, "entity");
+                    if (tempValue.equals("k")) {
+                        filter = new Filter();
+                        filter.setKeyValue(parser.getLocalName());
+                        tempKeyValue = parser.getLocalName();
+                    }
+                    if (tempValue.equalsIgnoreCase("v")) {
+                        filter.setTagValue(parser.getLocalName());
+                    }
+                    break;
 
-				case XMLStreamConstants.END_ELEMENT:
-					if (tempKeyValue.equalsIgnoreCase(parser.getLocalName())) {
-						filters.add(filter);
-					}
-					break;
+                case XMLStreamConstants.END_ELEMENT:
+                    if (tempKeyValue.equalsIgnoreCase(parser.getLocalName())) {
+                        filters.add(filter);
+                    }
+                    break;
 
-				}
-				parser.next();
-			}
-		} catch (XMLStreamException e) {
-			e.printStackTrace();
-		}
-	}
+                }
+                parser.next();
+            }
+        } catch (XMLStreamException e) {
+            e.printStackTrace();
+        }
+    }
 
-	public Filter[] getFilters() {
-		Filter[] filterarray= new Filter[filters.size()];
-		return filters.toArray(filterarray);
-	}
+    public Filter[] getFilters() {
+        Filter[] filterarray= new Filter[filters.size()];
+        return filters.toArray(filterarray);
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/XMLReader.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/XMLReader.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/reader/XMLReader.java	(revision 30725)
@@ -9,29 +9,29 @@
 
 public  abstract class XMLReader {
-	
-	protected String filename;
-	protected XMLInputFactory factory = XMLInputFactory.newInstance();
-	protected XMLStreamReader parser;
-	 
-	public XMLReader(String filename) {
-		try {
-			parser = factory
-				.createXMLStreamReader(this.getClass().getResourceAsStream(filename));
-		} catch (XMLStreamException e) {
-			e.printStackTrace();
-		}
-	}
-	
-	public XMLReader(File file) {
-		try {
-			parser = factory
-					.createXMLStreamReader(new FileInputStream(file));
-		} catch (FileNotFoundException e) {
-			e.printStackTrace();
-		} catch (XMLStreamException e) {
-			e.printStackTrace();
-		}
-	}
-	
-	public abstract void parseXML();
+    
+    protected String filename;
+    protected XMLInputFactory factory = XMLInputFactory.newInstance();
+    protected XMLStreamReader parser;
+     
+    public XMLReader(String filename) {
+        try {
+            parser = factory
+                .createXMLStreamReader(this.getClass().getResourceAsStream(filename));
+        } catch (XMLStreamException e) {
+            e.printStackTrace();
+        }
+    }
+    
+    public XMLReader(File file) {
+        try {
+            parser = factory
+                    .createXMLStreamReader(new FileInputStream(file));
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        } catch (XMLStreamException e) {
+            e.printStackTrace();
+        }
+    }
+    
+    public abstract void parseXML();
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/util/RelationProducer.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/util/RelationProducer.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/util/RelationProducer.java	(revision 30725)
@@ -19,47 +19,47 @@
 public class RelationProducer {
 
-	private JunctionCheckerPlugin plugin;
-	private HashSet<HashSet<Channel>> storedRelations;
+    private JunctionCheckerPlugin plugin;
+    private HashSet<HashSet<Channel>> storedRelations;
 
-	public RelationProducer(JunctionCheckerPlugin plugin) {
-		this.plugin = plugin;
-		storedRelations = new HashSet<HashSet<Channel>>();
-	}
+    public RelationProducer(JunctionCheckerPlugin plugin) {
+        this.plugin = plugin;
+        storedRelations = new HashSet<HashSet<Channel>>();
+    }
 
-	public void produceRelation(HashSet<Channel> subset, int n) {
-		if (isProduced(subset)) {
-			return;
-		}
-		LinkedList<OsmPrimitive> ways = new LinkedList<OsmPrimitive>();
-		Iterator<Channel> cit = subset.iterator();
-		while (cit.hasNext()) {
-			Channel c = cit.next();
-			// System.out.println(c.getWay().getId());
-			if (!(ways.contains(plugin.getOsmlayer().data.getPrimitiveById(c
-					.getWay().getId(), OsmPrimitiveType.WAY)))) {
-				ways.add(plugin.getOsmlayer().data.getPrimitiveById(c.getWay()
-						.getId(), OsmPrimitiveType.WAY));
-			}
-		}
-		Main.map.mapView.setActiveLayer(plugin.getOsmlayer());
-		plugin.getOsmlayer().data.setSelected(ways);
+    public void produceRelation(HashSet<Channel> subset, int n) {
+        if (isProduced(subset)) {
+            return;
+        }
+        LinkedList<OsmPrimitive> ways = new LinkedList<OsmPrimitive>();
+        Iterator<Channel> cit = subset.iterator();
+        while (cit.hasNext()) {
+            Channel c = cit.next();
+            // System.out.println(c.getWay().getId());
+            if (!(ways.contains(plugin.getOsmlayer().data.getPrimitiveById(c
+                    .getWay().getId(), OsmPrimitiveType.WAY)))) {
+                ways.add(plugin.getOsmlayer().data.getPrimitiveById(c.getWay()
+                        .getId(), OsmPrimitiveType.WAY));
+            }
+        }
+        Main.map.mapView.setActiveLayer(plugin.getOsmlayer());
+        plugin.getOsmlayer().data.setSelected(ways);
 
-		Relation jrelation = new Relation();
-		jrelation.put("type", "junction");
-		jrelation.put("n", Integer.toString(n));
-		for (int i = 0; i < ways.size(); i++) {
-			jrelation.addMember(new RelationMember("part of", ways.get(i)));
-		}
+        Relation jrelation = new Relation();
+        jrelation.put("type", "junction");
+        jrelation.put("n", Integer.toString(n));
+        for (int i = 0; i < ways.size(); i++) {
+            jrelation.addMember(new RelationMember("part of", ways.get(i)));
+        }
 
-		plugin.getOsmlayer().data.addPrimitive(jrelation);
-	}
+        plugin.getOsmlayer().data.addPrimitive(jrelation);
+    }
 
-	private boolean isProduced(HashSet<Channel> subset) {
-		if (storedRelations.contains(subset)) {
-			return true;
-		} else {
-			storedRelations.add(subset);
-		}
-		return false;
-	}
+    private boolean isProduced(HashSet<Channel> subset) {
+        if (storedRelations.contains(subset)) {
+            return true;
+        } else {
+            storedRelations.add(subset);
+        }
+        return false;
+    }
 }
Index: /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/writing/OSMXMLWriter.java
===================================================================
--- /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/writing/OSMXMLWriter.java	(revision 30724)
+++ /applications/editors/josm/plugins/junctionchecking/src/org/openstreetmap/josm/plugins/JunctionChecker/writing/OSMXMLWriter.java	(revision 30725)
@@ -22,64 +22,64 @@
 public class OSMXMLWriter {
 
-	String filename;
-	ChannelDiGraph digraph;
-	XMLStreamWriter writer;
+    String filename;
+    ChannelDiGraph digraph;
+    XMLStreamWriter writer;
 
-	public OSMXMLWriter(String filename, ChannelDiGraph digraph) {
-		this.filename = filename;
-		this.digraph = digraph;
-	}
+    public OSMXMLWriter(String filename, ChannelDiGraph digraph) {
+        this.filename = filename;
+        this.digraph = digraph;
+    }
 
-	public void writeXML() throws FileNotFoundException, XMLStreamException {
-		XMLOutputFactory factory = XMLOutputFactory.newInstance();
-		writer = factory.createXMLStreamWriter(
-		                                   new FileOutputStream(  filename ) );
-		// Der XML-Header wird erzeugt
-		writer.writeStartDocument("utf-8", "1.0");
-		// Zuerst wird das Wurzelelement mit Attribut geschrieben
-		  writer.writeStartElement( "osm" );
-		    writer.writeAttribute( "version", "0.6" );
-		    writer.writeAttribute("generator", "channelGenerator");
+    public void writeXML() throws FileNotFoundException, XMLStreamException {
+        XMLOutputFactory factory = XMLOutputFactory.newInstance();
+        writer = factory.createXMLStreamWriter(
+                                           new FileOutputStream(  filename ) );
+        // Der XML-Header wird erzeugt
+        writer.writeStartDocument("utf-8", "1.0");
+        // Zuerst wird das Wurzelelement mit Attribut geschrieben
+          writer.writeStartElement( "osm" );
+            writer.writeAttribute( "version", "0.6" );
+            writer.writeAttribute("generator", "channelGenerator");
 
-		    writer.writeEmptyElement("bounds");
-		    writer.writeAttribute("minlat", Double.toString(digraph.getBbbottom()));
-		    writer.writeAttribute("minlon", Double.toString(digraph.getBbleft()));
-		    writer.writeAttribute("maxlat", Double.toString(digraph.getBbtop()));
-		    writer.writeAttribute("maxlon", Double.toString(digraph.getBbright()));
+            writer.writeEmptyElement("bounds");
+            writer.writeAttribute("minlat", Double.toString(digraph.getBbbottom()));
+            writer.writeAttribute("minlon", Double.toString(digraph.getBbleft()));
+            writer.writeAttribute("maxlat", Double.toString(digraph.getBbtop()));
+            writer.writeAttribute("maxlon", Double.toString(digraph.getBbright()));
 
 
-		    OSMNode[] nodes = digraph.getAllOSMNodes();
-		    for (int i = 0; i < nodes.length; i++) {
-		    	//writer.writeStartElement("node");
-		    	writer.writeEmptyElement("node");
-		    	writeAttributes(nodes[i]);
-			}
+            OSMNode[] nodes = digraph.getAllOSMNodes();
+            for (int i = 0; i < nodes.length; i++) {
+                //writer.writeStartElement("node");
+                writer.writeEmptyElement("node");
+                writeAttributes(nodes[i]);
+            }
 
-		    ArrayList<Channel> ways = digraph.getChannels();
-		    for (int i = 0; i < ways.size(); i++) {
-				writer.writeStartElement("way");
-				writer.writeAttribute("id", Integer.toString(ways.get(i).getNewid()));
-				writeAttributes(ways.get(i).getWay());
-				  writer.writeEmptyElement("nd");
-				  writer.writeAttribute("ref", Long.toString(ways.get(i).getFromNode().getId()));
-				  //writer.writeEndElement();
-				  writer.writeEmptyElement("nd");
-				  writer.writeAttribute("ref", Long.toString(ways.get(i).getToNode().getId()));
-				  //writer.writeEndElement();
+            ArrayList<Channel> ways = digraph.getChannels();
+            for (int i = 0; i < ways.size(); i++) {
+                writer.writeStartElement("way");
+                writer.writeAttribute("id", Integer.toString(ways.get(i).getNewid()));
+                writeAttributes(ways.get(i).getWay());
+                  writer.writeEmptyElement("nd");
+                  writer.writeAttribute("ref", Long.toString(ways.get(i).getFromNode().getId()));
+                  //writer.writeEndElement();
+                  writer.writeEmptyElement("nd");
+                  writer.writeAttribute("ref", Long.toString(ways.get(i).getToNode().getId()));
+                  //writer.writeEndElement();
 
-				  HashMap<String, String> tags = ways.get(i).getWay().getHashmap();
-				  Set<String> keys = tags.keySet();
-				  String t;
-				  Iterator<String> iterator = keys.iterator();
-				  while (iterator.hasNext()) {
-						t = iterator.next();
-						writer.writeEmptyElement("tag");
-						writer.writeAttribute("k", t);
-						writer.writeAttribute("v", tags.get(t));
-					  }
-				  writer.writeEmptyElement("tag");
-				  writer.writeAttribute("k", "ID");
-				  writer.writeAttribute("v", Integer.toString(ways.get(i).getNewid()));
-				  writer.writeEmptyElement("tag");
+                  HashMap<String, String> tags = ways.get(i).getWay().getHashmap();
+                  Set<String> keys = tags.keySet();
+                  String t;
+                  Iterator<String> iterator = keys.iterator();
+                  while (iterator.hasNext()) {
+                        t = iterator.next();
+                        writer.writeEmptyElement("tag");
+                        writer.writeAttribute("k", t);
+                        writer.writeAttribute("v", tags.get(t));
+                      }
+                  writer.writeEmptyElement("tag");
+                  writer.writeAttribute("k", "ID");
+                  writer.writeAttribute("v", Integer.toString(ways.get(i).getNewid()));
+                  writer.writeEmptyElement("tag");
                   writer.writeAttribute("k", "SCC");
                   if (ways.get(i).isStrongConnected()) {
@@ -90,25 +90,25 @@
                   }
                   writer.writeEndElement();
-			}
+            }
 
-		  writer.writeEndElement();
-		writer.writeEndDocument();
-		writer.close();
-	}
+          writer.writeEndElement();
+        writer.writeEndDocument();
+        writer.close();
+    }
 
-	private void writeAttributes(OSMEntity ent) throws FileNotFoundException, XMLStreamException{
-		if (ent instanceof OSMNode) {
-			writer.writeAttribute("id", Long.toString(ent.getId()) );
-			writer.writeAttribute("lat", Double.toString(((OSMNode) ent).getLatitude()));
-			writer.writeAttribute("lon", Double.toString(((OSMNode) ent).getLongitude()));
-		}
+    private void writeAttributes(OSMEntity ent) throws FileNotFoundException, XMLStreamException{
+        if (ent instanceof OSMNode) {
+            writer.writeAttribute("id", Long.toString(ent.getId()) );
+            writer.writeAttribute("lat", Double.toString(((OSMNode) ent).getLatitude()));
+            writer.writeAttribute("lon", Double.toString(((OSMNode) ent).getLongitude()));
+        }
 
-    	if (ent.getTimestamp()!=null) {
-    		writer.writeAttribute("timestamp", ent.getTimestamp());
-    	}
-    	if (ent.isVisible())
-    		writer.writeAttribute("visible", "true");
-    	else writer.writeAttribute("visible", "false");
-		writer.writeAttribute("version", Integer.toString(ent.getVersion()));
-	}
+        if (ent.getTimestamp()!=null) {
+            writer.writeAttribute("timestamp", ent.getTimestamp());
+        }
+        if (ent.isVisible())
+            writer.writeAttribute("visible", "true");
+        else writer.writeAttribute("visible", "false");
+        writer.writeAttribute("version", Integer.toString(ent.getVersion()));
+    }
 }
