#vulnerable code 
                             @SuppressWarnings("unchecked")
	public <T extends Edge> T removeEdge(String from, String to)
			throws ElementNotFoundException {
		GraphicNode node0 = (GraphicNode) styleGroups.getNode(from);
		GraphicNode node1 = (GraphicNode) styleGroups.getNode(to);

		if (node0 != null && node1 != null) {
			ArrayList<GraphicEdge> edges0 = connectivity.get(node0);
			ArrayList<GraphicEdge> edges1 = connectivity.get(node1);

			for (GraphicEdge edge0 : edges0) {
				for (GraphicEdge edge1 : edges1) {
					if (edge0 == edge1) {
						removeEdge(edge0.getId());
						return (T) edge0;
					}
				}
			}
		}

		return null;
	} 
                            #location 12 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                             @SuppressWarnings("unchecked")
	public <T extends Edge> T removeEdge(String from, String to)
			throws ElementNotFoundException {
		GraphicNode node0 = (GraphicNode) styleGroups.getNode(from);
		GraphicNode node1 = (GraphicNode) styleGroups.getNode(to);

		if (node0 != null && node1 != null) {
			Collection<GraphicEdge> edges0 = connectivity.get(node0);
            Collection<GraphicEdge> edges1 = connectivity.get(node1);

			for (GraphicEdge edge0 : edges0) {
				for (GraphicEdge edge1 : edges1) {
					if (edge0 == edge1) {
						removeEdge(edge0.getId());
						return (T) edge0;
					}
				}
			}
		}

		return null;
	}