System.out.println(" GEFeedbackLoop Collapse: source edges were equal"); System.out.println(" The container of the edge is " + ((GEStreamNode) ((DefaultPort)edge.getSource()).getParent()).getEncapsulatingNode());
	public void collapse()	{		Object[] nodeList = this.getContainedElements().toArray();		ConnectionSet cs = this.localGraphStruct.getConnectionSet();			this.localGraphStruct.getJGraph().getGraphLayoutCache().setVisible(new Object[]{this}, true);				Iterator splitEdgeIter = localGraphStruct.getGraphModel().edges(this.getSplitter().getPort());		Iterator joinEdgeIter = localGraphStruct.getGraphModel().edges(this.getJoiner().getPort());		ArrayList edgesToRemove =  new ArrayList();				while (joinEdgeIter.hasNext())		{			DefaultEdge edge = (DefaultEdge) joinEdgeIter.next();			Iterator sourceIter = this.getJoiner().getTargetEdges().iterator();			while(sourceIter.hasNext())			{				DefaultEdge target = (DefaultEdge) sourceIter.next();				if(target.equals(edge))				{					System.out.println(" GEFeedbackLoop Collapse: target edges were equal");					System.out.println(" The container of the edge is " + ((GEStreamNode) ((DefaultPort)edge.getSource()).getParent()).getEncapsulatingNode());					if (!(this.equals(((GEStreamNode) ((DefaultPort)edge.getSource()).getParent()).getEncapsulatingNode())))					{						cs.disconnect(edge, false);						cs.connect(edge, this.getPort(), false);						this.addTargetEdge(edge);						edgesToRemove.add(edge);					}				}			}		}		while (splitEdgeIter.hasNext())		{			DefaultEdge edge = (DefaultEdge) splitEdgeIter.next();			Iterator targetIter = this.getSplitter().getSourceEdges().iterator();			while(targetIter.hasNext())			{				DefaultEdge target = (DefaultEdge) targetIter.next();				if (target.equals(edge))				{					System.out.println(" GEFeedbackLoop Collapse: source edges were equal");					System.out.println(" The container of the edge is " + ((GEStreamNode) ((DefaultPort)edge.getSource()).getParent()).getEncapsulatingNode());					if (!(this.equals(((GEStreamNode) ((DefaultPort)edge.getTarget()).getParent()).getEncapsulatingNode())))					{						cs.disconnect(edge,true);						cs.connect(edge, this.getPort(),true);						this.addSourceEdge(edge);						edgesToRemove.add(edge);					}				}			}		}			Object[] removeArray = edgesToRemove.toArray();		for(int i = 0; i<removeArray.length;i++)		{			this.splitter.removeSourceEdge((DefaultEdge)removeArray[i]);			this.splitter.removeTargetEdge((DefaultEdge)removeArray[i]);			this.joiner.removeSourceEdge((DefaultEdge)removeArray[i]);			this.joiner.removeTargetEdge((DefaultEdge)removeArray[i]);		}			GraphConstants.setAutoSize(this.attributes, true);					this.localGraphStruct.getGraphModel().edit(localGraphStruct.getAttributes(), cs, null, null);		this.localGraphStruct.getJGraph().getGraphLayoutCache().setVisible(nodeList, false);				for (int i = level - 1; i >= 0; i--)		{			this.localGraphStruct.containerNodes.hideContainersAtLevel(i);		}			JGraphLayoutManager manager = new JGraphLayoutManager(this.localGraphStruct);		manager.arrange();			for (int i = level - 1; i >= 0; i--)		{			this.localGraphStruct.setLocationContainersAtLevel(i);		}					}